mirror of
https://github.com/curl/curl.git
synced 2026-06-20 16:15:37 +03:00
progress: only show "raw" numbers up to 9999
Probably makes the output easier to read. Fixes #19431 Reported-by: Fd929c2CE5fA on github
This commit is contained in:
parent
c6f1b0ff49
commit
c61dd1cd2d
1 changed files with 2 additions and 8 deletions
|
|
@ -70,8 +70,8 @@ static char *max6data(curl_off_t bytes, char *max6)
|
|||
/* a signed 64-bit value is 8192 petabytes maximum */
|
||||
const char unit[] = { 'k', 'M', 'G', 'T', 'P', 0 };
|
||||
int k = 0;
|
||||
if(bytes < 1000000) {
|
||||
curl_msnprintf(max6, 7, "%5" CURL_FORMAT_CURL_OFF_T, bytes);
|
||||
if(bytes < 100000) {
|
||||
curl_msnprintf(max6, 7, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
|
||||
return max6;
|
||||
}
|
||||
|
||||
|
|
@ -84,12 +84,6 @@ static char *max6data(curl_off_t bytes, char *max6)
|
|||
(bytes%1024) / (1024/10), unit[k]);
|
||||
break;
|
||||
}
|
||||
else if(nbytes < 100000) {
|
||||
/* xxxxxU */
|
||||
curl_msnprintf(max6, 7, "%5" CURL_FORMAT_CURL_OFF_T "%c",
|
||||
nbytes, unit[k]);
|
||||
break;
|
||||
}
|
||||
bytes = nbytes;
|
||||
k++;
|
||||
DEBUGASSERT(unit[k]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue