From aff494fd2b799a5a06bdbac86e5ddfa7a20b74de Mon Sep 17 00:00:00 2001 From: james <> Date: Fri, 7 Mar 2008 14:17:01 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'apps/sympathy.c') diff --git a/apps/sympathy.c b/apps/sympathy.c index d40caba..ef120ec 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.40 2008/03/07 14:16:44 james + * *** empty log message *** + * * Revision 1.39 2008/03/07 14:13:40 james * *** empty log message *** * @@ -148,7 +151,7 @@ static char rcsid[] = #include "mainloop.h" extern void usage (void); -extern char * expand(const char *,int *); +extern char *expand (const char *, int *); static char hostname[1024]; char *socket_dirs[] = @@ -431,18 +434,20 @@ get_hostname (void) strcat (hostname, "."); } -void send_to_server(Socket *c,char *s) +void +send_to_server (Socket * c, char *s) { -int n; + int n; -s=expand(s,&n); + s = expand (s, &n); -if (!n) return; + if (!n) + return; -while (n--) { - ipc_msg_send_key (c, *(uint8_t *)s); - s++; -} + while (n--) { + ipc_msg_send_key (c, *(uint8_t *) s); + s++; + } ipc_msg_send_killme (c); } @@ -781,11 +786,11 @@ main (int argc, char *argv[]) } if (oflags['I']) { - if (!client_socket) + if (!client_socket) fatal_moan ("-I requires either -c or -r", oargs['k']); - if (!oargs['I']) + if (!oargs['I']) fatal_moan ("-I requires an arugment"); - send_to_server(client_socket,oargs['I']); + send_to_server (client_socket, oargs['I']); } else { if (client_socket) @@ -806,13 +811,13 @@ main (int argc, char *argv[]) ansi->set_title (ansi, oargs['k']); } } - } + } - ctx->v = vt102_new (&size); - ctx->h = history_new (history); + ctx->v = vt102_new (&size); + ctx->h = history_new (history); - mainloop (ctx, ansi, server_socket, client_socket); + mainloop (ctx, ansi, server_socket, client_socket); if (ansi) { ansi->close (ansi); -- cgit v1.2.3