From bba0d5b6fb0b1bbe6b5bb4a84c72de2152d8dfe3 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 29 Mar 2017 13:08:57 +0200 Subject: [PATCH] chars: rename $html parameter from glyph_info method Overridden in font.plp, but too generic and ambiguous anyway. --- Shiar_Sheet/FormatChar.pm | 4 ++-- apl.plp | 4 ++-- chars.plp | 4 ++-- font.plp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index 78e4a21..8054655 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -31,7 +31,7 @@ sub glyph_html { my ($self, $char) = @_; my $codepoint = ord $char; my $info = $self->glyph_info($codepoint); - my ($class, $name, $mnem, $html, $string) = @$info; + my ($class, $name, $mnem, $entity, $string) = @$info; my $cell = EscapeHTML($string || $char); my $title = sprintf 'U+%04X%s', $codepoint, $name && " ($name)"; @@ -39,7 +39,7 @@ sub glyph_html { $cell = "$cell" if $class =~ /\bZs\b/; $cell = ' ' if $cell eq ''; - return ($cell, EscapeHTML($title), "X $class", $mnem, $html); + return ($cell, EscapeHTML($title), "X $class", $mnem, $entity); } sub glyphs_html { diff --git a/apl.plp b/apl.plp index 6fdf3ca..546be3b 100644 --- a/apl.plp +++ b/apl.plp @@ -60,14 +60,14 @@ for my $op (@ops) { my $codepoint = ord $chr; my $ascii = $codepoint <= 127; my $info = $glyphs->glyph_info($codepoint); - my ($class, $name, $mnem, $html, $string) = @{$info}; + my ($class, $name, $mnem, $entity, $string) = @{$info}; printf '%s', $chr, EscapeHTML($name || '?'), $class; printf '%s', @{$_} for ( [$ascii ? 'l5' : defined $altkey ? 'l4' : 'l3', $altkey], [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1', EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)], - [defined $html ? 'l4' : $ascii ? 'l5' : 'l1', $html // "#$codepoint"], + [defined $entity ? 'l4' : $ascii ? 'l5' : 'l1', $entity // "#$codepoint"], ); printf( defined $_ ? '%s' : '', diff --git a/chars.plp b/chars.plp index a637eae..96d74b4 100644 --- a/chars.plp +++ b/chars.plp @@ -115,12 +115,12 @@ for my $chr (@chars) { print "$chr\n"; my $info = $glyphs->glyph_info($codepoint); - my ($class, $name, $mnem, $html, $string) = @$info; + my ($class, $name, $mnem, $entity, $string) = @$info; print "$_" for sprintf('%X', $codepoint), EscapeHTML($name || '?'); printf '%s', @$_ for ( [$ascii ? 'l0' : defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : 'l1', EscapeHTML($mnem) // ''], - [$ascii ? 'l0' : defined $html ? 'l4' : 'l1', $html // ''], + [$ascii ? 'l0' : defined $entity ? 'l4' : 'l1', $entity // ''], (map { !defined $font{$_}->{-name} ? [l0 => '?'] : $font{$_}->{$chr} ? [l4 => '✔'] : [l1 => '✘'] diff --git a/font.plp b/font.plp index fd55017..82aa0c3 100644 --- a/font.plp +++ b/font.plp @@ -107,7 +107,7 @@ EOT say sprintf '%X', $cp if $colpos++ % $pagecols == 0; my $info = $glyphs->glyph_info($cp); - my ($class, $name, $mnem, $html, $string) = @{$info}; + my ($class, $name, $mnem, $entity, $string) = @{$info}; my $np = $class =~ /\bC\S\b/; # noprint if control or invalid # display literal character, with placeholder circle if non-spacing/enclosing my $html = ($class =~ /\bM[ne]\b/ && chr 9676) . EscapeHTML(chr $cp); -- 2.30.0