This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Fix --annotate option output
authorKarl Williamson <khw@cpan.org>
Tue, 8 Sep 2015 19:18:58 +0000 (13:18 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 8 Sep 2015 22:42:30 +0000 (16:42 -0600)
 Special code suppressed the expanded output of some ranges, where it
 would be clear from the range itself what was meant.  However, for many
 output tables, that range output was changed, so the desired
 information is missing.  For these tables, don't suppress the expanded
 output.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 91c38a3..1f03121 100644 (file)
@@ -99537,7 +99537,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC POSIX-BC */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * d5895407f73f1bcb0d7ad39e955c0e88a9145e401e868572849eeb134e669269 lib/unicore/mktables
+ * db70131a57e33d508d06ac16a9637b368182ec6b88085c43d83cdf9ccb3590fc lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * 8a097f8f726bb1619af2f27f149ab87e60a1602f790147e3a561358be16abd27 regen/mk_invlists.pl
index c621923..d005c44 100644 (file)
@@ -6379,7 +6379,15 @@ END
                                     $range_name = "Hangul Syllable";
                                 }
 
-                                if ($i != $start || $range_end < $end) {
+                                # If the annotation would just repeat what's
+                                # already being output as the range, skip it.
+                                # (When an inversion list is being written, it
+                                # isn't a repeat, as that always is in
+                                # decimal)
+                                if (   $write_as_invlist
+                                    || $i != $start
+                                    || $range_end < $end)
+                                {
                                     if ($range_end < $MAX_WORKING_CODEPOINT)
                                     {
                                         $annotation = sprintf "%04X..%04X",
@@ -6393,6 +6401,7 @@ END
                                 else { # Indent if not displaying code points
                                     $annotation = " " x 4;
                                 }
+
                                 if ($range_name) {
                                     $annotation .= " $age[$i]" if $age[$i];
                                     $annotation .= " $range_name";
index 72e25fe..911d1c7 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * d5895407f73f1bcb0d7ad39e955c0e88a9145e401e868572849eeb134e669269 lib/unicore/mktables
+ * db70131a57e33d508d06ac16a9637b368182ec6b88085c43d83cdf9ccb3590fc lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * d9c04ac46bdd81bb3e26519f2b8eb6242cb12337205add3f7cf092b0c58dccc4 regen/regcharclass.pl