From 79ba927ea0d883d505f6f7aa5aed6f7fa902d19d Mon Sep 17 00:00:00 2001 From: james <> Date: Fri, 7 Mar 2008 14:13:40 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'apps/sympathy.c') diff --git a/apps/sympathy.c b/apps/sympathy.c index 7c68529..d40caba 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.39 2008/03/07 14:13:40 james + * *** empty log message *** + * * Revision 1.38 2008/03/07 13:56:39 james * *** empty log message *** * @@ -145,7 +148,7 @@ static char rcsid[] = #include "mainloop.h" extern void usage (void); -extern char * expand(const char *); +extern char * expand(const char *,int *); static char hostname[1024]; char *socket_dirs[] = @@ -430,9 +433,17 @@ get_hostname (void) void send_to_server(Socket *c,char *s) { -s=expand(s); -//FIXME +int n; + +s=expand(s,&n); + +if (!n) return; +while (n--) { + ipc_msg_send_key (c, *(uint8_t *)s); + s++; +} + ipc_msg_send_killme (c); } int @@ -776,6 +787,7 @@ main (int argc, char *argv[]) fatal_moan ("-I requires an arugment"); send_to_server(client_socket,oargs['I']); } else { + if (client_socket) ipc_msg_send_initialize (client_socket); @@ -794,13 +806,13 @@ main (int argc, char *argv[]) ansi->set_title (ansi, oargs['k']); } } + } ctx->v = vt102_new (&size); ctx->h = history_new (history); mainloop (ctx, ansi, server_socket, client_socket); - } if (ansi) { ansi->close (ansi); @@ -820,7 +832,7 @@ main (int argc, char *argv[]) if (pid_file) unlink (pid_file); - if (!oflags['H']) + if (!oflags['H'] && !oflags['I']) printf ("you have now exited sympathy\n"); return 0; } -- cgit v1.2.3