• src/sbbs3/ansiterm.cpp ge

    From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Friday, August 09, 2024 19:25:00
    https://gitlab.synchro.net/main/sbbs/-/commit/0d281709be67b9bf92346e63
    Modified Files:
    src/sbbs3/ansiterm.cpp getkey.cpp inkey.cpp js_console.cpp sbbs.h
    Log Message:
    Rename sbbs_t::ungetstr() and JS console.ungetstr() to ungetkeys()

    ... since these methods only feed the keyboard buffer.

    Add an optional 'insert' argument to console.ungetkeys() - default is false (append).

    Add a new version of console.ungetstr() which feeds the passed characters directly to the receive input buffer. Now returns bool indicating success. Existing scripts (if any) that use console.ungetstr() should continue to work just fine.

    This is anticipation of telgate.js being able to stuff strings (e.g. username, password) into the input buffer and those chars/keys being passed to the
    remote (gatewayed) telnet server. Since the telnet gateway reads directly from the receive input buffer (ignoring the keyboard buffer), we needed a way to stuff strings of characters into the receive input buffer directly and that sort of exposed the weirdness of the existing console.ungetstr() method:
    - it didn't return a return value (not indication of failure)
    - it didn't support an 'insert' operation (even though the underlying C++
    method does)
    - it didn't use the sbbs_t method that already existed for feedding a string
    of characters into the input/keyboard buffer

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net