mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
Hardcode c_fmt in a different way since used in nl_langinfo now
This commit is contained in:
parent
6c9eb5f3a6
commit
740972dc72
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72183
@ -123,8 +123,8 @@ _fmt(format, t, pt, ptlim)
|
||||
"%02d", pt, ptlim);
|
||||
continue;
|
||||
case 'c':
|
||||
/* NOTE: c_fmt is intentionally ignored */
|
||||
pt = _fmt("%a %Ef %T %Y", t, pt, ptlim);
|
||||
/* NOTE: c_fmt is hardcoded in timelocal.c */
|
||||
pt = _fmt(tptr->c_fmt, t, pt, ptlim);
|
||||
continue;
|
||||
case 'D':
|
||||
pt = _fmt("%m/%d/%y", t, pt, ptlim);
|
||||
|
@ -141,8 +141,8 @@ _strptime(const char *buf, const char *fmt, struct tm *tm)
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
/* NOTE: c_fmt is intentionally ignored */
|
||||
buf = _strptime(buf, "%a %Ef %T %Y", tm);
|
||||
/* NOTE: c_fmt is hardcoded in timelocal.c */
|
||||
buf = _strptime(buf, tptr->c_fmt, tm);
|
||||
if (buf == 0)
|
||||
return 0;
|
||||
break;
|
||||
|
@ -82,9 +82,8 @@ static const struct lc_time_T _C_time_locale = {
|
||||
|
||||
/*
|
||||
** c_fmt (ctime-compatible)
|
||||
** Not used, just compatibility placeholder.
|
||||
*/
|
||||
NULL,
|
||||
"%a %Ef %T %Y",
|
||||
|
||||
/* am */
|
||||
"AM",
|
||||
@ -246,6 +245,8 @@ set_from_buf(const char *p, int num_lines)
|
||||
for (ap = (const char **) &_time_localebuf, i = 0;
|
||||
i < num_lines; ++ap, ++i)
|
||||
*ap = p += strlen(p) + 1;
|
||||
/* XXX: always overwrite for ctime format parsing compatibility */
|
||||
_time_localebuf.c_fmt = _C_time_locale.c_fmt;
|
||||
if (num_lines >= LCTIME_SIZE_2)
|
||||
return;
|
||||
for (i = 0; i < 12; i++)
|
||||
|
@ -40,7 +40,7 @@ struct lc_time_T {
|
||||
const char * weekday[7];
|
||||
const char * X_fmt;
|
||||
const char * x_fmt;
|
||||
const char * c_fmt; /* not used, just compatibility placeholder */
|
||||
const char * c_fmt;
|
||||
const char * am;
|
||||
const char * pm;
|
||||
const char * date_fmt;
|
||||
|
Loading…
Reference in New Issue
Block a user