mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Stupid ncurses.
This commit is contained in:
parent
9ef5bdc7c0
commit
36e3f31f23
12
client.c
12
client.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: client.c,v 1.31 2008-06-18 20:58:03 nicm Exp $ */
|
/* $Id: client.c,v 1.32 2008-06-19 19:36:55 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -127,7 +127,7 @@ client_main(struct client_ctx *cctx)
|
|||||||
{
|
{
|
||||||
struct pollfd pfd;
|
struct pollfd pfd;
|
||||||
char *error;
|
char *error;
|
||||||
int timeout;
|
int xtimeout; /* Yay for ncurses namespace! */
|
||||||
|
|
||||||
siginit();
|
siginit();
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ client_main(struct client_ctx *cctx)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
timeout = INFTIM;
|
xtimeout = INFTIM;
|
||||||
while (!sigterm) {
|
while (!sigterm) {
|
||||||
if (sigwinch)
|
if (sigwinch)
|
||||||
client_handle_winch(cctx);
|
client_handle_winch(cctx);
|
||||||
@ -147,11 +147,11 @@ client_main(struct client_ctx *cctx)
|
|||||||
goto out;
|
goto out;
|
||||||
case 0:
|
case 0:
|
||||||
/* May be more in buffer, don't let poll block. */
|
/* May be more in buffer, don't let poll block. */
|
||||||
timeout = 0;
|
xtimeout = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Out of data, poll may block. */
|
/* Out of data, poll may block. */
|
||||||
timeout = INFTIM;
|
xtimeout = INFTIM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ client_main(struct client_ctx *cctx)
|
|||||||
if (BUFFER_USED(cctx->srv_out) > 0)
|
if (BUFFER_USED(cctx->srv_out) > 0)
|
||||||
pfd.events |= POLLOUT;
|
pfd.events |= POLLOUT;
|
||||||
|
|
||||||
if (poll(&pfd, 1, timeout) == -1) {
|
if (poll(&pfd, 1, xtimeout) == -1) {
|
||||||
if (errno == EAGAIN || errno == EINTR)
|
if (errno == EAGAIN || errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
fatal("poll failed");
|
fatal("poll failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user