chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / usage.c
1 /*
2  * usage.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.3  2008/02/20 02:11:35  james
14  * *** empty log message ***
15  *
16  * Revision 1.2  2008/02/16 10:58:52  james
17  * *** empty log message ***
18  *
19  * Revision 1.1  2008/02/16 01:30:56  james
20  * *** empty log message ***
21  *
22  */
23
24
25 void
26 usage (void)
27 {
28
29   fprintf (stderr, "Usage:\n"
30            "sympathy -t      [-l] [-d serialdev|-p] [-b baud] [-f] [-L log]\n"
31            "sympathy -s      [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-F] [-k skt]\n"
32            "                      [-n hlines]\n"
33            "sympathy [-s -c] [-l] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
34            "                      [-n hlines]\n"
35            "sympathy -c      [-H] -k skt\n"
36            "sympathy -r id   [-H]\n"
37            "sympathy -h\n"
38            "\n"
39            "Main mode:\n"
40            "   -t  terminal emulator mode: one process is started which reads from\n"
41            "          the serial device or ptty and writes to the users terminal.\n"
42            "   -s  server mode: a process is started (and daemonized unless -F is\n"
43            "          given) which listens on a socket, and reads from the serial\n"
44            "          device or ptty.\n"
45            "   -s -c  server and client mode. Fork a server and connect a client\n"
46            "            incompatible with -F. This is the default mode\n"
47            "   -c     client mode: connect to server mode process\n"
48            "   -r id  client mode: connect to server mode process on socket\n"
49            "             ~/.sympathy/id\n"
50            "\n"
51            "Options:\n"
52            "   -l  lock the serial device. By default sympathy checks that no\n"
53            "          other process has create a lock file, and temporarily ceases\n"
54            "          to access the serial port if it spots one. With this option\n"
55            "          sympathy creates a lock file and prevents other programs\n"
56            "          accessing the serial port. Incompatible with -p\n"
57            "   -d serialdev  the serial device to connect to, eg /dev/ttyS0\n"
58            "   -p   fork a login shell in a pty and connect to that rather than\n"
59            "           connect to a serial port. This option is the default if\n"
60            "           no -d option is specified\n"
61            "   -b baud  the baudrate to set. If omitted sympathy does not set\n"
62            "              a baudrate and uses the current setting\n"
63            "   -f  set RTS/CTS flowcontrol. By default sympathy disables flow\n"
64            "         control\n"
65            "   -k socket  explicity set the name of the socket, by default\n"
66            "                sympathy will use ~/.sympathy/$pid\n"
67            "   -F  do not detach, run the server in the foreground\n"
68            "   -H  instead of connecting the user's terminal to the session\n"
69            "         emit HTML of the current state of the screen on stdout\n"
70            "   -L  log activity on the device to the file log\n"
71            "   -n  hlines  the number of lines of history to store in the\n"
72            "                 server, that are replayed on connexion\n"
73 );
74
75   exit (1);
76 }