Skip to content
Snippets Groups Projects
  1. Feb 19, 2023
    • 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
  2. Nov 12, 2022
  3. Sep 03, 2022
  4. Mar 28, 2022
  5. 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
  6. 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
  7. Feb 26, 2022
  8. Feb 05, 2022
  9. Nov 18, 2021
    • Rob Swindell's avatar
      Add text.dat lines for "All" and the List key ('L'), used in quoting · 9513bdba
      Rob Swindell authored
      The internal line editor's quoting feature add some hard-coded strings ("Done" and "All") and the (L)ist key was hard-coded. Use the text.dat string (new and pre-existing) for these now.
      
      Also, use the new sbbs_t *_key() methods for referencing the configured key bindings (via text.dat) for these common key-stroke commands.
      Convert the text.dat strings for keys (e.g. YNQP) to uppercase always as well.
      9513bdba
  10. Oct 06, 2021
    • Rob Swindell's avatar
      New @-code: !x to perform Ctrl-A style terminal/attribute control · 6b6383da
      Rob Swindell authored
      Most Ctrl-A code terminal/attribute effects can now be invoked via @!x@ where x is one or more Ctrl-A sequence operands (e.g. @!B@ to set the current attribute to blue, @!P@ to pause the terminal). Multiple attribute codes may be specified in a single @!x@ sequence. Both upper and lowercase attribute codes are supported. The "^A@" sequence is not supported, but there's already an @-code to perform the equivalent operation ("SHOW:20").
      
      Rationale: when using PabloDraw to edit display (e.g. .msg) files, there was no easy way to explicitly clear (set to "normal") the current attributes at the end of a line of text. If that line of text contained a background color and the line caused the terminal to scroll, that background color would fill the next/new line resulting in some potential undesirable effects. There are 2 common solutions to this problem: either clear the screen before displaying the file (not always desirable) or clear the attributes at the end of the line (before the CR/LF). This can now be achieved by adding a @!N@ (the equivalent of Ctrl-AN for "normal" attributes) to the end of a line. There's no way to insert custom Ctrl-A sequences or other way to force PabloDraw to clear the attributes at the end of a line, that I found.
      
      I chose the '!' character because it's (on my keyboard anyway) the Shift-1 key and Ctrl-A is ASCII 1. I considered a sequence such as @A:x@, but that's one more character and since this sequence usually won't display anything, a shorter sequence is likely preferred. For the shortest-possible sequence, use Ctrl-A sequences instead. However, for many consecutive Ctrl-A sequences, the @-code equivalent might actually end up being shorter(!). @-codes aren't support in as many places in Synchronet where Ctrl-A codes are supported (for security reasons), so it's not like this is going to replace the use of Ctrl-A codes everywhere.
      6b6383da
    • Rob Swindell's avatar
      New @-codes SEX and GENDERS · 67bb599a
      Rob Swindell authored
      SEX is the user's sex/gender
      GENDERS is the list of system-supported genders for new users to choose from.
      67bb599a
  11. Sep 25, 2021
  12. Aug 15, 2021
  13. Apr 04, 2021
    • Rob Swindell's avatar
      New @-code: CONTINUE · 34b50b18
      Rob Swindell authored
      CONTINUE is like GETKEY except it'll set the display-abort flag if 'N' or 'Q' are typed.
      
      Make the WAIT:<n> argument 10ths of a second (instead of milliseconds) to be more consistent with DELAY:<n>.
      34b50b18
    • Rob Swindell's avatar
      New @-codes: GETKEY and WAIT:<milliseconds> · 342c2cd6
      Rob Swindell authored
      GETKEY waits indefinitely for any key press by the user (resolves issue #245).
      WAIT:<n> waits for up to n-milliseconds for a key press and then continues on.
      
      For both cases, the key pressed is not echoed or acted upon in any way. Ctrl-keys could be handled by global or built-in ctrl-key handlers, so those would be the exception.
      342c2cd6
    • 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
  14. Feb 15, 2021
  15. Dec 12, 2020
  16. Dec 09, 2020
    • Rob Swindell's avatar
      Make read/unread mail-waiting stats easier to access · fee51099
      Rob Swindell authored
      New JS User.stats properties:
      - read_mail_waiting
      - unread_mail_waiting
      - spam_waiting
      
      New @-codes:
      - MAILR (read mail waiting)
      - MAILU (unread mail waiting)
      
      And the corresponding MAILR# and MAILU# codes (for non-current user's stats).
      
      Addresses feature request #191.
      fee51099
  17. Dec 06, 2020
  18. Nov 25, 2020
  19. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      ec20d959
  20. Oct 16, 2020
    • Rob Swindell's avatar
      New @-code TEXT:<num> to display text.dat string #num · 072314eb
      Rob Swindell authored
      Also, don't truncate strings to accommodate screen width when the string contains a new-line character.
      This is so ScottD (from irc.synchro.net) can use TEXT:556 @-code to print the Ctrl-K menu (text.dat string) via a command shell written in Baja.
      072314eb
  21. Oct 15, 2020
    • Rob Swindell's avatar
      New @-code: BIRTH for full-format user birthdate · de250705
      Rob Swindell authored
      Use BIRTH instead of BDATE if you want MM/DD/YYYY (or DD/MM/YYYY) instead of MM/DD/YY or DD/MM/YY formatted birthdate display.
      
      New aliases (for consistency): BIRTHFMT -> BDATEFMT and BIRTH:<fmt> -> BDATE:<fmt>
      de250705
    • Rob Swindell's avatar
      People don't like YYYY/MM/DD for entering birthdates · bf2a0fc8
      Rob Swindell authored
      Can't say I don't blame them, it is a little unnatural. So instead, use either MM/DD/YYYY (the default) or DD/MM/YYYY (European date mode). This required the use of a new @-code: BDATEFMT and the update of a couple of text.dat lines (in next commit).
      bf2a0fc8
  22. Oct 05, 2020
  23. Oct 04, 2020
  24. Sep 29, 2020
  25. Sep 28, 2020
    • Rob Swindell's avatar
      New user-related @-codes: NETMAIL, FWD, TMP, NOTE, LASTIP · 3098bab8
      Rob Swindell authored
      NETMAIL: user's personal netmail or email address - for WitNik
      FWD: "On" if the user has opted for forwarding their mail to netmail or "Off"
      TMP: user's chosen temporay file type (e.g. "ZIP")
      NOTE: user's note (same as MEMO1)
      LASTIP: user's most recent IP address at time of logoff
      3098bab8
  26. Sep 17, 2020
    • Rob Swindell's avatar
      Better sysop availability (for chat) visibility/toggleability · 6b993a0b
      Rob Swindell authored
      - JS system.operator_available property (read/writeable)
      - SYSAVAIL @-code which expands to LiSysopAvailable or LiSysopNotAvailable
        (use the new SYSAVAIL @-code in the chat menu to show availabilty to chat)
      - ;avail sysop command (in str_cmds.js) to toggle sysop availability
      - Changed LiSysopIs text.dat string to be a format string (include %s) and
        the trailing \r\n, so that it can be used in str_cmds.js or anywhere else
        to report sysop availability to chat, or can be set to blank string to
        display nothing (this would not work previously).
      6b993a0b
  27. Sep 07, 2020
    • Rob Swindell's avatar
      Fix observed race-condition resulting in the HOSTNAME @-code being blank. · dee21ed6
      Rob Swindell authored
      Eliminate the hack in each server where it will over-write startup host_name
      (with the configured Internet email address), if it's blank. This hack was
      subject to a race condition where the parent app (e.g. sbbsctrl.exe) would
      clear or re-initialize the host_name after the sever threads had initialized.
      Instead, just use a function which will return either the startup->host_name
      or (fallback to) scfg.inet_addr.
      dee21ed6
  28. Aug 16, 2020
  29. May 10, 2020
Loading