// wlocale -- class locale wide member functions #include #include _STD_BEGIN typedef char_traits _Wtraits; typedef istreambuf_iterator _Winiter; typedef ostreambuf_iterator _Woutiter; // facets associated with C categories #define ADDFAC(T, cat, pi, pl) \ if ((_CATMASK(T::_Getcat()) & cat) == 0) \ ; \ else if (pl == 0) \ pi->_Addfac(new T(_Lobj), T::id); \ else \ pi->_Addfac((locale::facet *)&_USE(*pl, T), T::id); typedef ctype _Tw1; typedef num_get _Tw2; typedef num_put _Tw3; typedef numpunct _Tw4; typedef collate _Tw5; typedef messages _Tw6; typedef money_get _Tw7; typedef money_put _Tw9; typedef moneypunct _Tw11; typedef moneypunct _Tw12; typedef time_get _Tw13; typedef time_put _Tw14; typedef codecvt _Twc1; template<> locale::id ctype::id; template<> locale::id codecvt::id; template<> locale::id time_put::id; template<> locale::id num_get::id; template<> locale::id num_put::id; template<> locale::id numpunct::id; template<> locale::id collate::id; template<> locale::id messages::id; template<> locale::id money_get::id; template<> locale::id money_put::id; template<> locale::id moneypunct::id; template<> locale::id moneypunct::id; template<> locale::id time_get::id; void __cdecl locale::_Locimp::_Makewloc(const _Locinfo& _Lobj, locale::category _C, _Locimp *_Pi, const locale *_Pl) { // setup wide part of a new locale _Lockit lk; ADDFAC(_Tw1, _C, _Pi, _Pl); ADDFAC(_Tw2, _C, _Pi, _Pl); ADDFAC(_Tw3, _C, _Pi, _Pl); ADDFAC(_Tw4, _C, _Pi, _Pl); ADDFAC(_Tw5, _C, _Pi, _Pl); ADDFAC(_Tw6, _C, _Pi, _Pl); ADDFAC(_Tw7, _C, _Pi, _Pl); ADDFAC(_Tw9, _C, _Pi, _Pl); ADDFAC(_Tw11, _C, _Pi, _Pl); ADDFAC(_Tw12, _C, _Pi, _Pl); ADDFAC(_Tw13, _C, _Pi, _Pl); ADDFAC(_Tw14, _C, _Pi, _Pl); //... ADDFAC(_Twc1, _C, _Pi, _Pl); } _STD_END /* * Copyright (c) 1995 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. */