Commit graph

3 commits

Author SHA1 Message Date
Nicolas Pitre
c2d2c5c0d6 vt: move UCS tables to the "shipped" form
Use the "shipped" mechanism to copy pre-generated tables to the build
tree by default. If GENERATE_UCS_TABLES=1 then they are generated at
build time instead. If GENERATE_UCS_TABLES=2 then
gen_ucs_recompose_table.py is invoked with --full.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250417184849.475581-15-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-26 11:22:04 +02:00
Nicolas Pitre
ad934777f0 vt: update gen_ucs_width_table.py to make tables more space efficient
Split table ranges into BMP (16-bit) and non-BMP (above 16-bit).
This reduces the corresponding text size by 20-25%.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250417184849.475581-13-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-26 11:22:04 +02:00
Nicolas Pitre
b11a041179 vt: introduce gen_ucs_width_table.py to create ucs_width_table.h
The table in ucs.c is terribly out of date and incomplete. We also need a
second table to store zero-width code points. Properly maintaining those
tables manually is impossible. So here's a script to generate them.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250417184849.475581-5-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-26 11:22:03 +02:00