[RFC] First draft of the POSIX locale::name patch
Paolo Carlini
pcarlini@unitus.it
Wed Oct 2 09:46:00 GMT 2002
Hi again,
the below fixes a couple of bugs of the previous one
in the treatment of LC_ALL. I'm also trying again
to post the Changelog properly formatted...
Ciao, Paolo.
////////////
* include/bits/localefwd.h (class locale): Add static
member _S_num_c_categories, encoding the number of
additional C only categories.
(class locale::_Impl): Add _M_c_cats.
(class locale::_Impl::_M_names): Change to array of chars.
(class locale::_Impl::_M_check_same_name):
Use _S_num_c_categories, tweak.
(locale::locale(const locale&, _Facet*)): Ditto.
* src/locale.cc (locale::locale(const char* )):
Rewrite to deal with the environment in a POSIX-compliant
way while being thread safe.
(locale::name()): Update to output POSIX environment strings.
* src/localename.cc
(locale::_Impl::_Impl(const _Impl&, size_t): Use
_S_num_c_categories, tweak.
(locale::_Impl::_Impl(facet**, size_t, bool)): Ditto.
(locale::_Impl::_Impl(const char*, size_t)): Name
each category individually, both C++ ones and C only.
(locale::_Impl::_M_replace_categories): Use strcpy.
* testsuite/22_locale/ctor_copy_dtor.cc: Add test04.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_pnames2
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20021002/aaa400d7/attachment.ksh>
More information about the Libstdc++
mailing list