* a712c758275b460d18fa77a26ed3589689bb3f69dcc1ea99b913e32db92a5cd2 lib/unicore/version
* 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
* 8cffbf838b6e8ea5310e4ad2e0498ad9c1d87d4babead678081859473591317c regen/regcharclass.pl
- * 2bc7f79dc0257ad12db2288ccfcae7fa07bf0c068e4413b80f32c90d7dde0653 regen/regcharclass_multi_char_folds.pl
+ * eb505a90982944b6053f0b7141210f201b972cd9a57be66fcfeb7506227f6fbe regen/regcharclass_multi_char_folds.pl
* ex: set ro: */
die "Could not find inversion map for Case_Folding" unless defined $format;
die "Incorrect format '$format' for Case_Folding inversion map"
unless $format eq 'al';
+
my @folds;
+ my @output_folds;
for my $i (0 .. @$folds_ref - 1) {
next unless ref $folds_ref->[$i]; # Skip single-char folds
# isn't there to occupy space and time; instead there is this check.
die sprintf("regcomp.c can't cope with a latin1 multi-char fold (found in the fold of 0x%X", $cp_ref->[$i]) if grep { $_ < 256 && chr($_) !~ /[[:ascii:]]/ } @{$folds_ref->[$i]};
+ @folds = @{$folds_ref->[$i]};
+
# Create a line that looks like "\x{foo}\x{bar}\x{baz}" of the code
# points that make up the fold (use the actual character if
# printable).
my $fold = join "", map { chr $_ =~ /[[:print:]]/a
? chr $_
: sprintf "\\x{%X}", $_
- } @{$folds_ref->[$i]};
+ } @folds;
$fold = "\"$fold\"";
# Skip if something else already has this fold
- next if grep { $_ eq $fold } @folds;
+ next if grep { $_ eq $fold } @output_folds;
if ($all_folds) {
- push @folds, $fold
+ push @output_folds, $fold;
} # Skip if wants only all-ascii folds, and there is a non-ascii
- elsif (! grep { chr($_) =~ /[^[:ascii:]]/ } @{$folds_ref->[$i]}) {
+ elsif (! grep { chr($_) =~ /[^[:ascii:]]/ } @folds) {
# If the fold is to a cased letter, replace the entry with an
# array which also includes its upper case.
- my $this_fold_ref = $folds_ref->[$i];
+ my $this_fold_ref = \@folds;
for my $j (0 .. @$this_fold_ref - 1) {
my $this_ord = $this_fold_ref->[$j];
if (chr($this_ord) =~ /\p{Cased}/) {
}
# Then generate all combinations of upper/lower case of the fold.
- push @folds, gen_combinations($this_fold_ref);
+ push @output_folds, gen_combinations($this_fold_ref);
}
}
#
# No combinations of this with 's' need be added, as any of these
# containing 's' are prohibited under /iaa.
- push @folds, '"\x{17F}\x{17F}"' if $all_folds;
-
+ push @output_folds, '"\x{17F}\x{17F}"' if $all_folds;
- return @folds;
+ return @output_folds;
}
1