diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1989-11-10 16:20:57 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1989-11-10 16:20:57 +0000 |
commit | ae98613044a1084886d80b8283b25bad38cfd171 (patch) | |
tree | 7dfe17f2ae5835a17db41a0bb4d7ef903d6ff3d9 /x2p/s2p.SH | |
parent | bf38876a182e0df9dd73362f56cf0ab8b43aa789 (diff) | |
download | perl-ae98613044a1084886d80b8283b25bad38cfd171.tar.gz |
perl 3.0 patch #4 Patch #2 continued
Diffstat (limited to 'x2p/s2p.SH')
-rw-r--r-- | x2p/s2p.SH | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/x2p/s2p.SH b/x2p/s2p.SH index 35ee9e2870..e428d41910 100644 --- a/x2p/s2p.SH +++ b/x2p/s2p.SH @@ -28,9 +28,13 @@ $spitshell >s2p <<!GROK!THIS! : In the following dollars and backticks do not need the extra backslash. $spitshell >>s2p <<'!NO!SUBS!' -# $Header: s2p.SH,v 3.0 89/10/18 15:35:02 lwall Locked $ +# $Header: s2p.SH,v 3.0.1.1 89/11/11 05:08:25 lwall Locked $ # # $Log: s2p.SH,v $ +# Revision 3.0.1.1 89/11/11 05:08:25 lwall +# patch2: in s2p, + within patterns needed backslashing +# patch2: s2p was printing out some debugging info to the output file +# # Revision 3.0 89/10/18 15:35:02 lwall # 3.0 baseline # @@ -418,7 +422,7 @@ ${space}next line;"; elsif ($c eq ']') { $inbracket = 0; } - elsif (!$repl && index("()",$c) >= 0) { + elsif (!$repl && index("()+",$c) >= 0) { $_ = substr($_,0,$i) . '\\' . substr($_,$i,10000); $i++; $len++; @@ -583,10 +587,9 @@ sub fetchpat { local($inbracket); local($prefix,$delim,$ch); - delim: while (s:^([^\](|)[\\/]*)([](|)[\\/])::) { + delim: while (s:^([^\]+(|)[\\/]*)([]+(|)[\\/])::) { $prefix = $1; $delim = $2; - print "$prefix\t$delim\t$_\n"; if ($delim eq '\\') { s/(.)//; $ch = $1; @@ -597,13 +600,11 @@ sub fetchpat { $inbracket = 1; s/^\^// && ($delim .= '^'); s/^]// && ($delim .= ']'); - print "$prefix\t$delim\t$_\n"; } elsif ($delim eq ']') { $inbracket = 0; } elsif ($inbracket || $delim ne $outer) { - print "Adding\n"; $delim = '\\' . $delim; } $addr .= $prefix; |