This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patchlet/RFC] Finish up _M_extract_via_format
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ at gcc dot gnu dot org
- Cc: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 24 Oct 2003 11:18:07 +0200
- Subject: [Patchlet/RFC] Finish up _M_extract_via_format
Hi,
I'm finally implementing time_get::date_order (libstdc++/9635)
and noticed that _M_extract_via_format needs some work.
This patchlet, which I'm going to commit, fixes a minor issue,
another, more serious, is filed as libstdc++/12750: the 'e'
formatting code is not dealt with and unfortunately doesn't
appear to be really equivalent to 'd' (*)
It will take me some time to preliminarily fix that since
_M_extract_num it's not able to deal with spaces.
Suggestions well accepted!
Paolo.
(*) This is not an "academic" topic, since, for "is_IS" ;) it
actually happens that D_FMT is '%a %e.%b %Y'
/////////
2003-10-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc
(time_get<>::_M_extract_via_format): Deal with case 'C' too,
equivalent to 'y'.
diff -urN libstdc++-v3-orig/include/bits/locale_facets.tcc libstdc++-v3/include/bits/locale_facets.tcc
--- libstdc++-v3-orig/include/bits/locale_facets.tcc 2003-10-23 13:42:56.000000000 +0200
+++ libstdc++-v3/include/bits/locale_facets.tcc 2003-10-24 10:39:57.000000000 +0200
@@ -1691,6 +1691,7 @@
__times[0]);
break;
case 'y':
+ case 'C': // C99
// Two digit year. [tm_year]
_M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
__ctype, __err);