diff options
author | Roger Dingledine <arma@torproject.org> | 2003-10-20 01:19:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-10-20 01:19:54 +0000 |
commit | b40d0bffa781b6e212d0ba39c5bf63039762762e (patch) | |
tree | 4e21bba274a2a8009b8b926e691cfcf95f6eff00 /src/or/config.c | |
parent | db33eac4c4bbee07ac7a80e1609233d0b277f966 (diff) | |
download | tor-b40d0bffa781b6e212d0ba39c5bf63039762762e.tar tor-b40d0bffa781b6e212d0ba39c5bf63039762762e.tar.gz |
a skeletal print_usage() function
svn:r634
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 977af4981..c1733905e 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -191,6 +191,10 @@ static void config_assign(or_options_t *options, struct config_line *list) { } } +void print_usage(void) { + +} + /* return 0 if success, <0 if failure. */ int getconfig(int argc, char **argv, or_options_t *options) { struct config_line *cl; @@ -215,6 +219,11 @@ int getconfig(int argc, char **argv, or_options_t *options) { options->TotalBandwidth = 800000; /* at most 800kB/s total sustained incoming */ options->NumCpus = 1; + if(argc > 1 && (!strcmp(argv[1], "-h") || !strcmp(argv[1],"--help"))) { + print_usage(); + exit(0); + } + /* learn config file name, get config lines, assign them */ i = 1; while(i < argc-1 && strcmp(argv[i],"-f")) { |