X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=blobdiff_plain;f=apps%2Fsympathy.c;h=6e869be9349028a24bc669b76019e04de786bfe1;hp=29c328085789780aacc8a03d352fbc47447d933d;hb=f623a361f194ceff8bda6b737aca73d8024c0005;hpb=bc5816961e628165bb776b0beeb87917174335a2;ds=inline diff --git a/apps/sympathy.c b/apps/sympathy.c index 29c3280..6e869be 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,12 @@ static char rcsid[] = /* * $Log$ + * Revision 1.20 2008/02/27 10:00:34 james + * *** empty log message *** + * + * Revision 1.19 2008/02/27 09:47:05 james + * *** empty log message *** + * * Revision 1.18 2008/02/27 09:42:53 james * *** empty log message *** * @@ -301,15 +307,6 @@ main (int argc, char *argv[]) oflags['s'] = 0; - if (!oflags['s'] && !oflags['c'] && !oflags['t'] && !oflags['r'] - && !oflags['l']) - { - /*If no mode is specified behave like screen */ - oflags['s']++; - oflags['c']++; - } - - { int sum = 0; sum += oflags['t']; @@ -318,6 +315,13 @@ main (int argc, char *argv[]) sum += oflags['l']; sum += oflags['v']; + if (!sum) { + /*If no mode is specified behave like screen */ + oflags['s']++; + oflags['c']++; + sum++; + } + if (sum != 1) fatal_moan ("specifiy exactly one of ( -c and or -s ), -t, -r, -l and -v"); @@ -325,7 +329,8 @@ main (int argc, char *argv[]) if (oflags['v']) { - fprintf ("Version: %s\n", libsympathy_version ()); + fprintf (stderr, "Version: %s\n", libsympathy_version ()); + fprintf (stderr, "Version: %s\n", rcsid); return 0; }