Skip to content

Commit e17a969

Browse files
nabijaczlewelibehlendorf
authored andcommitted
module: unicode: #ifdef out unused U8_UNICODE_320
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#16704
1 parent 5e72677 commit e17a969

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

include/sys/u8_textprep.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ extern "C" {
6868
#define U8_TEXTPREP_IGNORE_INVALID (0x00020000)
6969
#define U8_TEXTPREP_NOWAIT (0x00040000)
7070

71+
#if 0
7172
#define U8_UNICODE_320 (0)
7273
#define U8_UNICODE_500 (1)
74+
#else
75+
#define U8_UNICODE_500 (0)
76+
#endif
7377
#define U8_UNICODE_LATEST (U8_UNICODE_500)
7478

7579
#define U8_VALIDATE_ENTIRE (0x00100000)

include/sys/u8_textprep_data.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ typedef struct {
147147
* toupper case conversion mappings.
148148
*/
149149
static const uchar_t u8_common_b1_tbl[U8_UNICODE_LATEST + 1][256] = {
150+
#ifdef U8_UNICODE_320
150151
{
151152
0, N_, N_, N_, N_, N_, N_, N_,
152153
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] = {
181182
1, N_, N_, N_, N_, N_, N_, N_,
182183
N_, N_, N_, N_, N_, N_, N_, N_,
183184
},
185+
#endif
184186
{
185187
0, N_, N_, N_, N_, N_, N_, N_,
186188
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] = {
219221

220222
static const uchar_t u8_combining_class_b2_tbl[U8_UNICODE_LATEST + 1][2][256] =
221223
{
224+
#ifdef U8_UNICODE_320
222225
{
223226
{
224227
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] =
290293
},
291294

292295
},
296+
#endif
293297
{
294298
{
295299
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] =
366370

367371
static const uchar_t u8_combining_class_b3_tbl[U8_UNICODE_LATEST + 1][9][256] =
368372
{
373+
#ifdef U8_UNICODE_320
369374
{
370375
{ /* Third byte table 0. */
371376
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] =
674679
N_, N_, N_, N_, N_, N_, N_, N_,
675680
},
676681
},
682+
#endif
677683
{
678684
{ /* Third byte table 0. */
679685
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] =
990996
*/
991997
static const uchar_t u8_combining_class_b4_tbl[U8_UNICODE_LATEST + 1][55][256] =
992998
{
999+
#ifdef U8_UNICODE_320
9931000
{
9941001
{ /* Fourth byte table 0. */
9951002
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] =
28622869
0, 0, 0, 0, 0, 0, 0, 0,
28632870
},
28642871
},
2872+
#endif
28652873
{
28662874
{ /* Fourth byte table 0. */
28672875
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] =
47374745
};
47384746

47394747
static const uchar_t u8_composition_b1_tbl[U8_UNICODE_LATEST + 1][256] = {
4748+
#ifdef U8_UNICODE_320
47404749
{
47414750
0, N_, N_, N_, N_, N_, N_, N_,
47424751
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] = {
47714780
N_, N_, N_, N_, N_, N_, N_, N_,
47724781
N_, N_, N_, N_, N_, N_, N_, N_,
47734782
},
4783+
#endif
47744784
{
47754785
0, N_, N_, N_, N_, N_, N_, N_,
47764786
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] = {
48084818
};
48094819

48104820
static const uchar_t u8_composition_b2_tbl[U8_UNICODE_LATEST + 1][1][256] = {
4821+
#ifdef U8_UNICODE_320
48114822
{
48124823
{
48134824
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] = {
48454856
},
48464857

48474858
},
4859+
#endif
48484860
{
48494861
{
48504862
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] = {
48884900
static const u8_displacement_t u8_composition_b3_tbl[
48894901
U8_UNICODE_LATEST + 1][5][256] =
48904902
{
4903+
#ifdef U8_UNICODE_320
48914904
{
48924905
{ /* Third byte table 0. */
48934906
{ 0x8000, 0 }, { N_, 0 }, { N_, 0 },
@@ -5330,6 +5343,7 @@ static const u8_displacement_t u8_composition_b3_tbl[
53305343
{ N_, 0 },
53315344
},
53325345
},
5346+
#endif
53335347
{
53345348
{ /* Third byte table 0. */
53355349
{ 0x8000, 0 }, { N_, 0 }, { N_, 0 },
@@ -5775,6 +5789,7 @@ static const u8_displacement_t u8_composition_b3_tbl[
57755789
};
57765790

57775791
static const uchar_t u8_composition_b4_tbl[U8_UNICODE_LATEST + 1][41][257] = {
5792+
#ifdef U8_UNICODE_320
57785793
{
57795794
{ /* Fourth byte table 0. */
57805795
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] = {
72127227
0,
72137228
},
72147229
},
7230+
#endif
72157231
{
72167232
{ /* Fourth byte table 0. */
72177233
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] = {
86548670
static const uint16_t u8_composition_b4_16bit_tbl[
86558671
U8_UNICODE_LATEST + 1][5][257] =
86568672
{
8673+
#ifdef U8_UNICODE_320
86578674
{
86588675
{ /* Fourth byte 16-bit table 0. */
86598676
0, 0, 0, 0, 0, 0, 0, 0,
@@ -8831,6 +8848,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[
88318848
362,
88328849
},
88338850
},
8851+
#endif
88348852
{
88358853
{ /* Fourth byte 16-bit table 0. */
88368854
0, 0, 0, 0, 0, 0, 0, 0,
@@ -9011,6 +9029,7 @@ static const uint16_t u8_composition_b4_16bit_tbl[
90119029
};
90129030

90139031
static const uchar_t u8_composition_final_tbl[U8_UNICODE_LATEST + 1][6623] = {
9032+
#ifdef U8_UNICODE_320
90149033
{
90159034
0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_,
90169035
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] = {
98419860
0, 0, 0, 0, 0, 0, 0, 0,
98429861
0, 0, 0, 0, 0, 0, 0,
98439862
},
9863+
#endif
98449864
{
98459865
0x01, 0xCC, 0xB8, FIL_, 0xE2, 0x89, 0xAE, FIL_,
98469866
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] = {
1067410694
};
1067510695

1067610696
static const uchar_t u8_decomp_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = {
10697+
#ifdef U8_UNICODE_320
1067710698
{
1067810699
{
1067910700
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] = {
1074510766
},
1074610767

1074710768
},
10769+
#endif
1074810770
{
1074910771
{
1075010772
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] = {
1082110843

1082210844
static const u8_displacement_t u8_decomp_b3_tbl[U8_UNICODE_LATEST + 1][8][256] =
1082310845
{
10846+
#ifdef U8_UNICODE_320
1082410847
{
1082510848
{ /* Third byte table 0. */
1082610849
{ 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] =
1152711550
{ N_, 0 },
1152811551
},
1152911552
},
11553+
#endif
1153011554
{
1153111555
{ /* Third byte table 0. */
1153211556
{ 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] =
1223612260
};
1223712261

1223812262
static const uchar_t u8_decomp_b4_tbl[U8_UNICODE_LATEST + 1][118][257] = {
12263+
#ifdef U8_UNICODE_320
1223912264
{
1224012265
{ /* Fourth byte table 0. */
1224112266
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] = {
1636816393
0,
1636916394
},
1637016395
},
16396+
#endif
1637116397
{
1637216398
{ /* Fourth byte table 0. */
1637316399
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] = {
2050320529
};
2050420530

2050520531
static const uint16_t u8_decomp_b4_16bit_tbl[U8_UNICODE_LATEST + 1][30][257] = {
20532+
#ifdef U8_UNICODE_320
2050620533
{
2050720534
{ /* Fourth byte 16-bit table 0. */
2050820535
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] = {
2155521582
0,
2155621583
},
2155721584
},
21585+
#endif
2155821586
{
2155921587
{ /* Fourth byte 16-bit table 0. */
2156021588
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] = {
2261022638
};
2261122639

2261222640
static const uchar_t u8_decomp_final_tbl[U8_UNICODE_LATEST + 1][19370] = {
22641+
#ifdef U8_UNICODE_320
2261322642
{
2261422643
0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84,
2261522644
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] = {
2503425063
0, 0, 0, 0, 0, 0, 0, 0,
2503525064
0, 0,
2503625065
},
25066+
#endif
2503725067
{
2503825068
0x20, 0x20, 0xCC, 0x88, 0x61, 0x20, 0xCC, 0x84,
2503925069
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] = {
2746127491
};
2746227492

2746327493
static const uchar_t u8_case_common_b2_tbl[U8_UNICODE_LATEST + 1][2][256] = {
27494+
#ifdef U8_UNICODE_320
2746427495
{
2746527496
{
2746627497
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] = {
2753227563
},
2753327564

2753427565
},
27566+
#endif
2753527567
{
2753627568
{
2753727569
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] = {
2760927641
static const u8_displacement_t u8_tolower_b3_tbl[
2761027642
U8_UNICODE_LATEST + 1][5][256] =
2761127643
{
27644+
#ifdef U8_UNICODE_320
2761227645
{
2761327646
{ /* Third byte table 0. */
2761427647
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
@@ -27941,6 +27974,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[
2794127974
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
2794227975
},
2794327976
},
27977+
#endif
2794427978
{
2794527979
{ /* Third byte table 0. */
2794627980
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
@@ -28276,6 +28310,7 @@ static const u8_displacement_t u8_tolower_b3_tbl[
2827628310
};
2827728311

2827828312
static const uchar_t u8_tolower_b4_tbl[U8_UNICODE_LATEST + 1][36][257] = {
28313+
#ifdef U8_UNICODE_320
2827928314
{
2828028315
{ /* Fourth byte table 0. */
2828128316
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] = {
2953829573
0,
2953929574
},
2954029575
},
29576+
#endif
2954129577
{
2954229578
{ /* Fourth byte table 0. */
2954329579
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] = {
3080330839
};
3080430840

3080530841
static const uchar_t u8_tolower_final_tbl[U8_UNICODE_LATEST + 1][2299] = {
30842+
#ifdef U8_UNICODE_320
3080630843
{
3080730844
0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3,
3080830845
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] = {
3109331130
0, 0, 0, 0, 0, 0, 0, 0,
3109431131
0, 0, 0,
3109531132
},
31133+
#endif
3109631134
{
3109731135
0xC3, 0xA0, 0xC3, 0xA1, 0xC3, 0xA2, 0xC3, 0xA3,
3109831136
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] = {
3138831426
static const u8_displacement_t u8_toupper_b3_tbl[
3138931427
U8_UNICODE_LATEST + 1][5][256] =
3139031428
{
31429+
#ifdef U8_UNICODE_320
3139131430
{
3139231431
{ /* Third byte table 0. */
3139331432
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
@@ -31720,6 +31759,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[
3172031759
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
3172131760
},
3172231761
},
31762+
#endif
3172331763
{
3172431764
{ /* Third byte table 0. */
3172531765
{ N_, 0 }, { N_, 0 }, { N_, 0 }, { N_, 0 },
@@ -32055,6 +32095,7 @@ static const u8_displacement_t u8_toupper_b3_tbl[
3205532095
};
3205632096

3205732097
static const uchar_t u8_toupper_b4_tbl[U8_UNICODE_LATEST + 1][39][257] = {
32098+
#ifdef U8_UNICODE_320
3205832099
{
3205932100
{ /* Fourth byte table 0. */
3206032101
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] = {
3342233463
0,
3342333464
},
3342433465
},
33466+
#endif
3342533467
{
3342633468
{ /* Fourth byte table 0. */
3342733469
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] = {
3479234834
};
3479334835

3479434836
static const uchar_t u8_toupper_final_tbl[U8_UNICODE_LATEST + 1][2318] = {
34837+
#ifdef U8_UNICODE_320
3479534838
{
3479634839
0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82,
3479734840
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] = {
3508435127
0, 0, 0, 0, 0, 0, 0, 0,
3508535128
0, 0, 0, 0, 0, 0,
3508635129
},
35130+
#endif
3508735131
{
3508835132
0xCE, 0x9C, 0xC3, 0x80, 0xC3, 0x81, 0xC3, 0x82,
3508935133
0xC3, 0x83, 0xC3, 0x84, 0xC3, 0x85, 0xC3, 0x86,

0 commit comments

Comments
 (0)