aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2008-02-16 01:30:56 +0000
committerjames <>2008-02-16 01:30:56 +0000
commit7a496b7d0c46959c1f44094023c6afa2eb62961a (patch)
treeb54273801868a9ab398ab11d4ba73c2ec615e8ae
parent85a601f7fcaaa64d58567779236a4f3568c219ad (diff)
downloadsympathy-7a496b7d0c46959c1f44094023c6afa2eb62961a.tar.gz
sympathy-7a496b7d0c46959c1f44094023c6afa2eb62961a.tar.bz2
sympathy-7a496b7d0c46959c1f44094023c6afa2eb62961a.zip
*** empty log message ***
-rw-r--r--apps/Makefile.am5
-rw-r--r--apps/mainloop.c17
-rw-r--r--apps/usage.c63
3 files changed, 84 insertions, 1 deletions
diff --git a/apps/Makefile.am b/apps/Makefile.am
index dd6b433..cb1c675 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -7,6 +7,9 @@
# $Id$
#
# $Log$
+# Revision 1.7 2008/02/16 01:30:56 james
+# *** empty log message ***
+#
# Revision 1.6 2008/02/14 10:34:30 james
# *** empty log message ***
#
@@ -34,7 +37,7 @@ noinst_PROGRAMS = sympathyd sympathy
noinst_HEADERS=clients.h client.h
-sympathy_SOURCES = sympathy.c client.c
+sympathy_SOURCES = sympathy.c client.c usage.c clients.c mainloop.c
sympathy_LDADD = ../src/libsympathy.a -lutil
sympathyd_SOURCES = sympathyd.c clients.c client.c
diff --git a/apps/mainloop.c b/apps/mainloop.c
new file mode 100644
index 0000000..5acee6f
--- /dev/null
+++ b/apps/mainloop.c
@@ -0,0 +1,17 @@
+/*
+ * mainloop.c:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/16 01:30:56 james
+ * *** empty log message ***
+ *
+ */
+
diff --git a/apps/usage.c b/apps/usage.c
new file mode 100644
index 0000000..8bc00b9
--- /dev/null
+++ b/apps/usage.c
@@ -0,0 +1,63 @@
+/*
+ * usage.c:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/16 01:30:56 james
+ * *** empty log message ***
+ *
+ */
+
+
+void usage(void)
+{
+
+fprintf(stderr, "Usage:\n"
+"sympathy -t [-l] [-d serialdev|-p] [-b baud] [-h]\n"
+"sympathy -s [-l] [-d serialdev|-p] [-b baud] [-h] [-f] [-k socket]\n"
+"sympathy [-s -c] [-l] [-d serialdev|-p] [-b baud] [-h] [-k socket]\n"
+"sympathy -c -k socket [-H]\n"
+"sympathy -r id [-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 users 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"
+" -c client mode: connect to server mode process\n"
+" -s -c server and client mode. Fork a server and connect a client\n"
+" incompatible with -f. This is the default mode\n"
+" -r id client mode: connect to server mode process on socket\n"
+" ~/.sympathy/id\n"
+"\n"
+"Options:\n"
+" -l lock the serial device. By default sympathy checks that no\n"
+" other process has create 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 pty 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"
+" -h 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"
+);
+
+exit(1);
+}