Skip to content

Commit

Permalink
regen/mk_invlists.pl: Fix /i rules for non-ASCII machines
Browse files Browse the repository at this point in the history
Two variable weren't getting initialized properly in one code path, with
the result that the case folding tables were pretty much garbage, but
not on ASCII platforms.
  • Loading branch information
khwilliamson committed Aug 26, 2019
1 parent f4d6df2 commit 5c0563e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 41 deletions.
68 changes: 34 additions & 34 deletions charclass_invlists.h
Original file line number Diff line number Diff line change
Expand Up @@ -32260,7 +32260,7 @@ static const int _Perl_IVCF_invmap[] = { /* for ASCII/Latin1 */
&& '$' == 91 && '@' == 124 && '`' == 121 && '\n' == 21

static const UV _Perl_IVCF_invlist[] = { /* for EBCDIC 1047 */
1324, /* Number of elements */
1325, /* Number of elements */
148565664, /* Version and data structure type */
0, /* 0 if the list starts at 0;
1 if it starts at the element beyond 0 */
Expand All @@ -32278,6 +32278,7 @@ static const UV _Perl_IVCF_invlist[] = { /* for EBCDIC 1047 */
0x8A,
0x8C,
0x8D,
0x8E,
0x8F,
0x91,
0x92,
Expand Down Expand Up @@ -33701,7 +33702,7 @@ static const unsigned int IVCF_AUX_TABLE_12[] = {
};

static const unsigned int IVCF_AUX_TABLE_13[] = {
0xB5,
0xA0,
0x39C
};

Expand Down Expand Up @@ -33843,32 +33844,33 @@ static const U8 IVCF_AUX_TABLE_lengths[] = {

static const int _Perl_IVCF_invmap[] = { /* for EBCDIC 1047 */
0,
0xC0,
0x62,
IVCF_use_AUX_TABLE_1,
0xC6,
0x68,
0,
0xC6,
0x71,
0x1E9E,
0,
0xD8,
0x80,
0,
0x41,
0xC1,
0,
0xC6,
0xD8,
0xAC,
0xBA,
0xAE,
0,
0x41,
0xD1,
IVCF_use_AUX_TABLE_2,
0x4C,
0xD3,
0,
0xC6,
0x9E,
0,
IVCF_use_AUX_TABLE_3,
0x54,
0xE3,
0,
0xC6,
0xEB,
0,
0xD8,
0xFB,
0x178,
0,
0x100,
Expand Down Expand Up @@ -34651,7 +34653,7 @@ static const int _Perl_IVCF_invmap[] = { /* for EBCDIC 1047 */
0,
0x1E94,
0,
0xDF,
0x59,
0,
0x1EA0,
0,
Expand Down Expand Up @@ -35180,7 +35182,7 @@ static const int _Perl_IVCF_invmap[] = { /* for EBCDIC 1047 */
&& '$' == 91 && '@' == 124 && '`' == 121 && '\n' == 37

static const UV _Perl_IVCF_invlist[] = { /* for EBCDIC 037 */
1324, /* Number of elements */
1323, /* Number of elements */
148565664, /* Version and data structure type */
0, /* 0 if the list starts at 0;
1 if it starts at the element beyond 0 */
Expand All @@ -35197,7 +35199,6 @@ static const UV _Perl_IVCF_invlist[] = { /* for EBCDIC 037 */
0x81,
0x8A,
0x8C,
0x8D,
0x8F,
0x91,
0x92,
Expand Down Expand Up @@ -36621,7 +36622,7 @@ static const unsigned int IVCF_AUX_TABLE_12[] = {
};

static const unsigned int IVCF_AUX_TABLE_13[] = {
0xB5,
0xA0,
0x39C
};

Expand Down Expand Up @@ -36763,32 +36764,31 @@ static const U8 IVCF_AUX_TABLE_lengths[] = {

static const int _Perl_IVCF_invmap[] = { /* for EBCDIC 037 */
0,
0xC0,
0x62,
IVCF_use_AUX_TABLE_1,
0xC6,
0x68,
0,
0xC6,
0x71,
0x1E9E,
0,
0xD8,
0x80,
0,
0x41,
0xC1,
0,
0xC6,
0xD8,
0xAC,
0,
0x41,
0xD1,
IVCF_use_AUX_TABLE_2,
0x4C,
0xD3,
0,
0xC6,
0x9E,
0,
IVCF_use_AUX_TABLE_3,
0x54,
0xE3,
0,
0xC6,
0xEB,
0,
0xD8,
0xFB,
0x178,
0,
0x100,
Expand Down Expand Up @@ -37571,7 +37571,7 @@ static const int _Perl_IVCF_invmap[] = { /* for EBCDIC 037 */
0,
0x1E94,
0,
0xDF,
0x59,
0,
0x1EA0,
0,
Expand Down Expand Up @@ -395311,5 +395311,5 @@ static const U8 WB_table[23][23] = {
* a712c758275b460d18fa77a26ed3589689bb3f69dcc1ea99b913e32db92a5cd2 lib/unicore/version
* 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
* f51864f8e2be210bcc569e93da4e89acb0a727a383f813cecc718732fb292652 regen/mk_invlists.pl
* 44a3e3e2047a58e56ed8e3338ad85bedabae470dd119bf0862ca8129545ebf8a regen/mk_invlists.pl
* ex: set ro: */
2 changes: 1 addition & 1 deletion lib/unicore/uni_keywords.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1265,5 +1265,5 @@
# a712c758275b460d18fa77a26ed3589689bb3f69dcc1ea99b913e32db92a5cd2 lib/unicore/version
# 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
# 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
# f51864f8e2be210bcc569e93da4e89acb0a727a383f813cecc718732fb292652 regen/mk_invlists.pl
# 44a3e3e2047a58e56ed8e3338ad85bedabae470dd119bf0862ca8129545ebf8a regen/mk_invlists.pl
# ex: set ro:
13 changes: 8 additions & 5 deletions regen/mk_invlists.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2557,10 +2557,10 @@ ($)

my @invlist;
my @invmap;
my $map_format;
my $map_format = 0;;
my $map_default;
my $maps_to_code_point;
my $to_adjust;
my $maps_to_code_point = 0;
my $to_adjust = 0;
my $same_in_all_code_pages;
if ($is_local_sub) {
my @return = eval $lookup_prop;
Expand Down Expand Up @@ -2601,12 +2601,15 @@ ($)
@invmap = @$map_ref;
$map_format = $format;
$map_default = $default;
$maps_to_code_point = $map_format =~ / a ($ | [^r] ) /x;
$to_adjust = $map_format =~ /a/;
}
}
}

if ($map_format) {
$maps_to_code_point = $map_format =~ / a ($ | [^r] ) /x;
$to_adjust = $map_format =~ /a/;
}

# Re-order the Unicode code points to native ones for this platform.
# This is only needed for code points below 256, because native code
# points are only in that range. For inversion maps of properties
Expand Down
2 changes: 1 addition & 1 deletion uni_keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -7288,6 +7288,6 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
* a712c758275b460d18fa77a26ed3589689bb3f69dcc1ea99b913e32db92a5cd2 lib/unicore/version
* 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
* f51864f8e2be210bcc569e93da4e89acb0a727a383f813cecc718732fb292652 regen/mk_invlists.pl
* 44a3e3e2047a58e56ed8e3338ad85bedabae470dd119bf0862ca8129545ebf8a regen/mk_invlists.pl
* e80fb4dd6c15dc1b543793552ab5c7255a0f7b50d6ca9cce3a30a4dadf187b53 regen/mph.pl
* ex: set ro: */

0 comments on commit 5c0563e

Please sign in to comment.