projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove compatibility functions that are always provided by the POSIX host env.
[mmh]
/
sbr
/
discard.c
diff --git
a/sbr/discard.c
b/sbr/discard.c
index
03eaa10
..
e38e5b0
100644
(file)
--- a/
sbr/discard.c
+++ b/
sbr/discard.c
@@
-8,15
+8,7
@@
#include <h/mh.h>
#include <h/mh.h>
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-# include <termio.h>
-# else
-# include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
#ifdef SCO_5_STDIO
# define _ptr __ptr
#ifdef SCO_5_STDIO
# define _ptr __ptr
@@
-29,28
+21,10
@@
void
discard(FILE *io)
{
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;
if (io == NULL)
return;
-#ifdef HAVE_TERMIOS_H
tcflush(fileno(io), TCOFLUSH);
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);
#if defined(_FSTDIO) || defined(__DragonFly__)
fpurge(io);