Files
Arquivotheca.SunOS-4.1.4/usr.lib/libcurses/screen/_fixdelay.c
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

38 lines
674 B
C

#ifndef lint
static char sccsid[] = "@(#)_fixdelay.c 1.1 94/10/31 SMI"; /* from S5R2 1.1 */
#endif
#include "curses.ext"
/*
* The use has just changed his notion of whether we want nodelay mode.
* Do any system dependent processing.
*/
/* ARGSUSED */
_fixdelay(old, new)
bool old, new;
{
#ifdef USG
# include <fcntl.h>
int fl, rv, fd;
extern int errno;
FILE *inf;
inf = SP -> term_file;
if( inf == stdout )
{
inf = stdin;
}
fd = fileno( inf );
fl = fcntl(fd, F_GETFL, 0);
if (new)
fl |= O_NDELAY;
else
fl &= ~O_NDELAY;
if (old != new)
rv = fcntl(fd, F_SETFL, fl);
#else
/* No system dependent processing on the V7 or Berkeley systems. */
#endif
}