X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=client%2Fadh-opts.c;h=9805e5e8492440ef01ee7e21c9dd0494ed7d329d;hp=af8afbdec13b3f94b1bb466d44ed1a1018d9261a;hb=c5f033dba6fbc5848658e96aa71980c688020796;hpb=2b1c6979bb36a0e3a5aaa7f18b0c72b528f886b9 diff --git a/client/adh-opts.c b/client/adh-opts.c index af8afbd..9805e5e 100644 --- a/client/adh-opts.c +++ b/client/adh-opts.c @@ -5,11 +5,11 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is - * Copyright (C) 1997-1999 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1997-2000 Ian Jackson + * Copyright (C) 1999-2000 Tony Finch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,6 +62,10 @@ static const struct optioninfo global_options[]= { "Vd", "debug", &ov_verbose, adns_if_debug }, { ot_desconly, "other global options:" }, + { ot_funcarg, "Configuration to use instead of /etc/resolv.conf", + 0, "config", 0,0, of_config, "" }, + { ot_func, "Print version number", + 0, "version", 0,0, of_version }, { ot_func, "Print usage information", 0, "help", 0,0, of_help }, @@ -267,10 +271,14 @@ static void printusage(void) { if (ferror(stdout)) sysfail("write usage message",errno); } +void of_version(const struct optioninfo *oi, const char *arg, const char *arg2) { + VERSION_PRINT_QUIT("adnshost"); +} + void of_help(const struct optioninfo *oi, const char *arg, const char *arg2) { printusage(); if (fclose(stdout)) sysfail("finish writing output",errno); - exit(0); + quitnow(0); } typedef int comparer_type(const char **optp, const struct optioninfo *entry);