version 1.5, 1997/07/13 23:54:01 |
version 1.6, 1997/07/14 00:24:29 |
|
|
register struct name *top, *np, *t; |
register struct name *top, *np, *t; |
char nbuf[BUFSIZ]; |
char nbuf[BUFSIZ]; |
|
|
if (line == NOSTR || *line == '\0') |
if (line == NULL || *line == '\0') |
return(NIL); |
return(NIL); |
top = NIL; |
top = NIL; |
np = NIL; |
np = NIL; |
cp = line; |
cp = line; |
while ((cp = yankword(cp, nbuf)) != NOSTR) { |
while ((cp = yankword(cp, nbuf)) != NULL) { |
t = nalloc(nbuf, ntype); |
t = nalloc(nbuf, ntype); |
if (top == NIL) |
if (top == NIL) |
top = t; |
top = t; |
|
|
|
|
comma = ntype & GCOMMA; |
comma = ntype & GCOMMA; |
if (np == NIL) |
if (np == NIL) |
return(NOSTR); |
return(NULL); |
ntype &= ~GCOMMA; |
ntype &= ~GCOMMA; |
s = 0; |
s = 0; |
if (debug && comma) |
if (debug && comma) |
|
|
s++; |
s++; |
} |
} |
if (s == 0) |
if (s == 0) |
return(NOSTR); |
return(NULL); |
s += 2; |
s += 2; |
top = salloc(s); |
top = salloc(s); |
cp = top; |
cp = top; |
|
|
cp = ap; |
cp = ap; |
for (;;) { |
for (;;) { |
if (*cp == '\0') |
if (*cp == '\0') |
return(NOSTR); |
return(NULL); |
if (*cp == '(') { |
if (*cp == '(') { |
register int nesting = 0; |
register int nesting = 0; |
|
|
|
|
* share the same lseek location and trample |
* share the same lseek location and trample |
* on one another. |
* on one another. |
*/ |
*/ |
if ((shell = value("SHELL")) == NOSTR) |
if ((shell = value("SHELL")) == NULL) |
shell = _PATH_CSHELL; |
shell = _PATH_CSHELL; |
sigemptyset(&nset); |
sigemptyset(&nset); |
sigaddset(&nset, SIGHUP); |
sigaddset(&nset, SIGHUP); |
sigaddset(&nset, SIGINT); |
sigaddset(&nset, SIGINT); |
sigaddset(&nset, SIGQUIT); |
sigaddset(&nset, SIGQUIT); |
pid = start_command(shell, &nset, |
pid = start_command(shell, &nset, |
image, -1, "-c", fname, NOSTR); |
image, -1, "-c", fname, NULL); |
if (pid < 0) { |
if (pid < 0) { |
senderr++; |
senderr++; |
goto cant; |
goto cant; |
|
|
|
|
new = NIL; |
new = NIL; |
np = names; |
np = names; |
metoo = (value("metoo") != NOSTR); |
metoo = (value("metoo") != NULL); |
while (np != NIL) { |
while (np != NIL) { |
if (np->n_name[0] == '\\') { |
if (np->n_name[0] == '\\') { |
cp = np->n_flink; |
cp = np->n_flink; |
|
|
*/ |
*/ |
extra = 2; |
extra = 2; |
extra++; |
extra++; |
metoo = value("metoo") != NOSTR; |
metoo = value("metoo") != NULL; |
if (metoo) |
if (metoo) |
extra++; |
extra++; |
verbose = value("verbose") != NOSTR; |
verbose = value("verbose") != NULL; |
if (verbose) |
if (verbose) |
extra++; |
extra++; |
top = (char **)salloc((t + extra) * sizeof(*top)); |
top = (char **)salloc((t + extra) * sizeof(*top)); |
|
|
for (; n != NIL; n = n->n_flink) |
for (; n != NIL; n = n->n_flink) |
if ((n->n_type & GDEL) == 0) |
if ((n->n_type & GDEL) == 0) |
*ap++ = n->n_name; |
*ap++ = n->n_name; |
*ap = NOSTR; |
*ap = NULL; |
return(top); |
return(top); |
} |
} |
|
|