• src/sbbs3/scfglib1.c scfglib2.c scfgsave.c

    From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Thu Apr 13 19:51:49 2023
    Modified Files:
    src/sbbs3/scfglib1.c scfglib2.c scfgsave.c
    Log Message:
    Use more appropriate typed-integer ini file get/set functions

    I noticed when setting a security level's lines per message value > 32767
    in SCFG->System->Security Level Values, the value would be read back as 1 or
    or some other crazy value. That was because we were writing this value
    (and all the security level 16-bit values) using iniSetShortInt(). These are *unsigned* 16-bit values, so that we should have been using iniSetUShortInt(). We'll just use iniSetUInteger() instead to fix that/those issues.

    And since promotion/conversion from uint16_t or uint32_t to uint has no impact when creating a decimal representation of a number, just use iniSetUInteger() everywhere we're setting unsigned integer settings in the main config .ini files. If/when these fields are made larger in the future, this code will just work.

    When reading .ini integers, use the more appropriate iniGet[U]Int16 functions instead of iniGet[U]Short and use iniGetUInteger for reading enums or any values that are immediately typecast to a uchar/uint8_t.

    Replaced some other use of [u]short that I found when searching with stdint.h types.

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