Skip to content

Commit

Permalink
module: unicode: #ifdef out unused U8_UNICODE_320
Browse files Browse the repository at this point in the history
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli committed Oct 30, 2024
1 parent b9964fc commit 488abfe
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/sys/u8_textprep.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ extern "C" {
#define U8_TEXTPREP_NOWAIT (0x00040000)
#endif

#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)
Expand Down
44 changes: 44 additions & 0 deletions include/sys/u8_textprep_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -218,6 +220,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_,
Expand Down Expand Up @@ -289,6 +292,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_,
Expand Down Expand Up @@ -364,6 +368,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_,
Expand Down Expand Up @@ -672,6 +677,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_,
Expand Down Expand Up @@ -987,6 +993,7 @@ static const uchar_t u8_combining_class_b3_tbl[U8_UNICODE_LATEST + 1][9][256] =
* the combining class values not indices to the final tables.
*/
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,
Expand Down Expand Up @@ -2859,6 +2866,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,
Expand Down Expand Up @@ -4734,6 +4742,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_,
Expand Down Expand Up @@ -4768,6 +4777,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_,
Expand Down Expand Up @@ -4805,6 +4815,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_,
Expand Down Expand Up @@ -4842,6 +4853,7 @@ static const uchar_t u8_composition_b2_tbl[U8_UNICODE_LATEST + 1][1][256] = {
},

},
#endif
{
{
0, N_, N_, N_, N_, N_, N_, N_,
Expand Down Expand Up @@ -4883,6 +4895,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 },
Expand Down Expand Up @@ -5325,6 +5338,7 @@ static const u8_displacement_t u8_composition_b3_tbl[U8_UNICODE_LATEST + 1][5][2
{ N_, 0 },
},
},
#endif
{
{ /* Third byte table 0. */
{ 0x8000, 0 }, { N_, 0 }, { N_, 0 },
Expand Down Expand Up @@ -5770,6 +5784,7 @@ static const u8_displacement_t u8_composition_b3_tbl[U8_UNICODE_LATEST + 1][5][2
};

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,
Expand Down Expand Up @@ -7207,6 +7222,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,
Expand Down Expand Up @@ -8647,6 +8663,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,
Expand Down Expand Up @@ -8824,6 +8841,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[U8_UNICODE_LATEST + 1][5][257]
362,
},
},
#endif
{
{ /* Fourth byte 16-bit table 0. */
0, 0, 0, 0, 0, 0, 0, 0,
Expand Down Expand Up @@ -9004,6 +9022,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[U8_UNICODE_LATEST + 1][5][257]
};

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_,
Expand Down Expand Up @@ -9834,6 +9853,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_,
Expand Down Expand Up @@ -10667,6 +10687,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_,
Expand Down Expand Up @@ -10738,6 +10759,7 @@ static const uchar_t u8_decomp_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = {
},

},
#endif
{
{
0, N_, N_, N_, N_, N_, N_, N_,
Expand Down Expand Up @@ -10813,6 +10835,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 },
Expand Down Expand Up @@ -11519,6 +11542,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 },
Expand Down Expand Up @@ -12228,6 +12252,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,
Expand Down Expand Up @@ -16360,6 +16385,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,
Expand Down Expand Up @@ -20495,6 +20521,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,
Expand Down Expand Up @@ -21547,6 +21574,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,
Expand Down Expand Up @@ -22602,6 +22630,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,
Expand Down Expand Up @@ -25026,6 +25055,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,
Expand Down Expand Up @@ -27453,6 +27483,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_,
Expand Down Expand Up @@ -27524,6 +27555,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_,
Expand Down Expand Up @@ -27599,6 +27631,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 },
Expand Down Expand Up @@ -27931,6 +27964,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[U8_UNICODE_LATEST + 1][5][256]
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
},
},
#endif
{
{ /* Third byte table 0. */
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
Expand Down Expand Up @@ -28266,6 +28300,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[U8_UNICODE_LATEST + 1][5][256]
};

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,
Expand Down Expand Up @@ -29528,6 +29563,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,
Expand Down Expand Up @@ -30793,6 +30829,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,
Expand Down Expand Up @@ -31083,6 +31120,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,
Expand Down Expand Up @@ -31376,6 +31414,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 },
Expand Down Expand Up @@ -31708,6 +31747,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[U8_UNICODE_LATEST + 1][5][256]
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
},
},
#endif
{
{ /* Third byte table 0. */
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
Expand Down Expand Up @@ -32043,6 +32083,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[U8_UNICODE_LATEST + 1][5][256]
};

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,
Expand Down Expand Up @@ -33410,6 +33451,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,
Expand Down Expand Up @@ -34780,6 +34822,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,
Expand Down Expand Up @@ -35072,6 +35115,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,
Expand Down

0 comments on commit 488abfe

Please sign in to comment.