#endif /* defined(PERL_IN_REGEXEC_C) */
+/* More than one code point may have the same code point as their fold. This
+ * gives the maximum number in the current Unicode release. (The folded-to
+ * code point is not included in this count.) For example, both 'S' and
+ * \x{17F} fold to 's', so the number for that fold is 2. Another way to
+ * look at it is the maximum length of all the IVCF_AUX_TABLE's */
+#define MAX_FOLD_FROMS 3
+
/* Generated from:
* d34c77b7e7a94986cc82056919f4ffc1503b73091561e16bd8ef145ac0fd04c5 lib/Unicode/UCD.pm
* 0bc5023a4606962114c4eb3775fae072cad8fecef5894d0de06603b1c70cbb47 lib/unicore/ArabicShaping.txt
* 7bd6bcbe3813e0cd55e0998053d182b7bc8c97dcfd0b85028e9f7f55af4ad61b lib/unicore/version
* 4bb677187a1a64e39d48f2e341b5ecb6c99857e49d7a79cf503bd8a3c709999b regen/charset_translations.pl
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
- * 75b68d1ed0aa09110eacc421055c41bb1cc2d7cfbf23455f0a7bc9e2eb662b13 regen/mk_invlists.pl
+ * 743fbd71a854b7898795d351668ad5059d4f07dcfa870904618c97e6b4809e93 regen/mk_invlists.pl
* ex: set ro: */
# integer or float
my $numeric_re = qr/ ^ -? \d+ (:? \. \d+ )? $ /x;
+# More than one code point may have the same code point as their fold. This
+# gives the maximum number in the current Unicode release. (The folded-to
+# code point is not included in this count.) Most folds are pairs of code
+# points, like 'B' and 'b', so this number is at least one.
+my $max_fold_froms = 1;
+
my %keywords;
my $table_name_prefix = "UNI_";
# Now we have a hash that is the inversion of the case fold property.
- # Convert it to an inversion map.
+ # First find the maximum number of code points that fold to the same one.
+ foreach my $fold_to (keys %new) {
+ if (ref $new{$fold_to}) {
+ my $folders_count = scalar @{$new{$fold_to}};
+ $max_fold_froms = $folders_count if $folders_count > $max_fold_froms;
+ }
+ }
+ # Then convert the hash to an inversion map.
my @sorted_folds = sort { $a <=> $b } keys %new;
my (@invlist, @invmap);
end_file_pound_if;
+print $out_fh <<"EOF";
+
+/* More than one code point may have the same code point as their fold. This
+ * gives the maximum number in the current Unicode release. (The folded-to
+ * code point is not included in this count.) For example, both 'S' and
+ * \\x{17F} fold to 's', so the number for that fold is 2. Another way to
+ * look at it is the maximum length of all the IVCF_AUX_TABLE's */
+#define MAX_FOLD_FROMS $max_fold_froms
+EOF
+
my $sources_list = "lib/unicore/mktables.lst";
my @sources = qw(regen/mk_invlists.pl
lib/unicore/mktables
* 7bd6bcbe3813e0cd55e0998053d182b7bc8c97dcfd0b85028e9f7f55af4ad61b lib/unicore/version
* 4bb677187a1a64e39d48f2e341b5ecb6c99857e49d7a79cf503bd8a3c709999b regen/charset_translations.pl
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
- * 75b68d1ed0aa09110eacc421055c41bb1cc2d7cfbf23455f0a7bc9e2eb662b13 regen/mk_invlists.pl
+ * 743fbd71a854b7898795d351668ad5059d4f07dcfa870904618c97e6b4809e93 regen/mk_invlists.pl
* c42c035b18a0426443184e9f889aa2b16bef5a9add9805cd853c4e2a783712ff regen/mph.pl
* ex: set ro: */