=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/collect.c,v retrieving revision 1.22 retrieving revision 1.23 diff -c -r1.22 -r1.23 *** src/usr.bin/mail/collect.c 2001/11/20 20:50:00 1.22 --- src/usr.bin/mail/collect.c 2001/11/21 15:26:39 1.23 *************** *** 1,4 **** ! /* $OpenBSD: collect.c,v 1.22 2001/11/20 20:50:00 millert Exp $ */ /* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: collect.c,v 1.23 2001/11/21 15:26:39 millert Exp $ */ /* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */ /* *************** *** 36,44 **** #ifndef lint #if 0 ! static char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94"; #else ! static char rcsid[] = "$OpenBSD: collect.c,v 1.22 2001/11/20 20:50:00 millert Exp $"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #if 0 ! static const char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94"; #else ! static const char rcsid[] = "$OpenBSD: collect.c,v 1.23 2001/11/21 15:26:39 millert Exp $"; #endif #endif /* not lint */ *************** *** 62,75 **** * receipt of an interrupt signal, the partial message can be salted * away on dead.letter. */ - static FILE *collf; /* File for saving away */ static int hadintr; /* Have seen one SIGINT so far */ FILE * ! collect(hp, printheaders) ! struct header *hp; ! int printheaders; { FILE *fbuf; int lc, cc, fd, c, t, lastlong, rc, sig; --- 62,72 ---- * receipt of an interrupt signal, the partial message can be salted * away on dead.letter. */ static FILE *collf; /* File for saving away */ static int hadintr; /* Have seen one SIGINT so far */ FILE * ! collect(struct header *hp, int printheaders) { FILE *fbuf; int lc, cc, fd, c, t, lastlong, rc, sig; *************** *** 252,259 **** hp->h_bcc = cat(hp->h_bcc, extract(&linebuf[2], GBCC)); break; case 'd': ! strncpy(linebuf + 2, getdeadletter(), sizeof(linebuf) - 3); ! linebuf[sizeof(linebuf) - 1] = '\0'; /* fall into . . . */ case 'r': case '<': --- 249,256 ---- hp->h_bcc = cat(hp->h_bcc, extract(&linebuf[2], GBCC)); break; case 'd': ! linebuf[2] = '\0'; ! strlcat(linebuf, getdeadletter(), sizeof(linebuf)); /* fall into . . . */ case 'r': case '<': *************** *** 399,408 **** * Write a file, ex-like if f set. */ int ! exwrite(name, fp, f) ! char name[]; ! FILE *fp; ! int f; { FILE *of; int c; --- 396,402 ---- * Write a file, ex-like if f set. */ int ! exwrite(char *name, FILE *fp, int f) { FILE *of; int c; *************** *** 447,455 **** * On return, make the edit file the new temp file. */ void ! mesedit(fp, c) ! FILE *fp; ! int c; { FILE *nf; struct sigaction oact; --- 441,447 ---- * On return, make the edit file the new temp file. */ void ! mesedit(FILE *fp, int c) { FILE *nf; struct sigaction oact; *************** *** 473,481 **** * Sh -c must return 0 to accept the new message. */ void ! mespipe(fp, cmd) ! FILE *fp; ! char cmd[]; { FILE *nf; int fd; --- 465,471 ---- * Sh -c must return 0 to accept the new message. */ void ! mespipe(FILE *fp, char *cmd) { FILE *nf; int fd; *************** *** 527,537 **** * should shift over and 'f' if not. */ int ! forward(ms, fp, fn, f) ! char ms[]; ! FILE *fp; ! char *fn; ! int f; { int *msgvec; struct ignoretab *ig; --- 517,523 ---- * should shift over and 'f' if not. */ int ! forward(char *ms, FILE *fp, char *fn, int f) { int *msgvec; struct ignoretab *ig; *************** *** 575,581 **** * Save the partial message in ~/dead.letter. */ int ! collabort() { /* * the control flow is subtle, because we can be called from ~q. --- 561,567 ---- * Save the partial message in ~/dead.letter. */ int ! collabort(void) { /* * the control flow is subtle, because we can be called from ~q. *************** *** 601,608 **** } void ! savedeadletter(fp) ! FILE *fp; { FILE *dbuf; int c; --- 587,593 ---- } void ! savedeadletter(FILE *fp) { FILE *dbuf; int c; *************** *** 623,631 **** } int ! gethfromtty(hp, gflags) ! struct header *hp; ! int gflags; { hadintr = 0; --- 608,614 ---- } int ! gethfromtty(struct header *hp, int gflags) { hadintr = 0;