diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1995-02-21 04:15:15 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1995-02-21 04:15:15 +0000 |
commit | 59bfb274d102042872fc208f54debe197266426e (patch) | |
tree | 577ad17c7ed60de6090e4d00e0f8551cd1f5fcbb /usr.bin | |
parent | d7a124e5d896c4b9d1cd964e6a306228a8121256 (diff) | |
download | src-59bfb274d102042872fc208f54debe197266426e.tar.gz src-59bfb274d102042872fc208f54debe197266426e.zip |
Use tcflush(), eliminate libcompat.
Notes
Notes:
svn path=/head/; revision=6591
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/msgs/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/msgs/msgs.c | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile index bcc230ed56c5..8613f79cb5ea 100644 --- a/usr.bin/msgs/Makefile +++ b/usr.bin/msgs/Makefile @@ -1,7 +1,8 @@ -# @(#)Makefile 8.1 (Berkeley) 6/6/93 +# From: @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $Id$ PROG= msgs -DPADD= ${LIBTERMCAP} ${LIBCOMPAT} -LDADD= -ltermcap -lcompat +DPADD= ${LIBTERMCAP} +LDADD= -ltermcap .include <bsd.prog.mk> diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index 9a5311aaa022..c7bde8a0967e 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -75,7 +75,7 @@ static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93"; #include <errno.h> #include <pwd.h> #include <setjmp.h> -#include <sgtty.h> +#include <termios.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -130,7 +130,6 @@ int nlines; int Lpp = 0; time_t t; time_t keep; -struct sgttyb otty; char *mktemp(); char *nxtfld(); @@ -162,7 +161,7 @@ int argc; char *argv[]; setbuf(stdout, NULL); #endif - gtty(fileno(stdout), &otty); + time(&t); setuid(uid = getuid()); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); @@ -632,8 +631,8 @@ int length; fflush(stdout); } - /* trick to force wait on output */ - stty(fileno(stdout), &otty); + /* force wait on output */ + tcdrain(fileno(stdout)); } void |