diff options
Diffstat (limited to 'usr.sbin/zic/zdump.c')
-rw-r--r-- | usr.sbin/zic/zdump.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/zic/zdump.c b/usr.sbin/zic/zdump.c index 094e172..a34cadd 100644 --- a/usr.sbin/zic/zdump.c +++ b/usr.sbin/zic/zdump.c @@ -1,8 +1,4 @@ -#ifndef lint -#ifndef NOID -static char elsieid[] = "@(#)zdump.c 7.28"; -#endif /* !defined NOID */ -#endif /* !defined lint */ +static char elsieid[] = "@(#)zdump.c 7.31"; /* ** This code has been made independent of the rest of the time @@ -162,6 +158,11 @@ char * argv[]; (void) textdomain(TZ_DOMAIN); #endif /* HAVE_GETTEXT - 0 */ progname = argv[0]; + for (i = 1; i < argc; ++i) + if (strcmp(argv[i], "--version") == 0) { + (void) printf("%s\n", elsieid); + (void) exit(EXIT_SUCCESS); + } vflag = 0; cutoff = NULL; while ((c = getopt(argc, argv, "c:v")) == 'c' || c == 'v') @@ -171,7 +172,7 @@ char * argv[]; if ((c != EOF && c != -1) || (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { (void) fprintf(stderr, -_("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"), +_("%s: usage is %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n"), argv[0], argv[0]); (void) exit(EXIT_FAILURE); } @@ -263,9 +264,8 @@ _("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"), show(argv[i], t, TRUE); } if (fflush(stdout) || ferror(stdout)) { - (void) fprintf(stderr, _("%s: Error writing "), - argv[0]); - (void) perror(_("standard output")); + (void) fprintf(stderr, "%s: ", argv[0]); + (void) perror(_("Error writing standard output")); (void) exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); |