head 1.7; access; symbols; locks; strict; comment @ * @; 1.7 date 93.02.26.21.56.04; author jromine; state Exp; branches; next 1.6; 1.6 date 92.12.15.00.20.22; author jromine; state Exp; branches; next 1.5; 1.5 date 92.12.14.17.36.16; author jromine; state Exp; branches; next 1.4; 1.4 date 90.04.05.15.31.32; author sources; state Exp; branches; next 1.3; 1.3 date 90.04.05.14.45.54; author sources; state Exp; branches; next 1.2; 1.2 date 90.02.05.15.01.21; author sources; state Exp; branches; next 1.1; 1.1 date 90.02.05.15.01.16; author sources; state Exp; branches; next ; desc @@ 1.7 log @386BSD/BSD44 @ text @/* discard.c - discard output on a file pointer */ #ifndef lint static char ident[] = "@@(#)$Id: discard.c,v 1.6 1992/12/15 00:20:22 jromine Exp jromine $"; #endif /* lint */ #include "../h/mh.h" #include #ifdef POSIX #include #else #ifndef SYS5 #include #else /* SYS5 */ #include #include #ifndef NOIOCTLH #include #endif /* NOIOCTLH */ #endif /* SYS5 */ #endif /* POSIX */ void discard (io) FILE *io; { #ifndef POSIX #ifndef SYS5 struct sgttyb sg; #else /* SYS5 */ struct termio sg; #endif /* SYS5 */ #endif /* POSIX */ if (io == NULL) return; #ifdef POSIX tcflush (fileno (io), TCOFLUSH); #else #ifndef SYS5 if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK) (void) ioctl (fileno (io), TIOCSETP, (char *) &sg); #else /* SYS5 */ if (ioctl (fileno (io), TCGETA, &sg) != NOTOK) (void) ioctl (fileno (io), TCSETA, &sg); #endif /* SYS5 */ #endif /* POSIX */ #ifdef _FSTDIO fpurge (io); #else if (io -> _ptr = io -> _base) io -> _cnt = 0; #endif } @ 1.6 log @endif sugar @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id: discard.c,v 1.5 1992/12/14 17:36:16 jromine Exp jromine $"; d8 3 d20 1 d26 1 d32 1 d37 3 d47 1 d49 3 d54 1 @ 1.5 log @*** empty log message *** @ text @d3 2 a4 2 static char ident[] = "@@(#)$Id: discard.c,v 1.4 90/04/05 15:31:32 sources Exp $"; #endif lint d10 1 a10 1 #else SYS5 d15 2 a16 2 #endif NOIOCTLH #endif SYS5 d24 1 a24 1 #else SYS5 d26 1 a26 1 #endif SYS5 d34 1 a34 1 #else SYS5 d37 1 a37 1 #endif SYS5 @ 1.4 log @add ID @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id:$"; @ 1.3 log @add ID @ text @d3 1 a3 1 static char ident[] = "$Id:"; @ 1.2 log @*** empty log message *** @ text @d2 3 @ 1.1 log @Initial revision @ text @d10 1 d12 1 @