• src/syncterm/ripper.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Mar 17 11:59:16 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e9b4206eb16d93e29dd10df7
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Replace dead argc check with malloc NULL check in do_skypix()

    The argc < 1 guard was unreachable because the counting loop always
    increments argc at least once. Replace it with a NULL check on the
    malloc() result, which was the actual missing guard.
    (Coverity CID 501977)

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Mar 21 19:53:02 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/6cce9286f030bf47bd57e6d5
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Fix three |# (RIP_NO_MORE) parsing bugs in parse_rip()

    Bug reported by NightFox, who should really open bug reports on
    SourceForge instead of making people chase things down secondhand.

    1. Stale '!' rendered when |# follows non-RIP text

    When non-RIP bytes precede '!' in the same buffer (e.g. the common
    case of \n\r or \r\n line endings before a RIP line), rip_start is
    non-zero. The |# handler called handle_rip_line() which took its
    first branch: deferring the RIP data to pending, truncating blen to
    rip_start, and returning false. But the handler unconditionally ran
    rip_start = pos + 1, which now exceeded blen. At the end of
    parse_rip(), rip_start <= maxlen was true but rip_start > blen, so
    buffer_rip was skipped but rip_start was returned as the output
    length — reading the stale '!' byte from the physically-uncleared
    buffer position. Commit 27e6a20f added the rip_start <= blen guard
    to prevent a crash but did not fix the data leak.

    Fix: check handle_rip_line()'s return value. When it returns false
    (deferred), don't modify rip_start. When it returns true (processed
    immediately), do the post-processing as before. Also pass
    RIP_STATE_BANG instead of RIP_STATE_CMD since both paths want BANG
    state after |#.

    2. |# must flush immediately, even when deferred

    The entire purpose of the |# special handling (added in 93e05beb)
    is to flush RIP commands without waiting for a line terminator.
    When handle_rip_line() defers (returns false), the RIP data sits
    in pending unprocessed until the next parse_rip() call — defeating
    the flush semantics. This matters for interactive commands like
    the NY2008 popup (|1000) that block waiting for user input: the
    popup wouldn't appear until after the next data arrived.

    Fix: when handle_rip_line() returns false, process pending
    immediately via do_rip_string() and reset newstate to FLUSHING
    so the next flush call knows there's nothing left to process.

    3. |# bytes leak as visible text from moredata

    When handle_rip_line()'s first branch defers RIP data, remaining
    bytes after |# are saved to moredata. On the next parse_rip()
    call, the flush path processes pending and switches to moredata.
    But handle_rip_line() unconditionally resets rip_start to the
    sentinel (maxlen+1), even though the restored state (BANG) means
    the moredata buffer is entirely RIP data. With rip_start as
    sentinel, the |# handler's handle_rip_line() call took the second
    path with remove=0, failing to remove the |# bytes from the
    buffer. They were then returned to the caller as visible text.

    Fix: after the flush path switches to moredata, re-check the
    restored state. If it's not BOL/MOL (i.e. still inside a RIP
    sequence), reset rip_start to 0.

    4. Allow '!' to start new RIP sequence after |#

    Per the spec, |# means "end of RIPscrip scene." Testing against
    RIPterm (reference implementation) confirms that '!' after |# on
    the same line starts a new RIP sequence. SyncTERM's BANG state
    only accepted '|', sending '!' to unrip_line -> MOL where it was
    rejected as a RIP start character.

    Fix: accept '!', '\x01', and '\x02' in RIP_STATE_BANG, updating
    rip_start and staying in BANG. This matches RIPterm's behavior
    where both |#|#|# (repeated NO_MORE) and |#!|... (new sequence)
    work on the same line.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Apr 13 01:14:04 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/87ddc4046f27a9c51592941d
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    More fixes.

    RIPterm doesn't render \x0e or \x0f at all. (perseid.rip)
    Fixed size is ALWAYS used for plain buttons.
    Fix stroked-font tabs.
    The actual movement after a glyph is drawn comes from the stroke
    data, NOT the width data. In SANS.CHR at least, the table has TAB
    with a width of 0, but it's actually 24 based on the stroke.
    Only use npoints for |p, |P, and |l
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Apr 13 20:15:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2b59a74912e34419e35217eb
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    More RIP tweaks

    Correctly handle the "selected" flag.
    This also makes selecting buttons match the RIPterm rendering.

    Support "highlight icon" buttons.
    This is what you're expected to use with radio buttons and checkboxen

    Fix paste clipping
    It clips at the bottom of the screen, rejects at the right.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Apr 14 00:49:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/412fcb168c8a5e4a7854d93c
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Add support for justified text.

    Bug-compatible with RIPterm as usual.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Apr 14 01:03:08 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3c9429e9b886b357504661bb
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Fix whitespace
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Apr 14 01:04:48 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3f3da7f1f946bc833f8c5763
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Remove segment/offset references from comments.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Apr 15 11:09:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/d00fb8a5a903062bed9355bb
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Fix build for SyncVIEW
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 11:10:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/97b24908022f8f9b66219660
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Don't set values that end up never used.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 11:16:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/d626b0ea46f25e95455be770
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Some more type twiddling
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 14:01:08 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/37b929e00df0ace04dcdac0b
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Fix invalid ESC buffer expansion/stuffing
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 14:01:08 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/846d51fe947ce8e276793f2e
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Save/restore CTerm receive callback when reiniting

    Otherwise ANSI responses stop flowing back to the BBS in RIP mode.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 14:36:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9c50d542280c470b42f8c236
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Save font when drawing buttons and use it.

    Black Flag RIP menus changed fonts after drawing buttons, and that
    made things look bad.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 17 22:38:54 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/6147bc695c037df28bc4c6e4
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Avoid implying to Coverity that rip.stw.size belongs in a mutex
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Apr 18 01:39:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/fadf3dfffe8df12876c622b1
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    Fix some Coverity warnings.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Apr 24 23:19:16 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4a72a5fa65458b2f2df810d9
    Modified Files:
    src/syncterm/ripper.c
    Log Message:
    We define our own M_PI now.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)