Lines 124-129
extern const struct __locale_data _nl_C_LC_TIME attribute_hidden;
Link Here
|
124 |
(&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string) |
124 |
(&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string) |
125 |
# define month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (MON_1)].string) |
125 |
# define month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (MON_1)].string) |
126 |
# define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string) |
126 |
# define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string) |
|
|
127 |
# define alt_month_name \ |
128 |
(&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ALTMON_1)].string) |
127 |
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string) |
129 |
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string) |
128 |
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string) |
130 |
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string) |
129 |
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string) |
131 |
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string) |
Lines 403-408
__strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
Link Here
|
403 |
if (s.decided !=raw) |
405 |
if (s.decided !=raw) |
404 |
{ |
406 |
{ |
405 |
trp = rp; |
407 |
trp = rp; |
|
|
408 |
#ifdef _LIBC |
409 |
/* First check if the alt month is provided. */ |
410 |
if (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt) |
411 |
&& * (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt)) |
412 |
&& match_string (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt), trp) |
413 |
&& trp > rp_longest) |
414 |
{ |
415 |
rp_longest = trp; |
416 |
cnt_longest = cnt; |
417 |
if (s.decided == not |
418 |
&& strcmp (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt), |
419 |
alt_month_name[cnt])) |
420 |
decided_longest = loc; |
421 |
} |
422 |
trp = rp; |
423 |
#endif |
406 |
if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp) |
424 |
if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp) |
407 |
&& trp > rp_longest) |
425 |
&& trp > rp_longest) |
408 |
{ |
426 |
{ |
Lines 429-434
__strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
Link Here
|
429 |
if (s.decided != loc |
447 |
if (s.decided != loc |
430 |
&& (((trp = rp, match_string (month_name[cnt], trp)) |
448 |
&& (((trp = rp, match_string (month_name[cnt], trp)) |
431 |
&& trp > rp_longest) |
449 |
&& trp > rp_longest) |
|
|
450 |
#ifdef _LIBC |
451 |
|| ((trp = rp, alt_month_name[cnt] |
452 |
&& alt_month_name[cnt][0] |
453 |
&& match_string (alt_month_name[cnt], trp)) |
454 |
&& trp > rp_longest) |
455 |
#endif |
432 |
|| ((trp = rp, match_string (ab_month_name[cnt], trp)) |
456 |
|| ((trp = rp, match_string (ab_month_name[cnt], trp)) |
433 |
&& trp > rp_longest))) |
457 |
&& trp > rp_longest))) |
434 |
{ |
458 |
{ |
Lines 1016-1021
__strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
Link Here
|
1016 |
case 'O': |
1040 |
case 'O': |
1017 |
switch (*fmt++) |
1041 |
switch (*fmt++) |
1018 |
{ |
1042 |
{ |
|
|
1043 |
case 'B': |
1044 |
/* Undo the increment and continue. */ |
1045 |
fmt--; |
1046 |
break; |
1019 |
case 'd': |
1047 |
case 'd': |
1020 |
case 'e': |
1048 |
case 'e': |
1021 |
/* Match day of month using alternate numeric symbols. */ |
1049 |
/* Match day of month using alternate numeric symbols. */ |
1022 |
- |
|
|