X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fdiscard.c;h=e38e5b0bcd56cb90ca0290e55292eece4256e3ff;hp=03eaa102111e470ae51bf4eceb96462d63d1feeb;hb=7e421e1fd5cf1c4ce33edc005fa63784d9c5a2e6;hpb=768b5edd9623b7238e12ec8dfc409b82a1ed9e2d diff --git a/sbr/discard.c b/sbr/discard.c index 03eaa10..e38e5b0 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -8,15 +8,7 @@ #include -#ifdef HAVE_TERMIOS_H -# include -#else -# ifdef HAVE_TERMIO_H -# include -# else -# include -# endif -#endif +#include #ifdef SCO_5_STDIO # define _ptr __ptr @@ -29,28 +21,10 @@ 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);