SUMMARY.md 2.8 KB

Terminal escape libraries — summary (tag: terminals-strict-v1)

Three strict, direct-emitter Modula-2 libraries (gm2 -fiso), no Concat tables. Each procedure writes its bytes via STextIO immediately.

Libraries

  • VT100.def/mod (MODULE VT100) — strict DEC VT100: SGR 0,1,4,5,7, cursor H/CUP/HVP/CUU/CUD/CUF/CUB, IND/RI/NEL, DECSC/DECRC, erase EL0/1/2 + ED0/1/2, DECSTBM, tabs, double-size ESC#3..#8, LNM + DEC private modes ?1..?9, keypad ESC=/ESC>, charsets G0/G1 + SS2/SS3, DSR/DA/RIS, LEDs, DECTST. No VT52, no DOS screen modes, no xterm, no colors.
  • VT52.def/mod (MODULE VT52) — strict DEC VT52 (17 procs): ESC </=/>, charsets F/G, cursor A/B/C/D/H, ESC Y direct address (+31 offset, row first), I/K/J/Z//Z.
  • Ansi.def/mod (MODULE Ansi) — modern superset per docs/VT100-3.txt: cursor incl. E/F/G/s/u, erase incl. 3J, SGR 0-9 + resets, SetAttr, 16 colors + Default, 38;5/48;5, 38;2/48;2 RGB, DOS ESC[=, private ?25/?47/?1049, print i/1i/4i/5i, BEL..CR.
  • All three export Unbuffered / Buffered (termios save + IO.UnBufferedMode, restore + BufferedMode; pattern from ../Editor/Tests/T17.mod) so device replies (CPR ESC[row;colR) can be read char-by-char with IO.Read, no RETURN needed.

Tests (tests/, all link clean)

  • TestVT100* (11): SGR, Cursor, Scroll, Erase, Tabs, Size, Modes, Keypad, Charset, Reports, LedTest.
  • TestVT52* (4): Mode, Cursor, Erase, Ident.
  • TestAnsi* (7): Cursor, Erase, SGR, Color, Modes, Print, RequestPosition (live CPR query, prints Row=/Col=).
  • testSplit.mod (SplitV1 helper, kept from original code).

Build

sh build.sh — compiles SplitV1 + VT100 + VT52 + Ansi, links every test. Full suite exit 0. Byte-verified via od: ESC[0m/1m, ESC[3;7H, ESC[2J, ESC[?3h, ESC(0, ESCc, ESC[38;5;200m, ESC[38;2;255;0;128m, ESC[?1049h, ESC[i, ESC Y $ ), ESC / Z.

Archive

Old/ keeps the superseded originals untouched: firsttest files, pre-promotion VT100.def/mod, old-API tests (TestVT100N13, T). docs/ holds the VT100/VT52 reference material plus regis-cli.txt.

ReGIS

Regis.def/mod (MODULE Regis) — ReGIS vector graphics for xterm (built with --enable-regis-graphics) and contour, grounded in the VT330/VT340 PRM via the contour ReGIS reference: Enter (DCS 1 p) / EnterResume (DCS p) / Exit (ST), S(E), address window, P/V absolute + signed-relative, Dot, Rect, C circle variants + arcs, F(V) triangle fill, T text + size/dir/slant, W colors (index/named/RGB/HLS), modes, patterns, widths, shading, @ macrographs, R reports (send-only), Unbuffered/Buffered. Tests: TestRegisDemo/Color/Macro. See docs/regis-cli.txt for shell one-liners and support detection (CSI c contains ;3).