From 3bd6766484c058684b631549007d42750fbd6b0b Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Sat, 7 May 2005 13:40:19 +0000 Subject: [PATCH] - strftime() now ignores the E and O modifiers. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14931 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/changes | 1 + library/time_strftime.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/library/changes b/library/changes index f6b02f5..00bded9 100644 --- a/library/changes +++ b/library/changes @@ -26,6 +26,7 @@ - Added strtof(), llabs(), lldiv(), vsscanf() and vscanf() for C99. - strftime() now supports %C, %n, %r, %R, %t, %T, %u, %V, and %z for C99. + And it ignores the E and O modifiers. c.lib 1.191 (9.4.2005) diff --git a/library/time_strftime.c b/library/time_strftime.c index 5705ad5..140ebd7 100644 --- a/library/time_strftime.c +++ b/library/time_strftime.c @@ -1,5 +1,5 @@ /* - * $Id: time_strftime.c,v 1.10 2005-05-07 13:21:49 obarthel Exp $ + * $Id: time_strftime.c,v 1.11 2005-05-07 13:40:19 obarthel Exp $ * * :ts=4 * @@ -125,6 +125,11 @@ format_date(const char *format,const struct tm *tm,struct Hook * hook) /* OK, what kind of format is expected? */ c = (*format++); + /* For C99, check if the 'E' or 'O' modifiers are present. If so, + skip them for now. */ + if(c == 'E' || c == 'O') + c = (*format++); + /* We stop if the string ends here. Hm... should this count as an error? */ if(c == '\0') break;