Skip to content
Snippets Groups Projects
  1. Mar 17, 2024
  2. Mar 07, 2024
  3. Feb 16, 2024
    • Rob Swindell's avatar
      UTF-8 improvements · 2584a864
      Rob Swindell authored
      Don't corrupt UTF-8 strings with SAFECOPY() (use new SAFECOPY_UTF8).
      
      Some terminals (notably, Windows Terminal) display zero width UNICODE chars
      as a single column-wide space. <sigh> Auto-detect the zero-width "width"
      (1 or 0) of the terminal during connection and UTF-8 auto-detection.
      
      getstr() works a lot better now with UTF-8 strings with wide chars (e.g.
      emojis), but likely much more to do.
      2584a864
  4. Feb 07, 2024
  5. Jan 25, 2024
  6. Jan 16, 2024
  7. Jan 15, 2024
    • Rob Swindell's avatar
      Fix the recently-added NODE_USER @-code · 0639add9
      Rob Swindell authored
      Since "NODE*" is a match for a node number status (ugh), and this comparison
      happened before the comparison for "NODE_USER", we'd never hit that condition.
      Thought I tested this before original commit, but I guess I did not. Oops.
      0639add9
  8. Jan 13, 2024
  9. Dec 31, 2023
    • Rob Swindell's avatar
      Allow sysop-configurable date separator (e.g. YYYY-MM-DD) · 013bcca9
      Rob Swindell authored
      To complete the request from: Max (WESTLINE)
      
        Is it possible to do a new dateformat in scfg
        In sweden we using YYYY-MM-DD format as standard.
      
      The default will be '/'.  Technically, any separator is possible by editing
      the "date_sep" value in the global section of main.ini.  SCFG allows the
      most popular separators: /.- and space.
      013bcca9
    • Rob Swindell's avatar
      Introduce 3rd system/local date display format: YY/MM/DD · 96976ab5
      Rob Swindell authored
      ... and YYYY/MM/DD for birthdate input/display.
      
      Now set in SCFG->System (not toggle options) and stored in the "date_fmt" key
      (new) in main.ini. The old sys_misc SM_EURODATE flag is deprecated (but used
      to determine the default value of date_fmt when not present).
      
      As requested from: Max (WESTLINE)
      
        Is it possible to do a new dateformat in scfg
        In sweden we using YYYY-MM-DD format as standard.
      96976ab5
  10. Dec 12, 2023
    • Rob Swindell's avatar
      Fix the @-code support in the Regarding* text.dat strings · a31f4346
      Rob Swindell authored
      Actually tested myself this time, needed a lot more than first appearances.
      
      Also includes a security/safety enhancement where the @-code expanded string
      is *not* used as an sprintf format string. Supporting both format specifiers
      and @-codes in a single text.dat string is tricky (always has been).
      
      For Accession.
      a31f4346
  11. Dec 10, 2023
  12. Dec 02, 2023
  13. Oct 26, 2023
  14. Sep 26, 2023
    • Rob Swindell's avatar
      Fast text.dat string references, more localization support via JS and @-codes · 9fb7c2c3
      Rob Swindell authored
      sbbs_t::mnemonics() now supports @-codes immediately following the tilde
      (e.g. ~@Yes@) to use the first character of a dynamically-replaced
      (e.g. localized/translated) text string as a command key.
      Fixed issue in sbbs_t::mnemonics if multiple @-codes were specified in the
      string, but no space characters (just noticed this bug while reviewing).
      
      Created: sbbs_t::expand_atcodes() - used by sbbs_t::mnemonics(), exposed in
      JS as bbs.expand_atcodes().
      
      bbs.text and system.text now have properties: each text string ID is the
      property name and the text index number (1-based) is the property value -
      enabling fast text string lookup without load/require text.js
      
      Constified sbbs_t::atcode() and attrstr() - not too painful
      
      Deprecated YNQP text.dat string in favor of (the first character of)
        "Yes" and "No" text strings and new strings: "Quit", and "PasswordChar"
      
      Other text.dat changes: ListKey->List, AllKey->Unused853
      More new text.dat strings: Which, Next, Previous, Language, LANG
      Deprecate the "AllKey" text string
      Create/use sbbs_t::all_key() - first character of "All" text string
      
      New JS console properties that present common (possibly localized) command
      keys: yes_key, no_key, quit_key, all_key, list_key, next_key, prev_key
      9fb7c2c3
  15. Sep 24, 2023
    • Rob Swindell's avatar
      text.dat string IDs can now be used in/as @-codes, directly · 28522b71
      Rob Swindell authored
      The TEXT:<x> @-code can now be used with the text.dat string ID rather than
      the text.dat string number, if preferred.
      
      For convenience and brevity, ALL text.dat string IDs are now valid @-codes
      (case-sensitive). While this functionality is redundant with the TEXT: @-code
      now, if there are any conflicts between new/existing @-codes and text.dat
      string IDs, the TEXT: @-code can be used to overcome such conflicts.
      
      This should help with localization (to other languages) by using common
      single-word replacements (Which, Quit, Next, etc.) in text.dat strings.
      28522b71
  16. Sep 14, 2023
  17. Sep 13, 2023
  18. Jun 10, 2023
  19. Jun 09, 2023
    • Rob Swindell's avatar
      <Deuce> ... billion-and-one result of comparison of constant 100000 warnings. · 2b087b8b
      Rob Swindell authored
      So Clang-FreeBSD was warning (in compiles of scfg/scfg*.c by Deuce):
      result of comparison of constant 100000 with expression of type 'uint16_t'
      (aka 'unsigned short') is always true
      
      Why? Cause a uint16_t's max value is 65535 (less than 100000). Sure we could
      have just lowered the UIFC max number of config items to 65535, but that would
      have been too easy. And why are these compared-with values of type uint16_t to
      begin with? Because most ctrl/*.cnf lists (of configuration items) were
      limited to 65535 entries cause ... 16-bit DOS, historically. Now that *.cnf
      files aren't used, we could just increase these scfg_t.*_total type sizes from
      16 to 32-bits, yeah? The result is this commit.
      
      I went to (signed) int so we could still keep -1 as the special illegal
      sub/dir num value (e.g. INVALID_SUB, which is sometimes used to indicate the
      email message base). Theoretically, 2 billion configuration items could be
      supported in these lists, but SCFG will limit you to 100000 anyway. So there's
      a whole lot of s/uint/int in this commit.
      
      I'd be very surprised if this doesn't result in some new GCC/Clang warnings,
      but at least the old "comparison of constant 100000" warnings are now gone!
      2b087b8b
  20. Mar 21, 2023
    • Rob Swindell's avatar
      Add GETDIM @-code to get the current ANSI terminal dimensions (rows and cols) · bc6776d9
      Rob Swindell authored
      This code will do nothing if there's no user logged-in or their terminal is
      not ANSI or their terminal dimensions (rows and cols) are set to specific
      values (not auto-detected). This code does the same thing as calling JS
      console.getdimensions(). Since it waits (up to 5 seconds) for a CPR response
      from the terminal, this does potentially slow down output, so caveat emptor.
      
      This could be used by a sysop to address issue #529.
      bc6776d9
  21. Mar 04, 2023
  22. Feb 19, 2023
    • Rob Swindell's avatar
      The great 'long int' purge of 2023 part 2 · 0932bcda
      Rob Swindell authored
      Mostly [s]printf format fixups
      0932bcda
    • Rob Swindell's avatar
      The great 'long int' purge of 2023 part 1 · 59d8974c
      Rob Swindell authored
      At one time, Synchronet was a 16-bit DOS project, plagued by the 16-bit [u]int, so long's were used everywhere > 16-bits were known to be needed/wanted (This is before the days of the standard sized types from stdint.h), and they've persisted.
      
      But '[u]long int' is 64-bits on *nix 64-bit builds, 32-bits everywhere else (even 64-bit Windows builds if/when we ever get around to that), so this could lead to insidious bugs that would only show up on one flavor or the other. Since [u]int is 32-bits on everything we currently support, we'll use that instead of [u]long.
      
      This "part 1" because I'm sure there's going to be warnings and errors from the GCC/Clang builds as a result, which I'll get to next.
      59d8974c
  23. Nov 12, 2022
  24. Sep 03, 2022
  25. Mar 28, 2022
  26. Mar 24, 2022
    • Rob Swindell's avatar
      Fix newly-introduced GCC warnings · d20ba4ab
      Rob Swindell authored
      d20ba4ab
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 2d4ec7b8
      Rob Swindell authored
      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
      2d4ec7b8
  27. Mar 21, 2022
    • Rob Swindell's avatar
      SMB items (messages or files) can now have 32-bit or 64-bit cost value · f1332d3e
      Rob Swindell authored
      To fully support files > 4GB in size in file bases, credit values larger than 32-bits must be supported too.
      
      There's a couple of todo comments/items included in this commit, but that's mainly to do with messages (which don't really have costs anyway).
      
      The main thing to deal with now is the fact that users can't have more than 4GB in credits in the first place! That's got to be fixed next.
      f1332d3e
  28. Feb 26, 2022
  29. Feb 05, 2022
Loading