aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate-builtin-terminfo.py (follow)
Commit message (Collapse)AuthorAgeLines
* scripts: generate-builtin-terminfo: escape fixesDaniel Eklöf2022-10-05-7/+14
| | | | | * Remove ‘:’ escaping only in raw (non-parameterized) sequences * Double-escape *all* escape characters in parameterized sequences
* scripts: generate-builtin-terminfo: double-escape backslash in STDaniel Eklöf2022-10-05-0/+4
| | | | | Fixes an issue with XTGETTCAP, where escape sequences terminated with ST, and containing parameters were missing a trailing backslash.
* scripts: generate-builtin-terminfo: add synthetic ‘name’ capabilityDaniel Eklöf2022-09-28-0/+1
| | | | Same as ‘TN’; reports the terminfo name.
* xtgettcap: switch from a table based internal structure, to a single char arrayDaniel Eklöf2022-01-13-33/+24
| | | | | | | | | | | | | | | | | | Having the builtin terminfo DB as a table, with one entry per capability/value pair was ineffective memory-wise - we ended up adding ~20K to the final binary size. This patch changes the internal representation from a table, to a single NULL-separated (and NULL-terminated) char array: cap1-name \0 cap1-value \0 cap2-name \0 cap2-value \0 The capabilities are still sorted; to lookup a capability we need to scan from the beginning until we either find a match, or until the capabilities from the DB sort higher (lexicographically) than the searched-for capability. The terminfo char array is 3.3K - more better than before.
* dcs: xtgettcap: handle boolean capabilitiesDaniel Eklöf2022-01-13-4/+5
| | | | Reply with DCS 1 + r <cap> ST
* scripts: generate-builtin-terminfo: add custom capability ‘Co’Daniel Eklöf2022-01-13-1/+2
| | | | | | This is a “special feature”, similar to “TN” and “RGB”: Co for termcap colors (or colors for terminfo colors)
* script: add generate-builtin-terminfo.pyDaniel Eklöf2022-01-13-0/+202
This script parses a terminfo source file and generates a C header file with a static struct containing terminfo names and their values. The table is sorted on the capability names