1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Return a value on non-Windows systems without TIOCGWINSZ.

This commit is contained in:
hniksic 2004-01-29 04:38:52 -08:00
parent 4d626daf5a
commit 9a4afed6fd
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -1674,10 +1674,12 @@ determine_screen_width (void)
#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 */
}