diff options
author | Karl Williamson <khw@cpan.org> | 2018-04-19 17:06:39 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-04-20 01:11:51 -0600 |
commit | 48737b776aa8890f33cc8a379b23f6bbecd9cc03 (patch) | |
tree | 0546654c7d49b40ee5a6b237c8791dd4fb362bf2 /regen | |
parent | c454388e0d36bec89ba820ceb1be046fb8244d8e (diff) | |
download | perl-48737b776aa8890f33cc8a379b23f6bbecd9cc03.tar.gz |
regen/mk_invlists.pl: Extract code into subs
This is in preparation for it to be used in more places
Diffstat (limited to 'regen')
-rw-r--r-- | regen/mk_invlists.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl index 2e0eed88d5..de0e0b69b1 100644 --- a/regen/mk_invlists.pl +++ b/regen/mk_invlists.pl @@ -95,6 +95,10 @@ sub end_file_pound_if { } } +sub end_charset_pound_if { + print $out_fh "\n" . get_conditional_compile_line_end(); +} + sub switch_pound_if ($$) { my $name = shift; my $new_pound_if = shift; @@ -128,6 +132,10 @@ sub switch_pound_if ($$) { } } +sub start_charset_pound_if ($;$) { + print $out_fh "\n" . get_conditional_compile_line_start(shift, shift); +} + sub output_invlist ($$;$) { my $name = shift; my $invlist = shift; # Reference to inversion list array @@ -2055,7 +2063,7 @@ end_file_pound_if; # official inversion list. for my $charset (get_supported_code_pages()) { - print $out_fh "\n" . get_conditional_compile_line_start($charset); + start_charset_pound_if($charset); @a2n = @{get_a2n($charset)}; # Below is the list of property names to generate. '&' means to use the @@ -2478,7 +2486,7 @@ for my $charset (get_supported_code_pages()) { output_invmap($prop_name, \@invmap, $lookup_prop, $map_format, $map_default, $extra_enums, $charset) if @invmap; } end_file_pound_if; - print $out_fh "\n" . get_conditional_compile_line_end(); + end_charset_pound_if; } switch_pound_if('Boundary_pair_tables', 'PERL_IN_REGEXEC_C'); |