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:
parent
4d626daf5a
commit
9a4afed6fd
@ -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
|
||||
|
@ -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 */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user