This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Add capability to override match directory
authorKarl Williamson <khw@cpan.org>
Mon, 3 Feb 2020 20:44:44 +0000 (13:44 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 3 Feb 2020 23:34:55 +0000 (16:34 -0700)
This is because this is still supposed to work on DOS 8.3 filesystems,
and future commits will use non-Unicode-Character-Database tables which
don't have shorter names.

charclass_invlists.h
lib/unicore/mktables
lib/unicore/uni_keywords.pl
regcharclass.h
uni_keywords.h

index 5e186fc..bcc73f1 100644 (file)
@@ -403454,7 +403454,7 @@ static const U8 WB_table[24][24] = {
  * 0fea35394151afefbb4121b6380db1b480be6f9bafb4eba3382dc292dcf68526 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * 5e2ebecdb96e100145cb697ccc4db04b28a36a9a5ac2ea09f238ebb78eac1fc6 lib/unicore/mktables
+ * af51c5acca3285df71e7b969637ac1173765b17288baa563b74e7d4d2d078bc5 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
index 4771510..edec462 100644 (file)
@@ -9094,6 +9094,13 @@ sub trace { return main::trace(@_) if main::DEBUG && $to_trace }
     main::set_access('pre_declared_maps',
                                     \%pre_declared_maps, 'r', 's');
 
+    my %match_subdir;
+    # For properties whose shortest names are too long for a DOS 8.3
+    # filesystem to distinguish between, this is used to manually give short
+    # names for the directory name immediately under $match_tables that the
+    # match tables for this property should be placed in.
+    main::set_access('match_subdir', \%match_subdir, 'r');
+
     my %has_dependency;
     # A boolean that gives whether some table somewhere is defined as the
     # complement of a table in this property.  This is a crude, but currently
@@ -9135,6 +9142,7 @@ sub trace { return main::trace(@_) if main::DEBUG && $to_trace }
                                     # values should be defined for all
                                     # properties, except those overriding this
                                     // $v_version ge v5.1.0;
+        $match_subdir{$addr} = delete $args{'Match_SubDir'};
 
         # Rest of parameters passed on.
 
@@ -18791,7 +18799,9 @@ sub write_all_tables() {
             # Match tables for the property go in lib/$subdirectory, which is
             # the property's name.  Don't use the standard file name for this,
             # as may get an unfamiliar alias
-            @directory = ($matches_directory, $property->external_name);
+            @directory = ($matches_directory, ($property->match_subdir)
+                                              ? $property->match_subdir
+                                              : $property->external_name);
         }
         else {
 
index 5ab3d91..3aaf1c1 100644 (file)
 # 0fea35394151afefbb4121b6380db1b480be6f9bafb4eba3382dc292dcf68526 lib/unicore/extracted/DLineBreak.txt
 # 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
 # 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
-# 5e2ebecdb96e100145cb697ccc4db04b28a36a9a5ac2ea09f238ebb78eac1fc6 lib/unicore/mktables
+# af51c5acca3285df71e7b969637ac1173765b17288baa563b74e7d4d2d078bc5 lib/unicore/mktables
 # 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
 # 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
 # 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
index d9c3451..f73f5a1 100644 (file)
  * 0fea35394151afefbb4121b6380db1b480be6f9bafb4eba3382dc292dcf68526 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * 5e2ebecdb96e100145cb697ccc4db04b28a36a9a5ac2ea09f238ebb78eac1fc6 lib/unicore/mktables
+ * af51c5acca3285df71e7b969637ac1173765b17288baa563b74e7d4d2d078bc5 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * f9a393e7add8c7c2728356473ce5b52246d51295b2da0c48fb6f0aa21799e2bb regen/regcharclass.pl
index ba2cd09..4140f45 100644 (file)
@@ -7520,7 +7520,7 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
  * 0fea35394151afefbb4121b6380db1b480be6f9bafb4eba3382dc292dcf68526 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * 5e2ebecdb96e100145cb697ccc4db04b28a36a9a5ac2ea09f238ebb78eac1fc6 lib/unicore/mktables
+ * af51c5acca3285df71e7b969637ac1173765b17288baa563b74e7d4d2d078bc5 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl