Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

  1. 05 Apr, 2021 1 commit
  2. 04 Apr, 2021 2 commits
  3. 03 Apr, 2021 1 commit
  4. 02 Apr, 2021 1 commit
    • Deucе's avatar
      Initial work on setTimeout() · ad635a64
      Deucе authored
      This appears to work and the event handler *should* work on other
      event types already.
      
      Note, this is *nix-only due to the use of poll().  select() will
      need to be used for Windows to keep XP compatability.
      ad635a64
  5. 22 Feb, 2021 1 commit
  6. 15 Feb, 2021 2 commits
  7. 22 Jan, 2021 1 commit
    • Rob Swindell's avatar
      Optionally distinguish between timeout and NUL inkey() result · bec4667e
      Rob Swindell authored
      Some terminals can send NUL (ASCII 0), e.g. hitting Ctrl-Space in Apple iTerm. Allow users of inkey() (in C++ or JS) to optionally detect the difference by specifying the K_NUL mode flag. In JS, console.inkey() will return null upon timeout (rather than "") when the K_NUL mode flag is used and return an empty string ("") upon receipt of NUL (ASCII 0).
      
      The default is the previous behavior where a timeout and the receipt of a NUL character appear the same to the caller of inkey().
      bec4667e
  8. 07 Nov, 2020 2 commits
  9. 13 Sep, 2020 1 commit
    • Rob Swindell's avatar
      Fixes to printfile and printtail methods · ac3d3173
      Rob Swindell authored
      Throw an exception if no filename is specified (rather than just abort the
      script by returning JS_FALSE).
      
      The return value is supposed to be a bool, not an int (JS_TRUE != JSVAL_TRUE).
      ac3d3173
  10. 16 Aug, 2020 1 commit
  11. 24 May, 2020 1 commit
    • rswindell's avatar
      Addd console.mouse_mode (bit-field) property for visibility/control of sbbs... · b1b8ce5a
      rswindell authored
      Addd console.mouse_mode (bit-field) property for visibility/control of sbbs internal ANSI-mouse-reporting mode flags (should not normally need to set this).
      console.getxy() now works with non-ANSI terminals and returns false if for some reason the request fails (e.g. ANSI cursor position report timeout).
      b1b8ce5a
  12. 14 May, 2020 1 commit
    • rswindell's avatar
      No longer dynamically allocate compiled access requirment (AR) strings for configuration items. · 110cc8ac
      rswindell authored
      SCFG for Win32 is linked against a load_cfg lib that builds withOUT SCFG defined, so these compiled AR elements were allocated and then many SCFG operations (e.g. copy/paste, create new) would copy the allocated ARs to another configuration and then be subjected to double-free upon exit/clean-up (resulting in exception or crash).
      Just get rid of this cruft and some other related RAM-byte-saving hold-overs from the MS-DOS days.
      110cc8ac
  13. 12 May, 2020 1 commit
    • rswindell's avatar
      As part of the rev 1.147 (add mouse hot sport support) commit, I made what I... · a96b9402
      rswindell authored
      As part of the rev 1.147 (add mouse hot sport support) commit, I made what I thought was a harmless change to the JS console.clear() implementation, I changed the call to sbbs->CLS to sbbs->clearscreen(). The sbbs->CLS macro calls outchar(FF) which check the line-counter and does the auto-pause before screen-clear. A direct call to sbbs->clearscreen() does not.
      Just in case someone actually wants the new (but unexpected behavior), I added an optional boolean parameter to console.clear(), autopause (default to true). Pass false if you want to defeat the autopause functionality. This should be effectively the same as setting the console.line_counter = 0 before calling console.clear(), but it also totally bypasses sbbs_t::outchar,
      so there could be other differences I'm not thinking of.
      Anyway, this fixes the lack of auto-screen pauses in JS mods recently introduced.
      a96b9402
  14. 09 May, 2020 2 commits
    • rswindell's avatar
      058294a5
    • rswindell's avatar
      Both hungry/liberal hot-spots and strict hot-spots can be defined now, at the... · 6f16fafe
      rswindell authored
      Both hungry/liberal hot-spots and strict hot-spots can be defined now, at the same time. For Nelgin.
      Use ^A` to define a single-char strict hot-spot using Ctrl-A codes. Unfortunately, this usurps the "home" Ctrl-A code which nothing seems to use but has now been changed to ^A'.
      Use ` instead of ~ in mnemonics to define strict single-char hot-spots (also displays the cmd key in [] instead () on non ANSI/PETSCII terms).
      Use @` instead of @~ codes to define strict hot-keys.
      Use HOT:STRICT @-code to declare a strict hot-key color.
      Use HOT:HUNGRY @-code to toggle back to hungry color-defined hot-keys (the default).
      New optional boolean argument to JS console.add_hotkey(), hungry = true by default.
      6f16fafe
  15. 08 May, 2020 3 commits
    • rswindell's avatar
      Add sbbs_t::keybuf_space() and keybuf_level() · a5b0f07f
      rswindell authored
      and JS console.keyboard_buffer_space() and keyboard_buffer_level()
      ... for tracking the number of character spaces used and available in the the (unget)keyboard input buffer.
      a5b0f07f
    • rswindell's avatar
      Resolve GCC warning: unused variable 'argv' · 885eda66
      rswindell authored
      885eda66
    • 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
  16. 30 Apr, 2020 1 commit
    • rswindell's avatar
      Support JavaScript property name expansion using JS:<name> @-code where name is · c9c42c87
      rswindell authored
      the name of a scalar property in either the current scope (by default) or the
      scope of the object passed to:
      - bbs.menu()
      - console.putmsg()
      - console.printfile()
      - console.printtail()
      
      The 'name' cannot be an array element (e.g. myprop[0]) or a nested object
      reference (e.g. myobj.myprop): just a single property name that can be
      converted to a string.
      
      Also, bbs.menu() now accepts an optional print-mode argument (default: P_NONE).
      c9c42c87
  17. 06 Apr, 2020 1 commit
    • rswindell's avatar
      Fix bug introduced in rev 1.142 with the additional/optional arguments to the · f1dfe106
      rswindell authored
      yesno() and noyes() methods:
      We need to check the argument count before using the second (optional)
      argument or else it has some garbage/left-over value from some previous JS
      function call. And no, just increasing the argument count in the method table
      isn't enough. :-(
      Reported by echicken and DaiTengu, thanks!
      f1dfe106
  18. 19 Mar, 2020 1 commit
    • rswindell's avatar
      console.getkeys() had a couple of bugs: · 49eef9c4
      rswindell authored
      - you couldn't specify a maxnum value of 0 (it would get overridden to ~0)
      - you couldn't specify a mode argument value without also specifying a non-zero
        maxnum value
      49eef9c4
  19. 02 Mar, 2020 1 commit
  20. 01 Mar, 2020 1 commit
    • rswindell's avatar
      sbbs_t::yesno() and noyes() and their JS equivalents (console.yesno/noyes) · 07f31378
      rswindell authored
      now accept an optional print-mode (a.k.a. pmode) argument to provide more
      control over the printing that happens in these functions/methods.
      The immediate use is for P_NOCRLF to stop the newline from being printed
      after a yes or no response (e.g. in a full-screen UI), but there could be other
      uses.
      07f31378
  21. 08 Oct, 2019 1 commit
  22. 21 Sep, 2019 1 commit
    • rswindell's avatar
      sbbs_t::center() and thusly JS console.center() now accepts an optional · 77f2c366
      rswindell authored
      "width" argument (in columns), defaults the user's current screen column-width
      but you can now over-ride this value when an additional/optional argument.
      Also, center() now clears-to-EOL before sending the CRLF to the terminal.
      Hopefully this doesn't mess up anyone's existing use of center().
      77f2c366
  23. 10 Sep, 2019 1 commit
  24. 21 Aug, 2019 1 commit
    • rswindell's avatar
      Always use a passthru (proxy) socket when executing external programs that · 53884cce
      rswindell authored
      use socket I/O (e.g. sexyz, door32.sys doors, sync-xsdk doors) - not just when
      the client is connected via SSH. This solves a number of problems:
      - programs that change socket options
      - programs that don't support non-CP437 charsets (e.g. PETSCII, UTF-8)
      - programs that don't support Telnet-IAC escaping
      
      This greatly simplifies (reduces the need for) input_thread locking.
      
      The passthru_thread now handles chunks of up to 4000 bytes per transfer
      between socket and ringbuf, instead of a char at a time, greatly improving the
      performance.
      53884cce
  25. 05 Aug, 2019 2 commits
  26. 04 Aug, 2019 1 commit
    • 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
  27. 03 Aug, 2019 1 commit
  28. 27 Jul, 2019 1 commit
    • rswindell's avatar
      Added support to console.print() for an optional P_* mode argument. Must · 2f0381d2
      rswindell authored
      be called as console.print(string, number), the number will be interpretted
      as the P_* mode flags value. Otherwise, all arguments are converted to strings
      and printed (as before).
      If anyone was calling console.print(string, number), they will get different
      behavior now. I couldn't find any evidence of anyone using this syntax for
      console.print(), so I think this should be okay.
      Only a limited set of P_* flags are supported (e.g. P_PETSCII, P_UTF8) - far
      fewer than console.putmsg(), but console.putmsg() is much more heavy weight
      and supports a lot more "features" likely to interfere with the expected user
      output. In general, try to use console.putmsg() only when printing multi-line
      text strings or when @-code expansion is needed. Otherwise, console.print()
      is usually better.
      2f0381d2
  29. 10 Jul, 2019 2 commits
    • rswindell's avatar
      Create a use new sbbs_t method: term_type(), returns the auto-generated · f3333bff
      rswindell authored
      terminal "type" string (ANSI, RIP, PETSCII, or DUMB).
      Expose this value in JS via the new console.type read-only property.
      The TERM @-code now expands to this string rather than the (often
      client-supplied) sbbs_t.terminal string value.
      f3333bff
    • rswindell's avatar
      Fun with Unicode! · 43c793a1
      rswindell authored
      Create a sbbs_t method: wide(), which displays a string using "fullwidth"
      Unicode characters, when possible, otherwise, double-spaced.
      Exposed in JS via console.wide() and a new @-code: WIDE:<string>
      43c793a1
  30. 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
  31. 04 May, 2019 2 commits