chiark / gitweb /
e90b8d231376b13662600393a648b4c35e184c48
[sympathy.git] / apps / sympathy.c
1 /*
2  * sympathy.c:
3  *
4  * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
5  * All rights reserved.
6  *
7  */
8
9 static char rcsid[] = "$Id$";
10
11 /*
12  * $Log$
13  * Revision 1.5  2008/02/20 15:50:14  james
14  * *** empty log message ***
15  *
16  * Revision 1.4  2008/02/20 02:11:35  james
17  * *** empty log message ***
18  *
19  * Revision 1.3  2008/02/14 02:46:44  james
20  * *** empty log message ***
21  *
22  * Revision 1.2  2008/02/14 00:57:58  james
23  * *** empty log message ***
24  *
25  * Revision 1.1  2008/02/05 14:25:49  james
26  * *** empty log message ***
27  *
28  */
29
30 #include <sympathy.h>
31 #include "mainloop.h"
32
33 int
34 main (int argc, char *argv[])
35 {
36   int c;
37   extern char *optarg;
38   extern int optind, opterr, optopt;
39
40   int tflag = 0, cflag = 0, sflag = 0, rflag = 0;
41   int lflag = 0, dflag = 0, bflag = 0, pflag = 0;
42   int kflag = 0;
43
44   int nhistory = 200;
45   int baud = -1;
46   char *rid, *device_path;
47   char *socket_path;
48
49   Log *log=NULL;
50
51   while ((c = getopt (argc, argv, "tscr:d:pb:fL:Fk:n:")) != EOF)
52     {
53       switch (c)
54         {
55         case 't':
56           tflag++;
57           break;
58         case 's':
59           sflag++;
60           break;
61         case 'c':
62           cflag++;
63         break;
64         case 'r':
65            rflag++;
66           rid=optarg;
67         break;
68         case 'L':
69                 if (log) moan("only one -L argument is allowed");
70                 log=file_log_new(optarg);
71                 if (!log) moan("couldn't open %s as a log file",optarg);
72         default:
73           usage ();
74         }
75     }
76
77
78
79
80 #if 0
81   "sympathy -t      [-l] [-d serialdev|-p] [-b baud] [-f] [-L log]\n"
82     "sympathy -s      [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-F] [-k skt]\n"
83     "                      [-n hlines]\n"
84     "sympathy [-s -c] [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
85     "                      [-n hlines]\n"
86     "sympathy -c      [-H] -k skt\n" "sympathy -r id   [-H]\n" "\n" client ();
87 #endif
88 }