aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2008-02-20 15:50:14 +0000
committerjames <>2008-02-20 15:50:14 +0000
commit2799637b71ab47881574f89b7979f07bb47e2f66 (patch)
tree8aefb1a5ab028530d617e5d092c88fa5192fdb86
parent52e93d61c117c99b5bc9e80807317e1bf73a3039 (diff)
downloadsympathy-2799637b71ab47881574f89b7979f07bb47e2f66.tar.gz
sympathy-2799637b71ab47881574f89b7979f07bb47e2f66.tar.bz2
sympathy-2799637b71ab47881574f89b7979f07bb47e2f66.zip
*** empty log message ***
-rw-r--r--apps/sympathy.c103
1 files changed, 55 insertions, 48 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c
index 4b67502..e90b8d2 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.5 2008/02/20 15:50:14 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/20 02:11:35 james
* *** empty log message ***
*
@@ -30,52 +33,56 @@ static char rcsid[] = "$Id$";
int
main (int argc, char *argv[])
{
-int c;
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-int tflag=0,cflag=0,sflag=0,rflag=0;
-int lflag=0,dflag=0,bflag=0,pflag=0;
-int kflag=0;
-
-int nhistory=200;
-int baud=-1;
-char *rid,*device_path;
-char *socket_path;
-
-while ((c=getopt(argc,argv,"tscr:d:pb:fL:Fk:n:"))!=EOF) {
-switch(c) {
- case 't':
- tflag++;
- break;
- case 's':
- sflag++;
- break;
- case 'c':
- cflag++;
-
-
-
-
-
-
-
-default:
- usage();
-}
-}
-
-
-
-
- "sympathy -t [-l] [-d serialdev|-p] [-b baud] [-f] [-L log]\n"
- "sympathy -s [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-F] [-k skt]\n"
- " [-n hlines]\n"
- "sympathy [-s -c] [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
- " [-n hlines]\n"
- "sympathy -c [-H] -k skt\n"
- "sympathy -r id [-H]\n"
- "\n"
-
- client ();
+ int c;
+ extern char *optarg;
+ extern int optind, opterr, optopt;
+
+ int tflag = 0, cflag = 0, sflag = 0, rflag = 0;
+ int lflag = 0, dflag = 0, bflag = 0, pflag = 0;
+ int kflag = 0;
+
+ int nhistory = 200;
+ int baud = -1;
+ char *rid, *device_path;
+ char *socket_path;
+
+ Log *log=NULL;
+
+ while ((c = getopt (argc, argv, "tscr:d:pb:fL:Fk:n:")) != EOF)
+ {
+ switch (c)
+ {
+ case 't':
+ tflag++;
+ break;
+ case 's':
+ sflag++;
+ break;
+ case 'c':
+ cflag++;
+ break;
+ case 'r':
+ rflag++;
+ rid=optarg;
+ break;
+ case 'L':
+ if (log) moan("only one -L argument is allowed");
+ log=file_log_new(optarg);
+ if (!log) moan("couldn't open %s as a log file",optarg);
+ default:
+ usage ();
+ }
+ }
+
+
+
+
+#if 0
+ "sympathy -t [-l] [-d serialdev|-p] [-b baud] [-f] [-L log]\n"
+ "sympathy -s [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-F] [-k skt]\n"
+ " [-n hlines]\n"
+ "sympathy [-s -c] [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
+ " [-n hlines]\n"
+ "sympathy -c [-H] -k skt\n" "sympathy -r id [-H]\n" "\n" client ();
+#endif
}