aboutsummaryrefslogtreecommitdiffstats
path: root/apps/usage.c
blob: d76f9d9d57481f9570043032130f5484f17a04f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
 * usage.c:
 *
 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id$";

/*
 * $Log$
 * Revision 1.16  2008/02/27 18:29:49  james
 * *** empty log message ***
 *
 * Revision 1.15  2008/02/27 16:01:24  james
 * *** empty log message ***
 *
 * Revision 1.14  2008/02/27 09:55:57  james
 * *** empty log message ***
 *
 * Revision 1.13  2008/02/27 09:42:53  james
 * *** empty log message ***
 *
 * Revision 1.12  2008/02/27 09:42:21  james
 * *** empty log message ***
 *
 * Revision 1.11  2008/02/27 01:31:38  james
 * *** empty log message ***
 *
 * Revision 1.10  2008/02/27 01:31:14  james
 * *** empty log message ***
 *
 * Revision 1.9  2008/02/24 00:43:55  james
 * *** empty log message ***
 *
 * Revision 1.8  2008/02/24 00:42:53  james
 * *** empty log message ***
 *
 * Revision 1.7  2008/02/23 11:48:52  james
 * *** empty log message ***
 *
 * Revision 1.6  2008/02/20 18:49:11  staffcvs
 * *** empty log message ***
 *
 * Revision 1.5  2008/02/20 18:31:44  james
 * *** empty log message ***
 *
 * Revision 1.4  2008/02/20 17:18:33  james
 * *** empty log message ***
 *
 * Revision 1.3  2008/02/20 02:11:35  james
 * *** empty log message ***
 *
 * Revision 1.2  2008/02/16 10:58:52  james
 * *** empty log message ***
 *
 * Revision 1.1  2008/02/16 01:30:56  james
 * *** empty log message ***
 *
 */

#include <stdio.h>
#include <stdlib.h>

void
usage (void)
{

  fprintf (stderr, "Usage:\n"
           "sympathy -t      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log]\n"
           "                                  [-w WxH] [-u]\n"
           "sympathy -s      [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
           "                      [-n hlines] [-w WxH] [-F]\n"
           "sympathy [-s -c] [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-k skt]\n"
           "                      [-n hlines] [-w WxH] [-u]\n"
           "sympathy -c      [-H] [-u] -k skt\n"
           "sympathy -r id   [-H] [-u]\n"
           "sympathy {-l|-ls}\n"
           "sympathy -v\n"
           "sympathy -h\n"
           "\n"
           "Main mode:\n"
           "   -t  terminal emulator mode: one process is started which reads from\n"
           "          the serial device or ptty and writes to the user's terminal.\n"
           "   -s  server mode: a process is started (and daemonized unless -F is\n"
           "          given) which listens on a socket, and reads from the serial\n"
           "          device or ptty.\n"
           "   -s -c  server and client mode: Fork a server and connect a client\n"
           "            incompatible with -F. This is the default mode\n"
           "   -c     client mode: connect to server mode process\n"
           "   -r id  client mode: connect to server mode process on socket\n"
           "             ~/.sympathy/id or ~/.sympathy/hostname.id if id is an\n"
           "             integer\n"
           "   -l or -ls  list active sockets in ~/.sympathy\n"
           "   -v   show version\n"
           "   -h   show help\n"
           "\n"
           "Options:\n"
           "   -K  lock the serial device. By default sympathy checks that no\n"
           "          other process has created a lock file, and temporarily ceases\n"
           "          to access the serial port if it spots one. With this option\n"
           "          sympathy creates a lock file and prevents other programs\n"
           "          accessing the serial port. Incompatible with -p\n"
           "   -d serialdev  the serial device to connect to, eg /dev/ttyS0\n"
           "   -p   fork a login shell in a ptty and connect to that rather than\n"
           "           connect to a serial port. This option is the default if\n"
           "           no -d option is specified\n"
           "   -b baud  the baudrate to set. If omitted sympathy does not set\n"
           "              a baudrate and uses the current setting\n"
           "   -f  set RTS/CTS flowcontrol. By default sympathy disables flow\n"
           "         control\n"
           "   -k socket  explicity set the name of the socket, by default\n"
           "                sympathy will use ~/.sympathy/$pid\n"
           "   -F  do not detach, run the server in the foreground\n"
           "   -H  instead of connecting the user's terminal to the session\n"
           "         emit HTML of the current state of the screen on stdout\n"
           "   -L log  log activity on the device to the file log\n"
           "   -n  hlines  the number of lines of history to store in the\n"
           "                 server, that are replayed on connexion\n"
           "   -u  don't emit utf-8 try to use ISO-2202 to the local terminal\n"
           "   -w W[xH]  start session with a screen of size W by H. 0<W<=132,\n"
           "             0<H<24, default 80 by 24\n"
           );


  exit (1);
}