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