summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-02-28 21:56:43 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-02-28 21:56:43 +0000
commit9f68db38bddc39fbd37e57bf1751eaf7aac28e57 (patch)
tree8c581f83488d49a072fcad6fb1ebb946d74948df /x2p
parentac58e20f744208e9bff2115708a2f1c4e2e2175f (diff)
downloadperl-9f68db38bddc39fbd37e57bf1751eaf7aac28e57.tar.gz
perl 3.0 patch #12 patch #9, continued
See patch #9.
Diffstat (limited to 'x2p')
-rw-r--r--x2p/s2p.SH11
-rw-r--r--x2p/walk.c9
2 files changed, 15 insertions, 5 deletions
diff --git a/x2p/s2p.SH b/x2p/s2p.SH
index fc85209d34..08230b02ec 100644
--- a/x2p/s2p.SH
+++ b/x2p/s2p.SH
@@ -28,9 +28,12 @@ $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.1.2 89/11/17 15:51:27 lwall Locked $
+# $Header: s2p.SH,v 3.0.1.3 90/03/01 10:31:21 lwall Locked $
#
# $Log: s2p.SH,v $
+# Revision 3.0.1.3 90/03/01 10:31:21 lwall
+# patch9: s2p didn't handle \< and \>
+#
# Revision 3.0.1.2 89/11/17 15:51:27 lwall
# patch5: in s2p, line labels without a subsequent statement were done wrong
# patch5: s2p left residue in /tmp
@@ -426,6 +429,9 @@ ${space}next line;";
$len--;
$_ = substr($_,0,$i) . substr($_,$i+1,10000);
}
+ elsif (!$repl && substr($_,$i,1) =~ /^[<>]$/) {
+ substr($_,$i,1) = 'b';
+ }
}
elsif ($c eq '[' && !$repl) {
$i++ if substr($_,$i,1) eq '^';
@@ -607,7 +613,8 @@ sub fetchpat {
s/(.)//;
$ch = $1;
$delim = '' if $ch =~ /^[(){}\w]$/;
- $delim .= $1;
+ $ch = 'b' if $ch =~ /^[<>]$/;
+ $delim .= $ch;
}
elsif ($delim eq '[') {
$inbracket = 1;
diff --git a/x2p/walk.c b/x2p/walk.c
index ca1214d488..58494c9d78 100644
--- a/x2p/walk.c
+++ b/x2p/walk.c
@@ -1,4 +1,4 @@
-/* $Header: walk.c,v 3.0.1.3 89/12/21 20:32:35 lwall Locked $
+/* $Header: walk.c,v 3.0.1.4 90/03/01 10:32:45 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
@@ -6,6 +6,9 @@
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: walk.c,v $
+ * Revision 3.0.1.4 90/03/01 10:32:45 lwall
+ * patch9: a2p didn't put a $ on ExitValue
+ *
* Revision 3.0.1.3 89/12/21 20:32:35 lwall
* patch7: in a2p, user-defined functions didn't work on some machines
*
@@ -158,7 +161,7 @@ int minprec; /* minimum precedence without parens */
str_cat(str,"\n");
}
if (exitval)
- str_cat(str,"exit ExitValue;\n");
+ str_cat(str,"exit $ExitValue;\n");
if (subs->str_ptr) {
str_cat(str,"\n");
str_scat(str,subs);
@@ -1327,7 +1330,7 @@ sub Pick {\n\
}
else {
if (len == 1) {
- str_set(str,"ExitValue = ");
+ str_set(str,"$ExitValue = ");
exitval = TRUE;
str_scat(str,
fstr=walk(1,level,ops[node+1].ival,&numarg,P_ASSIGN));