[or-cvs] add --version, note that --help is probably obsolete

Roger Dingledine arma at seul.org
Tue Mar 2 05:19:03 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	config.c 
Log Message:
add --version, note that --help is probably obsolete


Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- config.c	2 Mar 2004 05:00:50 -0000	1.89
+++ config.c	2 Mar 2004 05:19:01 -0000	1.90
@@ -328,10 +328,10 @@
 /* prints the usage of tor. */
 static void print_usage(void) {
   printf("tor -f <torrc> [args]\n"
-         "See man page for more options.\n\n"
+         "See man page for more options. This -h is probably obsolete.\n\n"
          "-b <bandwidth>\t\tbytes/second rate limiting\n"
          "-d <file>\t\tDebug file\n"
-         "-m <max>\t\tMax number of connections\n"
+//         "-m <max>\t\tMax number of connections\n"
          "-l <level>\t\tLog level\n"
          "-r <file>\t\tList of known routers\n");
   printf("\nClient options:\n"
@@ -429,6 +429,11 @@
     exit(0);
   }
 
+  if(argc > 1 && (!strcmp(argv[1],"--version"))) {
+    printf("Tor version %s.\n",VERSION);
+    exit(0);
+  }
+
 /* learn config file name, get config lines, assign them */
   i = 1;
   while(i < argc-1 && strcmp(argv[i],"-f")) {



More information about the tor-commits mailing list