1
From 503a0b8da8ed299a00ac95fa24d1fc37c3e831d3 Mon Sep 17 00:00:00 2001
2
From: Herbert Xu <herbert@gondor.apana.org.au>
3
Date: Wed, 29 Mar 2006 07:35:34 +1100
4
Subject: [PATCH] [PARSER] Removed useless parsebackquote flag
6
The parsebackquote flag is only used in a test where it always has the
7
value zero. So we can remove it altogether.
10
src/parser.c | 8 +-------
11
2 files changed, 5 insertions(+), 7 deletions(-)
13
diff --git a/ChangeLog b/ChangeLog
14
index 02b966c..5dd6d40 100644
18
+2006-03-29 Herbert Xu <herbert@gondor.apana.org.au>
20
+ * Removed useless parsebackquote flag.
22
2006-01-12 Herbert Xu <herbert@gondor.apana.org.au>
24
* Fixed eval exit status with empty arguments.
25
diff --git a/src/parser.c b/src/parser.c
26
index c62a950..375fd54 100644
29
@@ -76,7 +76,6 @@ struct heredoc {
32
struct heredoc *heredoclist; /* list of here documents to read */
33
-int parsebackquote; /* nonzero if we are inside backquotes */
34
int doprompt; /* if set, prompt the user */
35
int needprompt; /* true if interactive and at start of line */
36
int lasttoken; /* last token read */
37
@@ -1019,7 +1018,7 @@ quotemark:
39
if (syntax == ARISYNTAX)
40
synerror("Missing '))'");
41
- if (syntax != BASESYNTAX && ! parsebackquote && eofmark == NULL)
42
+ if (syntax != BASESYNTAX && eofmark == NULL)
43
synerror("Unterminated quoted string");
46
@@ -1263,7 +1262,6 @@ badsub: synerror("Bad substitution");
49
struct nodelist **nlpp;
54
@@ -1274,11 +1272,9 @@ parsebackq: {
58
- savepbq = parsebackquote;
59
if (setjmp(jmploc.loc)) {
63
handler = savehandler;
64
longjmp(handler->loc, 1);
66
@@ -1360,7 +1356,6 @@ done:
67
nlpp = &(*nlpp)->next;
68
*nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
70
- parsebackquote = oldstyle;
73
saveprompt = doprompt;
74
@@ -1396,7 +1391,6 @@ done:
78
- parsebackquote = savepbq;
79
handler = savehandler;
80
if (arinest || dblquote)
81
USTPUTC(CTLBACKQ | CTLQUOTE, out);