diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-03-14 20:48:50 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-03-14 20:48:50 +0000 |
commit | ba737b94fd1c6a4292f942ab448e3770a0b8ff4c (patch) | |
tree | 1fe14a7a3422f6e9ff3c42e305f06b7acbfbbbe8 /time | |
parent | 1897bc3f9385320236b7f4d3b8439099e52747c8 (diff) | |
download | glibc-ba737b94fd1c6a4292f942ab448e3770a0b8ff4c.tar.gz |
Update.
2002-03-14 Jakub Jelinek <jakub@redhat.com>
* locale/broken_cur_max.c (__ctype_get_mb_cur_max): Use nl_langinfo.
* locale/Versions (_nl_current_LC_COLLATE, _nl_current_LC_CTYPE):
Remove.
2002-03-14 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/mp_clz_tab.c: New file.
* sysdeps/i386/mp_clz_tab.c: New file.
* sysdeps/hppa/mp_clz_tab.c: New file.
* sysdeps/powerpc/mp_clz_tab.c: New file.
* stdlib/Makefile (aux): Revert last patch.
* math/Makefile (gmp-objs): Likewise.
2002-03-13 Paul Eggert <eggert@twinsun.com>
* time/strftime.c: Comment fixes for references to obsolescent
standards, In most cases the simplest fix is to remove the
confusing comments. Cross-referencing all the standards properly
is a bit of a pain, and it should be enough to put that info in
the documentation as I did in my recent time.texi patch.
2002-03-13 Paul Eggert <eggert@twinsun.com>
* manual/time.texi (Formatting Calendar Time):
ISO C99 also specifies the E and O modifiers.
%P is a GNU extension, and is not in ISO C99.
Mention that %r is equivalent to %I:%M:%S %p in the POSIX locale.
%T is also in ISO C99.
The RFC 822 example is not valid in arbitrary locales.
Reword the POSIX.2 wording slightly, to make it a bit clearer
that POSIX.2 formats are also supported by later POSIX versions.
If a format was introduced in ISO C99 it is also required by
POSIX.1-2001.
Diffstat (limited to 'time')
-rw-r--r-- | time/strftime.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/time/strftime.c b/time/strftime.c index bcbe4a8a5b..bae952aadb 100644 --- a/time/strftime.c +++ b/time/strftime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -535,9 +535,8 @@ my_strftime (s, maxsize, format, tp ut_argument) } else { - /* POSIX.1 8.1.1 requires that whenever strftime() is called, the - time zone names contained in the external variable `tzname' shall - be set as if the tzset() function had been called. */ + /* POSIX.1 requires that local time zone information is used as + though strftime called tzset. */ # if HAVE_TZSET tzset (); # endif @@ -756,7 +755,7 @@ my_strftime (s, maxsize, format, tp ut_argument) #endif case L_('b'): - case L_('h'): /* POSIX.2 extension. */ + case L_('h'): if (change_case) { to_uppcase = 1; @@ -851,7 +850,7 @@ my_strftime (s, maxsize, format, tp ut_argument) break; #endif - case L_('C'): /* POSIX.2 extension. */ + case L_('C'): if (modifier == L_('O')) goto bad_format; if (modifier == L_('E')) @@ -898,7 +897,7 @@ my_strftime (s, maxsize, format, tp ut_argument) /* Fall through. */ # endif #endif - case L_('D'): /* POSIX.2 extension. */ + case L_('D'): if (modifier != 0) goto bad_format; subfmt = L_("%m/%d/%y"); @@ -910,7 +909,7 @@ my_strftime (s, maxsize, format, tp ut_argument) DO_NUMBER (2, tp->tm_mday); - case L_('e'): /* POSIX.2 extension. */ + case L_('e'): if (modifier == L_('E')) goto bad_format; @@ -1042,7 +1041,7 @@ my_strftime (s, maxsize, format, tp ut_argument) DO_NUMBER (2, tp->tm_mon + 1); - case L_('n'): /* POSIX.2 extension. */ + case L_('n'): add (1, *p = L_('\n')); break; @@ -1066,11 +1065,11 @@ my_strftime (s, maxsize, format, tp ut_argument) goto underlying_strftime; #endif - case L_('R'): /* ISO C99 extension. */ + case L_('R'): subfmt = L_("%H:%M"); goto subformat; - case L_('r'): /* POSIX.2 extension. */ + case L_('r'): #ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) @@ -1141,15 +1140,15 @@ my_strftime (s, maxsize, format, tp ut_argument) /* Fall through. */ # endif #endif - case L_('T'): /* POSIX.2 extension. */ + case L_('T'): subfmt = L_("%H:%M:%S"); goto subformat; - case L_('t'): /* POSIX.2 extension. */ + case L_('t'): add (1, *p = L_('\t')); break; - case L_('u'): /* POSIX.2 extension. */ + case L_('u'): DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); case L_('U'): @@ -1159,8 +1158,8 @@ my_strftime (s, maxsize, format, tp ut_argument) DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); case L_('V'): - case L_('g'): /* ISO C99 extension. */ - case L_('G'): /* ISO C99 extension. */ + case L_('g'): + case L_('G'): if (modifier == L_('E')) goto bad_format; { @@ -1268,7 +1267,7 @@ my_strftime (s, maxsize, format, tp ut_argument) zone = tzname[tp->tm_isdst]; #endif if (! zone) - zone = ""; /* POSIX.2 requires the empty string here. */ + zone = ""; #ifdef COMPILE_WIDE { @@ -1284,7 +1283,7 @@ my_strftime (s, maxsize, format, tp ut_argument) #endif break; - case L_('z'): /* ISO C99 extension. */ + case L_('z'): if (tp->tm_isdst < 0) break; |