summaryrefslogtreecommitdiff
path: root/include/term/unicode/unicode_data.inc
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-15 12:31:21 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-15 12:31:21 +0300
commit212f1cc9109aa0deb9e5d990bb2dba2b167618fb (patch)
tree0044818d9e12d602b4da3b6823d9997557e5cfae /include/term/unicode/unicode_data.inc
parent5f03033b0e211f9ed13e7a1351f9a8f9011ab665 (diff)
Keep installed headers from shadowing or polluting host names
The pkg-config file put include/term on the host's include path, so ncurses' term.h could be picked up in place of ours. Hosts now write <term/term.h> and the package adds only its include directory. The installed Unicode API had unprefixed names that collide with host symbols and macros. Rename them: term_ for functions, types, and static tables, TERM_ for macros and include guards. unicode_data.inc and tools/generate_unicode.py are renamed to match. The generator's inputs here are Unicode 15.1 and the checked-in table is 18.0.0, so the table data was not regenerated. Only the declarations were checked against the generator. utf8.h casts the malloc result so it compiles as C++. header_test.sh now includes <term/term.h> with only include/ on the path. It also checks that a host which defines unicode_width, UTF8_ACCEPT, GRAPHEME_MAX_LEN, in_ranges, and similar names compiles with the Unicode headers as C11 and C++, in both declaration orders. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/term/unicode/unicode_data.inc')
-rw-r--r--include/term/unicode/unicode_data.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/term/unicode/unicode_data.inc b/include/term/unicode/unicode_data.inc
index 8053b01..4ab1461 100644
--- a/include/term/unicode/unicode_data.inc
+++ b/include/term/unicode/unicode_data.inc
@@ -1,8 +1,8 @@
/* Generated from Unicode 18.0.0 data by tools/generate_unicode.py. */
-#define UNICODE_DATA_VERSION "18.0.0"
+#define TERM_UNICODE_DATA_VERSION "18.0.0"
-static const struct unicode_range zero_width[] = {
+static const struct term_unicode_range term_zero_width[] = {
{0xAD,0xAD},{0x300,0x36F},{0x483,0x489},{0x591,0x5BD},
{0x5BF,0x5BF},{0x5C1,0x5C2},{0x5C4,0x5C5},{0x5C7,0x5C9},
{0x600,0x605},{0x610,0x61A},{0x61C,0x61C},{0x64B,0x65F},
@@ -101,11 +101,11 @@ static const struct unicode_range zero_width[] = {
{0xE0020,0xE007F},{0xE0100,0xE01EF},
};
-static const struct unicode_range nonprintable[] = {
+static const struct term_unicode_range term_nonprintable[] = {
{0x0,0x1F},{0x7F,0x9F},{0xD800,0xDFFF},
};
-static const struct unicode_range unicode_wide[] = {
+static const struct term_unicode_range term_unicode_wide[] = {
{0x1100,0x115F},{0x231A,0x231B},{0x2329,0x232A},{0x23E9,0x23EC},
{0x23F0,0x23F0},{0x23F3,0x23F3},{0x25FD,0x25FE},{0x2614,0x2615},
{0x2630,0x2637},{0x2648,0x2653},{0x267F,0x267F},{0x268A,0x268F},
@@ -140,7 +140,7 @@ static const struct unicode_range unicode_wide[] = {
{0x20000,0x2FFFD},{0x30000,0x3FFFD},
};
-static const struct unicode_range spacing_mark[] = {
+static const struct term_unicode_range term_spacing_mark[] = {
{0x903,0x903},{0x93B,0x93B},{0x93E,0x940},{0x949,0x94C},
{0x94E,0x94F},{0x982,0x983},{0x9BE,0x9C0},{0x9C7,0x9C8},
{0x9CB,0x9CC},{0x9D7,0x9D7},{0xA03,0xA03},{0xA3E,0xA40},
@@ -192,7 +192,7 @@ static const struct unicode_range spacing_mark[] = {
{0x1D16D,0x1D172},{0x1D250,0x1D252},{0x1D25F,0x1D25F},{0x1D280,0x1D281},
};
-static const struct unicode_range extended_pictographic[] = {
+static const struct term_unicode_range term_extended_pictographic[] = {
{0xA9,0xA9},{0xAE,0xAE},{0x203C,0x203C},{0x2049,0x2049},
{0x2122,0x2122},{0x2139,0x2139},{0x2194,0x2199},{0x21A9,0x21AA},
{0x231A,0x231B},{0x2328,0x2328},{0x23CF,0x23CF},{0x23E9,0x23F3},
@@ -234,7 +234,7 @@ static const struct unicode_range extended_pictographic[] = {
{0x1F947,0x1F9FF},{0x1FA58,0x1FA5F},{0x1FA6E,0x1FAFF},{0x1FC00,0x1FFFD},
};
-static const struct unicode_range emoji_presentation[] = {
+static const struct term_unicode_range term_emoji_presentation[] = {
{0x231A,0x231B},{0x23E9,0x23EC},{0x23F0,0x23F0},{0x23F3,0x23F3},
{0x25FD,0x25FE},{0x2614,0x2615},{0x2648,0x2653},{0x267F,0x267F},
{0x2693,0x2693},{0x26A1,0x26A1},{0x26AA,0x26AB},{0x26BD,0x26BE},