https://gitlab.synchro.net/main/sbbs/-/commit/0ed7cdf7e7a50d6144e45781
Modified Files:
src/conio/cterm.c cterm.h src/syncterm/conn.c conn.h conn_conpty.c conn_conpty.h conn_pty.c conn_pty.h rlogin.c rlogin.h ssh.c ssh.h telnet_io.c telnet_io.h term.c window.c
Log Message:
SyncTERM: propagate terminal resizes to the remote end
When DECSSDT toggles the status row the cterm's text dimensions change
live, but nothing was telling the remote BBS. Add a size-change
callback in cterm (fired from cterm_resize_rows) that term.c wires
through a new conn_api.send_window_change dispatcher. Per-protocol implementations:
- Telnet/TelnetS: NAWS subnegotiation, gated on DO NAWS, with RFC
855/1073 0xFF byte-stuffing (previously missing on the inline
DO-NAWS reply too).
- SSH/SSHNA: SSH2 "window-change" via dssh_chan_send_window_change.
- RLogin: RFC 1282 0xFF 0xFF 's' 's' message. First OOB handling
in rlogin.c — enables SO_OOBINLINE, detects urgent bytes via
SIOCATMARK, and dispatches through an extensible
rlogin_handle_control() switch (stubs for 0x02/0x10/0x20; 0x80
latches winsize-enabled and flushes the current size).
- Local shell: TIOCSWINSZ on the pty master (unix) and
ResizePseudoConsole on the HPCON (win32 conpty).
- Raw/Modem/Serial: NULL; wrapper treats NULL as no-op.
Pixel dimensions are normalized across cterm's callback, the conn
callers, and get_term_win_size(): per-cell size comes from runtime vstat.charwidth/charheight (not the static vparams table, which was
wrong for EGA once the font changed), and when the terminal fills
every row/column of the framebuffer we report vstat.scrnwidth/
scrnheight so leftover scanlines (EGA 80x43 has 6 unused rows) aren't truncated. ssh_connect now passes real pixel dims to the initial
pty-req instead of zeros.
Co-Authored-By: Claude Opus 4.7 (1M context) <
[email protected]>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net