diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
| commit | dcebf9c7f954a55350b68d0ead1935612c4e2e05 (patch) | |
| tree | 3eb3e9f6154c6760bcb89a565f8ddc8f8b66cb90 /tools/generate_unicode.py | |
| parent | bd8222e615134c3ec5e7a07b6b1fa97c9bd4a471 (diff) | |
Rename the library to wsap_vtcore
ncurses installs <term.h> and defines struct term. In a file that
includes both headers, an ncurses TERMINAL * and this library's terminal
are silently the same type. The name wsap_vtcore avoids the clash.
The public header is now <wsap_vtcore/wsap_vtcore.h>. Every global
symbol uses the wsap_vtcore_ prefix, every macro uses WSAP_VTCORE_, and
the shared library is libwsap_vtcore.so.0. The default terminal name is
now "wsap_vtcore". The ISA override variable is WSAP_VTCORE_ISA.
No other behavior changes. The amalgamation writes wsap_vtcore.c and
wsap_vtcore.h.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tools/generate_unicode.py')
| -rw-r--r-- | tools/generate_unicode.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/generate_unicode.py b/tools/generate_unicode.py index 22f12a6..340509a 100644 --- a/tools/generate_unicode.py +++ b/tools/generate_unicode.py @@ -71,7 +71,7 @@ def unicode_categories(path): return by_category def emit_table(out, name, ranges): - out.append(f"static const struct term_unicode_range {name}[] = {{") + out.append(f"static const struct wsap_vtcore_unicode_range {name}[] = {{") for i in range(0, len(ranges), 4): chunk = ranges[i:i + 4] out.append("\t" + ",".join(f"{{0x{lo:X},0x{hi:X}}}" for lo, hi in chunk) + ",") @@ -104,13 +104,13 @@ def main(): emoji_presentation = field_ranges(args.emoji_data, {"Emoji_Presentation"}) out = [f"/* Generated from Unicode {version} data by tools/generate_unicode.py. */", "", - f'#define TERM_UNICODE_DATA_VERSION "{version}"', ""] - emit_table(out, "term_zero_width", zero) - emit_table(out, "term_nonprintable", nonprint) - emit_table(out, "term_unicode_wide", wide) - emit_table(out, "term_spacing_mark", spacing) - emit_table(out, "term_extended_pictographic", pictographic) - emit_table(out, "term_emoji_presentation", emoji_presentation) + f'#define WSAP_VTCORE_UNICODE_DATA_VERSION "{version}"', ""] + emit_table(out, "wsap_vtcore_zero_width", zero) + emit_table(out, "wsap_vtcore_nonprintable", nonprint) + emit_table(out, "wsap_vtcore_unicode_wide", wide) + emit_table(out, "wsap_vtcore_spacing_mark", spacing) + emit_table(out, "wsap_vtcore_extended_pictographic", pictographic) + emit_table(out, "wsap_vtcore_emoji_presentation", emoji_presentation) args.output.write_text("\n".join(out)) if __name__ == "__main__": |
