=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/tty.c,v retrieving revision 1.13 retrieving revision 1.14 diff -c -r1.13 -r1.14 *** src/usr.bin/mail/tty.c 2001/11/20 20:50:00 1.13 --- src/usr.bin/mail/tty.c 2001/11/21 15:26:39 1.14 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.13 2001/11/20 20:50:00 millert Exp $ */ /* $NetBSD: tty.c,v 1.7 1997/07/09 05:25:46 mikel Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.14 2001/11/21 15:26:39 millert Exp $ */ /* $NetBSD: tty.c,v 1.7 1997/07/09 05:25:46 mikel Exp $ */ /* *************** *** 36,44 **** #ifndef lint #if 0 ! static char sccsid[] = "@(#)tty.c 8.2 (Berkeley) 4/20/95"; #else ! static char rcsid[] = "$OpenBSD: tty.c,v 1.13 2001/11/20 20:50:00 millert Exp $"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #if 0 ! static const char sccsid[] = "@(#)tty.c 8.2 (Berkeley) 4/20/95"; #else ! static const char rcsid[] = "$OpenBSD: tty.c,v 1.14 2001/11/21 15:26:39 millert Exp $"; #endif #endif /* not lint */ *************** *** 63,73 **** /* * Read all relevant header fields. */ - int ! grabh(hp, gflags) ! struct header *hp; ! int gflags; { struct termios ttybuf; #ifndef TIOCSTI --- 63,70 ---- /* * Read all relevant header fields. */ int ! grabh(struct header *hp, int gflags) { struct termios ttybuf; #ifndef TIOCSTI *************** *** 120,126 **** #endif if (gflags & GTO) { #ifndef TIOCSTI ! if (!ttyset && hp->h_to != NIL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("To: ", detract(hp->h_to, 0)); --- 117,123 ---- #endif if (gflags & GTO) { #ifndef TIOCSTI ! if (!ttyset && hp->h_to != NULL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("To: ", detract(hp->h_to, 0)); *************** *** 140,146 **** } if (gflags & GCC) { #ifndef TIOCSTI ! if (!ttyset && hp->h_cc != NIL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("Cc: ", detract(hp->h_cc, 0)); --- 137,143 ---- } if (gflags & GCC) { #ifndef TIOCSTI ! if (!ttyset && hp->h_cc != NULL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("Cc: ", detract(hp->h_cc, 0)); *************** *** 150,156 **** } if (gflags & GBCC) { #ifndef TIOCSTI ! if (!ttyset && hp->h_bcc != NIL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("Bcc: ", detract(hp->h_bcc, 0)); --- 147,153 ---- } if (gflags & GBCC) { #ifndef TIOCSTI ! if (!ttyset && hp->h_bcc != NULL) ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); #endif s = readtty("Bcc: ", detract(hp->h_bcc, 0)); *************** *** 187,201 **** * be read. * */ - char * ! readtty(pr, src) ! char pr[], src[]; { struct sigaction act, oact; - sigset_t oset; char ch, canonb[BUFSIZ]; char *cp, *cp2; int c; fputs(pr, stdout); --- 184,196 ---- * be read. * */ char * ! readtty(char *pr, char *src) { struct sigaction act, oact; char ch, canonb[BUFSIZ]; char *cp, *cp2; + sigset_t oset; int c; fputs(pr, stdout); *************** *** 316,323 **** * Receipt continuation. */ void ! ttystop(s) ! int s; { struct sigaction act, oact; sigset_t nset; --- 311,317 ---- * Receipt continuation. */ void ! ttystop(int s) { struct sigaction act, oact; sigset_t nset; *************** *** 344,351 **** /*ARGSUSED*/ void ! ttyint(s) ! int s; { ttysignal = s; --- 338,344 ---- /*ARGSUSED*/ void ! ttyint(int s) { ttysignal = s;