53 : _C_body (_RW::__rw_locale::_C_manage (0, 0))
61 : _C_body (
rhs._C_body)
73 if (_C_body->_C_is_managed (_RW::__rw_cat_none)) {
75 _RW::__rw_locale::_C_manage (_C_body, _C_body->_C_name);
88locale::_C_get_std_facet (facet::_C_facet_type type,
89 facet::_C_ctor_t *ctor)
const
93 const size_t inx = size_t (type / 2);
102 const char *nm = _C_body->_C_name;
107#ifndef _RWSTD_LOCALE_ROOT_ENVVAR
108# define _RWSTD_LOCALE_ROOT_ENVVAR "RWSTD_LOCALE_ROOT"
110 _RW::__rw_chararray pathname;
121 pathname.append (root);
125 pathname.append (nm);
126 nm = pathname.data ();
130 if (-1 != stat (nm, &
sb))
134 nm = _C_body->_C_name;
136 _RW::__rw_chararray locname;
141 const int facet_cat = _RW::__rw_get_cat (
int (
inx + 1));
145 for (;
i !=
sizeof _RW::__rw_cats /
sizeof *_RW::__rw_cats; ++
i) {
146 if (_RW::__rw_cats [
i].cat == facet_cat) {
148 const size_t nmlen = size_t (next - nm);
150 locname.assign (nm, nmlen);
151 locname.append (
"", 1);
157 next = nm + ::strlen (nm);
160 nm = locname.data ();
165 const bool byname = !_RW::__rw_is_C (nm);
167 type = facet::_C_facet_type (type + byname);
169 if ( type == 1 + _RW::__rw_facet::_C_money_get
170 || type == 1 + _RW::__rw_facet::_C_money_put
171 || type == 1 + _RW::__rw_facet::_C_num_get
172 || type == 1 + _RW::__rw_facet::_C_num_put
173 || type == 1 + _RW::__rw_facet::_C_wmoney_get
174 || type == 1 + _RW::__rw_facet::_C_wmoney_put
175 || type == 1 + _RW::__rw_facet::_C_wnum_get
176 || type == 1 + _RW::__rw_facet::_C_wnum_put) {
177 type = facet::_C_facet_type (type - 1);
182 typedef _RW::__rw_facet::_C_facet_type FacetType;
184 facet*
const pfacet =
185 _RW::__rw_facet::_C_manage (0, FacetType (type), nm, ctor);
189#ifndef _RWSTD_REENTRANT
198 _C_body->_C_std_facets [
inx] = pfacet;
#define _RWSTD_ATOMIC_PREINCREMENT(x, ignore)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_ATOMIC_PREDECREMENT(x, ignore)
#define _RWSTD_ASSERT(ignore)
#define _RWSTD_LOCALE_ROOT_ENVVAR