[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Progress bar on MS-Windows
From: |
Eli Zaretskii |
Subject: |
[Bug-wget] Progress bar on MS-Windows |
Date: |
Sat, 28 May 2016 21:54:13 +0300 |
Running wget from the Windows cmd window, I see that we write 1 column
too many, when we display "eta XXm YYs" -- this causes the next
progress bar be displayed on the next screen line. So I came up with
a small patch below, in the Windows specific portion of
determine_screen_width.
Does anyone else see this? I see this in Wget 1.16.1, but I don't see
any changes in the related code in the current Git master. Did I miss
something? If not, OK to push this change?
--- src/utils.c~0 2014-11-23 18:49:06.000000000 +0200
+++ src/utils.c 2016-05-28 21:09:24.916750000 +0300
@@ -1822,7 +1824,7 @@ determine_screen_width (void)
CONSOLE_SCREEN_BUFFER_INFO csbi;
if (!GetConsoleScreenBufferInfo (GetStdHandle (STD_ERROR_HANDLE), &csbi))
return 0;
- return csbi.dwSize.X;
+ return csbi.dwSize.X - 1;
#else /* neither TIOCGWINSZ nor WINDOWS */
return 0;
#endif /* neither TIOCGWINSZ nor WINDOWS */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-wget] Progress bar on MS-Windows,
Eli Zaretskii <=