• src/sbbs3/ansi_terminal.c

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Oct 30 19:20:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/52675cb8cce3880093ea8760
    Modified Files:
    src/sbbs3/ansi_terminal.cpp prntfile.cpp putmsg.cpp
    Log Message:
    Track emulated output rate changes in all output, restore after putmsg()

    A message containing a raw DECSCS sequence (ESC[0;6*r) left SyncTERM at
    the emulated baud rate for all following output (prompts, etc.), most noticeably after aborting the message display with Ctrl-C or 'N' at the
    pause prompt.

    putmsg() only restored the output rate when it had been changed by an
    @BPS:n@ code, which updates term->cur_output_rate; a DECSCS sequence sent
    in any other output was passed through untracked. And the restore was
    skipped entirely in P_NOATCODES mode, which is how network-originated
    messages are displayed.

    Have ANSI_Terminal's output parser track the output speed selected by any DECSCS sequence sent (from message text, JS console.write(), etc.), and
    restore the original rate whenever it changed, regardless of P_NOATCODES
    (in both putmsg() and printfile()'s line-at-a-time mode).

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Oct 30 19:20:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c062f230a8c6c8d38b2399ea
    Modified Files:
    src/sbbs3/ansi_terminal.cpp
    Log Message:
    ANSI_Terminal: reset the background to default with SGR 49, not 39

    attrstr() emitted SGR 39 (default foreground) when switching to an
    attribute with BG_UNKNOWN, so the terminal's background color was never
    reset. A background left set (e.g. by ANSI art) then bled into the text
    that followed, while curatr claimed the default background, e.g. when
    pause() or putmsg() restored an attribute saved after an ESC[0m.

    Introduced in 374282bf81 (skins-28-shop, 2025-03-30).

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Oct 30 19:20:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8e1d6c99c5ccf35419c81a83
    Modified Files:
    src/sbbs3/ansi_terminal.cpp
    Log Message:
    ANSI_Terminal::getxy(): discard partial coordinates when restarting

    When an unexpected byte interrupted the cursor position report, getxy()
    pushed the bytes received so far back into the keyboard buffer and started looking for a new report, but kept any row/column digits already
    accumulated into *y/*x. The digits of the next report were then appended
    to them, yielding a wrong position (e.g. row 1 followed by a report of row
    5 returned 15).

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Oct 30 19:20:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/cd906399af94415ff9f86d5a
    Modified Files:
    src/sbbs3/ansi_terminal.cpp
    Log Message:
    ANSI_Terminal: fix cursor tracking of ED, CNL/CPL, DECSTBM, IND, and RIS

    The output parser tracked every ED (CSI Ps J) as homing the cursor and resetting the line counter, but only CSI 2J does that (and only on
    ANSI-BBS terminals such as SyncTERM). Synchronet itself sends CSI J for
    Ctrl-A J, @CLR2EOS@, and console.cleartoeos(), after which the tracked row/column were wrong: the next auto-pause came late, and with console.optimize_gotoxy enabled, a following gotoxy() could be skipped entirely.

    Also track, matching SyncTERM's cterm:
    - CNL (CSI E) and CPL (CSI F) moving to column 1
    - DECSTBM (CSI r) homing the cursor when the margins are valid
    - IND (ESC D) moving down one line
    - RIS (ESC c) resetting the attribute to the terminal default

    DECSC/DECRC (ESC 7 / ESC 8) remain untracked.

    Fixes #1314

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From MRO@VERT to Rob Swindell (on Debian L on Sun Nov 1 08:45:00 2026
    Re: src/sbbs3/ansi_terminal.cpp
    By: Rob Swindell (on Debian Linux) to Git commit to main/sbbs/master on Fri Oct 30 2026 07:20 pm

    https://gitlab.synchro.net/main/sbbs/-/commit/8e1d6c99c5ccf3
    5419c81a83 Modified Files: src/sbbs3/ansi_terminal.cpp Log Message: ANSI_Terminal::getxy(): discard partial coordinates when restarting

    When an unexpected byte interrupted the cursor position report,
    getxy() pushed the bytes received so far back into the keyboard
    buffer and started looking for a new report, but kept any row/column
    digits already accumulated into *y/*x. The digits of the next report
    were then appended to them, yielding a wrong position (e.g. row 1
    followed by a report of row 5 returned 15).

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



    another thing you should do is add a max size for that media cache.
    it can really fill up.


    --
    https://i.imgur.com/MNKA5U0.png
    President of BBS Sysop's Union +++ https://bbses.info/union
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 13 20:36:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1635fb18e653ea4338efa893
    Modified Files:
    src/sbbs3/ansi_terminal.cpp ansi_terminal.h con_out.cpp terminal.h
    Log Message:
    Send the ANSI music terminator raw on UTF-8 connections

    ANSI music is CSI M, N or | followed by note characters and ended by SO
    (0x0E). On a UTF-8 terminal, cp437_out() translated every byte through cp437_unicode_tbl[], which maps 0x0E to U+266B (beamed eighth notes), so
    the terminal never saw the terminator and silently discarded the tune.

    ANSI_Terminal now tracks when output is inside a music string: it starts
    on CSI N, CSI |, or CSI M without parameters (with parameters, CSI M is
    Delete Line), continues through the music alphabet, and ends on SO or on
    any other byte. While a string is open, SO is sent untranslated; outside
    one, 0x0E still renders as the CP437 glyph. The note characters no longer advance the tracked column, and a completed music string is removed from
    the saved line so restoreline() doesn't replay the tune.

    Fixes #1344

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>