• src/conio/cterm.c

    From Deucе@VERT to Git commit to main/sbbs/master on Sat Jan 11 00:01:13 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9f6780d23478b6cb933d4949
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Get strncat() and strnlen() out of the hot path...

    Down to 4.7s now... 38× faster.
    Starting to get somewhere useful now.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Jan 11 00:25:01 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/d308ae450e792921290484a5
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Get strspn() out of the ANSI hot path.

    This was the only standout issue when profiling the ANSI parsing
    code, and is a trivial fix since we're pretty much only checking
    contiguous ranges of characters.

    Unfortunately, I didn't create a test for comparison here.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Jan 18 15:13:59 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/274d038bd34c8da952533932
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Fix race condition in starting/stopping playnote thread

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Jan 19 08:44:55 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/51644d7992facd9e90a07b6a
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Indicate not running before posting sem

    Memory is free()ed after sem is posted, so this write goes into
    lalaland.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Jan 20 16:21:27 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c85d0cc939bffa1b1d30f1a1
    Modified Files:
    src/conio/cterm.c
    Log Message:
    retbuf paranoia

    Reported in unmonitor, which always passes NULL.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 22 10:34:07 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/ac92a69b18331da6083a68e2
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Fix handling of C1 control characters

    At the same time, fix an old error in prestel_handle_escaped() that
    didn't pass the ctrl to prestel_apply_ctrl_after() properly, and
    always flush the print buffer before calling prestel_handle_escaped()

    We still shouldn't actually get C1 characters on a Prestel connection,
    but if we do, at least we're doing the right thing now.

    As for G1 characters, the default repetoire for these terminals per
    ITU-T REC. T0101 is the mosaic character set with smoothed moasics,
    something there's no evidence of a Prestel terminal ever supporting.
    In order to implement those properly, I would need special handling
    of "separated" in the renderer, and would need to fiddle with the
    font to include the contiguous smoothed mosaics (and exclide the
    separated ones). Since this would end up allowing wildly un-Pretel
    behaviour (ie: mosaics without a mosaic escape) I'm inclined to
    just treat them all as spaces and move on util/unless I do full
    support for all the Videotex standards. Nobody has asked me to
    open this can of worms, so I'm just going to leave it on the shelf.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 22 11:55:15 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/1eb4ec043e73713ba2e9e4b2
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Ignore invalid ESC sequences in Prestel mode

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 22 11:56:38 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/bf58917b5e6a0c11203e127d
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Clear cterm->sequence and cterm->escbuf when ignoring ESC

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 22 12:00:47 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7982c3cf4ad4cf07ae92d7ce
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Switch back to ignoring unhandled C0 bytes.

    This "feels" more like what the spec means.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 22 12:07:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/1817c363cce0eb301f339cf0
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Update comments for closer reading of the spec.

    Section 2.3.1 is the C0 set, which "is not stored or displayed"
    Section 2.3.2 is the C1 set, so interpret "all control characters"
    in this context as meaning "all C1 characters".

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Jan 23 12:26:13 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4ab569ff44a8501fbfd653f4
    Modified Files:
    src/conio/cterm.c
    Log Message:
    Some todone comments.

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