diff options
author | Erik Andersen | 2000-02-07 05:29:42 +0000 |
---|---|---|
committer | Erik Andersen | 2000-02-07 05:29:42 +0000 |
commit | fac10d7c59f7db0facd5fb94de273310b9ec86e6 (patch) | |
tree | dccf8f905fc5807239883da9fca6597037d487fc /date.c | |
parent | 50bc101b7d6e847a9a0621ca3eb28c7117d095e5 (diff) | |
download | busybox-fac10d7c59f7db0facd5fb94de273310b9ec86e6.zip busybox-fac10d7c59f7db0facd5fb94de273310b9ec86e6.tar.gz |
A few minor updates. ;-)
Seriously though, read the Changelog for busybox 0.42,
which this is about to become...
-Erik
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -20,6 +20,10 @@ */ #include "internal.h" +#define BB_DECLARE_EXTERN +#define bb_need_invalid_date +#define bb_need_memory_exhausted +#include "messages.c" #include <stdlib.h> #include <errno.h> #include <sys/time.h> @@ -59,7 +63,7 @@ date_conv_time(struct tm *tm_time, const char *t_string) { &(tm_time->tm_year)); if(nr < 4 || nr > 5) { - fprintf(stderr, "date: invalid date `%s'\n", t_string); + fprintf(stderr, invalid_date, "date", t_string); exit( FALSE); } @@ -152,7 +156,7 @@ date_conv_ftime(struct tm *tm_time, const char *t_string) { } - fprintf(stderr, "date: invalid date `%s'\n", t_string); + fprintf(stderr, invalid_date, "date", t_string); exit( FALSE); @@ -190,7 +194,7 @@ date_main(int argc, char * * argv) case 'u': utc = 1; if (putenv ("TZ=UTC0") != 0) { - fprintf(stderr,"date: memory exhausted\n"); + fprintf(stderr, memory_exhausted, "date"); exit( FALSE); } /* Look ma, no break. Don't fix it either. */ @@ -204,10 +208,10 @@ date_main(int argc, char * * argv) } } else { if ( (date_fmt == NULL) && (strcmp(*argv, "+")==0) ) - date_fmt = *argv; + date_fmt=*argv; else if (date_str == NULL) { set_time = 1; - date_str = *argv; + date_str=*argv; } else { usage ( date_usage); } @@ -241,7 +245,7 @@ date_main(int argc, char * * argv) /* Correct any day of week and day of year etc fields */ tm = mktime(&tm_time); if (tm < 0 ) { - fprintf(stderr, "date: invalid date `%s'\n", date_str); + fprintf(stderr, invalid_date, "date", date_str); exit( FALSE); } @@ -284,4 +288,3 @@ date_main(int argc, char * * argv) exit( TRUE); } - |