aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sympathy.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sympathy.c')
-rw-r--r--apps/sympathy.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c
index 33c47e7..2a9b314 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.35 2008/03/06 21:33:02 james
+ * *** empty log message ***
+ *
* Revision 1.34 2008/03/06 16:49:39 james
* *** empty log message ***
*
@@ -274,8 +277,9 @@ mome (char *fmt, ...)
}
+
Socket *
-find_socket (char *fmt, ...)
+find_socket (char **retpath,char *fmt, ...)
{
Socket *ret;
char *path, *leaf, *h, **ptr;
@@ -315,13 +319,18 @@ find_socket (char *fmt, ...)
ret = socket_connect (path);
- free (path);
if (ret)
{
+ if (retpath) {
+ *retpath=path;
+ } else {
+ free (path);
+ }
free (leaf);
return ret;
}
+ free (path);
}
@@ -786,11 +795,11 @@ main (int argc, char *argv[])
if (safe_atoi (id) > 0)
{
- client_socket = find_socket ("%s%d", hostname, safe_atoi (id));
+ client_socket = find_socket (&oargs['k'],"%s%d", hostname, safe_atoi (id));
}
else
{
- client_socket = find_socket ("%s", id);
+ client_socket = find_socket (&oargs['k'],"%s", id);
}
if (!client_socket)
@@ -825,6 +834,8 @@ main (int argc, char *argv[])
ansi_new_from_terminal (terminal_open (0, 1),
oflags['u'] ? 0 : 1);
ansi->reset (ansi, NULL);
+ if (ansi->set_title)
+ ansi->set_title(ansi,oargs['k']);
}
if (oflags['I'])
{