version 1.4, 1997/07/13 21:21:15 |
version 1.5, 1997/07/13 23:54:01 |
|
|
{ |
{ |
register struct name *np; |
register struct name *np; |
|
|
np = (struct name *) salloc(sizeof(*np)); |
np = (struct name *)salloc(sizeof(*np)); |
np->n_flink = NIL; |
np->n_flink = NIL; |
np->n_blink = NIL; |
np->n_blink = NIL; |
np->n_type = ntype; |
np->n_type = ntype; |
|
|
|
|
top = names; |
top = names; |
np = names; |
np = names; |
(void) time(&now); |
(void)time(&now); |
date = ctime(&now); |
date = ctime(&now); |
while (np != NIL) { |
while (np != NIL) { |
if (!isfileaddr(np->n_name) && np->n_name[0] != '|') { |
if (!isfileaddr(np->n_name) && np->n_name[0] != '|') { |
|
|
goto cant; |
goto cant; |
} |
} |
image = open(tempEdit, 2); |
image = open(tempEdit, 2); |
(void) unlink(tempEdit); |
(void)unlink(tempEdit); |
if (image < 0) { |
if (image < 0) { |
warn(tempEdit); |
warn(tempEdit); |
senderr++; |
senderr++; |
(void)Fclose(fout); |
(void)Fclose(fout); |
goto cant; |
goto cant; |
} |
} |
(void) fcntl(image, F_SETFD, 1); |
(void)fcntl(image, F_SETFD, 1); |
fprintf(fout, "From %s %s", myname, date); |
fprintf(fout, "From %s %s", myname, date); |
puthead(hp, fout, GTO|GSUBJECT|GCC|GNL); |
puthead(hp, fout, GTO|GSUBJECT|GCC|GNL); |
while ((c = getc(fo)) != EOF) |
while ((c = getc(fo)) != EOF) |
(void) putc(c, fout); |
(void)putc(c, fout); |
rewind(fo); |
rewind(fo); |
(void) putc('\n', fout); |
(void)putc('\n', fout); |
(void) fflush(fout); |
(void)fflush(fout); |
if (ferror(fout)) |
if (ferror(fout)) |
warn(tempEdit); |
warn(tempEdit); |
(void)Fclose(fout); |
(void)Fclose(fout); |
|
|
} |
} |
rewind(fin); |
rewind(fin); |
while ((c = getc(fin)) != EOF) |
while ((c = getc(fin)) != EOF) |
(void) putc(c, fout); |
(void)putc(c, fout); |
if (ferror(fout)) { |
if (ferror(fout)) { |
senderr++; |
senderr++; |
warn(fname); |
warn(fname); |
|
|
verbose = value("verbose") != NOSTR; |
verbose = value("verbose") != NOSTR; |
if (verbose) |
if (verbose) |
extra++; |
extra++; |
top = (char **) salloc((t + extra) * sizeof(*top)); |
top = (char **)salloc((t + extra) * sizeof(*top)); |
ap = top; |
ap = top; |
*ap++ = "send-mail"; |
*ap++ = "send-mail"; |
*ap++ = "-i"; |
*ap++ = "-i"; |