Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
  2. Nov 05, 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. Apr 09, 2023
    • Rob Swindell's avatar
      Fix 20+ year old bug that allowed getstr(... K_WRAP) to overflow wordwrap buf · 63406890
      Rob Swindell authored
      The sbbs_t::wordwrap[] buffer was 81 characters (80 printable characters, plus
      NUL terminator) and sbbs_t.getstr(), when used with the K_WRAP mode flag could
      potentially write more than 81 characters to this buffer (e.g. when using a
      wider than 80 column terminal and writing a message with the internal line
      editor which calls sbbs_t::getstr(... K_WRAP)) - would corrupt sbbs_t members
      after wordwrap[], which included pointers that would be freed in the sbbs_t
      destructor (~sbbs_t) and subsequently page/segfault as seen in issue #545.
      
      This change increases the wordwrap buffer to likely twice the same needed
      (maximum columns + NUL terminator) and adds wordwrap bounds checking to
      sbbs_t::getstr().
      
      There were comments indicating crash sightings in the sbsb_t destructor going
      back to 2002, so this commit removes those comments.
      
      Thanks to Nelgin for providing the gdb dump details ('print *this') that was
      the clue needed to reach the root-cause determination.
      
      This fixes issue #545.
      63406890
  5. 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
  6. 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
  7. Feb 15, 2021
  8. 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
  9. Aug 16, 2020
  10. May 08, 2020
    • rswindell's avatar
      More mouse hot spot stuff: · e821783a
      rswindell authored
      - User Defaults menu mousified
      - When all hot spots have scrolled off the screen, clear the hot spot list
      - Insert new hot spots in the front of the list so they will take precedence
        over any previously defined duplicate hot spots
      - Numeric hot spot commands end in a carriage-return
      - No auto-acceptence of numbers when there are keys in the keyboard buffer
      - Baja UNGETKEY function now inserts keys into the "front" of the keyboard
        buffer (next to be consumed)
      - Hot key @-code command text supports C-style escape sequences
        (allows encoding of ctrl chars, spaces, etc.)
      e821783a
  11. Apr 28, 2020
    • rswindell's avatar
      Fix some cosmetic issues with saveline/restoreline and its interaction with · fa37e0a7
      rswindell authored
      getstr's insert mode (Ctrl-V) indicator and edit/line modes. Global Hot Keys
      (e.g. Ctrl-T) would do weird stuff like return the cursor to the end of the
      line or redraw the input string multiple times.
      So as part of this fix:
      - backspasce() now removed the last count characters from the save-line buffer
        (it is a destructive backspace afterall).
      - outchar('\b') (a non-destructive backspace) adds the \b to the save-line buf
      - restoreline() now always redraws the current insert/overwrite indicator in
        the upper right-most corner fo the screen
      - insert_indicator() now uses functions that aren't line-saved.
      
      An unrelated change included in this comment: center() now sends a CR before
      the cursor movement and centered-text, for times when the current column is
      *not* already at 0. Very useful for use with @-codes (e.g. display some pattern
      or "graphics" and then center some text over it).
      fa37e0a7
  12. Mar 31, 2020
  13. Jul 24, 2019
    • rswindell's avatar
      More UTF-8 goodness: · 52d5659f
      rswindell authored
      - Export all FIDOCTRL (other FTN kludge lines) to the QWK HEADERS.DAT file.
        These should already be imported if they exist, but were never added during
        export, so untested/new behavior. The control paragraph (kludge line) of
        specific interest here is the "CHRS" (charset) kludge we need for UTF-8.
      
      - Don't use the QWK "newline" character (0xE3) when the message is UTF-8.
        Use bare-LF's instead. This is pretty untested at this point as I will need
        another QWKnet board to post or receive UTF-8 encoded messages to test,
        getting the code into CVS is the first step. At least for now, there's no
        opt-in/out for this behavior. If your BBS has UTF-8 encoded messages, some
        QWK nodes or offline readers may have trouble with packets which include
        those messages. Or they may work fine (but likely display garbage CP437
        chars in-place of the proper Unicode codepoint glyph).
      
      - The beginning of UTF-8 input support in getstr() - which needs more work,
        particularly around character and word deletion and insertion.
      - The internal message editor now supports UTF-8 messages and kind of somewhat
        supports inputting UTF-8 characters in message text.
      
      New put/print text flag: P_AUTO_UTF8 which can auto-detect UTF8 strings and
      do the "right thing" for the user's terminal. New associated sbbs_t method:
      auto_utf8() which automatically sets P_UTF8 for any stirng that begins with
      a UTF-8 BOM (ZWNBSP). Else, if the P_AUTO_UTF8 mode flag is set, then
      it checks to see if the string contains invalid US-ASCII chars but valid UTF-8
      sequences and then sets P_UTF8 accordingly. Used by putmsg() and bputs().
      
      There's a new permuation of bprintf() which accepts a mode argument
      (i.e. for P_UTF8) and passes it on to the new mode-capable bputs().
      52d5659f
  14. May 09, 2019
    • rswindell's avatar
      Support bright background colors: · 48e7520e
      rswindell authored
      - for PETSCII, this is automatic and you don't lose blink, but you do lose
        colored foreground when enabling a bright background ("reverse video")
      - for ANSI, this mode is typically referred to as "iCE colors" and disables
        blinking-text support
      - Ctrl-AE (^AE) is the new attribute code to enable bright-background
        (will have no effect on ANSI terminals that are not iCE color enabled)
        "E" is now valid in the ctrl/attr.cfg file and string values for JS
        console.attributes assignments, as well
      - Ctrl-AI (^AI) - blink - now does nothing for ANSI/ICE color terminals
        (blinking is not supported in combination with bright-background)
      - Using a new/non-standard CGA attribute bit-flag to indicate the selection of
        bright-background colors (BG_BRIGHT, bit 10), separate from BLINK.
        This change required all/most char/uchar attribute representations to be
        converted to int/uint.
      
      New text.dat strings:
      - PetTerminalDetected (renamed from PetTermDetected)
      - PetTerminalQ
      - TerminalAutoDetect
      - TerminalColumns
      - TerminalRows
      - TerminalMonochrome
      - TerminalColor
      - TerminalIceColor
      - IceColorTerminalQ
      This also moved the MsgCarbonCopyList definition to the end of the file
      for now.
      
      PETSCII reverse-video attribute fix:
      When a CR is sent to the terminal, the reverse-video attibute is auto-disabled
      so update our "current attribute" (curatr) value to match the remote.
      
      Support new printfile/putmsg mode flag: P_WRAP to force an ungraceful
      line-wrap (splitting) to the specified column width. If no column width is
      specified (0), then this mode will force an ungraceful wrap before the last
      terminal column where some terminals *may* auto-wrap.
      
      JS console.printfile() and printtail() methods now support an optional
      "orig_columns" argument, similar to console.putmsg(). Must specify P_WORDWRAP
      or P_WRAP for this argument to have any effect.
      
      Much improved terminal-type selection/configuration in the user defaults
      menu and abort (^C) at any of the yes/no prompts is now detected/handled much
      better (to answers to the prompted questions are not saved to the user
      settings).
      48e7520e
  15. Oct 22, 2018
    • rswindell's avatar
      The big PETSCII commit: · 31303187
      rswindell authored
      So Omegix recently asked in the Synchronet Discussion group whether or not
      a PETSCII (Commodore) terminal could be used to access his Synchronet BBS.
      Now, the answer is "Yes". :-)
      The major issues addressed:
      
      - detecting a PETSCII terminal, solved by assigning specific (configurable):
        TCP ports to be used for incoming PETSCII connections, by default:
        port 64 is for 40-column PETSCII and port 128 is for 80-column PETSCII,
        but if the terminal sends a Telnet Window Size reply (e.g. SyncTERM), then
        either size terminal should fine on either port.
        The port numbers are configurable in the [BBS] section of your sbbs.ini
        file using the new keys: PET40Port (default value: 64) and PET80Port
        (default value: 128). Having these keys set doesn't make make the terminal
        server listen on that additional port - you'll need to add more
        IP:port combinations to one of Interfaces values, example:
          TelnetInterface=71.95.196.34,71.95.196.34:64,71.95.196.34:128
        And you don't have to use Telnet for the PETSCII connections - you could use
        RLogin or SSH instead (or in addition).
      
      - support for terminal widths < 80 columns:
        This was achieved through a combination of text.dat changes (numerous),
        new Ctrl-A and @-codes and new optional terminal-width-specific menu files
        (e.g. text/menu/main.40col.asc)
        A side effect of these changes is actually better support for terminals
        *wider* than 80 columns as well!
      
      - support for terminals that don't expand tabs to spaces (e.g. PETSCII):
        The terminal server now handles tab expansion with a run-time settable
        tab-size (default size: 8)
      
      - conditional access based on PETSCII (or small) terminal use (or not):
        + New PETSCII ARS keyword (boolean)
        + New COLS and ROWS ARS keywords (for terminal width and height requirements)
        + New TERM (string) ARS keyword
      
      New @-codes:
        - WORDWRAP, when placed at the top of a file, enables auto-wordwrap for
                    lines longer than the terminal width
        - CENTER, the text following before an end of line will be displayed centered
                  on the terminal (whatever the width, in columns)
        - CLEAR, like CLS, except it ignores (doesn't display) a CRLF that follows
        - COLS, current number of terminal columns (width)
        - ROWS, current number of terminal rows (height)
        - TERM, the auto-detected or reported terminal type (e.g. ANSI, TTY, etc.)
        - SYSONLY, toggles "echo" (display) off/back-on for non-sysops
                  similar to the Ctrl-A( and ) codes, but more convenient to use
                  (and PabloDraw won't strip the @-code from the file like it does
                   with Ctrl-A codes it doesn't support)
      
      New Ctrl-A codes:
        - \ conditional new-line/continuation when the terminal width is < 80 cols
            prints the new text.dat string LongLineContinuationPrefix
      
      yesno() will now return true if passed a blank string.
      noyes() will now return false if passed a blank string.
      getstr()'s input length limiting based on terminal width is more broadly
                 applied now (not just when using the K_LINE mode flag).
      
      New JS bbs object method: menu_exists(<base_filename>) returns Boolean
      New JS console object property: tabstop (Number)
      New JS console object methods: getbyte() and putbyte() to recv/send raw byte
          value with (very little) interpretation/intervention by the terminal server
      New JS console object method: creturn() - performs a carriage return
          (or equivalent)
      New JS (and C) printfile() mode flag: P_TRUNCATE, causes long lines to be
          truncated, rather than displaying causing a line-wrap.
      
      New text.dat strings:
        - NoAccessTerminal (for ARS check failures)
        - LongLineContinuationPrefix (for breaking long lines for 40col terminals)
        - Scanning (replaces a previously hard-coded "Scanning" string)
        - Done (replaces a previusly hard-coded "Done")
        - Scanned  (when finished scannning, clears the progress bar)
      31303187
  16. Oct 03, 2018
  17. Sep 05, 2018
  18. Jul 29, 2018
  19. Jul 25, 2018
  20. Dec 08, 2016
  21. Aug 22, 2015
  22. Apr 28, 2015
    • rswindell's avatar
      Bug-fix: From the text.dat Yes/No/Quit/Password entry (YNQP), the 'Q' character · aa709e2a
      rswindell authored
      was never used. This was intended to be a method for internationalization,
      letting the sysop change which key is used as the uiniversal "quit" key.
      This commit replaces most of the uses of the hard-coded 'Q' for quit wtih the
      3rd charcter in the text.dat YNQP string. Some hard-coded menus still have the
      'Q' key hard-coded and will need to be addressed later. The text.h YN index
      macro was changed to YNQP and the JS text index variable name will change
      as well.
      aa709e2a
  23. Oct 04, 2014
  24. Feb 19, 2009
  25. Feb 16, 2008
  26. Aug 23, 2006
  27. Sep 02, 2005
  28. Sep 01, 2005
  29. May 30, 2004
  30. May 11, 2004
  31. Oct 02, 2003
  32. Jul 25, 2003
  33. Jul 08, 2003
Loading