*/
/*
* This file is
- * Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ * Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
* Copyright (C) 1999-2000 Ian Jackson <ian@davenant.greenend.org.uk>
*
* It is part of adns, which is
* Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- * Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ * Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
*
* 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
adns_finish(adns);
}
-static void usage(void) {
- fprintf(stderr, "usage: %s [-d] [-p] [-c concurrency] [-C config] [logfile]\n",
+static void printhelp(FILE *file) {
+ fprintf(file, "usage: %s [-d] [-p] [-c concurrency] [-C config] [logfile]\n",
progname);
+}
+
+static void usage(void) {
+ printhelp(stderr);
exit(1);
}
extern char *optarg;
FILE *inf;
+ if (argv[1] && !strcmp(argv[1],"--help")) {
+ printhelp(stdout);
+ if (ferror(stdout) || fclose(stdout)) { perror("stdout"); exit(1); }
+ exit(0);
+ }
+
maxpending= DEFMAXPENDING;
opts= 0;
while ((c= getopt(argc, argv, "c:C:dp")) != -1)