summaryrefslogtreecommitdiff
path: root/x2p/walk.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-17 03:02:59 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-17 03:02:59 +0000
commitffed7fefd1d95d05e699dababfbb57ef2497cea1 (patch)
treeac02e16ead3b52915c921545a9ccb80f5c857501 /x2p/walk.c
parent0d3e774cdb279a1eadd8282d49334b9b1bfd42ed (diff)
downloadperl-ffed7fefd1d95d05e699dababfbb57ef2497cea1.tar.gz
perl 3.0 patch #6 patch 5 continued
See patch 5.
Diffstat (limited to 'x2p/walk.c')
-rw-r--r--x2p/walk.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/x2p/walk.c b/x2p/walk.c
index d0ea34112c..62b64a4a86 100644
--- a/x2p/walk.c
+++ b/x2p/walk.c
@@ -1,4 +1,4 @@
-/* $Header: walk.c,v 3.0.1.1 89/11/11 05:09:33 lwall Locked $
+/* $Header: walk.c,v 3.0.1.2 89/11/17 15:53:00 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.2 89/11/17 15:53:00 lwall
+ * patch5: on Pyramids, index(s, '}' + 128) doesn't find meta-}
+ *
* Revision 3.0.1.1 89/11/11 05:09:33 lwall
* patch2: in a2p, awk script with no line actions still needs main loop
*
@@ -1419,10 +1422,12 @@ sub Pick {\n\
if (!s)
fatal("Illegal for loop: %s",d);
*s++ = '\0';
- t = index(s,'}' + 128);
- if (!t)
- t = index(s,']' + 128);
- if (t)
+ for (t = s; i = *t; t++) {
+ i &= 127;
+ if (i == '}' || i == ']')
+ break;
+ }
+ if (*t)
*t = '\0';
str = str_new(0);
str_set(str,d+1);