This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Create UCD.pl
authorKarl Williamson <public@khwilliamson.com>
Fri, 4 Nov 2011 19:42:17 +0000 (13:42 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 8 Nov 2011 15:09:29 +0000 (08:09 -0700)
This is a the initial portion of this file that will be used in
Unicode::UCD.

lib/unicore/mktables

index cfb66e6..5223494 100644 (file)
@@ -14168,6 +14168,29 @@ END
     return;
 }
 
+sub make_UCD () {
+    # Create and write UCD.pl, which passes info about the tables to
+    # Unicode::UCD
+
+    my @ucd = <<END;
+$HEADER
+$INTERNAL_ONLY_HEADER
+
+# This file is for the use of Unicode::UCD
+
+# Highest legal Unicode code point
+\$Unicode::UCD::MAX_UNICODE_CODEPOINT = 0x$MAX_UNICODE_CODEPOINT_STRING;
+
+# Hangul syllables
+\$Unicode::UCD::HANGUL_BEGIN = $SBase_string;
+\$Unicode::UCD::HANGUL_COUNT = $SCount;
+
+1;
+END
+
+    main::write("UCD.pl", 0, \@ucd);  # The 0 means no utf8.
+    return;
+}
 
 sub write_all_tables() {
     # Write out all the tables generated by this program to files, as well as
@@ -14537,9 +14560,10 @@ sub write_all_tables() {
     # Write out the pod file
     make_pod;
 
-    # And Heavy.pl, Name.pm
+    # And Heavy.pl, Name.pm, UCD.pl
     make_Heavy;
     make_Name_pm;
+    make_UCD;
 
     make_property_test_script() if $make_test_script;
     return;