From b961732246b8d6ecfead5ef20834626706f08e50 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 2 Mar 2004 05:19:01 +0000 Subject: [PATCH] add --version, note that --help is probably obsolete svn:r1195 --- src/or/config.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index 553415e587..2da3ba72f4 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -328,10 +328,10 @@ static int config_assign_default(or_options_t *options) { /* prints the usage of tor. */ static void print_usage(void) { printf("tor -f [args]\n" - "See man page for more options.\n\n" + "See man page for more options. This -h is probably obsolete.\n\n" "-b \t\tbytes/second rate limiting\n" "-d \t\tDebug file\n" - "-m \t\tMax number of connections\n" +// "-m \t\tMax number of connections\n" "-l \t\tLog level\n" "-r \t\tList of known routers\n"); printf("\nClient options:\n" @@ -429,6 +429,11 @@ int getconfig(int argc, char **argv, or_options_t *options) { 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")) {