Use tcflush(), eliminate libcompat.

This commit is contained in:
wollman 1995-02-21 04:15:15 +00:00
parent 508504ecff
commit 27a28f2789
2 changed files with 8 additions and 8 deletions

View File

@ -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>

View File

@ -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