aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sympathy.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sympathy.c')
-rw-r--r--apps/sympathy.c11
1 files changed, 9 insertions, 2 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']++;
}