diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-05 14:46:07 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-09-05 14:46:07 +0000 |
commit | 27421a1878847389391c1a43420baaccf57057a7 (patch) | |
tree | 73e57d430a5828d242b78deb0a591a99f0df44a9 /coreutils/date.c | |
parent | bef14d7a878049a01f1fb9b412611a2d64c2b154 (diff) | |
download | busybox-w32-27421a1878847389391c1a43420baaccf57057a7.tar.gz busybox-w32-27421a1878847389391c1a43420baaccf57057a7.tar.bz2 busybox-w32-27421a1878847389391c1a43420baaccf57057a7.zip |
1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
Diffstat (limited to 'coreutils/date.c')
-rw-r--r-- | coreutils/date.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/date.c b/coreutils/date.c index 70484e2cd..0488b2de3 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -152,7 +152,7 @@ int date_main(int argc, char **argv) | |||
152 | #else | 152 | #else |
153 | # define GETOPT_ISOFMT | 153 | # define GETOPT_ISOFMT |
154 | #endif | 154 | #endif |
155 | bb_opt_complementaly = "d~ds:s~ds"; | 155 | bb_opt_complementally = "!d~ds:s~ds"; |
156 | opt = bb_getopt_ulflags(argc, argv, "Rs:ud:r:" GETOPT_ISOFMT, | 156 | opt = bb_getopt_ulflags(argc, argv, "Rs:ud:r:" GETOPT_ISOFMT, |
157 | &date_str, &date_str, &filename | 157 | &date_str, &date_str, &filename |
158 | #ifdef CONFIG_FEATURE_DATE_ISOFMT | 158 | #ifdef CONFIG_FEATURE_DATE_ISOFMT |
@@ -165,8 +165,6 @@ int date_main(int argc, char **argv) | |||
165 | bb_error_msg_and_die(bb_msg_memory_exhausted); | 165 | bb_error_msg_and_die(bb_msg_memory_exhausted); |
166 | } | 166 | } |
167 | use_arg = opt & DATE_OPT_DATE; | 167 | use_arg = opt & DATE_OPT_DATE; |
168 | if(opt & BB_GETOPT_ERROR) | ||
169 | bb_show_usage(); | ||
170 | #ifdef CONFIG_FEATURE_DATE_ISOFMT | 168 | #ifdef CONFIG_FEATURE_DATE_ISOFMT |
171 | if(opt & DATE_OPT_TIMESPEC) { | 169 | if(opt & DATE_OPT_TIMESPEC) { |
172 | if (!isofmt_arg) { | 170 | if (!isofmt_arg) { |