- 24 Oct, 2019 1 commit
-
-
rswindell authored
running a JavaScript module would crash (e.g. segfault) sbbs: Create and use a separate JS runtime, context, and global object/scope for global hotkey events. This means that the hotkey won't benefit from any previously loaded/required scripts, possibly effecting the performance of the first invocation of the hotkey handler. Subsequent JS hotkey events will reuse the same runtime/context/global, so they'll execute fast(er). One questionalbe change to js_execfile(): With the JS_GC (garbage collection) call *before* the JS_ENDREQUEST() call, the process would crash in libmozjs. Moving the JS_GC() call to *after* the JS_ENDREQUEST() resolved this issue and I'm not clear why. This 'js_cx' parameter here is not always sbbs_t::js_cx. When called to handle a JS hotkey event, it's sbbs_t::js_hotkey_cx, so it shouldn't interfere with the sbs_t::js_cx being used by the currently executing JS module (shell or door). <scratches chin>
-
- 08 Oct, 2019 1 commit
-
-
rswindell authored
JS console.gotoxy() and the GOTOXY @-code now work with PETSCII terminals (homes the cursor then moves down and right the appropriate number of rows and columns). Bummer I didn't think of this method sooner.
-
- 05 Oct, 2019 1 commit
-
-
rswindell authored
in-place or by also copying to a new string in the process. Don't string "soft-CRs" (0x8d) from UTF-8 encoded FTN messages, ever. Default strip_soft_cr SBBSecho setting to true/on.
-
- 21 Sep, 2019 1 commit
-
-
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().
-
- 31 Aug, 2019 1 commit
-
-
rswindell authored
Elminate unused member variable: inputfile
-
- 28 Aug, 2019 1 commit
-
-
rswindell authored
any control (ASCII 0x01 - 0x1F) characters.
-
- 25 Aug, 2019 1 commit
-
-
rswindell authored
client_socket_dup before activating the passthru_socket. This resolves the issue of external programs receiving stale data from the previous passthru session - data that was not sucessfully read by the last external program invoked.
-
- 24 Aug, 2019 1 commit
-
-
rswindell authored
wrapper for utf8_normalize_str() and utf8_replace_chars with the proper arguments. This will fix *a* problem with UTF-8 message not being converted to CP437 in QWK packets correctly (we were just normalizing, not fully converting). Also got rid of the defunct DLLCALL usage str_util.c
-
- 21 Aug, 2019 1 commit
-
-
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.
-
- 20 Aug, 2019 1 commit
-
-
rswindell authored
when "extra raw" output is needed. Use putcom() and comprintf() instead of rputs() and rprintf() for ANSI escape sequences. This doesn't actually fix any problem, but since rputs() is "less raw" than it used to be, let's use direct-output routines instead, for ANSI output.
-
- 15 Aug, 2019 1 commit
-
-
rswindell authored
optionally including the current (your) node. New @-codes: "ANODES" (active-nodes count), aliases: "ANODE" and "AN" "ONODES" (other-active-nodes count), aliases: "ONODE" and "ON" Make "NN" an alias for "NODE" and "TN" and alias for "TNODE". Add "TNODES" alias for "TNODE" as well, for symmetry.
-
- 12 Aug, 2019 1 commit
-
-
rswindell authored
(not delete) from the end of the sorted list of files (normally, 0). Created an sbbs_t::delfiles() wrapper which defaults to keep 0 files and also generates a error.log message if any of the file-deletions fail.
-
- 07 Aug, 2019 1 commit
-
-
rswindell authored
-
- 05 Aug, 2019 2 commits
-
-
rswindell authored
- new @-code BPS:x (where x is 0/unlimited, 300, 600, 1200, 2400, ... 115200) - new JS property: console.output_rate So you can have mutliple output rate changes in a single file by using multiple BPS @-codes. Hopefully this doesn't do weird things with non-compliant terminals.
-
rswindell authored
now accept an optional "count" argument (default: 1). JS console.backspace() and carrage_return() methods now accept an optional "count" argumnet (default: 1).
-
- 04 Aug, 2019 2 commits
-
-
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).
-
deuce authored
support to the JS API.
-
- 03 Aug, 2019 1 commit
-
-
rswindell authored
flag in the message header. When displaying message header fields containing UTF-8 using show_msghdr() with text.dat string or with msghdr.asc and @-codes, do the "dance" to be sure it's displayed correctly depending on the user's terminal (UTF-8 or not).
-
- 02 Aug, 2019 2 commits
-
-
rswindell authored
a message is posted to a different conference than the original sub-board with completely different header information. I suspect this has something to do HEADERS.DAT creation or import - not sure. So I added a "Conference" headers.dat field for *messages* (it already existed for votes) and use that value to confirm that the message header at the associated offset value in the QWK packet has the same conference number as the section in the headers.dat file. This is really just a sanity check and will only catch messages that were mistakening cross-posted (to a different conference) - *but* it log errors and save the bad QWK or REP file for me to examine more closely and see what's going on - and the message won't be imported (just "lost", which is also bad). So added more QWK import success/error checking and logging (especially for QWK packets since REP importing already had a lot of stats covered). Another check would be to store the original message number in the headers.dat file as well and use that to confirm that the headers.dat section is the correct match for the QWK message at that offset. I did not implement this check, yet. The conference number check seems like it'll catch most of the bad msgs and lead me to the root-cause.
-
rswindell authored
(defauls to enabled, for backward compatibility). Added new autohang args to bbs.send_file() and bbs.receive_file() (default:true) Added support for "description" argument to bbs.send_file() as well.
-
- 24 Jul, 2019 1 commit
-
-
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().
-
- 19 Jul, 2019 1 commit
-
-
rswindell authored
Full editor name and version details (up to 127 chars), for use in the EDITOR msg header field which is propagated over QWK networks. From what I could find, the WWIV RESULT.ED file format only ever contained 2 lines: <Anonymous: 0/1> <subject> So adding support for an optional 3rd line should be fine and backwards compatible. Hopefully WWIV or its message editors don't define a different "standard" 3rd line in the future. :-)
-
- 16 Jul, 2019 1 commit
-
-
rswindell authored
need that internal for SSH and RLogin support of fast-logons. So, now, even if logging in via SSH or Rlogin, the sys_status SS_FASTLOGON flag will be set when the user specifies "!username-or-number" during logon and then the logon.js can use that to determine what to display (or not) to the user, during logon. The QWK logon support ("*username-or-number") is also handled in this new sbbs_t method: parse_login(). This means the fast_logon_char is no longer configurable (hard-coded to '!') and the modopts.ini options are going to be parsed by logon.js from the [logon] section (not the [login] section). You still must set fast_logon=true in the [logon] section of modopts.ini to enable the fast-logon option for users.
-
- 11 Jul, 2019 2 commits
- 10 Jul, 2019 4 commits
-
-
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.
-
rswindell authored
-
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>
-
rswindell authored
@U+<codepoint-in-hex>@ - automatic CP437 fallback char, if available @U+<codepoint-in-hex|cp437char-in-hex>, specify CP437 fallback char @U+<codepoint-in-hex!cp437char-in-hex>, specify CP437 fallback char (used if no automatic fallback mapping is available)
-
- 09 Jul, 2019 1 commit
-
-
rswindell authored
Since not *everything* that #include's sbbs.h needs the PETSCII defs, remove it from sbbs.h and just #include petdefs.h where we need it. The catch-all header file is a problematic organizational design and we are moving away from that.
-
- 08 Jul, 2019 3 commits
-
-
rswindell authored
fidodefs.h:47:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define FIDO_CHARSET_UTF8 "CHRS: UTF-8 4" /* FTS-5003 */ ^ writemsg.cpp:645:15: note: in expansion of macro 'FIDO_CHARSET_UTF8' *charset = FIDO_CHARSET_UTF8;
-
rswindell authored
(e.g. applies to email and netmail now too).
-
rswindell authored
New function (derived from sbbs_t::utf8_to_cp437()): unicode_to_cp437() New utf8 functions: utf8_replace_chars(), utf8_str_is_valid(). utf8_getc() enhancement: val arg may be NULL (for length/validation uses). Convert quoted UTF-8 message text to CP437 when terminal is not UTF8. Set Fido CHRS: UTF-8 header field when posted message is UTF-8.
-
- 07 Jul, 2019 1 commit
-
-
rswindell authored
it and decide whether to write directly to the output ring buffer (EX_BIN) or use rputs() for charset translations.
-
- 06 Jul, 2019 1 commit
-
-
rswindell authored
with ZWNBSP/BOM UTF-8 sequence) and messages (with the "CHRS: UTF-8" FTN control paragra or MIME "charset=utf-8" parts). Not all UNICODE codepoints are supported (obviously). Tested with various files from ftp://columbia.edu/kermit/charsets/ (e.g. test.utf8, utf8-boxes.txt)
-
- 09 May, 2019 1 commit
-
-
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).
-
- 04 May, 2019 3 commits
-
-
rswindell authored
-
rswindell authored
JS's console.getkeys(). If no mode value is specified, K_UPPER is the default behavior (same as before). *.getkeys() currently only recognizes the following mode flags: - K_UPPER - K_NOECHO - K_NOCRLF K_NONE (0) is also a valid value.
-
rswindell authored
Use this in place of JS_GetPrivate() in native class methods that need the class instance's private data pointer and will do bad things if that pointer points to something other than what is expected. mcmlxxix (matt) discovered that using Object.apply(), you can invoke class methods where the 'this' instance is a different class. This would result in "Internal Error: No Private Data." or a crash. So now, gracefully detect this condition and report a meaningful error: "'<class-name>' instance: No Private Data or Class Mismatch" Also, important to note: if the method uses JS_THIS_OBJECT to get the JSObject* to pass to JS_Get*Private, then it must do this *before* it calls JS_SET_RVAL. From jsapi.h: * NB: there is an anti-dependency between JS_CALLEE and JS_SET_RVAL: native * methods that may inspect their callee must defer setting their return value * until after any such possible inspection. Otherwise the return value will be * inspected instead of the callee function object. The js_crypt*.c files still need this treatment.
-
- 02 May, 2019 1 commit
-
-
rswindell authored
Expanded codes will not *not* go beyond the terminal column width (minus 1). If you need the old/wrap behavior, add a "-W" modifier to your @-code. If a length value is specified with -W, it is ignored. - MSG_TO, MSG_FROM, MSG_SUBJECT now reflect the header values passed to sbbs_t::show_msghdr(), JS bbs.show_msg_header() and not necessarily the actual stored (e.g. MIME-encoded) header values. New codes: - MSG_CC - reflect a message's CC list, if it has one - DATETIMEZONE - combines DATETIME and TIMEZONE in one string
-