From 326343539121ccb118392b2b015e167520c5e123 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Apr 2005 16:40:43 +0000 Subject: [PATCH] Remove posixver.h and its uses. (COMMON_SHORT_OPTIONS): Remove. (short_options): New constant. (short_options, usage): -I now always takes an optional arg. --- src/date.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/date.c b/src/date.c index 2b1e0f3..0cabe3a 100644 --- a/src/date.c +++ b/src/date.c @@ -32,7 +32,6 @@ #include "getline.h" #include "inttostr.h" #include "posixtm.h" -#include "posixver.h" #include "quote.h" #include "strftime.h" @@ -79,7 +78,7 @@ static int iso_8601_format = 0; /* If true, display time in RFC-(2)822 format for mail or news. */ static bool rfc_format = false; -#define COMMON_SHORT_OPTIONS "Rd:f:r:s:u" +static char const short_options[] = "d:f:I::r:Rs:u"; static struct option const long_options[] = { @@ -128,7 +127,7 @@ Display the current time in the given FORMAT, or set the system date.\n\ \n\ -d, --date=STRING display time described by STRING, not `now'\n\ -f, --file=DATEFILE like --date once for each line of DATEFILE\n\ - --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\ + -I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\ TIMESPEC=`date' for date only (the default),\n\ `hours', `minutes', `seconds', or `ns' for date and\n\ time to the indicated precision.\n\ @@ -307,9 +306,6 @@ main (int argc, char **argv) int n_args; bool ok; int option_specified_date; - char const *short_options = (posix2_version () < 200112 - ? COMMON_SHORT_OPTIONS "I::" - : COMMON_SHORT_OPTIONS "I:"); initialize_main (&argc, &argv); program_name = argv[0]; -- 2.7.4