• src/conio/curs_cio.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Feb 23 10:46:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4ad3ae9d92a17f3a8985683e
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Fix curses kbhit() to only return true when ready to read

    Previously, an error in select() would also return true.
    May be part of the issue seen in ticket 216.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Mar 15 14:09:13 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/f3860da8dc297cbd766a4200
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Fix F11/F12 scancodes in curs_cio.c

    F11 and F12 were using 0x57/0x58 (INT 16h physical scancodes)
    instead of 0x85/0x86 (BIOS extended scancodes) as used by every
    other backend and defined by CIO_KEY_F(11)/CIO_KEY_F(12).

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Mar 18 21:52:28 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/317f26995eb17ffa4bde55a1
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Fix curses CPU spin when PTY is deleted (ticket #216)

    When a ttyd/SSH session drops and the PTY is deleted, ioctl(FIONREAD)
    returns -1/EIO instead of 0. The EOF detection in curs_getch() only
    checked for ioctl()==0, so the EIO case was missed and the while(get_wch()==ERR) loop spun at ~100% CPU. Treat FIONREAD failure
    as a dead fd and return CIO_KEY_QUIT immediately.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Aug 10 21:30:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/826514e72339ef2036c76d26
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Account for curses' own input queue in curs_kbhit() (#1223)

    Completing an escape sequence makes curses read ahead: on receiving ESC
    it consumes further bytes for up to ESCDELAY (uifc sets 25 ms) trying to
    match a key sequence, and holds whatever it swallowed but did not return
    in its own input queue.

    curs_kbhit() answered "is a key waiting?" with a zero-timeout select() on stdin, which cannot see that queue, and the uifc menu loop only calls
    getch() when kbhit says yes. A byte parked in the queue was therefore
    never fetched until unrelated input arrived on the descriptor, leaving
    the application one keystroke behind for the rest of the session.

    Typing ESC with anything close behind it is enough to trigger this, so it
    shows up readily over ssh and inside screen, where the network coalesces
    two quick keystrokes into a single burst. The visible symptom in SCFG is
    an ESC that does nothing until the next key is pressed. Every ciolib curses-mode program is affected, not just SCFG.

    Ask curses as well when select() comes up empty, and push back whatever
    it hands over. The suspended check is needed because curs_kbhit(), unlike curs_getch(), never calls curs_resume(), so it can be reached after
    endwin().

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Aug 10 22:04:14 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/864f3554e7b14a2c43459b9e
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Revert the curs_kbhit() peek into the curses input queue (#1223)

    Reverts 826514e723 (hang-4-prevention, 2026-08-10). It does not fix the
    input lag it was written for.

    That lag is not a curses buffering problem. Inside GNU screen, once the application enables mouse reporting (DECSET 1000, 1002 or 1003), screen
    holds a trailing ESC byte and releases it only when the next input byte arrives, so the ESC never reaches the descriptor and no amount of asking
    curses for it helps. A raw stdin reader with no curses linked in shows
    the same hold, and the hold is unbounded - measured past 10 seconds.
    tmux does not do this.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Aug 10 22:11:28 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e4d2b183bbd6ce717027e1c1
    Modified Files:
    src/conio/curs_cio.c
    Log Message:
    Safely check curses' input queue in curs_kbhit()

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