[tz] zdump convenience options

Arthur David Olson arthurdavidolson at gmail.com
Tue Apr 1 07:40:11 UTC 2014


Attached are changes for two zdump convenience options;
they also appear in mangled form below.

    @dashdashado

diff -rc tz2014braw/zdump.8 tz2014bredone/zdump.8
*** tz2014braw/zdump.8    2014-03-26 16:33:56.432625200 -0400
--- tz2014bredone/zdump.8    2014-03-26 16:35:28.051586100 -0400
***************
*** 13,19 ****
  .B \-c
  [loyear,]hiyear ] [
  .B \-t
! [lotime,]hitime ] [ zonename ... ]
  .SH DESCRIPTION
  .I Zdump
  prints the current time in each
--- 13,23 ----
  .B \-c
  [loyear,]hiyear ] [
  .B \-t
! [lotime,]hitime ] [
! .B \-\-pre
! ] [
! .B \-\-ado
! ] [ zonename ... ]
  .SH DESCRIPTION
  .I Zdump
  prints the current time in each
***************
*** 56,61 ****
--- 60,71 ----
  .BI "\-t " [lotime,]hitime
  Cut off verbose output at the start of the given time(s),
  given in decimal seconds since 1970-01-01 00:00:00 UTC.
+ .TP
+ .BI "\-\-pre"
+ Limit output to pre-A.D. only; equivalent to \-Vc\-1
+ .TP
+ .BI "\-\-ado"
+ Limit output to A.D. only; equivalent to \-Vc1,2500
  .SH LIMITATIONS
  Time discontinuities are found by sampling the results returned by
localtime
  at twelve-hour intervals.
diff -rc tz2014braw/zdump.c tz2014bredone/zdump.c
*** tz2014braw/zdump.c    2014-03-26 16:33:56.432625200 -0400
--- tz2014bredone/zdump.c    2014-03-26 16:37:38.748615700 -0400
***************
*** 304,310 ****
  usage(FILE * const stream, const int status)
  {
      (void) fprintf(stream,
! _("%s: usage: %s [--version] [--help] [-{vV}] [-{ct} [lo,]hi] zonename
...\n"
    "\n"
    "Report bugs to %s.\n"),
                 progname, progname, REPORT_BUGS_TO);
--- 304,310 ----
  usage(FILE * const stream, const int status)
  {
      (void) fprintf(stream,
! _("%s: usage: %s [--version] [--help] [--pre] [--ado] [-{vV}] [-{ct}
[lo,]hi] zonename ...\n"
    "\n"
    "Report bugs to %s.\n"),
                 progname, progname, REPORT_BUGS_TO);
***************
*** 346,351 ****
--- 346,355 ----
              exit(EXIT_SUCCESS);
          } else if (strcmp(argv[i], "--help") == 0) {
              usage(stdout, EXIT_SUCCESS);
+         } else if (strcmp(argv[i], "--pre") == 0) {
+             argv[i] = "-Vc-1";
+         } else if (strcmp(argv[i], "--ado") == 0) {
+             argv[i] = "-Vc1,2500",
          }
      vflag = Vflag = 0;
      cutarg = cuttimes = NULL;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20140401/01981519/attachment.html>
-------------- next part --------------
diff -rc tz2014braw/zdump.8 tz2014bredone/zdump.8
*** tz2014braw/zdump.8	2014-03-26 16:33:56.432625200 -0400
--- tz2014bredone/zdump.8	2014-03-26 16:35:28.051586100 -0400
***************
*** 13,19 ****
  .B \-c
  [loyear,]hiyear ] [
  .B \-t
! [lotime,]hitime ] [ zonename ... ]
  .SH DESCRIPTION
  .I Zdump
  prints the current time in each
--- 13,23 ----
  .B \-c
  [loyear,]hiyear ] [
  .B \-t
! [lotime,]hitime ] [ 
! .B \-\-pre
! ] [
! .B \-\-ado
! ] [ zonename ... ]
  .SH DESCRIPTION
  .I Zdump
  prints the current time in each
***************
*** 56,61 ****
--- 60,71 ----
  .BI "\-t " [lotime,]hitime
  Cut off verbose output at the start of the given time(s),
  given in decimal seconds since 1970-01-01 00:00:00 UTC.
+ .TP
+ .BI "\-\-pre"
+ Limit output to pre-A.D. only; equivalent to \-Vc\-1
+ .TP
+ .BI "\-\-ado"
+ Limit output to A.D. only; equivalent to \-Vc1,2500
  .SH LIMITATIONS
  Time discontinuities are found by sampling the results returned by localtime
  at twelve-hour intervals.
diff -rc tz2014braw/zdump.c tz2014bredone/zdump.c
*** tz2014braw/zdump.c	2014-03-26 16:33:56.432625200 -0400
--- tz2014bredone/zdump.c	2014-03-26 16:37:38.748615700 -0400
***************
*** 304,310 ****
  usage(FILE * const stream, const int status)
  {
  	(void) fprintf(stream,
! _("%s: usage: %s [--version] [--help] [-{vV}] [-{ct} [lo,]hi] zonename ...\n"
    "\n"
    "Report bugs to %s.\n"),
  		       progname, progname, REPORT_BUGS_TO);
--- 304,310 ----
  usage(FILE * const stream, const int status)
  {
  	(void) fprintf(stream,
! _("%s: usage: %s [--version] [--help] [--pre] [--ado] [-{vV}] [-{ct} [lo,]hi] zonename ...\n"
    "\n"
    "Report bugs to %s.\n"),
  		       progname, progname, REPORT_BUGS_TO);
***************
*** 346,351 ****
--- 346,355 ----
  			exit(EXIT_SUCCESS);
  		} else if (strcmp(argv[i], "--help") == 0) {
  			usage(stdout, EXIT_SUCCESS);
+ 		} else if (strcmp(argv[i], "--pre") == 0) {
+ 			argv[i] = "-Vc-1";
+ 		} else if (strcmp(argv[i], "--ado") == 0) {
+ 			argv[i] = "-Vc1,2500",
  		}
  	vflag = Vflag = 0;
  	cutarg = cuttimes = NULL;


More information about the tz mailing list