X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdiscard.c;h=d3eabd0eae8c4071a71cbc713f0bba4f0ccaf0bc;hb=dfecfa4b4b77983ddf8253b1b8effaf5c1a0ce80;hp=03eaa102111e470ae51bf4eceb96462d63d1feeb;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/sbr/discard.c b/sbr/discard.c index 03eaa10..d3eabd0 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -7,50 +7,16 @@ */ #include - -#ifdef HAVE_TERMIOS_H -# include -#else -# ifdef HAVE_TERMIO_H -# include -# else -# include -# endif -#endif - -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -#endif +#include void discard(FILE *io) { -#ifndef HAVE_TERMIOS_H -# ifdef HAVE_TERMIO_H - struct termio tio; -# else - struct sgttyb tio; -# endif -#endif - if (io == NULL) return; -#ifdef HAVE_TERMIOS_H tcflush(fileno(io), TCOFLUSH); -#else -# ifdef HAVE_TERMIO_H - if (ioctl(fileno(io), TCGETA, &tio) != -1) - ioctl(fileno(io), TCSETA, &tio); -# else - if (ioctl(fileno(io), TIOCGETP, (char *) &tio) != -1) - ioctl(fileno(io), TIOCSETP, (char *) &tio); -# endif -#endif #if defined(_FSTDIO) || defined(__DragonFly__) fpurge(io);