summaryrefslogtreecommitdiff
path: root/Src/subst.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/subst.c
parent0d0a134822e10de5946bb34720c8c0ca0518207c (diff)
downloadzsh-4900804b615ce659b2b1c82644fc5f2240345668.tar.gz
zsh-4900804b615ce659b2b1c82644fc5f2240345668.zip
make (e) flag be silent unless (X) is given, too (11768)
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 227fd3896..823b858e7 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -702,13 +702,13 @@ get_intarg(char **s)
/* Parsing for the (e) flag. */
static int
-subst_parse_str(char **sp, int single)
+subst_parse_str(char **sp, int single, int err)
{
char *s;
*sp = s = dupstring(*sp);
- if (!parsestr(s)) {
+ if (!(err ? parsestr(s) : parsestrnoerr(s))) {
if (!single) {
for (; *s; s++)
if (*s == Qstring)
@@ -1852,7 +1852,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (prenum || postnum)
x = dopadding(x, prenum, postnum, preone, postone,
premul, postmul);
- if (eval && subst_parse_str(&x, (qt && !nojoin)))
+ if (eval && subst_parse_str(&x, (qt && !nojoin), quoteerr))
return NULL;
xlen = strlen(x);
for (tn = firstnode(&tl);
@@ -1888,7 +1888,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (prenum || postnum)
x = dopadding(x, prenum, postnum, preone, postone,
premul, postmul);
- if (eval && subst_parse_str(&x, (qt && !nojoin)))
+ if (eval && subst_parse_str(&x, (qt && !nojoin), quoteerr))
return NULL;
xlen = strlen(x);
strcatsub(&y, ostr, aptr, x, xlen, NULL, globsubst, copied);
@@ -1903,7 +1903,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (prenum || postnum)
x = dopadding(x, prenum, postnum, preone, postone,
premul, postmul);
- if (eval && subst_parse_str(&x, (qt && !nojoin)))
+ if (eval && subst_parse_str(&x, (qt && !nojoin), quoteerr))
return NULL;
if (qt && !*x && isarr != 2)
y = dupstring(nulstring);
@@ -1919,7 +1919,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (prenum || postnum)
x = dopadding(x, prenum, postnum, preone, postone,
premul, postmul);
- if (eval && subst_parse_str(&x, (qt && !nojoin)))
+ if (eval && subst_parse_str(&x, (qt && !nojoin), quoteerr))
return NULL;
xlen = strlen(x);
*str = strcatsub(&y, aptr, aptr, x, xlen, fstr, globsubst, copied);
@@ -1938,7 +1938,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (prenum || postnum)
x = dopadding(x, prenum, postnum, preone, postone,
premul, postmul);
- if (eval && subst_parse_str(&x, (qt && !nojoin)))
+ if (eval && subst_parse_str(&x, (qt && !nojoin), quoteerr))
return NULL;
xlen = strlen(x);
*str = strcatsub(&y, ostr, aptr, x, xlen, fstr, globsubst, copied);