+5827. [cleanup] The command-line utilities printed their version numbers
+ inconsistently; they all now print to stdout. (They are
+ still inconsistent abotut whether you use `-v` or `-V`
+ to request the version). [GL #3189]
+
5826. [cleanup] Stop dig from complaining about lack of IDN support when
the user asks for no IDN translation. [GL #3188]
/* handled in preparse_args() */
break;
case 'v':
- fprintf(stderr, "delv %s\n", PACKAGE_VERSION);
+ printf("delv %s\n", PACKAGE_VERSION);
exit(0);
/* NOTREACHED */
default:
}
#endif /* if TARGET_OS_IPHONE */
-/*% version */
-static void
-version(void) {
- fprintf(stderr, "DiG %s\n", PACKAGE_VERSION);
-}
-
/*% help */
static void
help(void) {
(*lookup)->use_usec = true;
break;
case 'v':
- version();
+ printf("DiG %s\n", PACKAGE_VERSION);
exit(0);
break;
}
static const char *optstring = "46aAc:dilnm:p:rst:vVwCDN:R:TUW:";
-/*% version */
-static void
-version(void) {
- fprintf(stderr, "host %s\n", PACKAGE_VERSION);
-}
-
static void
pre_parse_args(int argc, char **argv) {
int c;
case 'v':
break;
case 'V':
- version();
+ printf("host %s\n", PACKAGE_VERSION);
exit(0);
break;
case 'w':
}
}
-static void
-version(void) {
- fprintf(stderr, "nslookup %s\n", PACKAGE_VERSION);
-}
-
static void
setoption(char *opt) {
size_t l = strlen(opt);
debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') {
if (strncasecmp(argv[0], "-ver", 4) == 0) {
- version();
+ printf("nslookup %s\n", PACKAGE_VERSION);
exit(0);
} else if (argv[0][1] != 0) {
setoption(&argv[0][1]);
void
version(const char *name) {
- fprintf(stderr, "%s %s\n", name, PACKAGE_VERSION);
+ printf("%s %s\n", name, PACKAGE_VERSION);
exit(0);
}
return (count);
}
-static void
-version(void) {
- fprintf(stderr, "nsupdate %s\n", PACKAGE_VERSION);
-}
-
#define PARSE_ARGS_FMT "46C:dDghilL:Mok:p:Pr:R:t:Tu:vVy:"
static void
break;
case 'V':
- version();
+ printf("nsupdate %s\n", PACKAGE_VERSION);
doexit = true;
break;
*/
break;
case 'v':
- fprintf(stderr, "mDiG %s\n", PACKAGE_VERSION);
+ printf("mDiG %s\n", PACKAGE_VERSION);
exit(0);
break;
}