summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 08:35:54 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 08:35:54 +0000
commit4900804b615ce659b2b1c82644fc5f2240345668 (patch)
tree5e4f4e2c9d52474042a89a34d24ac7b588c73038 /Src/lex.c
parent0d0a134822e10de5946bb34720c8c0ca0518207c (diff)
downloadzsh-4900804b615ce659b2b1c82644fc5f2240345668.tar.gz
zsh-4900804b615ce659b2b1c82644fc5f2240345668.tar.xz
zsh-4900804b615ce659b2b1c82644fc5f2240345668.zip
make (e) flag be silent unless (X) is given, too (11768)
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/Src/lex.c b/Src/lex.c
index f5c8d7bdd..644f8cf2b 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1419,6 +1419,22 @@ dquote_parse(char endchar, int sub)
 mod_export int
 parsestr(char *s)
 {
+    int err;
+
+    if ((err = parsestrnoerr(s))) {
+	untokenize(s);
+	if (err > 32 && err < 127)
+	    zerr("parse error near `%c'", NULL, err);
+	else
+	    zerr("parse error", NULL, 0);
+    }
+    return err;
+}
+
+/**/
+mod_export int
+parsestrnoerr(char *s)
+{
     int l = strlen(s), err;
 
     lexsave();
@@ -1434,13 +1450,6 @@ parsestr(char *s)
     inpop();
     DPUTS(cmdsp, "BUG: parsestr: cmdstack not empty.");
     lexrestore();
-    if (err) {
-	untokenize(s);
-	if (err > 32 && err < 127)
-	    zerr("parse error near `%c'", NULL, err);
-	else
-	    zerr("parse error", NULL, 0);
-    }
     return err;
 }