BBS:      TELESC.NET.BR
Assunto:  src/syncterm/term.c
De:       Deuc¨
Data:     Sat, 21 Mar 2026 06:26:33 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/e5a31427d83c14b2d05cb9fa
Modified Files:
	src/syncterm/term.c
Log Message:
Refactor doterm() key translation from switch statements to sorted tables

Replace 585 lines of per-emulation switch/case key translation with
sorted lookup tables and bsearch(). Each emulation (ATASCII, PETSCII,
Prestel, BEEB, VT52, ANSI-BBS) gets its own static const table in
.rodata. Special cases (DECBKM backspace, ATASCII inverse toggle,
Prestel reveal) remain as inline logic in send_emulation_key().

Includes verify_key_tables() with assert() to catch sort-order
regressions in debug builds.

Co-Authored-By: Claude Opus 4.6 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]