]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_progress: fix large time outputs and decimal size display
authorDaniel Stenberg <daniel@haxx.se>
Sat, 3 Jan 2026 16:50:26 +0000 (17:50 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 3 Jan 2026 23:16:59 +0000 (00:16 +0100)
commitb32e66a8ee775b74af22b94feccfb868142a0cc2
tree1cbe9e5aadd19edea9389fc1b62b3984a180579a
parent09374f6e7596d2363b12f46fd7e7483491b06f67
tool_progress: fix large time outputs and decimal size display

Time output:

- was broken for really large times

- now uses spaces instead of --:--:--

- >99999y is now the largest shown time

- show HH:MM:SS as long as hours are fewer than 100

Size:

- made the decimal output always only use a single decimal

Test:

- Add test 1622 to verify these functions

Closes #20177
src/tool_progress.c
src/tool_progress.h
tests/data/Makefile.am
tests/data/test1622 [new file with mode: 0644]
tests/tunit/Makefile.inc
tests/tunit/tool1622.c [new file with mode: 0644]