Just a sample of the Echomail archive
[ << oldest | < older | list | newer > | newest >> ]
|  Message 48603  |
|  Rob Swindell (on Windows 11) to Git commit to main/sbbs/master  |
|  src/xpdev/genwrap.c  |
|  09 Jan 26 22:26:15  |
 
TZUTC: -0800
MSGID: 54033.syncprog@1:103/705 2dc7fa18
PID: Synchronet 3.21b-Linux master/177a369d2 Jan 04 2026 GCC 12.2.0
TID: SBBSecho 3.34-Linux master/5090be897 Jan 08 2026 GCC 12.2.0
BBSID: VERT
CHRS: ASCII 1
FORMAT: flowed
https://gitlab.synchro.net/main/sbbs/-/commit/0a26d710549f9651895bb392
Modified Files:
src/xpdev/genwrap.c
Log Message:
Beautify output of duration estimate string functions
duration_estimate_to_vstr() would sometimes output plural suffixes for values
of "1", e.g. "1 minutes", "1 hours" when the value was not an exact multiple
(and depending on the precision argument value).
Both duration_estimate_to_str() and duration_estimate_to_vstr() would report
(depending on precision argument) values of "1.0 units" when the value is
actually greater than "1.0" (by some fraction) and actual 1.0 units would be
reported at "1 unit". It turns out, it's really not easy to predict the output
of printf("%f") with different precision values using math, so just check the
printf() output and adjust accordingly.
Demonstration of the fixed problems using the possible parameter values
to JS system.secondstr() and system.minutestr() with duration values 59, 60,
and 61:
'00:00:59' '59' '59m' '59m' '59 minutes' '59 minutes'
'00:01:00' '1:00' '1h' '1h' '1 hour' '1 hour'
'00:01:01' '1:01' '1.0h' '1h 1m' '1.0 hours' '1 hours 1 minute'
--- SBBSecho 3.34-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
SEEN-BY: 10/0 1 102/401 103/705 105/81 106/201 124/5016 128/187 129/14
SEEN-BY: 153/7715 154/110 214/22 218/0 1 215 700 810 226/30 227/114
SEEN-BY: 229/110 134 206 275 317 400 426 428 470 700 705 266/512 280/464
SEEN-BY: 291/111 301/1 320/219 322/757 342/200 396/45 460/58 633/280
SEEN-BY: 712/848 902/26 5075/35
PATH: 103/705 218/700 229/426
|
[ << oldest | < older | list | newer > | newest >> ]