diff options
author | Nicolas Pitre <npitre@baylibre.com> | 2025-05-07 10:13:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-21 13:39:45 +0200 |
commit | 63f0d28dcabe2733ddb8d0b3813a52bb585b7642 (patch) | |
tree | 97cf7e1dc4be72b412979e67f0414bfda31c86b2 /drivers/tty/vt/gen_ucs_fallback_table.py | |
parent | 6802f3591fdc732d2460eed3112b02cc07acab8f (diff) |
vt: process the full-width ASCII fallback range programmatically
This shaves about 170 bytes from ucs.o.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Link: https://lore.kernel.org/r/20250507141535.40655-9-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/gen_ucs_fallback_table.py')
-rwxr-xr-x | drivers/tty/vt/gen_ucs_fallback_table.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/vt/gen_ucs_fallback_table.py b/drivers/tty/vt/gen_ucs_fallback_table.py index 80257c6df440..6e09c1cb6d4b 100755 --- a/drivers/tty/vt/gen_ucs_fallback_table.py +++ b/drivers/tty/vt/gen_ucs_fallback_table.py @@ -197,6 +197,14 @@ def get_special_overrides(): # Exclude U+2028 (LINE SEPARATOR) overrides[0x2028] = 0 # LINE SEPARATOR (unidecode: '\n') + # Full-width to ASCII mapping (covering all printable ASCII 33-126) + # 0xFF01 (!) to 0xFF5E (~) -> ASCII 33 (!) to 126 (~) + # Those are excluded here to reduce the table size. + # It is more efficient to process them programmatically in + # ucs.c:ucs_get_fallback(). + for cp in range(0xFF01, 0xFF5E + 1): + overrides[cp] = 0 # Double-width ASCII characters + return overrides def organize_by_pages(fallback_map): |