aboutsummaryrefslogtreecommitdiff
path: root/Src/glob.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-06-18 10:55:45 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-06-18 10:55:45 +0000
commita2159285e80508bb682d90a71270fbddada8bd05 (patch)
treec491bf7a28d7f8fac7ab05cc860c01dea95c19b1 /Src/glob.c
parent805381040dd69dd02b78423d2d71913b33f3cc33 (diff)
downloadzsh-3.1.5-pws-22.tar.gz
zsh-3.1.5-pws-22.tar.xz
zsh-3.1.5-pws-22.zip
zsh-3.1.5-pws-22zsh-3.1.5-pws-22
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/Src/glob.c b/Src/glob.c
index 35aa447de..93b497632 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -744,7 +744,7 @@ parsecomp(int gflag)
pptr++;
}
- if (*pptr == Inpar && pptr[1] == Pound) {
+ if (*pptr == Inpar && pptr[1] == Pound && isset(EXTENDEDGLOB)) {
/* Found some globbing flags */
char *eptr = pptr;
if (kshfunc != KF_NONE)
@@ -3432,17 +3432,17 @@ tokenize(char *s)
void
remnulargs(char *s)
{
- int nl = *s;
- char *t = s;
-
- while (*s)
- if (INULL(*s))
- chuck(s);
- else
- s++;
- if (!*t && nl) {
- t[0] = Nularg;
- t[1] = '\0';
+ if (*s) {
+ char *t = s, *p = s, c;
+
+ while ((c = *s++))
+ if (!INULL(c))
+ *p++ = c;
+ *p = '\0';
+ if (!*t) {
+ t[0] = Nularg;
+ t[1] = '\0';
+ }
}
}