• src/xpdev/genwrap.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, July 06, 2022 21:18:35
    https://gitlab.synchro.net/main/sbbs/-/commit/a302a01b1b42887cdece9b23
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Escape chars >= 0x7f too (DEL and ex-ASCII/UTF-8 and whatnot)
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, July 06, 2022 21:23:26
    https://gitlab.synchro.net/main/sbbs/-/commit/735aa51e4f3bcaa8a6640416
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Fix for previous commit and escaped char values > 127 (0x7F)
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Saturday, March 11, 2023 17:27:03
    https://gitlab.synchro.net/main/sbbs/-/commit/7081a525902dcc4acf4f00a2
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Fix mysterious double overflow issue in parse_byte_count()

    It's possible that some values (e.g. "16384P") exceed the storage (count of bytes) of a 64-bit integer, and such values were causing floating point exceptions when running sbbsctrl.exe, e.g.
    Faulting application name: sbbsctrl.exe, version: 3.20.0.0, time stamp: 0x00000000
    Faulting module name: gdi32full.dll, version: 10.0.19041.2604, time stamp: 0x2b5302d5
    Exception code: 0xc0000090

    but interesting (and perhaps a clue), not with sbbs.exe.

    Anyway, this added range checking, limiting the maximum value to INT64_MAX (after division by unit, though there was no division-unit in the problem
    case, the "min_dspace" value parsing in scfglib2.c). Using conditional/ternary return statement had the same floating point exception occurrences, so this if-statement shouldn't be removed/changed/optimized!

    I suspect this has something to do with mix of Borland and MSVC run-time libs and perhaps different expectations or setups with regards to floating point exceptions. I did notice that when stepping through read_file_cfg(), I would get different return values for the same call to iniGetBytes() depending on whether it was initiated from sbbsctrl.exe (built with C++Builder) or
    sbbs.dll (built with MSVC).

    Thanks to Codefenix for providing the sample file.ini file that demonstrated the issue. This problem would've been very hard to root-cause otherwise!
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Friday, March 17, 2023 19:26:55
    https://gitlab.synchro.net/main/sbbs/-/commit/973b548fcd8c126de3633b5c
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Use const doubles for time durations

    Instead of copy/pasta. No change in function,.
    ---
    þ 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 Tuesday, March 28, 2023 15:27:09
    https://gitlab.synchro.net/main/sbbs/-/commit/ea44c50ad1ffe1a9cef1a7ff
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Fix clang warning: implicit conversion from 'long' to 'double'

    changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    if(bytes < 0 || bytes > INT64_MAX)
    ~ ^~~~~~~~~
    /usr/include/x86/_stdint.h:90:19: note: expanded from macro 'INT64_MAX'
    #define INT64_MAX 0x7fffffffffffffff
    ^~~~~~~~~~~~~~~~~~
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, October 09, 2025 16:02:28
    https://gitlab.synchro.net/main/sbbs/-/commit/1ea96df1b6d05d2730dd2a24
    Modified Files:
    src/xpdev/genwrap.c
    Log Message:
    Add support for NO_OS_VERSION

    This allows avoiding needing ini_file.c, strlist.c, etc. for things
    that use xpdev by just building select files.

    Otherwise you end up with a linking error. due to not finding
    iniReadFile().
    ---
    þ 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