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