Skip to content
Snippets Groups Projects
  1. 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
  2. Mar 04, 2023
  3. 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
  4. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  5. Jul 03, 2022
    • Rob Swindell's avatar
      Paranoia around use of smb.subnum as an index into scfg.sub[] · b8035cae
      Rob Swindell authored
      Use the is_valid_subnum() function before using the smb.subnum as an index into (s)cfg.sub[]. Related to the previous committed fix of writemsg(): leaving the global smb.subnum as -1 (INVALID_SUB) after replying to a post via email or netmail, resulting in a crash here.
      b8035cae
  6. 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
  7. Mar 03, 2022
  8. Feb 11, 2022
  9. Apr 04, 2021
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · 925e3b0a
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      925e3b0a
  10. Mar 04, 2021
    • Rob Swindell's avatar
      Ignore filenames in subject that aren't valid filenames, e.g. "Fwd:" · e6f7ab9c
      Rob Swindell authored
      There were 2 bug identified by issue #230:
      - the "Fwd:" prefix being added to the message subject was being treated as a filename. I first thought to just remove this subject tag, but then thought it best to just ignore obviously invalid filenames in the subject in the first place.
      
      - when forwarding files to a netmail address, the 'to' extension (user number) is 0, so the file will be in the data/file/####.out directory of the sender instead.
      
      We have 4 places (at least) where the message subjects are parsed and only one of those places currently supports quoted filenames (e.g. with spaces in them) and some of the others (e.g. QWK) don't support multiple filenames at all. That should be fixed.
      e6f7ab9c
  11. Feb 15, 2021
  12. Jan 21, 2021
  13. Dec 20, 2020
  14. Dec 10, 2020
  15. Dec 09, 2020
    • Rob Swindell's avatar
      Some message attributes (auxiliary and network) weren't shown · 9de1b02f
      Rob Swindell authored
      Copy some code from atcodes.cpp to show all the aux and network attributes.
      
      Also, the MsgAttr text.dat string only contains 17 %s's but we were passing 18, so the last attribute (KillSent) would never be shown.
      
      Instead, split this into 3 strings and just pass those 3 strings to the MsgAttr format string along with a ton of blank strings. So we don't have to keep updating the MsgAttr text.dat string every time we add more attribute flags (that was kind of ridiculous).
      9de1b02f
  16. Sep 27, 2020
  17. Aug 16, 2020
  18. May 08, 2020
    • rswindell's avatar
      Add mouse hot spot support: · 87c9982c
      rswindell authored
      - hot spots are clickable screen areas (e.g. in menus and prompts) that   generate key-strokes
      - commands may be from 1 to 127 ASCII-characters in length
      - currently using the X10 mouse reporting mode, may change
      - all mnemonics strings (~Example) are automatically hot-spots
      - The new ~ @-code defines a hot spot
      - Any screen-clear operation clears all hot spots
      - sbbs now tracks the current screen (cursor position) row
      - eliminated the old "tos" (top-of-screen) boolean (row == 0 indicates "tos")
      - created an sbbs_t::ungetstr() method
      - keep track if in pause (hit a key) prompt, for special mouse behavior
      
      new JS console object:
      - row property
      - tos property is now read-only (and deprecated)
      - new methods:
        add_hotspot()
        clear_hotspots()
        scroll_hotspots()
      
      redrwstr() gets some UTF8 touch-ups as part of this commit. <shrug>
      87c9982c
  19. Oct 08, 2019
  20. Aug 24, 2019
  21. Aug 17, 2019
  22. Aug 08, 2019
  23. Aug 07, 2019
  24. Aug 04, 2019
    • rswindell's avatar
      More UTF-8 fun: · 3313a87e
      rswindell authored
      - bstrlen() moved to sbbs_t, accepts an option pmode argument so it can account
        for UTF-8 encoded strings correctly
      - JS console.strlen() now accepts an optional pmode argument (e.g. P_UTF8)
      - Renamed sbbs_t::utf8_to_cp437 to sbbs_t::print_utf8_as_cp437
      - Create/use msghdr_hfield() to perform UTF-8->CP437 conversions as needed for
        printing/copying UTF-8 encoded message header fields.
      - Defined XTRN_UTF8 misc setting flag. If a message editor does *not* have this
        flag, it is assumed to *not* support UTF-8. Will likely use this for UTF-8
        doors as some point too (none known to exist, yet).
      3313a87e
  25. Aug 03, 2019
  26. Aug 01, 2019
  27. Jul 30, 2019
  28. Jul 26, 2019
  29. Jul 06, 2019
  30. May 04, 2019
    • rswindell's avatar
      smb_getplaintext and smb_getmsgtxt(...,GETMSGTXT_PLAIN) will now fall-back · 284b31b3
      rswindell authored
      to a text/html part of a multi-part MIME encoded message if no text/plain part
      exists.
      Changed smbmsg_t.charset to smbmsg_t.text_charset.
      Added smbmsg_t.text_subtype (e.g. "plain" or "html").
      Fixed issue with parsing parsed plain-text when the charset was the last
      element of the MIME-part header.
      MIMEDecodedPlainTextFmt text.dat line now includes the text sub-type arg
      284b31b3
  31. May 03, 2019
  32. May 02, 2019
    • rswindell's avatar
      @-code changes: · 0868c5d9
      rswindell authored
      Expanded codes will not *not* go beyond the terminal column width (minus 1).
      If you need the old/wrap behavior, add a "-W" modifier to your @-code.
      If a length value is specified with -W, it is ignored.
      
      - MSG_TO, MSG_FROM, MSG_SUBJECT now reflect the header values passed
        to sbbs_t::show_msghdr(), JS bbs.show_msg_header() and not necessarily the
        actual stored (e.g. MIME-encoded) header values.
      
      New codes:
      - MSG_CC - reflect a message's CC list, if it has one
      - DATETIMEZONE - combines DATETIME and TIMEZONE in one string
      0868c5d9
    • rswindell's avatar
      Added new text.dat string: MsgCarbonCopyList · f3dfd635
      rswindell authored
      used to display a CC list, when applicable.
      f3dfd635
Loading