L_ctype_t* _Locale_ctype_create(const char * name, struct _Locale_name_hint* hint) { const union locale_data_value *ctypes; L_ctype_t* lctype; lctype = (L_ctype_t*)malloc(sizeof(L_ctype_t)); lctype->gcc_data = _Category_create(name, LC_CTYPE); ctypes = lctype->gcc_data->values; lctype->__class = (_Locale_mask_t *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_CLASS)] .string) + 128; #ifdef _STLP_GLIBC_LOCALE_2 lctype->__tolower = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER)].string) + 128; lctype->__toupper = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER)].string) + 128; #else # if BYTE_ORDER == BIG_ENDIAN lctype->__tolower = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER_EB)].string) + 128; lctype->__toupper = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER_EB)].string) + 128; # elif BYTE_ORDER == LITTLE_ENDIAN lctype->__tolower = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER_EL)].string) + 128; lctype->__toupper = (const int *) (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER_EL)].string) + 128; # else # error bizarre byte order # endif #endif /* _STLP_GLIBC_LOCALE_2 */ return lctype; }
L_collate_t* _Locale_collate_create(const char * name, struct _Locale_name_hint* hint) { L_collate_t* lcollate = (L_collate_t*)malloc(sizeof(L_collate_t)); lcollate->gcc_data = _Category_create(name, LC_COLLATE); return lcollate; }
L_messages_t* _Locale_messages_create(const char * name, struct _Locale_name_hint* hint) { L_messages_t* lmsg = (L_messages_t*)malloc(sizeof(L_messages_t)); lmsg->gcc_data = _Category_create(name, LC_MESSAGES); return lmsg; }
L_time_t* _Locale_time_create(const char * name, struct _Locale_name_hint* hint) { L_time_t* ltime = (L_time_t*)malloc(sizeof(L_time_t)); ltime->gcc_data = _Category_create(name, LC_TIME); return ltime; }
L_monetary_t* _Locale_monetary_create(const char* name, struct _Locale_name_hint* hint) { L_monetary_t* lmon = (L_monetary_t*)malloc(sizeof(L_monetary_t)); lmon->gcc_data = _Category_create(name, LC_MONETARY); return lmon; }
L_numeric_t* _Locale_numeric_create(const char * name, struct _Locale_name_hint* hint) { L_numeric_t* lnum = (L_numeric_t*)malloc(sizeof(L_numeric_t)); lnum->gcc_data = _Category_create(name, LC_NUMERIC); return lnum; }
void* _Locale_numeric_create(const char * name) { L_numeric_t* lnum = (L_numeric_t*)malloc(sizeof(L_numeric_t)); lnum->gcc_data = _Category_create(name, LC_NUMERIC); return (void*)lnum; }