From 6fb644311ee9bf169a12bb9b2d9b081c16fc08f0 Mon Sep 17 00:00:00 2001 From: james <> Date: Thu, 6 Mar 2008 16:49:39 +0000 Subject: *** empty log message *** --- apps/mainloop.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'apps/mainloop.c') diff --git a/apps/mainloop.c b/apps/mainloop.c index 5772214..e266179 100644 --- a/apps/mainloop.c +++ b/apps/mainloop.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.24 2008/03/06 16:49:39 james + * *** empty log message *** + * * Revision 1.23 2008/03/06 16:49:05 james * *** empty log message *** * @@ -380,7 +383,7 @@ check_status (Context * c, Clients * cs) static int msg_from_server (ANSI * a, IPC_Msg * m, Context * c) { -int err=0; + int err = 0; switch (m->hdr.type) { @@ -401,11 +404,11 @@ int err=0; if (a->one_shot) { a->one_shot (a, &c->v->crt); - err++;/*Simulate a fatal write error enclosing tty*/ + err++; /*Simulate a fatal write error enclosing tty */ } break; case IPC_MSG_TYPE_TERM: - err+=tty_parse (c, m->term.term, m->term.len); + err += tty_parse (c, m->term.term, m->term.len); break; case IPC_MSG_TYPE_STATUS: cmd_new_status (c->d, c, m->status.status); @@ -418,7 +421,8 @@ int err=0; void -mainloop ( Context *c, ANSI *ansi,Socket * server_socket, Socket * client_socket) +mainloop (Context * c, ANSI * ansi, Socket * server_socket, + Socket * client_socket) { fd_set rfds, wfds; Clients *clients; @@ -535,7 +539,7 @@ mainloop ( Context *c, ANSI *ansi,Socket * server_socket, Socket * client_socket if (clients) send_output (clients, buf, red); if (tty_parse (c, buf, red)) - break; + break; } } @@ -550,7 +554,7 @@ mainloop ( Context *c, ANSI *ansi,Socket * server_socket, Socket * client_socket while (client_socket->msg) { if (msg_from_server (ansi, client_socket->msg, c)) - break; + break; socket_consume_msg (client_socket); } @@ -562,11 +566,11 @@ mainloop ( Context *c, ANSI *ansi,Socket * server_socket, Socket * client_socket { if (ansi->dispatch) if (ansi->dispatch (ansi, c)) - break; + break; if (ansi->update) if (ansi->update (ansi, c)) - break; + break; } } -- cgit v1.2.3