bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Progress bar on MS-Windows


From: Darshit Shah
Subject: Re: [Bug-wget] Progress bar on MS-Windows
Date: Wed, 1 Jun 2016 10:28:35 +0200
User-agent: Mutt/1.6.1-neo (2016-05-23)

Can you please try with the latest HEAD once? As far as I am aware, all the off-by-one errors have been fixed.

If there is something left over, we should fix it in the progress bar output itself instead of a hack somewhere in the Windows specific code. Unless the issue is in how the window size is reported in Windows.

Please test with latest HEAD first to see if the problem persists and then we can look into it further.

On 05/28, Eli Zaretskii wrote:
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 */


--
Thanking You,
Darshit Shah

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]