X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdiscard.c;h=dbe309d770599efe95db1a349e909d3250de67ba;hb=164be8e5e8b40ce4572281be26d423a9c9d595f3;hp=55c160bfbe7240c2e8500c5aa49d452005bb81c9;hpb=a33d9f4d7a1bf4bd4ab286f69af322b5b8d7c946;p=mmh diff --git a/sbr/discard.c b/sbr/discard.c index 55c160b..dbe309d 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -2,8 +2,6 @@ /* * discard.c -- discard output on a file pointer * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -11,15 +9,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 @@ -32,28 +22,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);