From dd870bcfb767e5c6fbc69792e7b8984b56962cef Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 14 Nov 2013 19:32:44 -0700 Subject: 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 --- lib/unicore/mktables | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'lib') 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. -- cgit v1.2.1