This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/mk_invlists.pl: Remove improper line
authorKarl Williamson <khw@cpan.org>
Fri, 6 Apr 2018 02:40:19 +0000 (20:40 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 17 Apr 2018 16:51:18 +0000 (10:51 -0600)
I don't know what this line was supposed to do, but it wasn't working.
This commit also uses DeMorgan's law to clarify, and makes sure that
before looking at an entry in an array, that the entry exists

charclass_invlists.h
regen/mk_invlists.pl

index a17262b..b908dfe 100644 (file)
@@ -170678,5 +170678,5 @@ static const U8 WB_table[24][24] = {
  * ea4dc61a00d2db9bd46f3ddec706b5b7b11e8fcf848fb384b54b507fb70d8e90 lib/unicore/mktables
  * 21653d2744fdd071f9ef138c805393901bb9547cf3e777ebf50215a191f986ea lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
- * f258cc77ab45ba5583bb3ea39b0859ae9b56030da93d94db4407455925fe5ae5 regen/mk_invlists.pl
+ * 9108f918cebbc47c3f673698e4c8563dfd5b4e2c2379c334f0104ad7882b2617 regen/mk_invlists.pl
  * ex: set ro: */
index fea618b..1cf4cfa 100644 (file)
@@ -2212,10 +2212,10 @@ for my $charset (get_supported_code_pages()) {
         # of 0..256, as the remap will also include all of 0..256  (256 not
         # 255 because a re-ordering could cause 256 to need to be in the same
         # range as 255.)
-        if (          (@invmap && $maps_to_code_point)
-            || (     ! $nonl1_only
-                || (   $invlist[0] < 256
-                    && ! ($invlist[0] == 0 && $invlist[1] > 256))))
+        if (       (@invmap && $maps_to_code_point)
+            || (   ($invlist[0] < 256
+                && (    $invlist[0] != 0
+                    || (scalar @invlist != 1 && $invlist[1] < 256)))))
         {
             if (! @invmap) {    # Straight inversion list
                 # Look at all the ranges that start before 257.