chiark / gitweb /
Mention that I wrote mallory's help message in the manpage.
[tripe] / client.c
index ccc3a05559ef2fa76af32c41b546e6a5991d7064..7edc790bfb7af0a2b637b0c41ddfbc1a632b03ba 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: client.c,v 1.12 2003/10/15 09:29:38 mdw Exp $
+ * $Id$
  *
  * Client for TrIPE
  *
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: client.c,v $
- * Revision 1.12  2003/10/15 09:29:38  mdw
- * Cosmetic fix to changelog comment.
- *
- * Revision 1.11  2003/07/13 11:19:49  mdw
- * Incompatible protocol fix!  Include message type code under MAC tag to
- * prevent cut-and-paste from key-exchange messages to general packet
- * transport.
- *
- * Revision 1.10  2003/05/17 10:59:19  mdw
- * Put a newline in the pidfile.
- *
- * Revision 1.9  2002/01/13 14:57:18  mdw
- * Track @lbuf@ changes in mLib.
- *
- * Revision 1.8  2001/06/19 22:09:37  mdw
- * Move the program name to the right place when constructing the arguments
- * to pass to a new server.
- *
- * Revision 1.7  2001/02/22 09:07:54  mdw
- * Write a pidfile on request, and delete it when finished.
- *
- * Revision 1.6  2001/02/22 09:06:08  mdw
- * Fix logfile rotation to avoid program collapse.
- *
- * Revision 1.5  2001/02/16 21:23:39  mdw
- * Use reliable signal handling for reopening logs.
- *
- * Revision 1.4  2001/02/06 09:34:53  mdw
- * Change ERR response to FAIL for consistency with other programs.
- *
- * Revision 1.3  2001/02/04 17:10:15  mdw
- * Reopen logfiles on receipt of @SIGHUP@ (not done very well).  Don't
- * change directory -- just mangle pathnames instead.
- *
- * Revision 1.2  2001/02/04 01:17:54  mdw
- * Create a configuration header file to tidy up command lines.
- *
- * Revision 1.1  2001/02/03 20:26:37  mdw
- * Initial checkin.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include "config.h"
@@ -267,11 +222,11 @@ static void usage(FILE *fp)
 {
   pquis(fp, "\
 Usage:\n\
-       $ [-w] [-options] [command [args]...]\n\
-       $ [-Dl] [-f file] [-options]\n\
+       $ [-w] [-OPTIONS] [COMMAND [ARGS]...]\n\
+       $ [-Dl] [-f FILE] [-OPTIONS]\n\
 Options:\n\
-       [-s] [-d directory] [-a socket] [-P pidfile]\n\
-       [-p program] [-S arg,arg,...]\n\
+       [-s] [-d DIRECTORY] [-a SOCKET] [-P PIDFILE]\n\
+       [-p PROGRAM] [-S ARG,ARG,...]\n\
 ");
 }
 
@@ -289,8 +244,9 @@ Options in full:\n\
 -u, --usage            Show brief usage message.\n\
 \n\
 -D, --daemon           Become a background task after connecting.\n\
--d, --directory=DIR    Select current directory [default /var/lib/tripe]\n\
--a, --admin-socket=FILE        Select socket to connect to.\n\
+-d, --directory=DIR    Select current directory [default " CONFIGDIR "].\n\
+-a, --admin-socket=FILE        Select socket to connect to
+                          [default " SOCKETDIR "/tripesock].\n\
 -P, --pidfile=FILE     Write process-id to FILE.\n\
 \n\
 -s, --spawn            Start server rather than connecting.\n\
@@ -305,8 +261,8 @@ Options in full:\n\
 
 int main(int argc, char *argv[])
 {
-  const char *dir = "/var/lib/tripe";
-  const char *sock = "tripesock";
+  const char *dir = CONFIGDIR;
+  const char *sock = SOCKETDIR "/tripesock";
   const char *spawnpath = "tripe";
   string_v spawnopts = DA_INIT;
   char *p;