From ba306db3cbf0e39fd4f1a2d160aaacca6ff64106 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 21 Mar 2001 14:52:12 +0000 Subject: Get rid of non-standard %E[Ff] formats, userland apps already fixed --- lib/libc/stdtime/strftime.3 | 6 ++---- lib/libc/stdtime/strftime.c | 14 +------------- lib/libc/stdtime/strptime.c | 17 +---------------- 3 files changed, 4 insertions(+), 33 deletions(-) (limited to 'lib') diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3 index 3f50c6b..b4cb993 100644 --- a/lib/libc/stdtime/strftime.3 +++ b/lib/libc/stdtime/strftime.3 @@ -110,10 +110,8 @@ The sequences are supposed to provide alternate representations. .Pp -Additionly %Ef implemented to represent short month name / day -order of the date, %EF to represent long month name / day -order -and %OB to represent alternative months names +Additionly %OB implemented +to represent alternative months names (used standalone, without day mentioned). .It Cm %e is replaced by the day of month as a decimal number (1-31); single diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c index a4cdc86..72f67d4 100644 --- a/lib/libc/stdtime/strftime.c +++ b/lib/libc/stdtime/strftime.c @@ -158,20 +158,8 @@ label: case 'e': pt = _conv(t->tm_mday, "%2d", pt, ptlim); continue; - case 'f': - if (!Ealternative) - break; - pt = _fmt(*(tptr->md_order) == 'd' ? - "%e %b" : "%b %e", - t, pt, ptlim); - continue; case 'F': - if (!Ealternative) - pt = _fmt("%Y-%m-%d", t, pt, ptlim); - else - pt = _fmt(*(tptr->md_order) == 'd' ? - "%e %B" : "%B %e", - t, pt, ptlim); + pt = _fmt("%Y-%m-%d", t, pt, ptlim); continue; case 'H': pt = _conv(t->tm_hour, "%02d", pt, ptlim); diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index b39176d..09f8e18 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -165,22 +165,7 @@ label: goto label; case 'F': - if (!Ealternative) - buf = _strptime(buf, "%Y-%m-%d", tm); - else - buf = _strptime(buf, - *(tptr->md_order) == 'd' ? - "%e %B" : "%B %e", tm); - if (buf == 0) - return 0; - break; - - case 'f': - if (!Ealternative) - break; - buf = _strptime(buf, - *(tptr->md_order) == 'd' ? "%e %b" : "%b %e", - tm); + buf = _strptime(buf, "%Y-%m-%d", tm); if (buf == 0) return 0; break; -- cgit v1.1