summaryrefslogtreecommitdiff
path: root/dolist.c
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1991-06-09 12:36:21 +0000
committerLarry Wall <lwall@netlabs.com>1991-06-09 12:36:21 +0000
commit1462b684862954f3522657efc93a3264698e4a9f (patch)
treec92554143d0076f4bd8a6f41f8caa3315eef035d /dolist.c
parentd48672a2009b4897fb5bf74d6723c050cdd015e0 (diff)
downloadperl-1462b684862954f3522657efc93a3264698e4a9f.tar.gz
perl 4.0 patch 10: (combined patch)
Subject: pack(hh,1) dumped core Subject: read didn't work from character special files open for writing Subject: close-on-exec wrongly set on system file descriptors Subject: //g only worked first time through Subject: perl -v printed incorrect copyright notice Subject: certain pattern optimizations were botched Subject: documented some newer features in addenda Subject: $) and $| incorrectly handled in run-time patterns Subject: added tests for case-insensitive regular expressions Subject: m'$foo' now treats string as single quoted
Diffstat (limited to 'dolist.c')
-rw-r--r--dolist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/dolist.c b/dolist.c
index c1f4ed56f6..7527874bf8 100644
--- a/dolist.c
+++ b/dolist.c
@@ -1,4 +1,4 @@
-/* $RCSfile: dolist.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 10:58:28 $
+/* $RCSfile: dolist.c,v $$Revision: 4.0.1.2 $$Date: 91/06/10 01:22:15 $
*
* Copyright (c) 1991, Larry Wall
*
@@ -6,6 +6,9 @@
* License or the Artistic License, as specified in the README file.
*
* $Log: dolist.c,v $
+ * Revision 4.0.1.2 91/06/10 01:22:15 lwall
+ * patch10: //g only worked first time through
+ *
* Revision 4.0.1.1 91/06/07 10:58:28 lwall
* patch4: new copyright notice
* patch4: added global modifier for pattern matches
@@ -202,6 +205,8 @@ int *arglast;
goto gotcha;
}
else {
+ if (global)
+ spat->spat_regexp->startp[0] = Nullch;
if (gimme == G_ARRAY)
return sp;
str_sset(str,&str_no);
@@ -276,6 +281,8 @@ yup:
nope:
spat->spat_regexp->startp[0] = Nullch;
++spat->spat_short->str_u.str_useful;
+ if (global)
+ spat->spat_regexp->startp[0] = Nullch;
if (gimme == G_ARRAY)
return sp;
str_sset(str,&str_no);