1. 28 Jun, 2019 1 commit
    • rswindell's avatar
      Initial support for UTF-8 terminals. At this time, just performs charset · 11d3f59f
      rswindell authored
      translation from CP437 -> UTF-8 and only when using high-level text output
      functions - so the output from native/DOS doors and scripts that use low-level
      output methods won't be translated.
      UTF-8 is auto-detected (only) at this time during answer (before login) by
      sending a ZWNBSP and checking (via ANSI) if the cursor position moved - an
      idea "borrowed" from Ozz Nixon (aka SqZ).
      
      This commit requires the new "encode" library (src/encode), so you may need
      to perform a cvs checkout to get that module!
      11d3f59f
  2. 09 May, 2019 1 commit
    • 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
  3. 06 May, 2019 1 commit
  4. 04 May, 2019 1 commit
    • rswindell's avatar
      Added a new sbbs_t.console (JS console.status) flag: CON_CR_CLREOL, which · 0dcfd4ff
      rswindell authored
      when set, force a clear-to-end-of-line sequence to be sent to the remote
      terminal before sending a carriage-return (CR, '\r') character. This is useful
      in scenarios where you want to move/home the cursor and *not* clear the screen
      and then display or execute something that assumes clean lines are being
      displayed on and thus wouldn'd bother with any clear-to-eol sequences before
      line-endings.
      Any scripts that enable this mode should disable it upon exit (e.g. using
      js.on_exit() to restore the original console status).
      0dcfd4ff
  5. 28 Apr, 2019 1 commit
    • rswindell's avatar
      Introduce a user setting (misc flag) which informs sbbs that the terminal · c187e140
      rswindell authored
      will be sending 0x7f (DEL) when the backspace key is struck: SWAP_DELETE
      For example, xterm sends 0x7f when backspace and hit and an ANSI escape
      sequence when the DEL key is hit.
      
      I don't yet have a way to *enable* this setting.
      
      Also, allow the user's setting of NO_EXASCII to take effect even when
      auto-terminal type detection is used (yes, the user's terminal can support
      ANSI and *not* CP437).
      c187e140
  6. 19 Feb, 2019 1 commit
    • rswindell's avatar
      Re-work the column-counting in outchar(). · 27c9842c
      rswindell authored
      I noticed that printable ctrl chars (e.g. 0x18 and 0x19) were not causing the
      current column position to increment, so that got me looking at this code and
      wondering why the LF/FF checking was outside the if(!outchar_esc) condition
      and being executed when CON_R_ECHO is off. So now, using a switch statement,
      it's cleaner and all the printable ctrl chars move the current column position
      correctly.
      27c9842c
  7. 11 Jan, 2019 1 commit
    • rswindell's avatar
      A partial retraction of the Ctrl-AZ interpretation changes introduced on · b2412964
      rswindell authored
      Oct-14-2018:
      It turns out, PabloDraw actually inserts a Ctrl-AZ sequence at the end of .msg
      (and presumably Synchronet .asc) files it edits - before the SAUCE record.
      This resulted in a printed Ctrl-Z character (arrow pointing right) in most
      terminals when viewing text/menu files created or edited with PabloDraw. :-(
      So, now Ctrl-AZ (uppercase) will revert to the previous definition:
      premature end-of-file (EOF)
      and a Ctrl-Az (lowercase) will output a Ctrl-Z (substitute) character.
      I'm not a big fan of case-sensitive Ctrl-A codes, but frankly, running out of
      chars and I already started this pattern with the Ctrl-AF/f sequences.
      Hopefully there's no existing software that is/was putting Ctrl-Az (lowercase)
      in files, expecting that to trigger a premature EOF. I certainly was not.
      b2412964
  8. 30 Oct, 2018 1 commit
    • rswindell's avatar
      External programs that are "binary" in nature (e.g. file transfer protocols) · be7d06bc
      rswindell authored
      now have their output translated to PETSCII equivalents for PETSCII terminals
      (but input is not yet translated).
      .seq files are now sent untranslated via printfile() and putmsg() to PETSCII
      terminals (using the new P_PETSCII putmsg mode flag).
      .seq files (and P_PETSCII mode text printed via putmsg) is now converted
      (poorly) from PETSCII to CP437 - this is still a work-in-progress.
      Remove the remants of WIP and HTMLterm support from putmsg() and printfile().
      be7d06bc
  9. 25 Oct, 2018 1 commit
  10. 22 Oct, 2018 1 commit
    • 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
  11. 15 Oct, 2018 1 commit
  12. 11 Oct, 2018 1 commit
    • rswindell's avatar
      Since rev 1.27 of prntfile.cpp (Sept-30), the stock scanmsg.asc menu · dc49cd42
      rswindell authored
      ('?' from the Reading Messages prompt) would not fully display because
      it contains a Ctrl-Z character (for the right-arrow symbol). Rather than
      revert the menu() change (where CPM-EOF mode is the default for menu
      files) - change the Ctrl-AZ sequence from "premature end-of-file" to instead
      send an actual Ctrl-Z character (similiar to Ctrl-AA, Ctrl-AL, etc.). This
      changes the long-standing behavior of what Ctrl-AZ does, but since that was
      a dubious "feature" that I'm pretty sure nobody used, I'm will to take that
      chance. If you need a premature EOF now, just use a regular ole Ctrl-Z
      char instead (or even the @eof@ code). Of course the msgscan.asc now has
      to change accordingly.
      dc49cd42
  13. 09 Oct, 2018 1 commit
    • rswindell's avatar
      Replaced the set of (ancient) arrays used for saving/restoring lines of · 3289d561
      rswindell authored
      terminal text and attributes with a linked-list. In doing so:
      - the save depth is no longer fixed (at 4), but dynamic and unbounded
      - the current column position is also saved/restored (bug fix)
      - no more copy/pasta from sbbsdefs.h into js_console.cpp
      - the JS console.saveline() and restore() methods now return Bool to indicate
        success/failure
      
      Also, some trailing white-space was auto-removed due to local editor settings.
      3289d561
  14. 15 Aug, 2018 1 commit
  15. 25 Jul, 2018 1 commit
    • rswindell's avatar
      sbbs_t::lputs() now handles the adding of the log message prefixes · 9e0fcab8
      rswindell authored
      ("Node X", user alias, etc.) - so removing a lot of the redundancies.
      Also, logging the current timed event code and other prefixes in the
      event thread log messages - something I've wanted for a while now.
      There might be some redundant "Node X" strings, so if you see some funny
      looking log message, please let me know.
      9e0fcab8
  16. 01 Jul, 2018 1 commit
    • rswindell's avatar
      So Nelgin noticed that in novice (non-expert) menu mode, the A/S/D cmds · 1b14e744
      rswindell authored
      from the Chat menu would immediately clear the screen and redisplay the
      menu after displaying the change in the node's state. This was due to the
      enhancement in rev 1.77 of con_out.cpp whereby we no longer increment
      lncntr if the first lines displayed after a key-press are blank (who
      cares if blank lines scroll off the screen?). That's fine and all, but the
      auto-pause check in outchar(FF) would only auto-pause if the line-counter
      was greater than *one* (has been this way since forever). So with the
      enhancement in 1.77, a single non-blank line displayed after a key-press
      was now not enough to trigger the auto-pause ([Hit a Key] prompt).
      So I've changed the line-counter trigger value to greater than *zero*,
      which means we could have some new excessive auto-pauses, but other places
      where auto-pause wasn't working, should again.
      
      One new excessive auto-pause was after the system password was entered at
      the SY: prompt, so that fix is included in this commit.
      1b14e744
  17. 22 Feb, 2018 1 commit
  18. 16 Feb, 2018 2 commits
  19. 10 Feb, 2018 1 commit
  20. 05 Feb, 2018 1 commit
    • rswindell's avatar
      sbbs_t::outcom() now retries (1000 times with 80ms delays) if the transmit · 64f260dd
      rswindell authored
      buffer if full. So now everything that uses outcom (including JS
      console.write) now includes a retry. The lower-level non-retry outcom()
      was renamed _outcom() (and is used by outcom).
      Added new Ctrl-A code: Ctrl-AF - enables the blink attribute, but only
      if/when a blink font was activated in the terminal. Lower-case 'f' refers
      to the normal-intensity blink-font. Uppercase 'F' refers to the high
      intensity blink-font. This allows you to mix fonts in text/menu files
      and not have annoying blinking text in non-supporting terminals. This is
      the first Ctrl-A code to be case-sensitive.
      64f260dd
  21. 15 Jan, 2018 1 commit
  22. 12 Jan, 2018 1 commit
    • rswindell's avatar
      New Ctrl-A code (Conditional New-line): Ctrl-A/ (or \1/) · 036e6af7
      rswindell authored
      - When the Ctrl-A code is encountered, the terminal server will output a
        new-line sequence (CRLF), but only if the current column is not the first
        column. This is helpful for text.dat lines where you cannot make assumptions
        about the previously displayed text and you want to insure the cursor is at
        the beginning of a new-line without creating unnecessary blank lines in the
        output.
      036e6af7
  23. 08 Jan, 2018 1 commit
    • rswindell's avatar
      Improvements in auto-screen pausing: · 0e7118fa
      rswindell authored
      - If the first lines sent after a key-press are blank lines, don't count them
        in the line-counter (lncntr) - maximize the viewable data before pause.
      - Assume tabs chars are expanded to 8-space tab-stops when detecting auto
        line-wrapped output (e.g. when ;LISTing text files with tabs)
      0e7118fa
  24. 10 Dec, 2016 1 commit
  25. 06 Dec, 2016 1 commit
    • rswindell's avatar
      New Ctrl-A codes: · 5bf12c0d
      rswindell authored
      'J' - Clear to End-of-Screen, for ANSI users sends <ESC>[J, nothing otherwise
      '`' - Home Cursor, for ANSI users sends <ESC>[H, form feed otherwise
      5bf12c0d
  26. 27 Nov, 2016 1 commit
    • rswindell's avatar
      Added new sub-scan mode: SCAN_POLLS (used to scan sub-boards for posted polls) · b14e9904
      rswindell authored
      Introduced a better progress indicator (similar to poll results), using the
      backfill() method. 2 new attr.cfg fields allow the progress indicator colors to
      be configured separately from poll results (though they default to the same
      white on magenta). This new progress indicator is used when loading msg ptrs
      and scanning for votes. I will be using it while performing other searches
      (e.g. file libraries/dirs) as well.
      b14e9904
  27. 16 Nov, 2016 2 commits
    • rswindell's avatar
      Fix fill logic in backfill(). · 85132fdd
      rswindell authored
      85132fdd
    • rswindell's avatar
      Created new console output method: sbbs_t::backfill(): · 1c630caf
      rswindell authored
      it displays a string of text and fills the background color up to the
      specified percentage fo the string length. I will be using it for displaying
      poll results, but it could possibly be used for progress displays and such.
      The colors used are configured via the "backfill" and "unfill" attributes in
      ctrl/attr.cfg.
      1c630caf
  28. 07 Oct, 2015 1 commit
  29. 28 Apr, 2015 1 commit
    • 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
  30. 13 Nov, 2011 1 commit
  31. 19 Oct, 2011 1 commit
  32. 27 Feb, 2009 1 commit
  33. 25 Feb, 2009 1 commit
  34. 21 Feb, 2009 4 commits
    • rswindell's avatar
      sbbs_t::bputs() now checks online value in while() loop. · d13fc8f6
      rswindell authored
      sbbs_t::rputs() now:
      * Can accept an optional length argument which allows it to output strings
      with embedded NULs if desired.
      * If a call to outcom() fails, terminates and returns the sent number of chars.
      * Performs Telnet IAC escaping when appropriate.
      * Checks online value in while() loop.
      * No longer output to log if "on local" - event scripts aren't expected to use
      this function.
      JS console.write() and writeln() now use rputs() instead of putcom() so that
      Telnet IAC chars are escaped when necessary and saveline/restoreline will work.
      sbbs_t::putcom() now returns the number of chars sent successfully.
      d13fc8f6
    • rswindell's avatar
      Characters sent through rputs() (e.g. ANSI escape sequences) need to be saved · 4595fccd
      rswindell authored
      in the "save line buffer" so that the SAVELINE/RESTORELINE macros will work
      correctly again (redisplay with correct attributes).
      4595fccd
    • rswindell's avatar
      Fix misuse of ansi(). · 4d3943e6
      rswindell authored
      4d3943e6
    • rswindell's avatar
      Create and use a variant of sbbs_t::ansi() which accepts a "current attribute" · d0f49f9a
      rswindell authored
      argument and buffer and retruns an optimized ANSI sequence to generate
      the desired attribute.
      console.ansi() method now support this usage as well, so msgutils.js's
      attr_to_ansi() should no longer be needed.
      d0f49f9a
  35. 19 Feb, 2009 1 commit