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.12  2008/02/27 09:42:21  james
14  * *** empty log message ***
15  *
16  * Revision 1.11  2008/02/27 01:31:38  james
17  * *** empty log message ***
18  *
19  * Revision 1.10  2008/02/27 01:31:14  james
20  * *** empty log message ***
21  *
22  * Revision 1.9  2008/02/24 00:43:55  james
23  * *** empty log message ***
24  *
25  * Revision 1.8  2008/02/24 00:42:53  james
26  * *** empty log message ***
27  *
28  * Revision 1.7  2008/02/23 11:48:52  james
29  * *** empty log message ***
30  *
31  * Revision 1.6  2008/02/20 18:49:11  staffcvs
32  * *** empty log message ***
33  *
34  * Revision 1.5  2008/02/20 18:31:44  james
35  * *** empty log message ***
36  *
37  * Revision 1.4  2008/02/20 17:18:33  james
38  * *** empty log message ***
39  *
40  * Revision 1.3  2008/02/20 02:11:35  james
41  * *** empty log message ***
42  *
43  * Revision 1.2  2008/02/16 10:58:52  james
44  * *** empty log message ***
45  *
46  * Revision 1.1  2008/02/16 01:30:56  james
47  * *** empty log message ***
48  *
49  */
50
51 #include <stdio.h>
52 #include <stdlib.h>
53
54 void
55 usage (void)
56 {
57
58   fprintf (stderr, "Usage:\n"
59            "sympathy -t      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u]\n"
60            "sympathy -s      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u] [-k skt]\n"
61            "                      [-n hlines] [-w width] [-F]\n"
62            "sympathy [-s -c] [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-u] [-k skt]\n"
63            "                      [-n hlines] [-w width]\n"
64            "sympathy -c      [-H] [-u] -k skt\n"
65            "sympathy -r id   [-H] [-u]\n"
66            "sympathy {-l|-ls}\n"
67            "sympathy -v\n"
68            "sympathy -h\n"
69            "\n"
70            "Main mode:\n"
71            "   -t  terminal emulator mode: one process is started which reads from\n"
72            "          the serial device or ptty and writes to the users terminal.\n"
73            "   -s  server mode: a process is started (and daemonized unless -F is\n"
74            "          given) which listens on a socket, and reads from the serial\n"
75            "          device or ptty.\n"
76            "   -s -c  server and client mode. Fork a server and connect a client\n"
77            "            incompatible with -F. This is the default mode\n"
78            "   -c     client mode: connect to server mode process\n"
79            "   -r id  client mode: connect to server mode process on socket\n"
80            "             ~/.sympathy/id\n"
81            "   -l or -ls  list active sockets in ~/.sympathy\n"
82            "   -v   show version\n"
83            "   -h   show help\n"
84            "\n"
85            "Options:\n"
86            "   -K  lock the serial device. By default sympathy checks that no\n"
87            "          other process has create a lock file, and temporarily ceases\n"
88            "          to access the serial port if it spots one. With this option\n"
89            "          sympathy creates a lock file and prevents other programs\n"
90            "          accessing the serial port. Incompatible with -p\n"
91            "   -d serialdev  the serial device to connect to, eg /dev/ttyS0\n"
92            "   -p   fork a login shell in a pty and connect to that rather than\n"
93            "           connect to a serial port. This option is the default if\n"
94            "           no -d option is specified\n"
95            "   -b baud  the baudrate to set. If omitted sympathy does not set\n"
96            "              a baudrate and uses the current setting\n"
97            "   -f  set RTS/CTS flowcontrol. By default sympathy disables flow\n"
98            "         control\n"
99            "   -k socket  explicity set the name of the socket, by default\n"
100            "                sympathy will use ~/.sympathy/$pid\n"
101            "   -F  do not detach, run the server in the foreground\n"
102            "   -H  instead of connecting the user's terminal to the session\n"
103            "         emit HTML of the current state of the screen on stdout\n"
104            "   -L log  log activity on the device to the file log\n"
105            "   -n  hlines  the number of lines of history to store in the\n"
106            "                 server, that are replayed on connexion\n"
107            "   -u  don't emit utf-8 try to use ISO-2202 to the local terminal\n"
108            "   -w width  start session with a screen of width width<=132\n");
109
110
111   exit (1);
112 }