Commit Graph

129 Commits

Author SHA1 Message Date
Darshit Shah 7099f48998 Sanitize value sent to memset to prevent SEGFAULT 2016-03-01 08:11:13 +01:00
Darshit Shah 9933da2b9f Fix remaining bugs in progress bar implementation
* src/progress.c (create_image): Ensure that the entire screen width is
drawn everytime to prevent any artefacts from leaking through.
2015-12-10 13:43:45 +01:00
Darshit Shah 636a5f9a1c Eliminate more compiler warnings
* src/options.h (CHECK_CERT_MODES): Remove C99 style comma after last
value
* src/progress.c (create_image): Do not mix statements and declarations
* src/init.c (cmd_boolean_internal): Mark unused parameters
2015-12-09 09:26:24 +01:00
Darshit Shah 2257d3ebf8 Fix progress bar assertion with multibyte locales
* src/progress.c (bar_create): Define size of progress buffer explicitly
  (create_image): Clean up progress bar image creation. Use memset
  instead of for loops to create arrays of the same byte.
2015-12-09 09:26:24 +01:00
Darshit Shah 3ea0beec6f Revert "Disable progress bar when wget is backgrounded (trivial patch)"
This reverts commit e624732563.
2015-09-21 19:41:38 +05:30
Christian Neukirchen e624732563 Disable progress bar when wget is backgrounded (trivial patch)
* src/progress.c (create_image): progress only when in foreground

Sometimes I start wget, but the remote site is too slow, so I rather
want to run it in background, however when I simply use job control
for that, wget will keep spewing the progress bar all over my
terminal.  I have found the SIGHUP/SIGUSR1 feature to redirect output
to a log file, but I think the following small patch is even more
useful, since the progress bar will simply resume when wget is
foregrounded again (also, the final message is still printed to the
terminal in any case):
2015-09-10 10:26:29 +02:00
Alex Henrie b6e242cd6f Make the filename marquee a proper marquee
* src/progress.c: Start the marquee in the middle of the available space
  and do not restart it until all of the text has scrolled out of view.
2015-07-22 16:52:20 +05:30
Darshit Shah b6b1388fb7 Fix documentation for update_speed_ring()
* progress.c (update_speed_ring): The comment for the function
    incorrectly stated that the function uses thirty samples from the
    past instead of twenty.

    Reported-By: Yi Li <lovelylich@gmail.com>
2015-05-07 11:29:07 +05:30
Giuseppe Scrivano 16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Darshit Shah 8705e27e20 progress bar: Allow display on stderr alongwith -o
This commit causes the --show-progress option to print the progress bar
to stderr even when a logfile was explicitly provided on the command
line. Such a combination allows a user to log the output of Wget while
simultaneously keeping track of the download status.
2015-01-20 20:16:20 +01:00
Darshit Shah 4b845615fa Define MIN and MAx macros in a single location
MIN and MAx are macros that a developer will universally expect
throughout the source. Yet, they were being defined in multiple places
across the source. Instead, define them in a single location in the
common wget.h header file and use them consistently everywhere.
2014-12-04 18:36:54 +05:30
Tim Ruehsen bc75d2ecdf Fix code for undefined USE_NLS_PROGRESS_BAR in progress.c
Reported-by: Gisle Vanem
2014-11-20 21:48:04 +01:00
Tim Rühsen 3c51ad7f02 Removed form feeds from sources and NEWS 2014-11-20 16:35:34 +01:00
Darshit Shah d9f21b4b95 Aesthetic changes to progress bar 2014-11-20 16:43:47 +05:30
Tim Rühsen 7b43510fe3 Fixes possible issues with Wget running in a turkish locale 2014-11-20 10:56:21 +01:00
Tim Rühsen 1356e90a14 Trivial fixes for C89 compliancy 2014-11-20 09:56:57 +01:00
Tom Li 6c989c7131 Scroll to last character of filename in progress 2014-11-16 12:03:10 +05:30
Darshit Shah 94805ad55a Fix progress bar assertion 2014-11-15 00:13:13 +05:30
Darshit Shah 35bfcb34b0 Remove extra padding from the progress bar 2014-11-01 23:38:07 +05:30
Darshit Shah efe090df89 Handle multibyte characters in progressbar
This commit fixes a bug in the progressbar implementation wherein
filenames with multibyte characters were not handled correctly.
2014-09-14 16:17:00 +05:30
Darshit Shah f3289f76ec Better align download percentage status 2014-06-22 14:53:24 +05:30
Giuseppe Scrivano ffccc7d3be Do not depend on always defined macros 2014-06-12 18:49:15 +02:00
Darshit Shah 4eeabffee6 More progress bar aesthetic changes
This commit introduces two new changes to how the progress bar looks:
1. Support the --progress=bar:noscroll option which will prevent the filename
   from scrolling in the progress bar
