From 103cbe2418eb707a44fd4e2ebf6292f7993a258c Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 15 Mar 2002 16:20:00 +0000 Subject: Add strptime, and commonize some locale strings -Erik --- libc/misc/time/strftime.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'libc/misc/time/strftime.c') diff --git a/libc/misc/time/strftime.c b/libc/misc/time/strftime.c index 4dd3d7dd0..e1f0a4c1f 100644 --- a/libc/misc/time/strftime.c +++ b/libc/misc/time/strftime.c @@ -85,16 +85,8 @@ static unsigned int week(const struct tm *const tp , int starting_day , int max_ } #ifndef _NL_CURRENT -static char const weekday_name[][10] = - { - "Sunday", "Monday", "Tuesday", "Wednesday", - "Thursday", "Friday", "Saturday" - }; -static char const month_name[][10] = - { - "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - }; +extern char const __weekday_name[][10]; +extern char const __month_name[][10]; #endif /* Write information from TP into S according to the format @@ -117,8 +109,8 @@ size_t strftime( char *s , size_t maxsize , const char *format , register const size_t am_len = strlen(a_month); size_t ap_len = strlen (ampm); #else - const char *const f_wkday = weekday_name[tp->tm_wday]; - const char *const f_month = month_name[tp->tm_mon]; + const char *const f_wkday = __weekday_name[tp->tm_wday]; + const char *const f_month = __month_name[tp->tm_mon]; const char *const a_wkday = f_wkday; const char *const a_month = f_month; const char *const ampm = "AMPM" + 2 * (hour12 > 11); -- cgit v1.2.3