summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-05-05 16:30:10 -0600
committerKarl Williamson <khw@cpan.org>2014-05-31 11:23:00 -0600
commitc7c8bf5547526831b6168a1abd107399d80c0991 (patch)
treef65581e66e53834cf3100507c144e741cd3785fc /regen
parent67e9902864a6d06a2ba21bcb58dfc94d3bd240f6 (diff)
downloadperl-c7c8bf5547526831b6168a1abd107399d80c0991.tar.gz
Revert "regen/regcharclass.pl: Make more EBCDIC-friendly"
This reverts commit c4c8e61502fd5289a080f20332c6e3f9f23ce6e2. It turns out that this scheme to bootstrap regcharclass.h onto a machine not running ASCII created too much manual labor getting things to work. A better solution is to cross compile on an ASCII machine for the target. Commit 6ff677df5d6fe0f52ca0b6736f8b5a46ac402943 created the infrastructure to do that, and this commit starts the process of changing regen/regcharclass.pl to use that.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/regcharclass.pl20
1 files changed, 2 insertions, 18 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index 1f780a48f5..9f1c9c0ce8 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -505,25 +505,9 @@ sub _optree {
# can return the "else" value.
return $else if !@conds;
- # Assuming Perl is being released from an ASCII platform, the below makes
- # it work for non-UTF-8 out-of-the box when porting to non-ASCII, by
- # adding a translation back to ASCII. This is the wrong thing to do for
- # UTF-EBCDIC, as that is different from UTF-8. But the intent here is
- # that this regen should be run on the target system, which will omit the
- # translation, and generate the correct UTF-EBCDIC. On ASCII systems, the
- # translation macros expand to just their argument, so there is no harm
- # done nor performance penalty by including them.
- my $test;
- if ($test_type =~ /^cp/) {
- $test = "cp";
- $test = "NATIVE_TO_UNI($test)" if ASCII_PLATFORM;
- }
- else {
- $test = "((U8*)s)[$depth]";
- $test = "NATIVE_TO_LATIN1($test)" if ASCII_PLATFORM;
- }
+ my $test = $test_type =~ /^cp/ ? "cp" : "((U8*)s)[$depth]";
- # first we loop over the possible keys/conditions and find out what they
+ # First we loop over the possible keys/conditions and find out what they
# look like; we group conditions with the same optree together.
my %dmp_res;
my @res_order;