version 1.6, 1997/07/13 23:53:58 |
version 1.7, 1997/07/14 00:24:25 |
|
|
(void)strcpy(cmd, str); |
(void)strcpy(cmd, str); |
if (bangexp(cmd) < 0) |
if (bangexp(cmd) < 0) |
return(1); |
return(1); |
if ((shell = value("SHELL")) == NOSTR) |
if ((shell = value("SHELL")) == NULL) |
shell = _PATH_CSHELL; |
shell = _PATH_CSHELL; |
(void)run_command(shell, 0, -1, -1, "-c", cmd, NOSTR); |
(void)run_command(shell, 0, -1, -1, "-c", cmd, NULL); |
(void)signal(SIGINT, sigint); |
(void)signal(SIGINT, sigint); |
puts("!"); |
puts("!"); |
return(0); |
return(0); |
|
|
sig_t sigint = signal(SIGINT, SIG_IGN); |
sig_t sigint = signal(SIGINT, SIG_IGN); |
char *shell; |
char *shell; |
|
|
if ((shell = value("SHELL")) == NOSTR) |
if ((shell = value("SHELL")) == NULL) |
shell = _PATH_CSHELL; |
shell = _PATH_CSHELL; |
(void)run_command(shell, 0, -1, -1, NOSTR, NOSTR, NOSTR); |
(void)run_command(shell, 0, -1, -1, NULL, NULL, NULL); |
(void)signal(SIGINT, sigint); |
(void)signal(SIGINT, sigint); |
putchar('\n'); |
putchar('\n'); |
return(0); |
return(0); |
|
|
char **arglist = v; |
char **arglist = v; |
char *cp; |
char *cp; |
|
|
if (*arglist == NOSTR) |
if (*arglist == NULL) |
cp = homedir; |
cp = homedir; |
else |
else |
if ((cp = expand(*arglist)) == NOSTR) |
if ((cp = expand(*arglist)) == NULL) |
return(1); |
return(1); |
if (chdir(cp) < 0) { |
if (chdir(cp) < 0) { |
warn(cp); |
warn(cp); |
|
|
void *v; |
void *v; |
{ |
{ |
int *msgvec = v; |
int *msgvec = v; |
if (value("Replyall") == NOSTR) |
if (value("Replyall") == NULL) |
return(_respond(msgvec)); |
return(_respond(msgvec)); |
else |
else |
return(_Respond(msgvec)); |
return(_Respond(msgvec)); |
|
|
mp = &message[msgvec[0] - 1]; |
mp = &message[msgvec[0] - 1]; |
touch(mp); |
touch(mp); |
dot = mp; |
dot = mp; |
if ((rcv = skin(hfield("from", mp))) == NOSTR) |
if ((rcv = skin(hfield("from", mp))) == NULL) |
rcv = skin(nameof(mp, 1)); |
rcv = skin(nameof(mp, 1)); |
if ((replyto = skin(hfield("reply-to", mp))) != NOSTR) |
if ((replyto = skin(hfield("reply-to", mp))) != NULL) |
np = extract(replyto, GTO); |
np = extract(replyto, GTO); |
else if ((cp = skin(hfield("to", mp))) != NOSTR) |
else if ((cp = skin(hfield("to", mp))) != NULL) |
np = extract(cp, GTO); |
np = extract(cp, GTO); |
else |
else |
np = NIL; |
np = NIL; |
|
|
if (altnames) |
if (altnames) |
for (ap = altnames; *ap; ap++) |
for (ap = altnames; *ap; ap++) |
np = delname(np, *ap); |
np = delname(np, *ap); |
if (np != NIL && replyto == NOSTR) |
if (np != NIL && replyto == NULL) |
np = cat(np, extract(rcv, GTO)); |
np = cat(np, extract(rcv, GTO)); |
else if (np == NIL) { |
else if (np == NIL) { |
if (replyto != NOSTR) |
if (replyto != NULL) |
puts("Empty reply-to field -- replying to author"); |
puts("Empty reply-to field -- replying to author"); |
np = extract(rcv, GTO); |
np = extract(rcv, GTO); |
} |
} |
head.h_to = np; |
head.h_to = np; |
if ((head.h_subject = hfield("subject", mp)) == NOSTR) |
if ((head.h_subject = hfield("subject", mp)) == NULL) |
head.h_subject = hfield("subj", mp); |
head.h_subject = hfield("subj", mp); |
head.h_subject = reedit(head.h_subject); |
head.h_subject = reedit(head.h_subject); |
if (replyto == NOSTR && (cp = skin(hfield("cc", mp))) != NOSTR) { |
if (replyto == NULL && (cp = skin(hfield("cc", mp))) != NULL) { |
np = elide(extract(cp, GCC)); |
np = elide(extract(cp, GCC)); |
np = delname(np, myname); |
np = delname(np, myname); |
if (altnames != 0) |
if (altnames != 0) |
|
|
{ |
{ |
char *newsubj; |
char *newsubj; |
|
|
if (subj == NOSTR) |
if (subj == NULL) |
return(NOSTR); |
return(NULL); |
if ((subj[0] == 'r' || subj[0] == 'R') && |
if ((subj[0] == 'r' || subj[0] == 'R') && |
(subj[1] == 'e' || subj[1] == 'E') && |
(subj[1] == 'e' || subj[1] == 'E') && |
subj[2] == ':') |
subj[2] == ':') |
|
|
char varbuf[BUFSIZ], **ap, **p; |
char varbuf[BUFSIZ], **ap, **p; |
int errs, h, s; |
int errs, h, s; |
|
|
if (*arglist == NOSTR) { |
if (*arglist == NULL) { |
for (h = 0, s = 1; h < HSHSIZE; h++) |
for (h = 0, s = 1; h < HSHSIZE; h++) |
for (vp = variables[h]; vp != NOVAR; vp = vp->v_link) |
for (vp = variables[h]; vp != NOVAR; vp = vp->v_link) |
s++; |
s++; |
|
|
for (h = 0, p = ap; h < HSHSIZE; h++) |
for (h = 0, p = ap; h < HSHSIZE; h++) |
for (vp = variables[h]; vp != NOVAR; vp = vp->v_link) |
for (vp = variables[h]; vp != NOVAR; vp = vp->v_link) |
*p++ = vp->v_name; |
*p++ = vp->v_name; |
*p = NOSTR; |
*p = NULL; |
sort(ap); |
sort(ap); |
for (p = ap; *p != NOSTR; p++) |
for (p = ap; *p != NULL; p++) |
printf("%s\t%s\n", *p, value(*p)); |
printf("%s\t%s\n", *p, value(*p)); |
return(0); |
return(0); |
} |
} |
errs = 0; |
errs = 0; |
for (ap = arglist; *ap != NOSTR; ap++) { |
for (ap = arglist; *ap != NULL; ap++) { |
cp = *ap; |
cp = *ap; |
cp2 = varbuf; |
cp2 = varbuf; |
while (*cp != '=' && *cp != '\0') |
while (*cp != '=' && *cp != '\0') |
|
|
char **ap; |
char **ap; |
|
|
errs = 0; |
errs = 0; |
for (ap = arglist; *ap != NOSTR; ap++) { |
for (ap = arglist; *ap != NULL; ap++) { |
if ((vp2 = lookup(*ap)) == NOVAR) { |
if ((vp2 = lookup(*ap)) == NOVAR) { |
if (!sourcing) { |
if (!sourcing) { |
printf("\"%s\": undefined variable\n", *ap); |
printf("\"%s\": undefined variable\n", *ap); |
|
|
int s; |
int s; |
char **ap, *gname, **p; |
char **ap, *gname, **p; |
|
|
if (*argv == NOSTR) { |
if (*argv == NULL) { |
for (h = 0, s = 1; h < HSHSIZE; h++) |
for (h = 0, s = 1; h < HSHSIZE; h++) |
for (gh = groups[h]; gh != NOGRP; gh = gh->g_link) |
for (gh = groups[h]; gh != NOGRP; gh = gh->g_link) |
s++; |
s++; |
|
|
for (h = 0, p = ap; h < HSHSIZE; h++) |
for (h = 0, p = ap; h < HSHSIZE; h++) |
for (gh = groups[h]; gh != NOGRP; gh = gh->g_link) |
for (gh = groups[h]; gh != NOGRP; gh = gh->g_link) |
*p++ = gh->g_name; |
*p++ = gh->g_name; |
*p = NOSTR; |
*p = NULL; |
sort(ap); |
sort(ap); |
for (p = ap; *p != NOSTR; p++) |
for (p = ap; *p != NULL; p++) |
printgroup(*p); |
printgroup(*p); |
return(0); |
return(0); |
} |
} |
if (argv[1] == NOSTR) { |
if (argv[1] == NULL) { |
printgroup(*argv); |
printgroup(*argv); |
return(0); |
return(0); |
} |
} |
|
|
* later anyway. |
* later anyway. |
*/ |
*/ |
|
|
for (ap = argv+1; *ap != NOSTR; ap++) { |
for (ap = argv+1; *ap != NULL; ap++) { |
gp = (struct group *)calloc(sizeof(*gp), 1); |
gp = (struct group *)calloc(sizeof(*gp), 1); |
gp->ge_name = vcopy(*ap); |
gp->ge_name = vcopy(*ap); |
gp->ge_link = gh->g_list; |
gp->ge_link = gh->g_list; |
|
|
{ |
{ |
register char **ap; |
register char **ap; |
|
|
for (ap = list; *ap != NOSTR; ap++) |
for (ap = list; *ap != NULL; ap++) |
; |
; |
if (ap-list < 2) |
if (ap-list < 2) |
return; |
return; |
|
|
{ |
{ |
char **argv = v; |
char **argv = v; |
|
|
if (argv[0] == NOSTR) { |
if (argv[0] == NULL) { |
newfileinfo(0); |
newfileinfo(0); |
return(0); |
return(0); |
} |
} |
|
|
register char **ap; |
register char **ap; |
register char *cp; |
register char *cp; |
|
|
for (ap = argv; *ap != NOSTR; ap++) { |
for (ap = argv; *ap != NULL; ap++) { |
cp = *ap; |
cp = *ap; |
if ((cp = expand(cp)) != NOSTR) { |
if ((cp = expand(cp)) != NULL) { |
if (ap != argv) |
if (ap != argv) |
putchar(' '); |
putchar(' '); |
fputs(cp, stdout); |
fputs(cp, stdout); |
|
|
void *v; |
void *v; |
{ |
{ |
int *msgvec = v; |
int *msgvec = v; |
if (value("Replyall") == NOSTR) |
if (value("Replyall") == NULL) |
return(_Respond(msgvec)); |
return(_Respond(msgvec)); |
else |
else |
return(_respond(msgvec)); |
return(_respond(msgvec)); |
|
|
mp = &message[*ap - 1]; |
mp = &message[*ap - 1]; |
touch(mp); |
touch(mp); |
dot = mp; |
dot = mp; |
if ((cp = skin(hfield("from", mp))) == NOSTR) |
if ((cp = skin(hfield("from", mp))) == NULL) |
cp = skin(nameof(mp, 2)); |
cp = skin(nameof(mp, 2)); |
head.h_to = cat(head.h_to, extract(cp, GTO)); |
head.h_to = cat(head.h_to, extract(cp, GTO)); |
} |
} |
if (head.h_to == NIL) |
if (head.h_to == NIL) |
return(0); |
return(0); |
mp = &message[msgvec[0] - 1]; |
mp = &message[msgvec[0] - 1]; |
if ((head.h_subject = hfield("subject", mp)) == NOSTR) |
if ((head.h_subject = hfield("subject", mp)) == NULL) |
head.h_subject = hfield("subj", mp); |
head.h_subject = hfield("subj", mp); |
head.h_subject = reedit(head.h_subject); |
head.h_subject = reedit(head.h_subject); |
head.h_cc = NIL; |
head.h_cc = NIL; |