unicode: allow row ranges, fix verbose binary
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 25 Dec 2010 00:27:01 +0000 (01:27 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 11 Jan 2011 22:41:38 +0000 (23:41 +0100)
unicode.plp

index 0920030..2e9678b 100644 (file)
@@ -59,7 +59,10 @@ $glyphs->print(map {
                        for ($rowlen = 1; $rowlen++; $rowlen <= $#$table) {
                                last if $table->[$rowlen] =~ /\./;
                        }
-                       my @cells = map { $_*$rowlen .. ($_+1)*$rowlen - 1 } @select;
+                       my @cells = map {
+                               my $end = (s/-(.+)?// ? ($1 // @$table / $rowlen - 1) : $_) + 1;
+                               $_ * $rowlen .. $end * $rowlen - 1;
+                       } @select;
                        [ @$table[@cells] ];
                }
                else {
@@ -70,9 +73,9 @@ $glyphs->print(map {
        Popular
                punctuation/quoting
                        common
-               symbols/binary?symbols/binary=0
-               latin/sample=0=1
-                       sample=2=3
+               symbols/binary?symbols/binary=-5
+               latin/sample=-1
+                       sample=2-3
                        ?uncommon
                punctuation/version
                punctuation/marks