From 4744afda6ffc67ae97b5b8dfb495086c949d8fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 30 Oct 2024 12:50:30 +0100 Subject: [PATCH] module: unicode: #ifdef out unused U8_UNICODE_320 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ahelenia ZiemiaƄska --- include/sys/u8_textprep.h | 4 ++++ include/sys/u8_textprep_data.h | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index e82037de4fe4..774bde75d642 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -90,8 +90,12 @@ extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int); #define U8_TEXTPREP_IGNORE_INVALID (0x00020000) #define U8_TEXTPREP_NOWAIT (0x00040000) +#if 0 #define U8_UNICODE_320 (0) #define U8_UNICODE_500 (1) +#else +#define U8_UNICODE_500 (0) +#endif #define U8_UNICODE_LATEST (U8_UNICODE_500) #define U8_VALIDATE_ENTIRE (0x00100000) diff --git a/include/sys/u8_textprep_data.h b/include/sys/u8_textprep_data.h index f9598c4d928c..39139540a8d1 100644 --- a/include/sys/u8_textprep_data.h +++ b/include/sys/u8_textprep_data.h @@ -147,6 +147,7 @@ typedef struct { * toupper case conversion mappings. */ static const uchar_t u8_common_b1_tbl[U8_UNICODE_LATEST + 1][256] = { +#ifdef U8_UNICODE_320 { 0, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, @@ -181,6 +182,7 @@ static const uchar_t u8_common_b1_tbl[U8_UNICODE_LATEST + 1][256] = { 1, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, }, +#endif { 0, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, @@ -219,6 +221,7 @@ static const uchar_t u8_common_b1_tbl[U8_UNICODE_LATEST + 1][256] = { static const uchar_t u8_combining_class_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { +#ifdef U8_UNICODE_320 { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -290,6 +293,7 @@ static const uchar_t u8_combining_class_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = }, }, +#endif { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -366,6 +370,7 @@ static const uchar_t u8_combining_class_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = static const uchar_t u8_combining_class_b3_tbl[U8_UNICODE_LATEST + 1][9][256] = { +#ifdef U8_UNICODE_320 { { /* Third byte table 0. */ N_, N_, N_, N_, N_, N_, N_, N_, @@ -674,6 +679,7 @@ static const uchar_t u8_combining_class_b3_tbl[U8_UNICODE_LATEST + 1][9][256] = N_, N_, N_, N_, N_, N_, N_, N_, }, }, +#endif { { /* Third byte table 0. */ N_, N_, N_, N_, N_, N_, N_, N_, @@ -990,6 +996,7 @@ static const uchar_t u8_combining_class_b3_tbl[U8_UNICODE_LATEST + 1][9][256] = */ static const uchar_t u8_combining_class_b4_tbl[U8_UNICODE_LATEST + 1][55][256] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -2862,6 +2869,7 @@ static const uchar_t u8_combining_class_b4_tbl[U8_UNICODE_LATEST + 1][55][256] = 0, 0, 0, 0, 0, 0, 0, 0, }, }, +#endif { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -4737,6 +4745,7 @@ static const uchar_t u8_combining_class_b4_tbl[U8_UNICODE_LATEST + 1][55][256] = }; static const uchar_t u8_composition_b1_tbl[U8_UNICODE_LATEST + 1][256] = { +#ifdef U8_UNICODE_320 { 0, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, @@ -4771,6 +4780,7 @@ static const uchar_t u8_composition_b1_tbl[U8_UNICODE_LATEST + 1][256] = { N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, }, +#endif { 0, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, N_, @@ -4808,6 +4818,7 @@ static const uchar_t u8_composition_b1_tbl[U8_UNICODE_LATEST + 1][256] = { }; static const uchar_t u8_composition_b2_tbl[U8_UNICODE_LATEST + 1][1][256] = { +#ifdef U8_UNICODE_320 { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -4845,6 +4856,7 @@ static const uchar_t u8_composition_b2_tbl[U8_UNICODE_LATEST + 1][1][256] = { }, }, +#endif { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -4888,6 +4900,7 @@ static const uchar_t u8_composition_b2_tbl[U8_UNICODE_LATEST + 1][1][256] = { static const u8_displacement_t u8_composition_b3_tbl[ U8_UNICODE_LATEST + 1][5][256] = { +#ifdef U8_UNICODE_320 { { /* Third byte table 0. */ { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, @@ -5330,6 +5343,7 @@ static const u8_displacement_t u8_composition_b3_tbl[ { N_, 0 }, }, }, +#endif { { /* Third byte table 0. */ { 0x8000, 0 }, { N_, 0 }, { N_, 0 }, @@ -5775,6 +5789,7 @@ static const u8_displacement_t u8_composition_b3_tbl[ }; static const uchar_t u8_composition_b4_tbl[U8_UNICODE_LATEST + 1][41][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -7212,6 +7227,7 @@ static const uchar_t u8_composition_b4_tbl[U8_UNICODE_LATEST + 1][41][257] = { 0, }, }, +#endif { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -8654,6 +8670,7 @@ static const uchar_t u8_composition_b4_tbl[U8_UNICODE_LATEST + 1][41][257] = { static const uint16_t u8_composition_b4_16bit_tbl[ U8_UNICODE_LATEST + 1][5][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte 16-bit table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -8831,6 +8848,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[ 362, }, }, +#endif { { /* Fourth byte 16-bit table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -9011,6 +9029,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[ }; static const uchar_t u8_composition_final_tbl[U8_UNICODE_LATEST + 1][6623] = { +#ifdef U8_UNICODE_320 { 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, @@ -9841,6 +9860,7 @@ static const uchar_t u8_composition_final_tbl[U8_UNICODE_LATEST + 1][6623] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, +#endif { 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_, 0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xA0, FIL_, @@ -10674,6 +10694,7 @@ static const uchar_t u8_composition_final_tbl[U8_UNICODE_LATEST + 1][6623] = { }; static const uchar_t u8_decomp_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { +#ifdef U8_UNICODE_320 { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -10745,6 +10766,7 @@ static const uchar_t u8_decomp_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { }, }, +#endif { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -10821,6 +10843,7 @@ static const uchar_t u8_decomp_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { static const u8_displacement_t u8_decomp_b3_tbl[U8_UNICODE_LATEST + 1][8][256] = { +#ifdef U8_UNICODE_320 { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -11527,6 +11550,7 @@ static const u8_displacement_t u8_decomp_b3_tbl[U8_UNICODE_LATEST + 1][8][256] = { N_, 0 }, }, }, +#endif { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -12236,6 +12260,7 @@ static const u8_displacement_t u8_decomp_b3_tbl[U8_UNICODE_LATEST + 1][8][256] = }; static const uchar_t u8_decomp_b4_tbl[U8_UNICODE_LATEST + 1][118][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -16368,6 +16393,7 @@ static const uchar_t u8_decomp_b4_tbl[U8_UNICODE_LATEST + 1][118][257] = { 0, }, }, +#endif { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -20503,6 +20529,7 @@ static const uchar_t u8_decomp_b4_tbl[U8_UNICODE_LATEST + 1][118][257] = { }; static const uint16_t u8_decomp_b4_16bit_tbl[U8_UNICODE_LATEST + 1][30][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte 16-bit table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -21555,6 +21582,7 @@ static const uint16_t u8_decomp_b4_16bit_tbl[U8_UNICODE_LATEST + 1][30][257] = { 0, }, }, +#endif { { /* Fourth byte 16-bit table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -22610,6 +22638,7 @@ static const uint16_t u8_decomp_b4_16bit_tbl[U8_UNICODE_LATEST + 1][30][257] = { }; static const uchar_t u8_decomp_final_tbl[U8_UNICODE_LATEST + 1][19370] = { +#ifdef U8_UNICODE_320 { 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, @@ -25034,6 +25063,7 @@ static const uchar_t u8_decomp_final_tbl[U8_UNICODE_LATEST + 1][19370] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, +#endif { 0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84, 0x32, 0x33, 0x20, 0xCC, 0x81, 0xCE, 0xBC, 0x20, @@ -27461,6 +27491,7 @@ static const uchar_t u8_decomp_final_tbl[U8_UNICODE_LATEST + 1][19370] = { }; static const uchar_t u8_case_common_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { +#ifdef U8_UNICODE_320 { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -27532,6 +27563,7 @@ static const uchar_t u8_case_common_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { }, }, +#endif { { 0, N_, N_, N_, N_, N_, N_, N_, @@ -27609,6 +27641,7 @@ static const uchar_t u8_case_common_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = { static const u8_displacement_t u8_tolower_b3_tbl[ U8_UNICODE_LATEST + 1][5][256] = { +#ifdef U8_UNICODE_320 { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -27941,6 +27974,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, }, }, +#endif { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -28276,6 +28310,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[ }; static const uchar_t u8_tolower_b4_tbl[U8_UNICODE_LATEST + 1][36][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -29538,6 +29573,7 @@ static const uchar_t u8_tolower_b4_tbl[U8_UNICODE_LATEST + 1][36][257] = { 0, }, }, +#endif { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -30803,6 +30839,7 @@ static const uchar_t u8_tolower_b4_tbl[U8_UNICODE_LATEST + 1][36][257] = { }; static const uchar_t u8_tolower_final_tbl[U8_UNICODE_LATEST + 1][2299] = { +#ifdef U8_UNICODE_320 { 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, @@ -31093,6 +31130,7 @@ static const uchar_t u8_tolower_final_tbl[U8_UNICODE_LATEST + 1][2299] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, +#endif { 0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3, 0xC3, 0xA4, 0xC3, 0xA5, 0xC3, 0xA6, 0xC3, 0xA7, @@ -31388,6 +31426,7 @@ static const uchar_t u8_tolower_final_tbl[U8_UNICODE_LATEST + 1][2299] = { static const u8_displacement_t u8_toupper_b3_tbl[ U8_UNICODE_LATEST + 1][5][256] = { +#ifdef U8_UNICODE_320 { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -31720,6 +31759,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, }, }, +#endif { { /* Third byte table 0. */ { N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 }, @@ -32055,6 +32095,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[ }; static const uchar_t u8_toupper_b4_tbl[U8_UNICODE_LATEST + 1][39][257] = { +#ifdef U8_UNICODE_320 { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -33422,6 +33463,7 @@ static const uchar_t u8_toupper_b4_tbl[U8_UNICODE_LATEST + 1][39][257] = { 0, }, }, +#endif { { /* Fourth byte table 0. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -34792,6 +34834,7 @@ static const uchar_t u8_toupper_b4_tbl[U8_UNICODE_LATEST + 1][39][257] = { }; static const uchar_t u8_toupper_final_tbl[U8_UNICODE_LATEST + 1][2318] = { +#ifdef U8_UNICODE_320 { 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86, @@ -35084,6 +35127,7 @@ static const uchar_t u8_toupper_final_tbl[U8_UNICODE_LATEST + 1][2318] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, +#endif { 0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82, 0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86,