diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-11-14 19:32:44 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-12-31 08:27:19 -0700 |
commit | dd870bcfb767e5c6fbc69792e7b8984b56962cef (patch) | |
tree | a4b071fbd4f627fedd80fcc4d8c1256d44f11de8 /lib | |
parent | 97a8a595adfd7dda22e71e4edc67262f5dd11e64 (diff) | |
download | perl-dd870bcfb767e5c6fbc69792e7b8984b56962cef.tar.gz |
mktables: Convert to use new function
The previous commit added a new function used in newly added code; this
changes some existing code to use that function
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index c6b180aa59..bad179943b 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -5766,31 +5766,22 @@ END $start, $end; if ($value ne "") { if ($convert_map_to_from_hex) { - $OUT[-1] .= sprintf "\t$hex_format", $value; + $OUT[-1] .= sprintf "\t$hex_format\n", $value; } else { - $OUT[-1] .= "\t$value"; + $OUT[-1] .= "\t$value\n"; } } # Add a comment with the size of the range, if - # requested. Expand Tabs to make sure they all start - # in the same column, and then unexpand to use mostly - # tabs. - if (! $output_range_counts{$addr}) { - $OUT[-1] .= "\n"; - } - else { - $OUT[-1] = Text::Tabs::expand($OUT[-1]); - my $count = main::clarify_number($end - $start + 1); - use integer; - - my $width = $tab_stops * 8 - 1; - $OUT[-1] = sprintf("%-*s # [%s]\n", - $width, - $OUT[-1], - $count); - $OUT[-1] = Text::Tabs::unexpand($OUT[-1]); + # requested. + if ($output_range_counts{$addr}) { + $OUT[-1] = merge_single_annotation_line( + $OUT[-1], + "# [" + . main::clarify_number($end - $start + 1) + . "]\n", + $comment_indent); } } else { # Here to output a single code point per line. |