summaryrefslogtreecommitdiff
path: root/lib/unicore
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-11-27 12:16:25 -0700
committerKarl Williamson <public@khwilliamson.com>2013-12-31 08:27:22 -0700
commit731cb813cb160baa0c7969c70e0864d4da074738 (patch)
tree8702337b1c98dbb57a8b643772b97773c2b0e7ff /lib/unicore
parentf5a7f1939d98a1e112bd8fd009fc4ddbc82f517e (diff)
downloadperl-731cb813cb160baa0c7969c70e0864d4da074738.tar.gz
mktables: Split off some functionality
This adds a new function that formats a count of code points. Currently it calls the current function that formats a generic number. A future commit will change so that the output of the two functions differ. The reason for this commit is to make that later commit's difference listing smaller and easier to understand.
Diffstat (limited to 'lib/unicore')
-rw-r--r--lib/unicore/mktables14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 0006f5da8e..f3d5c83d58 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -1711,6 +1711,12 @@ sub clarify_number ($) {
return $number;
}
+sub clarify_code_point_count ($) {
+ # This is like clarify_number(), but the input is assumed to be a count of
+ # code points, rather than a generic number.
+
+ return clarify_number(shift);
+}
package Carp;
@@ -5866,7 +5872,7 @@ END
$OUT[-1] = merge_single_annotation_line(
$OUT[-1],
"# ["
- . main::clarify_number($end - $start + 1)
+ . main::clarify_code_point_count($end - $start + 1)
. "]\n",
$comment_indent);
}
@@ -5963,7 +5969,7 @@ END
# Include the number of code points in the
# range
my $count =
- main::clarify_number($range_end - $i + 1);
+ main::clarify_code_point_count($range_end - $i + 1);
$annotation .= " [$count]\n";
# Skip to the end of the range
@@ -6661,7 +6667,7 @@ END
# Get a string version of $count with underscores in large numbers,
# for clarity.
- my $string_count = main::clarify_number($count);
+ my $string_count = main::clarify_code_point_count($count);
my $code_points = ($count == 1)
? 'single code point'
@@ -7690,7 +7696,7 @@ END
# Get the number of code points matched by each of the tables in this
# file, and add underscores for clarity.
my $count = $leader->count;
- my $string_count = main::clarify_number($count);
+ my $string_count = main::clarify_code_point_count($count);
my $loose_count = 0; # how many aliases loosely matched
my $compound_name = ""; # ? Are any names compound?, and if so, an