aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate-builtin-terminfo.py (unfollow)
Commit message (Collapse)AuthorLines
2025-12-26mypy: no need to declare None as return type for __init__Daniel Eklöf-4/+4
2025-12-26scripts: mypy fixesDaniel Eklöf-35/+50
2025-12-20builtin terminfo: add custom 'query-os-name'Daniel Eklöf-0/+2
Inspired by Kitty's 'kitty-query-os_name'. Notable changes: * Drop kitty prefix * os_name -> os-name * Use "uname -s" without any transformations (e.g. no lower-casing) $ ./utils/xtgettcap query-os-name reply: (44 chars): <ESC>P1+r71756572792d6f732d6e616d65=4C696E7578<ESC>\ query-os-name=Linux Closes #2209
2024-05-01scripts: generate-builtin-terminfo: fix syntax errorArtturin-1/+1
2024-04-30scripts: generate-builtin-terminfo: use \xNN for control charactersDaniel Eklöf-3/+3
Instead of emitting raw control characters (for e.g. bel, cub1 and kbs), use \xNN C string escapes.
2024-04-27dcs: xtgettcap: always reply with tigetstr(3) formatted "strings"Daniel Eklöf-16/+22
That is, instead of sometimes replying with a "source" encoded string (where e.g. '\E' are returned just like that, and not as an actual ESC), always unescape all string values. This also includes \n \r \t \b \f \s, \^ \\ \ \:, as well as ^x-styled escapes. Closes #1701
2022-10-05scripts: generate-builtin-terminfo: escape fixesDaniel Eklöf-7/+14
* Remove ‘:’ escaping only in raw (non-parameterized) sequences * Double-escape *all* escape characters in parameterized sequences
2022-10-05scripts: generate-builtin-terminfo: double-escape backslash in STDaniel Eklöf-0/+4
Fixes an issue with XTGETTCAP, where escape sequences terminated with ST, and containing parameters were missing a trailing backslash.
2022-09-28scripts: generate-builtin-terminfo: add synthetic ‘name’ capabilityDaniel Eklöf-0/+1
Same as ‘TN’; reports the terminfo name.
2022-01-13xtgettcap: switch from a table based internal structure, to a single char arrayDaniel Eklöf-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.
2022-01-13dcs: xtgettcap: handle boolean capabilitiesDaniel Eklöf-4/+5
Reply with DCS 1 + r <cap> ST
2022-01-13scripts: generate-builtin-terminfo: add custom capability ‘Co’Daniel Eklöf-1/+2
This is a “special feature”, similar to “TN” and “RGB”: Co for termcap colors (or colors for terminfo colors)
2022-01-13script: add generate-builtin-terminfo.pyDaniel Eklöf-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
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-230/+0
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.