Use tcflush(), eliminate libcompat.

This commit is contained in:
Garrett Wollman 1995-02-21 04:15:15 +00:00
parent d7a124e5d8
commit 59bfb274d1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6591
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