diff options
author | james <> | 2008-02-27 16:01:25 +0000 |
---|---|---|
committer | james <> | 2008-02-27 16:01:25 +0000 |
commit | e14a8c751549c224b157f9689177b1a2f127ce20 (patch) | |
tree | 992cef9bd9a2f7aa9294150c24f6eb0d3276ce51 /apps | |
parent | 978f6e037320899ba9366005f50fa8cda84d3a58 (diff) | |
download | sympathy-e14a8c751549c224b157f9689177b1a2f127ce20.tar.gz sympathy-e14a8c751549c224b157f9689177b1a2f127ce20.tar.bz2 sympathy-e14a8c751549c224b157f9689177b1a2f127ce20.zip |
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r-- | apps/sympathy.c | 11 | ||||
-rw-r--r-- | apps/usage.c | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c index 6e869be..89cc552 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.21 2008/02/27 16:01:24 james + * *** empty log message *** + * * Revision 1.20 2008/02/27 10:00:34 james * *** empty log message *** * @@ -355,12 +358,16 @@ main (int argc, char *argv[]) /*Fold -r into -c */ if (oflags['r']) { - int id = safe_atoi (oargs['r']); + char *id = oargs['r']; if (id < 0) fatal_moan ("cannot parse -r %s as an integer", oargs['r']); oflags['k']++; - oargs['k'] = mome ("/.sympathy/%s%d", hostname, id); + if (safe_atoi(id)>0) { + oargs['k'] = mome ("/.sympathy/%s%d", hostname, safe_atoi(id)); + } else { + oargs['k'] = mome ("/.sympathy/%s", id); + } oflags['r'] = 0; oflags['c']++; } diff --git a/apps/usage.c b/apps/usage.c index d06bf05..5a00619 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.15 2008/02/27 16:01:24 james + * *** empty log message *** + * * Revision 1.14 2008/02/27 09:55:57 james * *** empty log message *** * @@ -83,7 +86,8 @@ usage (void) " incompatible with -F. This is the default mode\n" " -c client mode: connect to server mode process\n" " -r id client mode: connect to server mode process on socket\n" - " ~/.sympathy/id\n" + " ~/.sympathy/id or ~/.sympathy/hostname.id if id is an\n" + " integer\n" " -l or -ls list active sockets in ~/.sympathy\n" " -v show version\n" " -h show help\n" |