• src/sbbs3/atcodes.cpp bat_xfer.cpp chat.cpp chk_ar.cpp data.cpp downlo

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, March 23, 2022 21:07:26
    https://gitlab.synchro.net/main/sbbs/-/commit/1cac2c8a4ae11946e37d7e1a
    Modified Files:
    src/sbbs3/atcodes.cpp bat_xfer.cpp chat.cpp chk_ar.cpp data.cpp download.cpp exec.cpp file.cpp filedat.c filelist.c ftpsrvr.c getmsg.cpp js_user.c listfile.cpp logon.cpp netmail.cpp pack_qwk.cpp qwk.cpp readmsgs.cpp sbbs.h sbbsdefs.h src/sbbs3/scfg/scfgsys.c src/sbbs3/scfgdefs.h scfglib1.c scfgsave.c str.cpp str_util.c str_util.h text_defaults.c src/sbbs3/uedit/uedit.c src/sbbs3/upload.cpp userdat.c userdat.h useredit.cpp xtrn.cpp xtrn_sec.cpp
    Log Message:
    Support user credits and transfer stats > 4GB in total

    Credits and daily free credits are accurate to the byte up to (a maximum) of 18446744073709551615 (that's 18 Exbibytes - 1).

    User's upload and download byte stats are now similarly extended in maximum range, but the accuracy is only "to the byte" for values less than 10,000,000,000. Beyond that value, the accuracy declines, but is generally pretty damn accurate (to 4 decimal places beyond the nearest multiple of a power of 1024), so I don't expect that to be an issue. This method of storing upload/download byte stats allowed me to use the same 10-character user record fields in the user.dat file.

    As a side-effect of this enhancements:
    * User and file credit values are now expressed in multiples of powers of 1024 (e.g. 4.0G rather than 4,294,967,296).
    * Free credits per day per security level has now been extended from 32 to 64-bits (to accommodate values >= 4GB).
    * adjustuserrec() now longer takes the record length since we can easily determine that automatically and don't need more "sources of truth" that can be out-of-sync (e.g. the U_CDT field length going from 10 to 20 chars with this change).
    * setting the stage for locale-dependent thousands-separators (e.g. space instead of comma) - currently still hard-coded to comma
    * more/better support for files > 4GB in size (e.g. in the batch download queue)
    * user_t ulong fields changed to either uint32_t or uint64_t - I didn't realize how many long/ulong's remained in the code (which are sometmies 32-bit, sometimes 64-bit) - ugh
    * Steve's ultoac() function renamed to u32toac() and created a C++ wrapper that still uses the old name, for homage

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