MLocale *mlocale_monetary, *mlocale_numeric, ;
#endif
-/** Parse locale name NAME and return a newly created MLocale object.
- If the locale is not supported by the system, return NULL. */
+/** Parse locale name NAME and return a newly created MLocale object. */
static MLocale *
make_locale (const char *name)
{
- char *current, *new, *str;
+ char *str;
int len;
MLocale *locale;
char c;
- str = setlocale (LC_CTYPE, NULL);
- len = strlen (str) + 1;
- current = alloca (len);
- memcpy (current, str, len);
-
- if (! (new = setlocale (LC_CTYPE, name)))
- return NULL;
-
-
M17N_OBJECT (locale, NULL, MERROR_LOCALE);
- locale->name = msymbol (new);
+ locale->name = msymbol (name);
msymbol_put (locale->name, M_locale, (void *) locale);
M17N_OBJECT_UNREF (locale);
- len = strlen (new) + 1;
+ len = strlen (name) + 1;
str = alloca (len);
- memcpy (str, new, len);
+ memcpy (str, name, len);
c = '\0';
while (1)
}
else
locale->coding = Mcoding_us_ascii;
-
- setlocale (LC_CTYPE, current);
return locale;
}