+2004-01-29 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * utils.c (determine_screen_width): Return 0 if not running on
+ Windows or on a TIOCGWINSZ-capable system.
+
2004-01-28 David Fritz <zeroxdf@att.net>
* utils.c (determine_screen_width): Correctly determine console
#else /* not TIOCGWINSZ */
# ifdef WINDOWS
CONSOLE_SCREEN_BUFFER_INFO csbi;
- if (!GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &csbi))
+ if (!GetConsoleScreenBufferInfo (GetStdHandle (STD_ERROR_HANDLE), &csbi))
return 0;
return csbi.dwSize.X;
-# endif /* WINDOWS */
+# else /* neither WINDOWS nor TIOCGWINSZ */
+ return 0;
+#endif /* neither WINDOWS nor TIOCGWINSZ */
#endif /* not TIOCGWINSZ */
}