]> sjero.net Git - wget/commitdiff
[svn] Return a value on non-Windows systems without TIOCGWINSZ.
authorhniksic <devnull@localhost>
Thu, 29 Jan 2004 12:38:52 +0000 (04:38 -0800)
committerhniksic <devnull@localhost>
Thu, 29 Jan 2004 12:38:52 +0000 (04:38 -0800)
src/ChangeLog
src/utils.c

index 934be2354f8ecd2fd22cd7690c33a88cb85acae3..dacb4e7eeea4e30d7be1b1438fe19121125a6793 100644 (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
index c096b3e7e781dc0478658170b124a9da4544061b..2bb599359baa7a63f19bb9fa5309e5321c479546 100644 (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 */
 }