From 27a28f2789d7f721db507205aa71b30c863c6f84 Mon Sep 17 00:00:00 2001 From: wollman Date: Tue, 21 Feb 1995 04:15:15 +0000 Subject: Use tcflush(), eliminate libcompat. --- usr.bin/msgs/Makefile | 7 ++++--- usr.bin/msgs/msgs.c | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'usr.bin/msgs') diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile index bcc230e..8613f79c 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 diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index 9a5311a..c7bde8a 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 #include #include -#include +#include #include #include #include @@ -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 -- cgit v1.1