mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 14:41:08 +00:00
* 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