diff options
author | Prymmer/Kahn <pvhp@best.com> | 2001-06-21 17:03:24 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-22 12:13:37 +0000 |
commit | 3a9c887ec5858f682dcfa670925a52c00d6a8199 (patch) | |
tree | 95f5b58322c5cf9d4459cef0f65f1e6cceb58a90 /utils/h2xs.PL | |
parent | 76f26e3591a8243af871f7d09fe437dffde7a28b (diff) | |
download | perl-3a9c887ec5858f682dcfa670925a52c00d6a8199.tar.gz |
trigraphs and tests for h2xs
Message-ID: <Pine.BSF.4.21.0106212354510.6026-100000@shell8.ba.best.com>
p4raw-id: //depot/perl@10820
Diffstat (limited to 'utils/h2xs.PL')
-rw-r--r-- | utils/h2xs.PL | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index ef31a2e8a9..6bf4be97a2 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -553,6 +553,7 @@ if( @path_h ){ use Config; use File::Spec; my @paths; + my $pre_sub_tri_graphs = 1; if ($^O eq 'VMS') { # Consider overrides of default location # XXXX This is not equivalent to what the older version did: # it was looking at $hadsys header-file per header-file... @@ -616,6 +617,19 @@ if( @path_h ){ open(CH, "<$rel_path_h") || die "Can't open $rel_path_h: $!\n"; defines: while (<CH>) { + if ($pre_sub_tri_graphs) { + # Preprocess all tri-graphs + # including things stuck in quoted string constants. + s/\?\?=/#/g; # | ??=| #| + s/\?\?\!/|/g; # | ??!| || + s/\?\?'/^/g; # | ??'| ^| + s/\?\?\(/[/g; # | ??(| [| + s/\?\?\)/]/g; # | ??)| ]| + s/\?\?\-/~/g; # | ??-| ~| + s/\?\?\//\\/g; # | ??/| \| + s/\?\?</{/g; # | ??<| {| + s/\?\?>/}/g; # | ??>| }| + } if (/^[ \t]*#[ \t]*define\s+([\$\w]+)\b(?!\()\s*(?=[^" \t])(.*)/) { my $def = $1; my $rest = $2; |