X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdiscard.c;h=a1efa4882aadc9e70297dc167a904c6f898a2f68;hb=f2f6f08eee1d6b084221f9899c4472e6f57230b7;hp=dbc865c49441c01a3484d7e0028dac7b71f1dead;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/sbr/discard.c b/sbr/discard.c index dbc865c..a1efa48 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -9,49 +9,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);