[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391)
From: |
Darshit Shah |
Subject: |
Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391) |
Date: |
Fri, 17 Aug 2018 08:57:53 +0000 |
Darshit Shah commented on a discussion on libwget/bar.c:
> _bar_slot_t *slotp = &bar->slots[slot];
>
> xfree(slotp->filename);
> - slotp->filename = wget_strdup(filename);
> + if (++slotp->numfiles == 1) {
> + slotp->filename = wget_strdup(filename);
> + slotp->bytes_downloaded = 0;
> + } else {
> + char tag[128];
There are two options here:
1. We immediately truncate the filename to the maximum size
2. We keep the entire filename in the buffer. This option is useful if we
decide to implement the scrolling filename in progressbar that is in Wget1.x
In case, we want option 2, then it makes sense to dynamically allocate enough
memory to completely store the entire filename without truncating. In this
scenario, even 120 chars is not large enough.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/merge_requests/391#note_95084356
You're receiving this email because of your account on gitlab.com.
- [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Josef Möllers, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Josef Möllers, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Josef Möllers, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391),
Darshit Shah <=
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Josef Möllers, 2018/08/17
- Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17
Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391), Darshit Shah, 2018/08/17