|
|
1.1 root 1: #include "curses.ext"
2: /* @(#) _fixdelay.c: 1.1 10/15/83 (1.19 3/17/83) */
3:
4: /*
5: * The use has just changed his notion of whether we want nodelay mode.
6: * Do any system dependent processing.
7: */
8: /* ARGSUSED */
9: _fixdelay(old, new)
10: bool old, new;
11: {
12: #ifdef USG
13: # include <fcntl.h>
14: int fl, rv, fd;
15: extern int errno;
16: FILE *inf;
17:
18: inf = SP -> term_file;
19: if( inf == stdout )
20: {
21: inf = stdin;
22: }
23: fd = fileno( inf );
24: fl = fcntl(fd, F_GETFL, 0);
25: if (new)
26: fl |= O_NDELAY;
27: else
28: fl &= ~O_NDELAY;
29: if (old != new)
30: rv = fcntl(fd, F_SETFL, fl);
31: #else
32: /* No system dependent processing on the V7 or Berkeley systems. */
33: #endif
34: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.