diff options
author | Karl Williamson <khw@cpan.org> | 2014-04-16 19:32:38 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-05-31 10:14:55 -0600 |
commit | 81a2a11fdbafc00d0e4637aaaf4d252133a3d16c (patch) | |
tree | 55c1d1698c7cd795bda727a7704874180693bf74 /regen | |
parent | a1beba5bf133a5abd1f8a0cb6054bec2c71d5619 (diff) | |
download | perl-81a2a11fdbafc00d0e4637aaaf4d252133a3d16c.tar.gz |
regen/unicode_constants.pl: White-space only
Indent code in block formed by the previous commit
Diffstat (limited to 'regen')
-rw-r--r-- | regen/unicode_constants.pl | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/regen/unicode_constants.pl b/regen/unicode_constants.pl index 2924ff481d..8d68563540 100644 --- a/regen/unicode_constants.pl +++ b/regen/unicode_constants.pl @@ -116,25 +116,25 @@ while ( <DATA> ) { $str = sprintf "0x%02X", $cp; # Is a numeric constant } else { - $str = join "", map { sprintf "\\x%02X", $_ } - unpack("U0C*", pack("U", $cp)); - - $suffix = '_UTF8'; - if (! defined $flag || $flag =~ /^ string (_skip_if_undef)? $/x) { - $str = "\"$str\""; # Will be a string constant - } elsif ($flag eq 'tail') { - $str =~ s/\\x..//; # Remove the first byte - $suffix .= '_TAIL'; + $str = join "", map { sprintf "\\x%02X", $_ } + unpack("U0C*", pack("U", $cp)); + + $suffix = '_UTF8'; + if (! defined $flag || $flag =~ /^ string (_skip_if_undef)? $/x) { $str = "\"$str\""; # Will be a string constant - } - elsif ($flag eq 'first') { - $str =~ s/ \\x ( .. ) .* /$1/x; # Get the two nibbles of the 1st byte - $suffix .= '_FIRST_BYTE'; - $str = "0x$str"; # Is a numeric constant - } - else { - die "Unknown flag at line $.: $_\n"; - } + } elsif ($flag eq 'tail') { + $str =~ s/\\x..//; # Remove the first byte + $suffix .= '_TAIL'; + $str = "\"$str\""; # Will be a string constant + } + elsif ($flag eq 'first') { + $str =~ s/ \\x ( .. ) .* /$1/x; # Get the two nibbles of the 1st byte + $suffix .= '_FIRST_BYTE'; + $str = "0x$str"; # Is a numeric constant + } + else { + die "Unknown flag at line $.: $_\n"; + } } printf $out_fh "#define %s%s %s /* U+%04X */\n", $name, $suffix, $str, $U_cp; } |