From d14345fc1253495baa32bbcaa71e55a1700b0ab7 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 2 Feb 2007 11:46:39 +0100 Subject: [PATCH] Get rid of ancient types: sbyte, word, sword. s8, u16 and s16 are definitely more readable. --- charset/U-ligatures.h | 34 +++++++++++++++++----------------- charset/U-lower.h | 24 ++++++++++++------------ charset/U-unacc.h | 26 +++++++++++++------------- charset/U-upper.h | 24 ++++++++++++------------ charset/misc/gen-ligatures | 4 ++-- charset/misc/generate | 6 +++--- charset/toligatures.c | 2 +- charset/unicat.h | 10 +++++----- 8 files changed, 65 insertions(+), 65 deletions(-) diff --git a/charset/U-ligatures.h b/charset/U-ligatures.h index 49c5334e..667720dd 100644 --- a/charset/U-ligatures.h +++ b/charset/U-ligatures.h @@ -1,28 +1,28 @@ #define LIG_HASH_SIZE 24 -static const word *_U_lig_hash[] = { +static const u16 *_U_lig_hash[] = { NULL, NULL, NULL, - /* FB13 */ (const word []) { 0x0574, 0x0576, 0 }, - /* FB14 */ (const word []) { 0x0574, 0x0565, 0 }, - /* FB15 */ (const word []) { 0x0574, 0x056B, 0 }, - /* FB16 */ (const word []) { 0x057E, 0x0576, 0 }, - /* FB17 */ (const word []) { 0x0574, 0x056D, 0 }, - /* FB00 */ (const word []) { 0x0066, 0x0066, 0 }, - /* FB01 */ (const word []) { 0x0066, 0x0069, 0 }, - /* FB02 */ (const word []) { 0x0066, 0x006C, 0 }, - /* FB03 */ (const word []) { 0x0066, 0x0066, 0x0069, 0 }, - /* FB04 */ (const word []) { 0x0066, 0x0066, 0x006C, 0 }, - /* FB05 */ (const word []) { 0x0073, 0x0074, 0 }, - /* FB06 */ (const word []) { 0x0073, 0x0074, 0 }, - /* FB4F */ (const word []) { 0x05D0, 0x05DC, 0 }, + /* FB13 */ (const u16 []) { 0x0574, 0x0576, 0 }, + /* FB14 */ (const u16 []) { 0x0574, 0x0565, 0 }, + /* FB15 */ (const u16 []) { 0x0574, 0x056B, 0 }, + /* FB16 */ (const u16 []) { 0x057E, 0x0576, 0 }, + /* FB17 */ (const u16 []) { 0x0574, 0x056D, 0 }, + /* FB00 */ (const u16 []) { 0x0066, 0x0066, 0 }, + /* FB01 */ (const u16 []) { 0x0066, 0x0069, 0 }, + /* FB02 */ (const u16 []) { 0x0066, 0x006C, 0 }, + /* FB03 */ (const u16 []) { 0x0066, 0x0066, 0x0069, 0 }, + /* FB04 */ (const u16 []) { 0x0066, 0x0066, 0x006C, 0 }, + /* FB05 */ (const u16 []) { 0x0073, 0x0074, 0 }, + /* FB06 */ (const u16 []) { 0x0073, 0x0074, 0 }, + /* FB4F */ (const u16 []) { 0x05D0, 0x05DC, 0 }, NULL, NULL, - /* 0132 */ (const word []) { 0x0049, 0x004A, 0 }, - /* 0133 */ (const word []) { 0x0069, 0x006A, 0 }, + /* 0132 */ (const u16 []) { 0x0049, 0x004A, 0 }, + /* 0133 */ (const u16 []) { 0x0069, 0x006A, 0 }, NULL, NULL, NULL, - /* 0587 */ (const word []) { 0x0565, 0x0582, 0 }, + /* 0587 */ (const u16 []) { 0x0565, 0x0582, 0 }, }; diff --git a/charset/U-lower.h b/charset/U-lower.h index ebda091a..2e95fdce 100644 --- a/charset/U-lower.h +++ b/charset/U-lower.h @@ -1,6 +1,6 @@ /* Generated automatically by gentab. Please don't edit. */ -static const word _U_lower_00[256] = { +static const u16 _U_lower_00[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -19,7 +19,7 @@ static const word _U_lower_00[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_lower_01[256] = { +static const u16 _U_lower_01[256] = { 0x0101,0,0x0103,0,0x0105,0,0x0107,0,0x0109,0,0x010B,0,0x010D,0,0x010F,0, 0x0111,0,0x0113,0,0x0115,0,0x0117,0,0x0119,0,0x011B,0,0x011D,0,0x011F,0, 0x0121,0,0x0123,0,0x0125,0,0x0127,0,0x0129,0,0x012B,0,0x012D,0,0x012F,0, @@ -38,7 +38,7 @@ static const word _U_lower_01[256] = { 0,0x01F3,0x01F3,0,0x01F5,0,0x0195,0x01BF,0x01F9,0,0x01FB,0,0x01FD,0,0x01FF,0 }; -static const word _U_lower_02[256] = { +static const u16 _U_lower_02[256] = { 0x0201,0,0x0203,0,0x0205,0,0x0207,0,0x0209,0,0x020B,0,0x020D,0,0x020F,0, 0x0211,0,0x0213,0,0x0215,0,0x0217,0,0x0219,0,0x021B,0,0x021D,0,0x021F,0, 0x019E,0,0x0223,0,0x0225,0,0x0227,0,0x0229,0,0x022B,0,0x022D,0,0x022F,0, @@ -57,7 +57,7 @@ static const word _U_lower_02[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_lower_03[256] = { +static const u16 _U_lower_03[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -76,7 +76,7 @@ static const word _U_lower_03[256] = { 0,0,0,0,0x03B8,0,0,0x03F8,0,0x03F2,0x03FB,0,0,0,0,0 }; -static const word _U_lower_04[256] = { +static const u16 _U_lower_04[256] = { 0x0450,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,0x045A,0x045B,0x045C,0x045D,0x045E,0x045F, 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F, @@ -95,7 +95,7 @@ static const word _U_lower_04[256] = { 0x04F1,0,0x04F3,0,0x04F5,0,0,0,0x04F9,0,0,0,0,0,0,0 }; -static const word _U_lower_05[256] = { +static const u16 _U_lower_05[256] = { 0x0501,0,0x0503,0,0x0505,0,0x0507,0,0x0509,0,0x050B,0,0x050D,0,0x050F,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -114,7 +114,7 @@ static const word _U_lower_05[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_lower_1E[256] = { +static const u16 _U_lower_1E[256] = { 0x1E01,0,0x1E03,0,0x1E05,0,0x1E07,0,0x1E09,0,0x1E0B,0,0x1E0D,0,0x1E0F,0, 0x1E11,0,0x1E13,0,0x1E15,0,0x1E17,0,0x1E19,0,0x1E1B,0,0x1E1D,0,0x1E1F,0, 0x1E21,0,0x1E23,0,0x1E25,0,0x1E27,0,0x1E29,0,0x1E2B,0,0x1E2D,0,0x1E2F,0, @@ -133,7 +133,7 @@ static const word _U_lower_1E[256] = { 0x1EF1,0,0x1EF3,0,0x1EF5,0,0x1EF7,0,0x1EF9,0,0,0,0,0,0,0 }; -static const word _U_lower_1F[256] = { +static const u16 _U_lower_1F[256] = { 0,0,0,0,0,0,0,0,0x1F00,0x1F01,0x1F02,0x1F03,0x1F04,0x1F05,0x1F06,0x1F07, 0,0,0,0,0,0,0,0,0x1F10,0x1F11,0x1F12,0x1F13,0x1F14,0x1F15,0,0, 0,0,0,0,0,0,0,0,0x1F20,0x1F21,0x1F22,0x1F23,0x1F24,0x1F25,0x1F26,0x1F27, @@ -152,7 +152,7 @@ static const word _U_lower_1F[256] = { 0,0,0,0,0,0,0,0,0x1F78,0x1F79,0x1F7C,0x1F7D,0x1FF3,0,0,0 }; -static const word _U_lower_21[256] = { +static const u16 _U_lower_21[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0x03C9,0,0,0,0x006B,0x00E5,0,0,0,0, @@ -171,7 +171,7 @@ static const word _U_lower_21[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_lower_24[256] = { +static const u16 _U_lower_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -190,7 +190,7 @@ static const word _U_lower_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_lower_FF[256] = { +static const u16 _U_lower_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F, @@ -209,7 +209,7 @@ static const word _U_lower_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -const word *_U_lower[256] = { +const u16 *_U_lower[256] = { _U_lower_00,_U_lower_01,_U_lower_02,_U_lower_03,_U_lower_04,_U_lower_05,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,_U_lower_1E,_U_lower_1F, NULL,_U_lower_21,NULL,NULL,_U_lower_24,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, diff --git a/charset/U-unacc.h b/charset/U-unacc.h index a0188811..29b3222b 100644 --- a/charset/U-unacc.h +++ b/charset/U-unacc.h @@ -1,6 +1,6 @@ /* Generated automatically by gentab. Please don't edit. */ -static const word _U_unaccent_00[256] = { +static const u16 _U_unaccent_00[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -19,7 +19,7 @@ static const word _U_unaccent_00[256] = { 0,0x006E,0x006F,0x006F,0x006F,0x006F,0x006F,0,0,0x0075,0x0075,0x0075,0x0075,0x0079,0,0x0079 }; -static const word _U_unaccent_01[256] = { +static const u16 _U_unaccent_01[256] = { 0x0041,0x0061,0x0041,0x0061,0x0041,0x0061,0x0043,0x0063,0x0043,0x0063,0x0043,0x0063,0x0043,0x0063,0x0044,0x0064, 0x0044,0x0064,0x0045,0x0065,0x0045,0x0065,0x0045,0x0065,0x0045,0x0065,0x0045,0x0065,0x0047,0x0067,0x0047,0x0067, 0x0047,0x0067,0x0047,0x0067,0x0048,0x0068,0x0048,0x0068,0x0049,0x0069,0x0049,0x0069,0x0049,0x0069,0x0049,0x0069, @@ -38,7 +38,7 @@ static const word _U_unaccent_01[256] = { 0x006A,0,0,0,0x0047,0x0067,0,0,0x004E,0x006E,0x00C5,0x00E5,0x00C6,0x00E6,0x00D8,0x00F8 }; -static const word _U_unaccent_02[256] = { +static const u16 _U_unaccent_02[256] = { 0x0041,0x0061,0x0041,0x0061,0x0045,0x0065,0x0045,0x0065,0x0049,0x0069,0x0049,0x0069,0x004F,0x006F,0x004F,0x006F, 0x0052,0x0072,0x0052,0x0072,0x0055,0x0075,0x0055,0x0075,0x0053,0x0073,0x0054,0x0074,0,0,0x0048,0x0068, 0,0,0,0,0,0,0x0041,0x0061,0x0045,0x0065,0x00D6,0x00F6,0x00D5,0x00F5,0x004F,0x006F, @@ -57,7 +57,7 @@ static const word _U_unaccent_02[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_unaccent_03[256] = { +static const u16 _U_unaccent_03[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -76,7 +76,7 @@ static const word _U_unaccent_03[256] = { 0x03BA,0x03C1,0x03C2,0,0x0398,0x03B5,0,0,0,0x03A3,0,0,0,0,0,0 }; -static const word _U_unaccent_04[256] = { +static const u16 _U_unaccent_04[256] = { 0x0415,0x0415,0,0x0413,0,0,0,0x0406,0,0,0,0,0x041A,0x0418,0x0423,0, 0,0,0,0,0,0,0,0,0,0x0418,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -95,7 +95,7 @@ static const word _U_unaccent_04[256] = { 0x0423,0x0443,0x0423,0x0443,0x0427,0x0447,0,0,0x042B,0x044B,0,0,0,0,0,0 }; -static const word _U_unaccent_1D[256] = { +static const u16 _U_unaccent_1D[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0x0041,0x00C6,0x0042,0, @@ -114,7 +114,7 @@ static const word _U_unaccent_1D[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_unaccent_1E[256] = { +static const u16 _U_unaccent_1E[256] = { 0x0041,0x0061,0x0042,0x0062,0x0042,0x0062,0x0042,0x0062,0x00C7,0x00E7,0x0044,0x0064,0x0044,0x0064,0x0044,0x0064, 0x0044,0x0064,0x0044,0x0064,0x0112,0x0113,0x0112,0x0113,0x0045,0x0065,0x0045,0x0065,0x0228,0x0229,0x0046,0x0066, 0x0047,0x0067,0x0048,0x0068,0x0048,0x0068,0x0048,0x0068,0x0048,0x0068,0x0048,0x0068,0x0049,0x0069,0x00CF,0x00EF, @@ -133,7 +133,7 @@ static const word _U_unaccent_1E[256] = { 0x01AF,0x01B0,0x0059,0x0079,0x0059,0x0079,0x0059,0x0079,0x0059,0x0079,0,0,0,0,0,0 }; -static const word _U_unaccent_1F[256] = { +static const u16 _U_unaccent_1F[256] = { 0x03B1,0x03B1,0x1F00,0x1F01,0x1F00,0x1F01,0x1F00,0x1F01,0x0391,0x0391,0x1F08,0x1F09,0x1F08,0x1F09,0x1F08,0x1F09, 0x03B5,0x03B5,0x1F10,0x1F11,0x1F10,0x1F11,0,0,0x0395,0x0395,0x1F18,0x1F19,0x1F18,0x1F19,0,0, 0x03B7,0x03B7,0x1F20,0x1F21,0x1F20,0x1F21,0x1F20,0x1F21,0x0397,0x0397,0x1F28,0x1F29,0x1F28,0x1F29,0x1F28,0x1F29, @@ -152,7 +152,7 @@ static const word _U_unaccent_1F[256] = { 0,0,0x1F7C,0x03C9,0x03CE,0,0x03C9,0x1FF6,0x039F,0x038C,0x03A9,0x038F,0x03A9,0,0,0 }; -static const word _U_unaccent_20[256] = { +static const u16 _U_unaccent_20[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -171,7 +171,7 @@ static const word _U_unaccent_20[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_unaccent_21[256] = { +static const u16 _U_unaccent_21[256] = { 0,0,0x0043,0,0,0,0,0x0190,0,0,0x0067,0x0048,0x0048,0x0048,0x0068,0x0127, 0x0049,0x0049,0x004C,0x006C,0,0x004E,0,0,0,0x0050,0x0051,0x0052,0x0052,0x0052,0,0, 0,0,0,0,0x005A,0,0x03A9,0,0x005A,0,0x004B,0x00C5,0x0042,0x0043,0,0x0065, @@ -190,7 +190,7 @@ static const word _U_unaccent_21[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_unaccent_24[256] = { +static const u16 _U_unaccent_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -209,7 +209,7 @@ static const word _U_unaccent_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_unaccent_FF[256] = { +static const u16 _U_unaccent_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, @@ -228,7 +228,7 @@ static const word _U_unaccent_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -const word *_U_unaccent[256] = { +const u16 *_U_unaccent[256] = { _U_unaccent_00,_U_unaccent_01,_U_unaccent_02,_U_unaccent_03,_U_unaccent_04,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,_U_unaccent_1D,_U_unaccent_1E,_U_unaccent_1F, _U_unaccent_20,_U_unaccent_21,NULL,NULL,_U_unaccent_24,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, diff --git a/charset/U-upper.h b/charset/U-upper.h index 9021ee19..5cbab1c7 100644 --- a/charset/U-upper.h +++ b/charset/U-upper.h @@ -1,6 +1,6 @@ /* Generated automatically by gentab. Please don't edit. */ -static const word _U_upper_00[256] = { +static const u16 _U_upper_00[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -19,7 +19,7 @@ static const word _U_upper_00[256] = { 0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0,0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x0178 }; -static const word _U_upper_01[256] = { +static const u16 _U_upper_01[256] = { 0,0x0100,0,0x0102,0,0x0104,0,0x0106,0,0x0108,0,0x010A,0,0x010C,0,0x010E, 0,0x0110,0,0x0112,0,0x0114,0,0x0116,0,0x0118,0,0x011A,0,0x011C,0,0x011E, 0,0x0120,0,0x0122,0,0x0124,0,0x0126,0,0x0128,0,0x012A,0,0x012C,0,0x012E, @@ -38,7 +38,7 @@ static const word _U_upper_01[256] = { 0,0,0x01F1,0x01F1,0,0x01F4,0,0,0,0x01F8,0,0x01FA,0,0x01FC,0,0x01FE }; -static const word _U_upper_02[256] = { +static const u16 _U_upper_02[256] = { 0,0x0200,0,0x0202,0,0x0204,0,0x0206,0,0x0208,0,0x020A,0,0x020C,0,0x020E, 0,0x0210,0,0x0212,0,0x0214,0,0x0216,0,0x0218,0,0x021A,0,0x021C,0,0x021E, 0,0,0,0x0222,0,0x0224,0,0x0226,0,0x0228,0,0x022A,0,0x022C,0,0x022E, @@ -57,7 +57,7 @@ static const word _U_upper_02[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_upper_03[256] = { +static const u16 _U_upper_03[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -76,7 +76,7 @@ static const word _U_upper_03[256] = { 0x039A,0x03A1,0x03F9,0,0,0x0395,0,0,0x03F7,0,0,0x03FA,0,0,0,0 }; -static const word _U_upper_04[256] = { +static const u16 _U_upper_04[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -95,7 +95,7 @@ static const word _U_upper_04[256] = { 0,0x04F0,0,0x04F2,0,0x04F4,0,0,0,0x04F8,0,0,0,0,0,0 }; -static const word _U_upper_05[256] = { +static const u16 _U_upper_05[256] = { 0,0x0500,0,0x0502,0,0x0504,0,0x0506,0,0x0508,0,0x050A,0,0x050C,0,0x050E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -114,7 +114,7 @@ static const word _U_upper_05[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_upper_1E[256] = { +static const u16 _U_upper_1E[256] = { 0,0x1E00,0,0x1E02,0,0x1E04,0,0x1E06,0,0x1E08,0,0x1E0A,0,0x1E0C,0,0x1E0E, 0,0x1E10,0,0x1E12,0,0x1E14,0,0x1E16,0,0x1E18,0,0x1E1A,0,0x1E1C,0,0x1E1E, 0,0x1E20,0,0x1E22,0,0x1E24,0,0x1E26,0,0x1E28,0,0x1E2A,0,0x1E2C,0,0x1E2E, @@ -133,7 +133,7 @@ static const word _U_upper_1E[256] = { 0,0x1EF0,0,0x1EF2,0,0x1EF4,0,0x1EF6,0,0x1EF8,0,0,0,0,0,0 }; -static const word _U_upper_1F[256] = { +static const u16 _U_upper_1F[256] = { 0x1F08,0x1F09,0x1F0A,0x1F0B,0x1F0C,0x1F0D,0x1F0E,0x1F0F,0,0,0,0,0,0,0,0, 0x1F18,0x1F19,0x1F1A,0x1F1B,0x1F1C,0x1F1D,0,0,0,0,0,0,0,0,0,0, 0x1F28,0x1F29,0x1F2A,0x1F2B,0x1F2C,0x1F2D,0x1F2E,0x1F2F,0,0,0,0,0,0,0,0, @@ -152,7 +152,7 @@ static const word _U_upper_1F[256] = { 0,0,0,0x1FFC,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_upper_21[256] = { +static const u16 _U_upper_21[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -171,7 +171,7 @@ static const word _U_upper_21[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_upper_24[256] = { +static const u16 _U_upper_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -190,7 +190,7 @@ static const word _U_upper_24[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static const word _U_upper_FF[256] = { +static const u16 _U_upper_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -209,7 +209,7 @@ static const word _U_upper_FF[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -const word *_U_upper[256] = { +const u16 *_U_upper[256] = { _U_upper_00,_U_upper_01,_U_upper_02,_U_upper_03,_U_upper_04,_U_upper_05,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,_U_upper_1E,_U_upper_1F, NULL,_U_upper_21,NULL,NULL,_U_upper_24,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, diff --git a/charset/misc/gen-ligatures b/charset/misc/gen-ligatures index 8ebe71e6..17469ea6 100755 --- a/charset/misc/gen-ligatures +++ b/charset/misc/gen-ligatures @@ -62,11 +62,11 @@ my @ht = map { "NULL" } 1..$div; foreach my $l (keys %ligs) { my $i = (hex $l) % $div; my $w = join(", ", map { "0x$_" } split(/ /, expand($l))); - $ht[$i] = "/* $l */ (const word []) { $w, 0 }"; + $ht[$i] = "/* $l */ (const u16 []) { $w, 0 }"; } print "#define LIG_HASH_SIZE $div\n\n"; -print "static const word *_U_lig_hash[] = {\n"; +print "static const u16 *_U_lig_hash[] = {\n"; for (my $i=0; $i<$div; $i++) { print "\t", $ht[$i], ",\n"; } diff --git a/charset/misc/generate b/charset/misc/generate index 79774a93..1d91b76e 100644 --- a/charset/misc/generate +++ b/charset/misc/generate @@ -6,9 +6,9 @@ set -ex rm -f U-*.h chartable.h misc/u-* misc/gen-basic misc/table2h _U_cat byte U-cat.h -misc/table2h _U_lower word U-lower.h -misc/table2h _U_upper word U-upper.h +misc/table2h _U_lower u16 U-lower.h +misc/table2h _U_upper u16 U-upper.h ( cat misc/user_unacc && misc/gen-unacc ) >misc/u-unacc -misc/table2h _U_unaccent word U-unacc.h +misc/table2h _U_unaccent u16 U-unacc.h misc/gen-ligatures >U-ligatures.h misc/gen-charconv chartable.h diff --git a/charset/toligatures.c b/charset/toligatures.c index c74c7a7b..5fc9d075 100644 --- a/charset/toligatures.c +++ b/charset/toligatures.c @@ -11,7 +11,7 @@ #include "charset/unicat.h" #include "charset/U-ligatures.h" -const word * +const u16 * Uexpand_lig(uns x) { return _U_lig_hash[x % LIG_HASH_SIZE]; diff --git a/charset/unicat.h b/charset/unicat.h index 021ec5c2..a8b8d61e 100644 --- a/charset/unicat.h +++ b/charset/unicat.h @@ -11,7 +11,7 @@ #define _CHARSET_UNICAT_H extern const byte *_U_cat[]; -extern const word *_U_upper[], *_U_lower[], *_U_unaccent[]; +extern const u16 *_U_upper[], *_U_lower[], *_U_unaccent[]; static inline uns Ucategory(uns x) { @@ -23,23 +23,23 @@ static inline uns Ucategory(uns x) static inline uns Utoupper(uns x) { - word w = (_U_upper[x >> 8U]) ? _U_upper[x >> 8U][x & 0xff] : 0; + uns w = (_U_upper[x >> 8U]) ? _U_upper[x >> 8U][x & 0xff] : 0; return w ? w : x; } static inline uns Utolower(uns x) { - word w = (_U_lower[x >> 8U]) ? _U_lower[x >> 8U][x & 0xff] : 0; + uns w = (_U_lower[x >> 8U]) ? _U_lower[x >> 8U][x & 0xff] : 0; return w ? w : x; } static inline uns Uunaccent(uns x) { - word w = (_U_unaccent[x >> 8U]) ? _U_unaccent[x >> 8U][x & 0xff] : 0; + uns w = (_U_unaccent[x >> 8U]) ? _U_unaccent[x >> 8U][x & 0xff] : 0; return w ? w : x; } -extern const word *Uexpand_lig(uns x); +extern const u16 *Uexpand_lig(uns x); enum unicode_char_type { _U_LETTER = 1, /* Letters */ -- 2.39.2