2. Print human readable value for the amount already downloaded for any file
2014-05-30 13:28:02 +05:30
Tim Ruehsen 38a7829dcb Fix compiler warnings 2014-05-12 12:18:50 +02:00
Darshit Shah 6d4158122c Aesthetic changes and bug fixes for progress bar 2014-05-01 23:08:52 +02:00
Darshit Shah 8c2fd06ba8 Add --show-progress to force display progress bar
This is a relatively large commit that implements two major features:

1. Implement --show-progress switch to force the display of the progress bar in
   any verbosity level
2. Edit the implementation of the progress bar so that the filename is displayed
   in the same line.
2014-05-01 01:07:43 +02:00
Giuseppe Scrivano 67a4c6cf97 progress: Split update into update and draw 2014-05-01 00:46:44 +02:00
Giuseppe Scrivano 96418c6885 Rename --bits to --report-bps. 2012-06-06 14:10:07 +02:00
Tim Ruehsen 0aa3c5d33c Fix some compiler warnings. 2012-05-05 15:24:35 +02:00
Sasikantha Babu b9b510ca5f Accept --bit option 2012-03-05 22:23:06 +01:00
Giuseppe Scrivano 2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano 9ae052b1e2 Remove redundant guard. 2010-12-01 13:15:13 +01:00
Giuseppe Scrivano 293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Micah Cowan 4a08094db8 [mq]: cfg-mk 2009-09-21 20:39:44 -07:00
Micah Cowan b9e9ad65cc Ran update-copyright. 2009-09-04 00:13:47 -07:00
Micah Cowan f11619be14 "Translation note" -> "TRANSLATORS" 2009-07-23 10:24:36 -07:00
Steven Schubiger 2e1619d3fe Fix wrong human-readable ETA output. 2009-05-17 12:53:28 +02:00
Micah Cowan 48b53471e8 Henri's -Wall patch. 2008-05-30 22:42:36 -07:00
Micah Cowan e72b57629b Merge quote module stuff with current mainline. 2008-05-15 19:13:08 -07:00
Micah Cowan 16b833c16d Fix too-many-spaces problem for multibyte progress bars, when ETA string not displayed. 2008-04-30 13:48:30 -07:00
Steven Schubiger 2c77220411 Undo the USE_GNULIB_ALLOC defines. 2008-04-20 11:46:52 +02:00
Steven Schubiger 76780021d8 Use Gnulib's alloc functions throughout the source. 2008-04-19 01:21:24 +02:00
Steven Schubiger 9d519d49f0 Use Gnulib's quote function in progress.c. 2008-04-16 12:25:45 +02:00
Micah Cowan 653a658a58 Fixed #22251: Terminated download gets new filename. 2008-02-10 14:39:41 -08:00
Micah Cowan e111c92008 Remove screenwidth assertion from create_image. 2008-02-07 00:25:03 -08:00
Micah Cowan b9a2f26240 ChangeLog entries for NLS progress-bar changes; use correct conditional checks in progress.c. 2008-02-06 16:53:46 -08:00
Micah Cowan e95867e6cc Deal with progress bars in environs lacking mbtowc or wcwidth. 2008-02-06 18:10:24 -08:00
Micah Cowan f74d743345 Handle error codes from mbtowc, wcwidth. 2008-02-03 01:28:05 -08:00
Micah Cowan 35b72cc941 Handle missing wchar.h, wcwidth. 2008-02-03 01:48:50 -08:00
Micah Cowan 2a8fe286da Use character widths instead of number-of-bytes, to determine where on the terminal line we are (for progress-bar). 2008-02-03 00:53:16 -08:00