summaryrefslogtreecommitdiff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c2
-rw-r--r--Src/Zle/compctl.c20
-rw-r--r--Src/Zle/computil.c6
-rw-r--r--Src/Zle/zle_misc.c2
-rw-r--r--Src/Zle/zle_tricky.c24
5 files changed, 27 insertions, 27 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index ae7068fc9..2f9fb3308 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1055,7 +1055,7 @@ multiquote(char *s, int ign)
p += ign;
while (*p) {
if (ign >= 0 || p[1])
- s = quotestring(s, NULL, *p);
+ s = quotestring(s, *p);
p++;
}
}
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index ce4576297..c2da2977f 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -1400,7 +1400,7 @@ printcompctl(char *s, Compctl cc, int printflags, int ispat)
untokenize(p);
quotedzputs(p, stdout);
} else
- quotedzputs(quotestring(s, NULL, QT_BACKSLASH), stdout);
+ quotedzputs(quotestring(s, QT_BACKSLASH), stdout);
}
/* loop through flags w/o args that are set, printing them if so */
@@ -1536,7 +1536,7 @@ printcompctl(char *s, Compctl cc, int printflags, int ispat)
char *p = dupstring(s);
untokenize(p);
- quotedzputs(quotestring(p, NULL, QT_BACKSLASH), stdout);
+ quotedzputs(quotestring(p, QT_BACKSLASH), stdout);
}
}
putchar('\n');
@@ -1740,8 +1740,8 @@ static int addwhat;
* This uses the instring variable exported from zle_tricky.c.
*/
-#define quotename(s, e) \
-quotestring(s, e, instring == QT_NONE ? QT_BACKSLASH : instring)
+#define quotename(s) \
+quotestring(s, instring == QT_NONE ? QT_BACKSLASH : instring)
/* Hook functions */
@@ -3153,10 +3153,10 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
lpre = zhalloc(lpl + 1);
memcpy(lpre, s, lpl);
lpre[lpl] = '\0';
- qlpre = quotename(lpre, NULL);
+ qlpre = quotename(lpre);
lsuf = dupstring(s + offs);
lsl = strlen(lsuf);
- qlsuf = quotename(lsuf, NULL);
+ qlsuf = quotename(lsuf);
/* First check for ~.../... */
if (ic == Tilde) {
@@ -3175,11 +3175,11 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
rpre = (*p || *lpre == Tilde || *lpre == Equals) ?
(noreal = 0, getreal(tt)) :
dupstring(tt);
- qrpre = quotename(rpre, NULL);
+ qrpre = quotename(rpre);
for (p = lsuf; *p && *p != String && *p != Tick; p++);
rsuf = *p ? (noreal = 0, getreal(lsuf)) : dupstring(lsuf);
- qrsuf = quotename(rsuf, NULL);
+ qrsuf = quotename(rsuf);
/* Check if word is a pattern. */
@@ -3315,10 +3315,10 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
/* And get the file prefix. */
fpre = dupstring(((s1 == s || s1 == rpre || ic) &&
(*s != '/' || zlemetacs == wb)) ? s1 : s1 + 1);
- qfpre = quotename(fpre, NULL);
+ qfpre = quotename(fpre);
/* And the suffix. */
fsuf = dupstrpfx(rsuf, s2 - rsuf);
- qfsuf = quotename(fsuf, NULL);
+ qfsuf = quotename(fsuf);
if (comppatmatch && *comppatmatch && (ispattern & 2)) {
int t2;
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 1c90a543a..16b681cda 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3554,7 +3554,7 @@ comp_quote(char *str, int prefix)
if ((x = (prefix && *str == '=')))
*str = 'x';
- ret = quotestring(str, NULL, *compqstack);
+ ret = quotestring(str, *compqstack);
if (x)
*str = *ret = '=';
@@ -4744,7 +4744,7 @@ cf_ignore(char **names, LinkList ign, char *style, char *path)
for (; (n = *names); names++) {
if (!ztat(n, &nst, 1) && S_ISDIR(nst.st_mode)) {
if (tpwd && nst.st_dev == est.st_dev && nst.st_ino == est.st_ino) {
- addlinknode(ign, quotestring(n, NULL, QT_BACKSLASH));
+ addlinknode(ign, quotestring(n, QT_BACKSLASH));
continue;
}
if (tpar && !strncmp((c = dupstring(n)), path, pl)) {
@@ -4760,7 +4760,7 @@ cf_ignore(char **names, LinkList ign, char *style, char *path)
if (found || ((e = strrchr(c, '/')) && e > c + pl &&
!ztat(c, &st, 1) && st.st_dev == nst.st_dev &&
st.st_ino == nst.st_ino))
- addlinknode(ign, quotestring(n, NULL, QT_BACKSLASH));
+ addlinknode(ign, quotestring(n, QT_BACKSLASH));
}
}
}
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index a040ca0df..fbd40cd03 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -780,7 +780,7 @@ bracketedpaste(char **args)
int n;
ZLE_STRING_T wpaste;
wpaste = stringaszleline((zmult == 1) ? pbuf :
- quotestring(pbuf, NULL, QT_SINGLE_OPTIONAL), 0, &n, NULL, NULL);
+ quotestring(pbuf, QT_SINGLE_OPTIONAL), 0, &n, NULL, NULL);
cuttext(wpaste, n, CUT_REPLACE);
if (!(zmod.flags & MOD_VIBUF)) {
kct = -1;
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 1d4e1d284..958e79ffb 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -424,8 +424,8 @@ mod_export int instring, inbackt;
* This uses the instring variable above.
*/
-#define quotename(s, e) \
-quotestring(s, e, instring == QT_NONE ? QT_BACKSLASH : instring)
+#define quotename(s) \
+quotestring(s, instring == QT_NONE ? QT_BACKSLASH : instring)
/* Check if the given string is the name of a parameter and if this *
* parameter is one worth expanding. */
@@ -2004,11 +2004,11 @@ get_comp_string(void)
new->next = NULL;
new->str = dupstrpfx(bbeg, len);
- new->str = ztrdup(quotename(new->str, NULL));
+ new->str = ztrdup(quotename(new->str));
untokenize(new->str);
new->pos = begi;
*dbeg = '\0';
- new->qpos = strlen(quotename(predup, NULL));
+ new->qpos = strlen(quotename(predup));
*dbeg = '{';
i -= len;
boffs -= len;
@@ -2067,11 +2067,11 @@ get_comp_string(void)
lastbrbeg = new;
new->str = dupstrpfx(bbeg, len);
- new->str = ztrdup(quotename(new->str, NULL));
+ new->str = ztrdup(quotename(new->str));
untokenize(new->str);
new->pos = begi;
*dbeg = '\0';
- new->qpos = strlen(quotename(predup, NULL));
+ new->qpos = strlen(quotename(predup));
*dbeg = '{';
i -= len;
boffs -= len;
@@ -2117,7 +2117,7 @@ get_comp_string(void)
brend = new;
new->str = dupstrpfx(bbeg, len);
- new->str = ztrdup(quotename(new->str, NULL));
+ new->str = ztrdup(quotename(new->str));
untokenize(new->str);
new->pos = dp - predup - len + 1;
new->qpos = len;
@@ -2146,11 +2146,11 @@ get_comp_string(void)
lastbrbeg = new;
new->str = dupstrpfx(bbeg, len);
- new->str = ztrdup(quotename(new->str, NULL));
+ new->str = ztrdup(quotename(new->str));
untokenize(new->str);
new->pos = begi;
*dbeg = '\0';
- new->qpos = strlen(quotename(predup, NULL));
+ new->qpos = strlen(quotename(predup));
*dbeg = '{';
boffs -= len;
memmove(dbeg, dbeg + len, 1+strlen(dbeg+len));
@@ -2165,7 +2165,7 @@ get_comp_string(void)
p = bp->pos;
l = bp->qpos;
bp->pos = strlen(predup + p + l);
- bp->qpos = strlen(quotename(predup + p + l, NULL));
+ bp->qpos = strlen(quotename(predup + p + l));
memmove(predup + p, predup + p + l, 1+bp->pos);
}
}
@@ -2288,7 +2288,7 @@ doexpansion(char *s, int lst, int olst, int explincmd)
foredel(we - wb, CUT_RAW);
while ((ss = (char *)ugetnode(vl))) {
ret = 0;
- ss = quotename(ss, NULL);
+ ss = quotename(ss);
untokenize(ss);
inststr(ss);
if (nonempty(vl) || !first) {
@@ -2997,7 +2997,7 @@ processcmd(UNUSED(char **args))
inststr(" ");
untokenize(s);
- inststr(quotename(s, NULL));
+ inststr(quotename(s));
zsfree(s);
done = 1;