version 1.6, 2003/06/03 02:56:18 |
version 1.7, 2013/04/21 09:51:24 |
|
|
while (count) { |
while (count) { |
/* If not enough room for EORs, IACs, etc., wait */ |
/* If not enough room for EORs, IACs, etc., wait */ |
if (NETROOM() < 6) { |
if (NETROOM() < 6) { |
fd_set o; |
struct pollfd pfd[1]; |
|
|
FD_ZERO(&o); |
|
netflush(); |
netflush(); |
while (NETROOM() < 6) { |
while (NETROOM() < 6) { |
FD_SET(net, &o); |
pfd[0].fd = net; |
(void) select(net+1, (fd_set *) 0, &o, (fd_set *) 0, |
pfd[0].events = POLLOUT; |
(struct timeval *) 0); |
(void) poll(pfd, 1, -1); |
netflush(); |
netflush(); |
} |
} |
} |
} |
|
|
* DataToTerminal - queue up some data to go to terminal. |
* DataToTerminal - queue up some data to go to terminal. |
* |
* |
* Note: there are people who call us and depend on our processing |
* Note: there are people who call us and depend on our processing |
* *all* the data at one time (thus the select). |
* *all* the data at one time (thus the poll). |
*/ |
*/ |
|
|
int |
int |
|
|
|
|
while (count) { |
while (count) { |
if (TTYROOM() == 0) { |
if (TTYROOM() == 0) { |
#if defined(unix) |
struct pollfd pfd[1]; |
fd_set o; |
|
|
|
FD_ZERO(&o); |
|
#endif /* defined(unix) */ |
|
(void) ttyflush(0); |
(void) ttyflush(0); |
while (TTYROOM() == 0) { |
while (TTYROOM() == 0) { |
#if defined(unix) |
pfd[0].fd = tout; |
FD_SET(tout, &o); |
pfd[0].events = POLLOUT; |
(void) select(tout+1, (fd_set *) 0, &o, (fd_set *) 0, |
(void) poll(pfd, 1, -1); |
(struct timeval *) 0); |
|
#endif /* defined(unix) */ |
|
(void) ttyflush(0); |
(void) ttyflush(0); |
} |
} |
} |
} |