From 006a5267c67ca7076380d40d4562555fb5578514 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 22 Apr 2017 00:12:59 +0200 Subject: [PATCH] charset: code constants in hexadecimal where appropriate --- charset.plp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charset.plp b/charset.plp index b84816a..7e115a8 100644 --- a/charset.plp +++ b/charset.plp @@ -223,7 +223,7 @@ sub tabinput { elsif (defined $visible->{ascii}) { $row{parent} = $parents[0]; $params = $parents[1] // 80; - $params = 80 if hex $params >= 128; # ascii offset at most + $params = 80 if hex $params >= 0x80; # ascii offset at most } elsif (@parents) { $row{parent} = $parents[0]; @@ -281,14 +281,14 @@ sub tabinput { elsif (lc $input eq 'uu') { $row{cell} = do 'charset-ucplanes.inc.pl' or Alert('Table data could not be read', $@ || $!); - $row{endpoint} ||= 1023; + $row{endpoint} ||= 0x3FF; $row{set} = 'Unicode planes'; } elsif (lc $input eq 'u') { $row{cell} = do 'charset-unicode.inc.pl' or Alert('Table data could not be read', $@ || $!); - $row{endpoint} ||= 8191; + $row{endpoint} ||= 0x1FFF; $row{set} = 'Unicode ' . ( $row{startpoint} < 0x1000 && $row{endpoint} < 0x1000 ? 'BMP' : $row{startpoint} >= 0x1000 && $row{endpoint} < 0x2000 ? 'SMP' : @@ -299,11 +299,11 @@ sub tabinput { $row{set} = 'UTF-8'; $row{cell} = do 'charset-utf8.inc.pl' or Alert('Table data could not be read', $@ || $!); - $row{endpoint} = 255; + $row{endpoint} = 0xFF; } elsif ($row{set} = Encode::resolve_alias($input)) { $row{offset} = delete $row{startpoint}; - $row{endpoint} ||= 255; + $row{endpoint} ||= 0xFF; if ($row{set} eq 'MacHebrew' or $row{set} eq 'MacThai') { # array of possibly multiple characters per code point $row{table} = [ -- 2.30.0