From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: side effect of promptsubst.
Date: Thu, 4 May 2000 12:39:08 +0200 (MET DST) [thread overview]
Message-ID: <200005041039.MAA00509@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 04 May 2000 17:53:42 +0900
Tanaka Akira wrote:
> ...
> | foo="'and now' \"even the pubs\" \\a\\r\\e shut."
> | print -r ${(Q)foo}
> | Error output:
> | Oops. Bug in parse_subst_string: len < l
Hmhm. The other uses of `len' look good.
Bye
Sven
Index: Src/lex.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/lex.c,v
retrieving revision 1.4
diff -u -r1.4 lex.c
--- Src/lex.c 2000/05/04 08:43:31 1.4
+++ Src/lex.c 2000/05/04 09:56:55
@@ -1447,7 +1447,7 @@
int
parse_subst_string(char *s)
{
- int c, l = strlen(s), err;
+ int c, l = strlen(s), err, olen;
if (! *s)
return 0;
@@ -1464,6 +1464,7 @@
strinend();
inpop();
DPUTS(cmdsp, "BUG: parse_subst_string: cmdstack not empty.");
+ olen = len;
lexrestore();
errflag = err;
if (c == LEXERR) {
@@ -1471,9 +1472,9 @@
return 1;
}
#ifdef DEBUG
- if (c != STRING || len != l || errflag) {
+ if (c != STRING || olen != l || errflag) {
fprintf(stderr, "Oops. Bug in parse_subst_string: %s\n",
- len < l ? "len < l" : errflag ? "errflag" : "c != STRING");
+ olen < l ? "len < l" : errflag ? "errflag" : "c != STRING");
fflush(stderr);
untokenize(s);
return 1;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-05-04 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-04 10:39 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-05-04 8:41 Sven Wischnowsky
2000-05-04 8:53 ` Tanaka Akira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200005041039.MAA00509@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).