The attached patch achieves the following improvements:
(a) The progress line was quite long.
In order to implement (b) and keep the progress line at a reasonable size, I propose to move summary information out of the progress line and to a separate line, printed prior to the progress.
Current progress line contains:
- total size (bytes)
- total number of files
- total number of directories
I introduced a function print_sizes which prints summary information, and removed these pieces of information from the progress line.
(b) Add time estimate to progress (remaining and total time).
(c) Updating progress line once per second.
(d) Fix uninitialized variable messagebuf used for ftp.
I haven't used any ftp code from ecp myself.
(It seems parameter messagebuf doesn't make sense, because it's an input-parameter, not an output parameter, and it points to random memory.)
(e) Fix two printf format mismatches in ftp code, after introducing the -D_FILE_OFFSET_BITS=64 gcc parameter.
Patch v1