diff --git a/source/dcell/parser.d b/source/dcell/parser.d index 90da3ce..18d264e 100644 --- a/source/dcell/parser.d +++ b/source/dcell/parser.d @@ -2,7 +2,7 @@ * Parser module for dcell contains the code for parsing terminfo escapes * as they arrive on /dev/tty. * - * Copyright: Copyright 2022 Garrett D'Amore + * Copyright: Copyright 2025 Garrett D'Amore * Authors: Garrett D'Amore * License: * Distributed under the Boost Software License, Version 1.0. @@ -354,7 +354,7 @@ class Parser partial = false; // we have to parse the paste bit first - if (parsePaste() || parseRune() || parseFnKey() || parseSgrMouse() || parseLegacyMouse()) + if (parsePaste() || parseRune() || parseFnKey() || parseSgrMouse()) { keyStart = now; continue; @@ -732,155 +732,101 @@ private: return false; } - bool parseLegacyMouse() + unittest { - int x, y, btn; - - enum State - { - start, - bracket, - end - } - - State state; - - for (int i = 0; i < buf.length; i++) - { - final switch (state) - { - case State.start: - switch (buf[i]) - { - case '\x1b': - state = State.bracket; - break; - case '\x9b': - state = State.end; - break; - default: - return false; - } - break; - case State.bracket: - if (buf[i] != '[') - return false; - state++; - break; - case State.end: - if (buf[i] != 'M') - return false; - if (buf.length < i + 4) - break; - buf = buf[i + 1 .. $]; - btn = int(buf[0]); - x = int(buf[1]) - 32 - 1; - y = int(buf[2]) - 32 - 1; - buf = buf[3 .. $]; - evs ~= newMouseEvent(x, y, btn); - return true; - } - } - if (state > 0) - partial = true; - return false; + import core.thread; + import dcell.database; + + // taken from xterm, but pared down + static immutable Termcap term = { + name: "test-term", + enterKeypad: "\x1b[?1h\x1b=", + exitKeypad: "\x1b[?1l\x1b>", + cursorBack1: "\x08", + cursorUp1: "\x1b[A", + keyBackspace: "\x08", + keyF1: "\x1bOP", + keyF2: "\x1bOQ", + keyF3: "\x1bOR", + keyInsert: "\x1b[2~", + keyDelete: "\x1b[3~", + keyHome: "\x1bOH", + keyEnd: "\x1bOF", + keyPgUp: "\x1b[5~", + keyPgDn: "\x1b[6~", + keyUp: "\x1bOA", + keyDown: "\x1bOB", + keyLeft: "\x1bOD", + keyRight: "\x1bOC", + keyBacktab: "\x1b[Z", + keyShfRight: "\x1b[1;2C", + mouse: "\x1b[M", + }; + Database.put(&term); + auto tc = Database.get("test-term"); + assert(tc !is null); + Parser p = new Parser(ParseKeys(tc)); + assert(p.empty()); + assert(p.parse("")); // no data, is fine + assert(p.parse("\x1bOC")); + auto ev = p.events(); + + assert(ev.length == 1); + assert(ev[0].type == EventType.key); + assert(ev[0].key.key == Key.right); + + // this tests that the timed pase parsing works - + // escape sequences are kept partially until we + // have a match or we have waited long enough. + assert(p.parse(['\x1b', 'O']) == false); + ev = p.events(); + assert(ev.length == 0); + Thread.sleep(msecs(100)); + assert(p.parse([]) == true); + ev = p.events(); + assert(ev.length == 1); + assert(ev[0].type == EventType.key); + assert(ev[0].key.key == Key.rune); + assert(ev[0].key.mod == Modifiers.alt); + + // lone escape + assert(p.parse(['\x1b']) == false); + ev = p.events(); + assert(ev.length == 0); + Thread.sleep(msecs(100)); + assert(p.parse([]) == true); + ev = p.events(); + assert(ev.length == 1); + assert(ev[0].type == EventType.key); + assert(ev[0].key.key == Key.esc); + assert(ev[0].key.mod == Modifiers.none); + + // try injecting paste events + assert(tc.enablePaste != ""); + assert(p.parse(['\x1b', '[', '2', '0', '0', '~'])); + assert(p.parse(['A'])); + assert(p.parse(['\x1b', '[', '2', '0', '1', '~'])); + + ev = p.events(); + assert(ev.length == 1); + assert(ev[0].type == EventType.paste); + assert(ev[0].paste.content == "A"); + + // mouse events + assert(p.parse(['\x1b', '[', '<', '3', ';', '2', ';', '3', 'M'])); + ev = p.events(); + assert(ev.length == 1); + assert(ev[0].type == EventType.mouse); + assert(ev[0].mouse.pos.x == 1); + assert(ev[0].mouse.pos.y == 2); + + // unicode + string b = [0xe2, 0x82, 0xac]; + assert(p.parse(b)); + ev = p.events(); + assert(ev.length == 1); + assert(ev[0].type == EventType.key); + assert(ev[0].key.key == Key.rune); + assert(ev[0].key.ch == '€'); } } - -unittest -{ - import core.thread; - import dcell.database; - - // taken from xterm, but pared down - static immutable Termcap term = { - name: "test-term", - enterKeypad: "\x1b[?1h\x1b=", - exitKeypad: "\x1b[?1l\x1b>", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - keyBackspace: "\x08", - keyF1: "\x1bOP", - keyF2: "\x1bOQ", - keyF3: "\x1bOR", - keyInsert: "\x1b[2~", - keyDelete: "\x1b[3~", - keyHome: "\x1bOH", - keyEnd: "\x1bOF", - keyPgUp: "\x1b[5~", - keyPgDn: "\x1b[6~", - keyUp: "\x1bOA", - keyDown: "\x1bOB", - keyLeft: "\x1bOD", - keyRight: "\x1bOC", - keyBacktab: "\x1b[Z", - keyShfRight: "\x1b[1;2C", - mouse: "\x1b[M", - }; - Database.put(&term); - auto tc = Database.get("test-term"); - assert(tc !is null); - Parser p = new Parser(ParseKeys(tc)); - assert(p.empty()); - assert(p.parse("")); // no data, is fine - assert(p.parse("\x1bOC")); - auto ev = p.events(); - - assert(ev.length == 1); - assert(ev[0].type == EventType.key); - assert(ev[0].key.key == Key.right); - - // this tests that the timed pase parsing works - - // escape sequences are kept partially until we - // have a match or we have waited long enough. - assert(p.parse(['\x1b', 'O']) == false); - ev = p.events(); - assert(ev.length == 0); - Thread.sleep(msecs(100)); - assert(p.parse([]) == true); - ev = p.events(); - assert(ev.length == 1); - assert(ev[0].type == EventType.key); - assert(ev[0].key.key == Key.rune); - assert(ev[0].key.mod == Modifiers.alt); - - // lone escape - assert(p.parse(['\x1b']) == false); - ev = p.events(); - assert(ev.length == 0); - Thread.sleep(msecs(100)); - assert(p.parse([]) == true); - ev = p.events(); - assert(ev.length == 1); - assert(ev[0].type == EventType.key); - assert(ev[0].key.key == Key.esc); - assert(ev[0].key.mod == Modifiers.none); - - // try injecting paste events - assert(tc.enablePaste != ""); - assert(p.parse(['\x1b', '[', '2', '0', '0', '~'])); - assert(p.parse(['A'])); - assert(p.parse(['\x1b', '[', '2', '0', '1', '~'])); - - ev = p.events(); - assert(ev.length == 1); - assert(ev[0].type == EventType.paste); - assert(ev[0].paste.content == "A"); - - // mouse events - assert(p.parse(['\x1b', '[', '<', '3', ';', '2', ';', '3', 'M'])); - ev = p.events(); - assert(ev.length == 1); - assert(ev[0].type == EventType.mouse); - assert(ev[0].mouse.pos.x == 1); - assert(ev[0].mouse.pos.y == 2); - - // unicode - string b = [0xe2, 0x82, 0xac]; - assert(p.parse(b)); - ev = p.events(); - assert(ev.length == 1); - assert(ev[0].type == EventType.key); - assert(ev[0].key.key == Key.rune); - assert(ev[0].key.ch == '€'); -} diff --git a/source/dcell/termcap.d b/source/dcell/termcap.d index 0c68f7a..d0c6f4b 100644 --- a/source/dcell/termcap.d +++ b/source/dcell/termcap.d @@ -1,7 +1,7 @@ /** * Termcap module for dcell, contains the structure used to define terminal capabilities. * - * Copyright: Copyright 2022 Garrett D'Amore + * Copyright: Copyright 2025 Garrett D'Amore * Authors: Garrett D'Amore * License: * Distributed under the Boost Software License, Version 1.0. @@ -10,7 +10,6 @@ */ module dcell.termcap; -import core.thread; import std.conv; import std.algorithm; import std.functional; @@ -221,9 +220,9 @@ struct Termcap * to an interactive terminal like /dev/tty or stdin, while * interpreting embedded delay sequences of the form * $ (where DELAY is given in milliseconds, and must - * be a positive rational number of milliseconds). When these - * are encountered, the flush delegate is called (if not null), - * and the function sleeps for the indicated amount of time. + * be a positive rational number of milliseconds). However, + * we no longer need to delay as no terminal actually needs + * this (sorry ancient physical vt100 terminals), so we drop it. */ static void puts(R)(R output, string s, void delegate() flush = null) if (isOutputRange!(R, ubyte)) @@ -282,15 +281,6 @@ struct Termcap } val = val[1 .. $]; } - - if (valid) - { - if (flush !is null) - { - flush(); - } - Thread.sleep(usecs(usec * mult)); - } } } @@ -305,10 +295,6 @@ struct Termcap puts(ob, "AB$<1000>C"); puts(ob, "DEF$<100.5>\n"); - auto end = Clock.currTime(); - assert(end > now); - assert(now + seconds(1) <= end); - assert(now + seconds(2) > end); assert(ob.toString() == "ABCDEF\n"); // negative tests -- we don't care what's in the file (UB), but it must not panic @@ -328,9 +314,6 @@ struct Termcap puts(ob, "AB$<100>C"); puts(ob, "DEF$<100.5>\n"); auto end = Clock.currTime(); - assert(end > now); - assert(now + msecs(200) <= end); - assert(now + msecs(300) > end); assert(ob.toString() == "ABCDEF\n"); } @@ -350,12 +333,8 @@ struct Termcap } auto f = new Flusher(); - auto now = Clock.currTime(); puts(f, "ABC$<100>DEF", &f.flush); auto end = Clock.currTime(); - assert(end > now); - assert(now + msecs(100) <= end); - assert(f.flushes == 1); assert(f.toString() == "ABCDEF"); } diff --git a/source/dcell/terminfo/beterm.d b/source/dcell/terminfo/beterm.d deleted file mode 100644 index 0a3c692..0000000 --- a/source/dcell/terminfo/beterm.d +++ /dev/null @@ -1,57 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.beterm; - -import dcell.database; - -// beterm -static immutable Termcap term0 = { - name: "beterm", - lines: 25, - colors: 8, - bell: "\x07", - clear: "\x1b[H\x1b[J", - attrOff: "\x1b[0;10m", - underline: "\x1b[4m", - bold: "\x1b[1m", - reverse: "\x1b[7m", - enterKeypad: "\x1b[?4h", - exitKeypad: "\x1b[?4l", - setFg: "\x1b[3%p1%dm", - setBg: "\x1b[4%p1%dm", - resetColors: "\x1b[m", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - padChar: "\x00", - insertChar: "\x1b[@", - keyBackspace: "\x08", - keyF1: "\x1b[11~", - keyF2: "\x1b[12~", - keyF3: "\x1b[13~", - keyF4: "\x1b[14~", - keyF5: "\x1b[15~", - keyF6: "\x1b[16~", - keyF7: "\x1b[17~", - keyF8: "\x1b[18~", - keyF9: "\x1b[19~", - keyF10: "\x1b[20~", - keyF11: "\x1b[21~", - keyF12: "\x1b[22~", - keyInsert: "\x1b[2~", - keyDelete: "\x1b[3~", - keyHome: "\x1b[1~", - keyEnd: "\x1b[4~", - keyPgUp: "\x1b[5~", - keyPgDn: "\x1b[6~", - keyUp: "\x1b[A", - keyDown: "\x1b[B", - keyLeft: "\x1b[D", - keyRight: "\x1b[C", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/cygwin.d b/source/dcell/terminfo/cygwin.d deleted file mode 100644 index 386f8cb..0000000 --- a/source/dcell/terminfo/cygwin.d +++ /dev/null @@ -1,67 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.cygwin; - -import dcell.database; - -// cygwin -static immutable Termcap term0 = { - name: "cygwin", - colors: 8, - bell: "\x07", - clear: "\x1b[H\x1b[J", - enterCA: "\x1b7\x1b[?47h", - exitCA: "\x1b[2J\x1b[?47l\x1b8", - attrOff: "\x1b[0;10m", - underline: "\x1b[4m", - bold: "\x1b[1m", - reverse: "\x1b[7m", - setFg: "\x1b[3%p1%dm", - setBg: "\x1b[4%p1%dm", - resetColors: "\x1b[39;49m", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - padChar: "\x00", - insertChar: "\x1b[@", - keyBackspace: "\x08", - keyF1: "\x1b[[A", - keyF2: "\x1b[[B", - keyF3: "\x1b[[C", - keyF4: "\x1b[[D", - keyF5: "\x1b[[E", - keyF6: "\x1b[17~", - keyF7: "\x1b[18~", - keyF8: "\x1b[19~", - keyF9: "\x1b[20~", - keyF10: "\x1b[21~", - keyF11: "\x1b[23~", - keyF12: "\x1b[24~", - keyF13: "\x1b[25~", - keyF14: "\x1b[26~", - keyF15: "\x1b[28~", - keyF16: "\x1b[29~", - keyF17: "\x1b[31~", - keyF18: "\x1b[32~", - keyF19: "\x1b[33~", - keyF20: "\x1b[34~", - keyInsert: "\x1b[2~", - keyDelete: "\x1b[3~", - keyHome: "\x1b[1~", - keyEnd: "\x1b[4~", - keyPgUp: "\x1b[5~", - keyPgDn: "\x1b[6~", - keyUp: "\x1b[A", - keyDown: "\x1b[B", - keyLeft: "\x1b[D", - keyRight: "\x1b[C", - altChars: "+\x10,\x11-\x18.\x190Û`\x04a±føgñh°jÙk¿lÚmÀnÅo~pÄqÄrÄs_tÃu´vÁwÂx³yózò{ã|Ø}œ~þ", - enterACS: "\x1b[11m", - exitACS: "\x1b[10m", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/eterm.d b/source/dcell/terminfo/eterm.d deleted file mode 100644 index 6cb9be3..0000000 --- a/source/dcell/terminfo/eterm.d +++ /dev/null @@ -1,29 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.eterm; - -import dcell.database; - -// eterm -static immutable Termcap term0 = { - name: "eterm", - lines: 24, - bell: "\x07", - clear: "\x1b[H\x1b[J", - enterCA: "\x1b7\x1b[?47h", - exitCA: "\x1b[2J\x1b[?47l\x1b8", - attrOff: "\x1b[m", - underline: "\x1b[4m", - bold: "\x1b[1m", - reverse: "\x1b[7m", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - padChar: "\x00", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/hpterm.d b/source/dcell/terminfo/hpterm.d deleted file mode 100644 index 48e69aa..0000000 --- a/source/dcell/terminfo/hpterm.d +++ /dev/null @@ -1,52 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.hpterm; - -import dcell.database; - -// hpterm -static immutable Termcap term0 = { - name: "hpterm", - aliases: ["X-hpterm"], - lines: 24, - bell: "\x07", - clear: "\x1b&a0y0C\x1bJ", - attrOff: "\x1b&d@", - underline: "\x1b&dD", - bold: "\x1b&dB", - reverse: "\x1b&dB", - dim: "\x1b&dH", - enterKeypad: "\x1b&s1A", - exitKeypad: "\x1b&s0A", - setCursor: "\x1b&a%p1%dy%p2%dC", - cursorBack1: "\x08", - cursorUp1: "\x1bA", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x1bp", - keyF2: "\x1bq", - keyF3: "\x1br", - keyF4: "\x1bs", - keyF5: "\x1bt", - keyF6: "\x1bu", - keyF7: "\x1bv", - keyF8: "\x1bw", - keyInsert: "\x1bQ", - keyDelete: "\x1bP", - keyHome: "\x1bh", - keyPgUp: "\x1bV", - keyPgDn: "\x1bU", - keyUp: "\x1bA", - keyDown: "\x1bB", - keyLeft: "\x1bD", - keyRight: "\x1bC", - keyClear: "\x1bJ", - enterACS: "\x0e", - exitACS: "\x0f", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/kterm.d b/source/dcell/terminfo/kterm.d deleted file mode 100644 index 6729c8a..0000000 --- a/source/dcell/terminfo/kterm.d +++ /dev/null @@ -1,68 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.kterm; - -import dcell.database; - -// kterm -static immutable Termcap term0 = { - name: "kterm", - lines: 24, - colors: 8, - bell: "\x07", - clear: "\x1b[H\x1b[2J", - enterCA: "\x1b7\x1b[?47h", - exitCA: "\x1b[2J\x1b[?47l\x1b8", - attrOff: "\x1b[m\x1b(B", - underline: "\x1b[4m", - bold: "\x1b[1m", - reverse: "\x1b[7m", - enterKeypad: "\x1b[?1h\x1b=", - exitKeypad: "\x1b[?1l\x1b>", - setFg: "\x1b[3%p1%dm", - setBg: "\x1b[4%p1%dm", - resetColors: "\x1b[39;49m", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x1b[11~", - keyF2: "\x1b[12~", - keyF3: "\x1b[13~", - keyF4: "\x1b[14~", - keyF5: "\x1b[15~", - keyF6: "\x1b[17~", - keyF7: "\x1b[18~", - keyF8: "\x1b[19~", - keyF9: "\x1b[20~", - keyF10: "\x1b[21~", - keyF11: "\x1b[23~", - keyF12: "\x1b[24~", - keyF13: "\x1b[25~", - keyF14: "\x1b[26~", - keyF15: "\x1b[28~", - keyF16: "\x1b[29~", - keyF17: "\x1b[31~", - keyF18: "\x1b[32~", - keyF19: "\x1b[33~", - keyF20: "\x1b[34~", - keyInsert: "\x1b[2~", - keyDelete: "\x1b[3~", - keyPgUp: "\x1b[5~", - keyPgDn: "\x1b[6~", - keyUp: "\x1bOA", - keyDown: "\x1bOB", - keyLeft: "\x1bOD", - keyRight: "\x1bOC", - mouse: "\x1b[M", - altChars: "``aajjkkllmmnnooppqqrrssttuuvvwwxx~~", - enterACS: "\x1b(0", - exitACS: "\x1b(B", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/package.d b/source/dcell/terminfo/package.d index da4ba4b..25f6c37 100644 --- a/source/dcell/terminfo/package.d +++ b/source/dcell/terminfo/package.d @@ -8,28 +8,16 @@ module dcell.terminfo; import dcell.terminfo.aixterm; import dcell.terminfo.alacritty; import dcell.terminfo.ansi; -import dcell.terminfo.beterm; -import dcell.terminfo.cygwin; import dcell.terminfo.dtterm; -import dcell.terminfo.eterm; import dcell.terminfo.gnome; -import dcell.terminfo.hpterm; import dcell.terminfo.konsole; -import dcell.terminfo.kterm; import dcell.terminfo.linux; -import dcell.terminfo.pcansi; import dcell.terminfo.rxvt; import dcell.terminfo.screen; import dcell.terminfo.vt100; import dcell.terminfo.vt102; import dcell.terminfo.vt220; import dcell.terminfo.vt320; -import dcell.terminfo.vt400; import dcell.terminfo.vt420; -import dcell.terminfo.vt52; -import dcell.terminfo.wy50; -import dcell.terminfo.wy60; -import dcell.terminfo.wy99aansi; -import dcell.terminfo.wy99ansi; import dcell.terminfo.xfce; import dcell.terminfo.xterm; diff --git a/source/dcell/terminfo/pcansi.d b/source/dcell/terminfo/pcansi.d deleted file mode 100644 index 82e0bf6..0000000 --- a/source/dcell/terminfo/pcansi.d +++ /dev/null @@ -1,41 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.pcansi; - -import dcell.database; - -// pcansi -static immutable Termcap term0 = { - name: "pcansi", - lines: 24, - colors: 8, - bell: "\x07", - clear: "\x1b[H\x1b[J", - attrOff: "\x1b[0;10m", - underline: "\x1b[4m", - bold: "\x1b[1m", - blink: "\x1b[5m", - reverse: "\x1b[7m", - setFg: "\x1b[3%p1%dm", - setBg: "\x1b[4%p1%dm", - resetColors: "\x1b[37;40m", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x1b[D", - cursorUp1: "\x1b[A", - padChar: "\x00", - keyBackspace: "\x08", - keyHome: "\x1b[H", - keyUp: "\x1b[A", - keyDown: "\x1b[B", - keyLeft: "\x1b[D", - keyRight: "\x1b[C", - altChars: "+\x10,\x11-\x18.\x190Û`\x04a±føgñh°jÙk¿lÚmÀnÅo~pÄqÄrÄs_tÃu´vÁwÂx³yózò{ã|Ø}œ~þ", - enterACS: "\x1b[12m", - exitACS: "\x1b[10m", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/vt100.d b/source/dcell/terminfo/vt100.d index 0c03499..30b09a2 100644 --- a/source/dcell/terminfo/vt100.d +++ b/source/dcell/terminfo/vt100.d @@ -10,17 +10,17 @@ static immutable Termcap term0 = { aliases: ["vt100-am"], lines: 24, bell: "\x07", - clear: "\x1b[H\x1b[J$<50>", - attrOff: "\x1b[m\x0f$<2>", - underline: "\x1b[4m$<2>", - bold: "\x1b[1m$<2>", - blink: "\x1b[5m$<2>", - reverse: "\x1b[7m$<2>", + clear: "\x1b[H\x1b[J", + attrOff: "\x1b[m\x0f", + underline: "\x1b[4m", + bold: "\x1b[1m", + blink: "\x1b[5m", + reverse: "\x1b[7m", enterKeypad: "\x1b[?1h\x1b=", exitKeypad: "\x1b[?1l\x1b>", - setCursor: "\x1b[%i%p1%d;%p2%dH$<5>", + setCursor: "\x1b[%i%p1%d;%p2%dH", cursorBack1: "\x08", - cursorUp1: "\x1b[A$<2>", + cursorUp1: "\x1b[A", padChar: "\x00", keyBackspace: "\x08", keyF1: "\x1bOP", diff --git a/source/dcell/terminfo/vt102.d b/source/dcell/terminfo/vt102.d index c969a8a..b13c0cb 100644 --- a/source/dcell/terminfo/vt102.d +++ b/source/dcell/terminfo/vt102.d @@ -9,17 +9,17 @@ static immutable Termcap term0 = { name: "vt102", lines: 24, bell: "\x07", - clear: "\x1b[H\x1b[J$<50>", - attrOff: "\x1b[m\x0f$<2>", - underline: "\x1b[4m$<2>", - bold: "\x1b[1m$<2>", - blink: "\x1b[5m$<2>", - reverse: "\x1b[7m$<2>", + clear: "\x1b[H\x1b[J", + attrOff: "\x1b[m\x0f", + underline: "\x1b[4m", + bold: "\x1b[1m", + blink: "\x1b[5m", + reverse: "\x1b[7m", enterKeypad: "\x1b[?1h\x1b=", exitKeypad: "\x1b[?1l\x1b>", - setCursor: "\x1b[%i%p1%d;%p2%dH$<5>", + setCursor: "\x1b[%i%p1%d;%p2%dH", cursorBack1: "\x08", - cursorUp1: "\x1b[A$<2>", + cursorUp1: "\x1b[A", padChar: "\x00", keyBackspace: "\x08", keyF1: "\x1bOP", diff --git a/source/dcell/terminfo/vt220.d b/source/dcell/terminfo/vt220.d index 76aa7cd..45d5d05 100644 --- a/source/dcell/terminfo/vt220.d +++ b/source/dcell/terminfo/vt220.d @@ -47,8 +47,8 @@ static immutable Termcap term0 = { keyLeft: "\x1b[D", keyRight: "\x1b[C", altChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - enterACS: "\x1b(0$<2>", - exitACS: "\x1b(B$<4>", + enterACS: "\x1b(0", + exitACS: "\x1b(B", enableACS: "\x1b)0", automargin: true, }; diff --git a/source/dcell/terminfo/vt400.d b/source/dcell/terminfo/vt400.d deleted file mode 100644 index d6b4715..0000000 --- a/source/dcell/terminfo/vt400.d +++ /dev/null @@ -1,49 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.vt400; - -import dcell.database; - -// vt400 -static immutable Termcap term0 = { - name: "vt400", - aliases: ["vt400-24", "dec-vt400"], - lines: 24, - clear: "\x1b[H\x1b[J$<10/>", - showCursor: "\x1b[?25h", - hideCursor: "\x1b[?25l", - attrOff: "\x1b[m\x1b(B", - underline: "\x1b[4m", - bold: "\x1b[1m", - blink: "\x1b[5m", - reverse: "\x1b[7m", - enterKeypad: "\x1b[?1h\x1b=", - exitKeypad: "\x1b[?1l\x1b>", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08", - cursorUp1: "\x1b[A", - padChar: "\x00", - insertChar: "\x1b[@", - keyBackspace: "\x08", - keyF1: "\x1bOP", - keyF2: "\x1bOQ", - keyF3: "\x1bOR", - keyF4: "\x1bOS", - keyF6: "\x1b[17~", - keyF7: "\x1b[18~", - keyF8: "\x1b[19~", - keyF9: "\x1b[20~", - keyUp: "\x1bOA", - keyDown: "\x1bOB", - keyLeft: "\x1bOD", - keyRight: "\x1bOC", - altChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - enterACS: "\x1b(0", - exitACS: "\x1b(B", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/vt420.d b/source/dcell/terminfo/vt420.d index 19f2475..0560eff 100644 --- a/source/dcell/terminfo/vt420.d +++ b/source/dcell/terminfo/vt420.d @@ -9,15 +9,15 @@ static immutable Termcap term0 = { name: "vt420", lines: 24, bell: "\x07", - clear: "\x1b[H\x1b[2J$<50>", - attrOff: "\x1b[m$<2>", + clear: "\x1b[H\x1b[2J", + attrOff: "\x1b[m", underline: "\x1b[4m", - bold: "\x1b[1m$<2>", - blink: "\x1b[5m$<2>", - reverse: "\x1b[7m$<2>", + bold: "\x1b[1m", + blink: "\x1b[5m", + reverse: "\x1b[7m", enterKeypad: "\x1b=", exitKeypad: "\x1b>", - setCursor: "\x1b[%i%p1%d;%p2%dH$<10>", + setCursor: "\x1b[%i%p1%d;%p2%dH", cursorBack1: "\x08", cursorUp1: "\x1b[A", padChar: "\x00", @@ -41,8 +41,8 @@ static immutable Termcap term0 = { keyLeft: "\x1b[D", keyRight: "\x1b[C", altChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", - enterACS: "\x1b(0$<2>", - exitACS: "\x1b(B$<4>", + enterACS: "\x1b(0", + exitACS: "\x1b(B", automargin: true, }; diff --git a/source/dcell/terminfo/vt52.d b/source/dcell/terminfo/vt52.d deleted file mode 100644 index 3119081..0000000 --- a/source/dcell/terminfo/vt52.d +++ /dev/null @@ -1,30 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.vt52; - -import dcell.database; - -// vt52 -static immutable Termcap term0 = { - name: "vt52", - lines: 24, - bell: "\x07", - clear: "\x1bH\x1bJ", - setCursor: "\x1bY%p1%\' \'%+%c%p2%\' \'%+%c", - cursorBack1: "\x1bD", - cursorUp1: "\x1bA", - padChar: "\x00", - keyBackspace: "\x08", - keyUp: "\x1bA", - keyDown: "\x1bB", - keyLeft: "\x1bD", - keyRight: "\x1bC", - altChars: ".kffgghhompoqqss", - enterACS: "\x1bF", - exitACS: "\x1bG", -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/wy50.d b/source/dcell/terminfo/wy50.d deleted file mode 100644 index d0bb312..0000000 --- a/source/dcell/terminfo/wy50.d +++ /dev/null @@ -1,61 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.wy50; - -import dcell.database; - -// wy50 -static immutable Termcap term0 = { - name: "wy50", - aliases: ["wyse50"], - lines: 24, - bell: "\x07", - clear: "\x1b+$<20>", - showCursor: "\x1b`1", - hideCursor: "\x1b`0", - attrOff: "\x1b(\x1bH\x03", - reverse: "\x1b`6\x1b)", - dim: "\x1b`7\x1b)", - setCursor: "\x1b=%p1%\' \'%+%c%p2%\' \'%+%c", - cursorBack1: "\x08", - cursorUp1: "\x0b", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x01@\r", - keyF2: "\x01A\r", - keyF3: "\x01B\r", - keyF4: "\x01C\r", - keyF5: "\x01D\r", - keyF6: "\x01E\r", - keyF7: "\x01F\r", - keyF8: "\x01G\r", - keyF9: "\x01H\r", - keyF10: "\x01I\r", - keyF11: "\x01J\r", - keyF12: "\x01K\r", - keyF13: "\x01L\r", - keyF14: "\x01M\r", - keyF15: "\x01N\r", - keyF16: "\x01O\r", - keyInsert: "\x1bQ", - keyDelete: "\x1bW", - keyHome: "\x1e", - keyPgUp: "\x1bJ", - keyPgDn: "\x1bK", - keyUp: "\x0b", - keyDown: "\n", - keyLeft: "\x08", - keyRight: "\x0c", - keyBacktab: "\x1bI", - keyPrint: "\x1bP", - altChars: "0wa_h[jukslrmqnxqzttuyv]wpxv", - enterACS: "\x1bH\x02", - exitACS: "\x1bH\x03", - keyShfHome: "\x1b{", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/wy60.d b/source/dcell/terminfo/wy60.d deleted file mode 100644 index 50f6979..0000000 --- a/source/dcell/terminfo/wy60.d +++ /dev/null @@ -1,65 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.wy60; - -import dcell.database; - -// wy60 -static immutable Termcap term0 = { - name: "wy60", - aliases: ["wyse60"], - lines: 24, - bell: "\x07", - clear: "\x1b+$<100>", - enterCA: "\x1bw0", - exitCA: "\x1bw1", - showCursor: "\x1b`1", - hideCursor: "\x1b`0", - attrOff: "\x1b(\x1bH\x03\x1bG0\x1bcD", - underline: "\x1bG8", - blink: "\x1bG2", - reverse: "\x1bG4", - dim: "\x1bGp", - setCursor: "\x1b=%p1%\' \'%+%c%p2%\' \'%+%c", - cursorBack1: "\x08", - cursorUp1: "\x0b", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x01@\r", - keyF2: "\x01A\r", - keyF3: "\x01B\r", - keyF4: "\x01C\r", - keyF5: "\x01D\r", - keyF6: "\x01E\r", - keyF7: "\x01F\r", - keyF8: "\x01G\r", - keyF9: "\x01H\r", - keyF10: "\x01I\r", - keyF11: "\x01J\r", - keyF12: "\x01K\r", - keyF13: "\x01L\r", - keyF14: "\x01M\r", - keyF15: "\x01N\r", - keyF16: "\x01O\r", - keyInsert: "\x1bQ", - keyDelete: "\x1bW", - keyHome: "\x1e", - keyPgUp: "\x1bJ", - keyPgDn: "\x1bK", - keyUp: "\x0b", - keyDown: "\n", - keyLeft: "\x08", - keyRight: "\x0c", - keyBacktab: "\x1bI", - keyPrint: "\x1bP", - altChars: "+/,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~", - enterACS: "\x1bcE", - exitACS: "\x1bcD", - keyShfHome: "\x1b{", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/wy99aansi.d b/source/dcell/terminfo/wy99aansi.d deleted file mode 100644 index 2913a07..0000000 --- a/source/dcell/terminfo/wy99aansi.d +++ /dev/null @@ -1,63 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.wy99aansi; - -import dcell.database; - -// wy99a-ansi -static immutable Termcap term0 = { - name: "wy99a-ansi", - lines: 25, - bell: "\x07", - clear: "\x1b[H\x1b[J$<200>", - showCursor: "\x1b[34h\x1b[?25h", - hideCursor: "\x1b[?25l", - attrOff: "\x1b[m\x0f\x1b[\"q", - underline: "\x1b[4m", - bold: "\x1b[1m", - blink: "\x1b[5m", - reverse: "\x1b[7m", - dim: "\x1b[2m", - enterKeypad: "\x1b[?1h", - exitKeypad: "\x1b[?1l", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08$<1>", - cursorUp1: "\x1bM", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x1bOP", - keyF2: "\x1bOQ", - keyF3: "\x1bOR", - keyF4: "\x1bOS", - keyF5: "\x1b[M", - keyF6: "\x1b[17~", - keyF7: "\x1b[18~", - keyF8: "\x1b[19~", - keyF9: "\x1b[20~", - keyF10: "\x1b[21~", - keyF11: "\x1b[23~", - keyF12: "\x1b[24~", - keyF17: "\x1b[K", - keyF18: "\x1b[31~", - keyF19: "\x1b[32~", - keyF20: "\x1b[33~", - keyF21: "\x1b[34~", - keyF22: "\x1b[35~", - keyF23: "\x1b[1~", - keyF24: "\x1b[2~", - keyUp: "\x1bOA", - keyDown: "\x1bOB", - keyLeft: "\x1bOD", - keyRight: "\x1bOC", - keyBacktab: "\x1b[z", - altChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", - enterACS: "\x0e", - exitACS: "\x0f", - enableACS: "\x1b)0", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -} diff --git a/source/dcell/terminfo/wy99ansi.d b/source/dcell/terminfo/wy99ansi.d deleted file mode 100644 index 2417241..0000000 --- a/source/dcell/terminfo/wy99ansi.d +++ /dev/null @@ -1,63 +0,0 @@ -// Generated automatically. DO NOT HAND-EDIT. - -module dcell.terminfo.wy99ansi; - -import dcell.database; - -// wy99-ansi -static immutable Termcap term0 = { - name: "wy99-ansi", - lines: 25, - bell: "\x07", - clear: "\x1b[H\x1b[J$<200>", - showCursor: "\x1b[34h\x1b[?25h", - hideCursor: "\x1b[?25l", - attrOff: "\x1b[m\x0f\x1b[\"q", - underline: "\x1b[4m", - bold: "\x1b[1m", - blink: "\x1b[5m", - reverse: "\x1b[7m", - dim: "\x1b[2m", - enterKeypad: "\x1b[?1h", - exitKeypad: "\x1b[?1l", - setCursor: "\x1b[%i%p1%d;%p2%dH", - cursorBack1: "\x08$<1>", - cursorUp1: "\x1bM", - padChar: "\x00", - keyBackspace: "\x08", - keyF1: "\x1bOP", - keyF2: "\x1bOQ", - keyF3: "\x1bOR", - keyF4: "\x1bOS", - keyF5: "\x1b[M", - keyF6: "\x1b[17~", - keyF7: "\x1b[18~", - keyF8: "\x1b[19~", - keyF9: "\x1b[20~", - keyF10: "\x1b[21~", - keyF11: "\x1b[23~", - keyF12: "\x1b[24~", - keyF17: "\x1b[K", - keyF18: "\x1b[31~", - keyF19: "\x1b[32~", - keyF20: "\x1b[33~", - keyF21: "\x1b[34~", - keyF22: "\x1b[35~", - keyF23: "\x1b[1~", - keyF24: "\x1b[2~", - keyUp: "\x1bOA", - keyDown: "\x1bOB", - keyLeft: "\x1bOD", - keyRight: "\x1bOC", - keyBacktab: "\x1b[z", - altChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", - enterACS: "\x0e", - exitACS: "\x0f", - enableACS: "\x1b)0", - automargin: true, -}; - -static this() -{ - Database.put(&term0); -}