diff options
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c index f52bcdfc8..bf80495bd 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -1592,7 +1592,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) /* combination of (L), (U) and (C) flags. */ int casmod = CASMOD_NONE; /* - * quotemod says we are doing either (q) (positive), (Q) (negative) + * quotemod says we are doing either (q/b) (positive), (Q) (negative) * or not (0). quotetype counts the q's for the first case. * quoterr is simply (X) but gets passed around a lot because the * combination (eX) needs it. @@ -1861,6 +1861,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) quotemod++, quotetype++; } break; + case 'b': + if (quotemod || quotetype != QT_NONE) + goto flagerr; + quotemod = 1; + quotetype = QT_BACKSLASH_PATTERN; + break; case 'Q': quotemod--; break; @@ -3460,7 +3466,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) if (quotemod) { int pre = 0, post = 0; - if (quotemod > 0 && quotetype > QT_BACKSLASH) { + if (quotemod > 0) { switch (quotetype) { case QT_DOLLARS: @@ -3471,6 +3477,9 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) case QT_SINGLE_OPTIONAL: /* quotes will be added for us */ + case QT_BACKSLASH: + case QT_BACKSLASH_PATTERN: + /* no quotes */ break; default: |