diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-06-28 00:10:34 +0200 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-08-23 12:53:06 +0100 |
commit | 09c01ce5d0518b51cd6d3114351c967f295878da (patch) | |
tree | b9e2bf767ffcce25f9f96a41043863fadffd02ab | |
parent | 9d989adec01904ad5a3c1021e4f610c39fa27b94 (diff) | |
download | busybox-w32-09c01ce5d0518b51cd6d3114351c967f295878da.tar.gz busybox-w32-09c01ce5d0518b51cd6d3114351c967f295878da.tar.bz2 busybox-w32-09c01ce5d0518b51cd6d3114351c967f295878da.zip |
win32/strptime: avoid old-style declarations
This was inherited from gnulib. While at it, get rid of the ugly (and
unneeded) LOCALE constants.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ron Yorston <rmy@pobox.com>
-rw-r--r-- | win32/strptime.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/win32/strptime.c b/win32/strptime.c index f84b8dbc0..89d4fd2a4 100644 --- a/win32/strptime.c +++ b/win32/strptime.c | |||
@@ -62,7 +62,7 @@ enum ptime_locale_status { not, loc, raw }; | |||
62 | #define recursive(new_fmt) \ | 62 | #define recursive(new_fmt) \ |
63 | (*(new_fmt) != '\0' \ | 63 | (*(new_fmt) != '\0' \ |
64 | && (rp = __strptime_internal (rp, (new_fmt), tm, \ | 64 | && (rp = __strptime_internal (rp, (new_fmt), tm, \ |
65 | decided, era_cnt LOCALE_ARG)) != NULL) | 65 | decided, era_cnt)) != NULL) |
66 | 66 | ||
67 | 67 | ||
68 | static char const weekday_name[][10] = | 68 | static char const weekday_name[][10] = |
@@ -99,11 +99,6 @@ static const unsigned short int __mon_yday[2][13] = | |||
99 | { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } | 99 | { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } |
100 | }; | 100 | }; |
101 | 101 | ||
102 | # define LOCALE_PARAM | ||
103 | # define LOCALE_ARG | ||
104 | # define LOCALE_PARAM_DECL | ||
105 | # define LOCALE_PARAM_PROTO | ||
106 | # define HELPER_LOCALE_ARG | ||
107 | # define ISSPACE(Ch) isspace (Ch) | 102 | # define ISSPACE(Ch) isspace (Ch) |
108 | 103 | ||
109 | 104 | ||
@@ -144,13 +139,8 @@ day_of_the_year (struct tm *tm) | |||
144 | 139 | ||
145 | 140 | ||
146 | static char * | 141 | static char * |
147 | __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) | 142 | __strptime_internal (const char *rp, const char *fmt, struct tm *tm, |
148 | const char *rp; | 143 | enum ptime_locale_status *decided, int era_cnt) |
149 | const char *fmt; | ||
150 | struct tm *tm; | ||
151 | enum ptime_locale_status *decided; | ||
152 | int era_cnt; | ||
153 | LOCALE_PARAM_DECL | ||
154 | { | 144 | { |
155 | 145 | ||
156 | int cnt; | 146 | int cnt; |
@@ -633,15 +623,11 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) | |||
633 | 623 | ||
634 | 624 | ||
635 | char * | 625 | char * |
636 | strptime (buf, format, tm LOCALE_PARAM) | 626 | strptime (const char *buf, const char *format, struct tm *tm) |
637 | const char *buf; | ||
638 | const char *format; | ||
639 | struct tm *tm; | ||
640 | LOCALE_PARAM_DECL | ||
641 | { | 627 | { |
642 | enum ptime_locale_status decided; | 628 | enum ptime_locale_status decided; |
643 | 629 | ||
644 | decided = raw; | 630 | decided = raw; |
645 | return __strptime_internal (buf, format, tm, &decided, -1 LOCALE_ARG); | 631 | return __strptime_internal (buf, format, tm, &decided, -1); |
646 | } | 632 | } |
647 | 633 | ||