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 <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed Oct 30, 2024
1 parent d799996 commit 4744afd
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 @@ -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)
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 @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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_,
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4744afd

Please sign in to comment.