diff options
author | Larry Wall <lwall@netlabs.com> | 1991-06-09 12:36:21 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1991-06-09 12:36:21 +0000 |
commit | 1462b684862954f3522657efc93a3264698e4a9f (patch) | |
tree | c92554143d0076f4bd8a6f41f8caa3315eef035d /str.c | |
parent | d48672a2009b4897fb5bf74d6723c050cdd015e0 (diff) | |
download | perl-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 'str.c')
-rw-r--r-- | str.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $RCSfile: str.c,v $$Revision: 4.0.1.2 $$Date: 91/06/07 11:58:13 $ +/* $RCSfile: str.c,v $$Revision: 4.0.1.3 $$Date: 91/06/10 01:27:54 $ * * Copyright (c) 1991, Larry Wall * @@ -6,6 +6,9 @@ * License or the Artistic License, as specified in the README file. * * $Log: str.c,v $ + * Revision 4.0.1.3 91/06/10 01:27:54 lwall + * patch10: $) and $| incorrectly handled in run-time patterns + * * Revision 4.0.1.2 91/06/07 11:58:13 lwall * patch4: new copyright notice * patch4: taint check on undefined string could cause core dump @@ -939,8 +942,14 @@ STR *src; ++s; t = s; } - else if ((*s == '@' || (*s == '$' && !index(nointrp,s[1]))) && - s+1 < send) { + else if (*s == '$' && s+1 < send && *nointrp && index(nointrp,s[1])) { + str_ncat(str, t, s - t); + str_ncat(str, "$b", 2); + str_ncat(str, s, 2); + s += 2; + t = s; + } + else if ((*s == '@' || *s == '$') && s+1 < send) { str_ncat(str,t,s-t); t = s; if (*s == '$' && s[1] == '#' && (isalpha(s[2]) || s[2] == '_')) @@ -1171,6 +1180,9 @@ int sp; if (s-t > 0) str_ncat(str,t,s-t); switch(*++s) { + default: + fatal("panic: unknown interp cookie\n"); + break; case 'a': str_scat(str,*++elem); break; |