• src/xpdev/genwrap.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, December 18, 2023 02:32:05
    https://gitlab.synchro.net/main/sbbs/-/commit/58b4de5093abeb6c7d2371f1
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    The %g printf specifier doesn't work the same as %f, use %f instead

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, December 18, 2023 17:21:37
    https://gitlab.synchro.net/main/sbbs/-/commit/9031ac11bbc1003e9cd13f3e
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Cosmetic improvements to duration*_to_[v]str() functions

    Use lower case y/w/d/h/m suffix.

    If a duration is an exact multiple, don't display ".0" fraction. This is not consistent with byte_estimate_to_str() string generation, but I think it's
    more in line with human expectations.

    Don't display "90d" as "12.9w" (unless the requested unit is one-week).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Saturday, February 24, 2024 02:08:25
    https://gitlab.synchro.net/main/sbbs/-/commit/984f1eb68d22b45de08fd723
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Insure all builds of safe_strerror() write the string to the passed buf

    The GNU_SOURCE build of this function was (sometimes?) just returning the string and not actually copying it to the passed buf. This is consistent
    with the GNU manpage on strerror_r():
    "This may be either a pointer to a string that the function stores in buf ..." but was inconsistent with all the other build types of this function.

    Also updated to use strlcpy and write the problematic error number to the default string (if unknown).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:31:27
    https://gitlab.synchro.net/main/sbbs/-/commit/0d60813bb295908d35ad556e
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Fix issue in last commit

    Need to update the parameter names as well.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Saturday, March 23, 2024 00:10:09
    https://gitlab.synchro.net/main/sbbs/-/commit/78ae0fd80623b830fe86b6d6
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Change spaces to tabs in new strlcpy()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, January 05, 2026 00:49:23
    https://gitlab.synchro.net/main/sbbs/-/commit/4067f32824605ad984122488
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    duration_estimate_to_[v]str(): Don't include ".0" suffix for value of zero

    When a unit value > 1 was specified, we could get strings with extra "noise" (e.g. "0.0h" with the upcoming change to minutes_to_str()).

    This does sort of ignore the 'precision' argument in this case, but we already do (provide no fraction) for exactly-divisible values (e.g. 60min = "1h"). So if we ever uses these functions to provide columns with aligned decimals, that might be a problem.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Friday, January 09, 2026 22:26:15
    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'

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, March 10, 2026 01:43:03
    https://gitlab.synchro.net/main/sbbs/-/commit/4d011faa0c8478bbc1ec75f4
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    c_unescape_str() no longer allocates and frees memory

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wednesday, March 11, 2026 00:14:47
    https://gitlab.synchro.net/main/sbbs/-/commit/13621f3f48d46f54fa27b4a7
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Put the NULL pointer check back in c_unescape_str()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net