Files
wget2/include
Darshit Shah f633c3c75a Support dynamic thread allocation in progress bar
* include/libwget.h.in: Add new function wget_bar_set_slots
* libwget/bar.c (_wget_bar_st): Add new struct member max_slots to store
the maximum number of slots of the progress bar
  (wget_bar_init): Initialize the memory for all the possible
progress_bars
  (wget_bar_set_slots): New function to modify the number of progress
slots at runtime. Can only increase the number of slots, not decrease.
* src/bar.c(bar_init): Remove unneeded variable lf. bar_init() is
invoked before any threads are created, hence do not print the required
newlines. This is now done by wget_bar_set_slots
  (bar_update_slots): Wget2 interface for libwget's wget_bar_set_slots
  (_error_write): Fix the position of acquiring the mutex. Don't make
  changes to the screen while some other progress bar function may be
  running
* src/bar.h: New function bar_update_slots
* src/wget.c: Create global variable nthreads.
  (downloader_thread): Update the number of progress bar slots
* src/wget.h: New global variable nthreads
2016-09-27 22:17:37 +02:00
..
2015-09-19 22:54:38 +02:00