https://gitlab.synchro.net/main/sbbs/-/commit/18ccff2087bc6bba561d2433
Modified Files:
src/doors/syncdoom/syncdoom.c src/doors/syncduke/syncduke_io.c src/doors/syncretro/syncretro_io.c src/doors/termgfx/stats.c stats.h src/doors/termgfx/test/test_stats.c
Log Message:
termgfx: the Ctrl-S strip has to fit the row it is drawn on
Spelling the turn-key model out -- " kitty/nat" became " kitty turn=nat"
in 6b95aa66c0 (2026-07-26) -- cost five columns on a strip that was
already within a few of the margin. SyncDuke's row measures 81 columns in
the sixel-full tier, 82 in JXL with the inline-blob and upscale fields,
and 84 on the widest text tier, against an 80-column SyncTERM. What the
player sees depends on the terminal: the tail lost to the margin, or the overflow wrapped onto the last row of the game view and everything
scrolled up a line.
Two changes buy the width back and one keeps it bought.
The shared head spells the pipeline depth "d3/auto" rather than
"depth 3/auto", which is what termgfx_termio's row and SyncConquer's have always called it -- the same field read two ways depending on which door
was open. That is five columns, and dropping the trailing space each door appended is a sixth: the strip ends in an erase-to-end-of-line that paints
the rest of the row in the bar's own colors, so the space was never
visible. Duke's three rows come to 75, 76 and 78.
termgfx_stats_clip() is the part that keeps it. Clamping each number, which
is all stats.c did, bounds no total -- fields accumulate, and this row overflowed by gaining one more of them. Every door now clips the assembled strip to its own column count as the last step before painting. The cut
lands on a field boundary so a survivor is never a half-printed value, and
a width not yet probed (cols <= 0) leaves the strip alone.
SyncDOOM's and SyncRetro's rows change with the head; both were inside the margin already. The stderr stats line SyncDuke logs keeps "depth" -- a log
is grepped and plotted, and costs no columns.
test_stats asserts the two widths a door can actually reach -- the widest
tier name, and JXL where the blob and upscale fields appear -- fit 80, and covers the clip's boundary cut and its untouched cases.
Built and tested under MSVC only; not yet compiled under GCC/Clang.
Uncrustify was unavailable on this machine, so the new code was written to
the house style by hand.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net