Updated help information for adig, acountry, and ahost.#334
Conversation
…on from the man pages.
|
please move code out of headers |
|
I was able to get Travis to pass with code in header but not in the '.c' (see be57554..., 6e9bae7...) not sure if this has to do with the 'Quick hack...' where it looks like ares_get_opt is manually included in some of the makefiles (e.g. Makefile.m32 at line 42) or if this is some other subtlety that I am not familiar with. In the case that I need to manually include in makefiles via the hack, this seems like more editing than should be needed for a simple help printout, thus perhaps I missed something. Currently all checks have passed. |
|
your header file still has the full implementation. you should just move the respective print functions to adig.c/ahost.c/etc instead of creating new external files. |
|
should probably merge -? and -h to do the same output |
|
Note that, to stay consistent with 'man -h' (which I hope is a good example to follow) I omitted the -? from the usage note but the programs now respond to -? and -h. |
| break; | ||
| case '?': | ||
| print_help_info_adig(); | ||
| break; |
There was a problem hiding this comment.
One could collapse these info:
case 'h':
case '?':
print_help_info_adig();
break;| static void print_help_info_adig() { | ||
| printf("adig, version %s \n\n", ARES_VERSION_STR); | ||
| printf("usage: adig [-h] [-d] [-f flag] [-s server] [-c class] [-t type] [-T|U port] name ...\n\n" | ||
| " d : Print some extra debugging output.\n" |
There was a problem hiding this comment.
Why d and not -d ... as is more common in help-screens?
(same in all 3 a*.c files).
Provide more descriptive help information for various utilities. Fix By: @anonymoushelpishere
Information from the man pages was added to the -h option of each of the commands.