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. 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
  4. 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
  5. 23 Apr, 2019 1 commit
    • rswindell's avatar
      Clean up the hostname look-up stuff: · 60f996f9
      rswindell authored
      - getnameinfo() was being called with NI_NUMERICHOST in the mail server and
        web server (but nowhere else)
      - use a singly-defined macro (STR_NO_HOSTNAME) for the "<no name>" string
        rather than copying it about
      - the webserver apparently assumes that session->host_name will always have
        *some* unique value (e.g. the IP address when no hostname is available) - so
        account for that special need <grumble>
      60f996f9
  6. 12 Apr, 2019 1 commit
    • rswindell's avatar
      Define and use a new external message editor option: SAVECOLUMNS · ee00b5f8
      rswindell authored
      (default: off) - when enabled, the current terminal width (columns) will be
      saved in the msg header.
      When using the internal msg editor or raw intput mode, the columns are always
      saved in the message editor. fseditor.js should have this option enabled.
      ee00b5f8
  7. 09 Apr, 2019 2 commits
  8. 21 Feb, 2019 1 commit
  9. 20 Feb, 2019 1 commit
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  10. 04 Jan, 2019 1 commit
  11. 01 Jan, 2019 1 commit
  12. 30 Dec, 2018 1 commit
  13. 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
  14. 25 Oct, 2018 1 commit
  15. 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
  16. 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
  17. 03 Oct, 2018 2 commits
    • rswindell's avatar
      Define and use a new getstr() mode flag: K_TRIM, to trim white-space · 48d31b27
      rswindell authored
      from both ends of the input string automatically and disallow (ignore)
      more than one consecutive space character mid-string.
      The returned value is still the non-trimmed string length - perhaps that
      should be changed.
      48d31b27
    • rswindell's avatar
      Allow message "tagging" (ala hashtags, without the hash). · 14b116bc
      rswindell authored
      If a message sub-board is configured to "Allow Message Tagging"
      (under Toggle Options in SCFG->Message Areas), then after a message is
      posted (via the terminal server), the user will be prompted if they
      want to tag the message with one or more space-separated tags. The no/yes
      prompt can be skipp if desired by setting the TagMessageQ line in the
      text.dat file to an empty string. There is currently no provision for
      regular users to actually see/view the message tags (yet), but the sysop
      or sub-op can view the tags in the message header with the 'H' sys/sub-op
      command.
      14b116bc
  18. 24 Jul, 2018 1 commit
    • rswindell's avatar
      The great Copyright year update and (mostly) removal of 2018: · f869ad3d
      rswindell authored
      Most of the copyright years in the source code were misleading (the date of
      most recent publish was actually later) and all were unnecessary. I've been
      removing copyright years piecemeal, for a long time, but I decided it was time
      to just perform a bulk search and (mostly) replace. In some cases, I left
      old copyright years on files that either are not used (and soon to be removed)
      or obsolete and unlikely to ever be touched again (e.g. Win9x FOSSIL VXD). Some
      of the runtime binaries still contain copyright years and those were updated to
      2018.
      f869ad3d
  19. 25 Jun, 2018 1 commit
  20. 03 Feb, 2018 1 commit
  21. 18 Dec, 2017 1 commit
  22. 10 Dec, 2017 1 commit
  23. 24 Nov, 2017 1 commit
  24. 13 Nov, 2017 1 commit
    • rswindell's avatar
      New feature: control of SPAM visibility when reading mail on the Terminal · d18bd3bd
      rswindell authored
      Server via the new 'V' command from the Reading Mail prompt allows you to
      toggle between all mail (including SPAM, the default), SPAM only, or HAM only.
      Also added a new '/' (search text) command from the reading mail prompts.
      Mail imported before the mailsrvr added support (recently) for the MSG_SPAM
      attribute flag will not be counted/filtered as SPAM.
      SBBSecho will have a commit (next) to support the new loadmail() usage, it
      will not compile until then.
      d18bd3bd
  25. 23 Oct, 2017 2 commits
    • rswindell's avatar
      c4799f3a
    • rswindell's avatar
      * Implemented support for new LIB_DIRS option: · 11e529d4
      rswindell authored
        Automatically detect child sub-directories and make them available as virtual
        directories for users to download from - only useful via FTP currently.
      * Implemented Sorting options for Message Groups and File Libraries:
        Sub-boards within groups and directories within library can now be
        automatically sorted based on the sysop's chosen sort field (long name, short
        name, or internal code)
        - Required that sub-boards are now stored/saved in msgs.cnf based on groups
        - Required QWKnet hub sub-board reference dynamic renumbering
      * Implemented "Template" toggle option for sub-boards and file directories:
        A sub-board or directory marked as "template" will be used for newly created
        (or imported) subs/dirs for that group/lib. Clone Options via SCFG will now
        use the "template" item as the source of the cloned settings, if available.
      11e529d4
  26. 27 Sep, 2017 1 commit
  27. 03 Aug, 2017 1 commit
  28. 07 Jun, 2017 1 commit
  29. 04 Jun, 2017 1 commit
  30. 08 Dec, 2016 1 commit
  31. 06 Dec, 2016 1 commit
  32. 01 Dec, 2016 1 commit
    • rswindell's avatar
      Error messages logged with errormsg() now contain the name of the C/C++ · b4b6713e
      rswindell authored
      function where the error is being reported from. So the WHERE macro now
      contains the __FUNCTION__ "macro" and the various js*.c files that use the
      WHERE macro to report errors had to be updated too.
      Also, the 'access' argument is now being passed as a signed long rather than
      unsigned long. Status/return values are often passed in here (e.g. from smblib)
      and may be negative. This argument was being displayed with %ld but wasn't
      being passed in as a signed value, so on 64-bit long systems, negative numbers
      were just printed as large (4M+) numbers.
      Also, no need to call getfname() in errormsg() since this is embedded in the
      WHERE macro (since 2009).
      b4b6713e
  33. 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
  34. 23 Nov, 2016 1 commit
    • rswindell's avatar
      New QWKnet hub configuration settings (with defaults): · 40b2188a
      rswindell authored
      - Include Kludge Lines     (Yes)
      - Include VOTING.DAT File   (Yes)
      - Include HEADERS.DAT File   (Yes)
      - Extended (QWKE) Packets    (No)
      - Exported Ctrl-A Codes    (Strip)
      
      SBBS/QWKnet nodes now have more control over the REP packet files created
      by their systems. If the "uplink" (hub) is complaining about receiving
      unsupported files (e.g. VOTING.DAT) or kluge lines (e.g. @TZ), just turn them
      off.
      
      Also, Ctrl-A codes may now be retained in QWKnetmail. And the @REPLYTO kludge
      line enabled for the first time (!).
      40b2188a
  35. 21 Nov, 2016 1 commit
    • rswindell's avatar
      Change MsgBase.get_user_votes() to MsgBase.how_user_voted(). · 0b984ab1
      rswindell authored
      New MsgBase header propeties:
      - total_votes (total number of votes this msg or poll has received)
      - tally[], an array of 16 numbers indicating the total votes for each poll answer
        in the case of a normal message, tally[0] is the same as upvotes and tally[1]
        is the same as downvotes.
      This should complete what echicken needs to display polls and voting results
      in his web UI.
      0b984ab1
  36. 16 Nov, 2016 1 commit
  37. 15 Nov, 2016 1 commit