X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/0ebff22d9b5832b18444f7c680ca71e24fc3734e..aa3ffb57294018bc66aabe1df8960643c397a449:/client/adh-opts.c diff --git a/client/adh-opts.c b/client/adh-opts.c index 4cc201a..9805e5e 100644 --- a/client/adh-opts.c +++ b/client/adh-opts.c @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * 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 @@ -64,6 +64,8 @@ static const struct optioninfo global_options[]= { { 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 }, @@ -269,6 +271,10 @@ 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);