Lines Matching refs:locale

34 #include <locale.h>
105 /* The array Default holds the systems notion of default locale. It is normally
107 * default locale spanning all categories
149 setlocale(int category, char *locale)
173 if (locale == NULL) {
191 * of all the locale values, in order,
214 if (strchr(locale, '/') != NULL) {
218 if (strlen(locale) > sizeof buf - 1)
220 (void) strcpy(buf, locale);
275 if ((ret = getlocale_ctype(locale , my_ctype,
287 getlocale_numeric(locale, &my_lconv,
300 if ((ret = openlocale("LC_TIME", LC_TIME, locale,
310 getlocale_monetary(locale, &my_lconv,
323 if ((ret = openlocale("LANGINFO", LANGINFO, locale,
336 if ((ret = openlocale("LC_COLLATE", LC_COLLATE, locale,
346 if ((ret = openlocale("LC_MESSAGES", LC_MESSAGES, locale,
357 getlocale_ctype(char *locale, char *ctypep, char *newlocale)
361 if ((fd = openlocale("LC_CTYPE", LC_CTYPE, locale, newlocale)) > 0) {
374 getlocale_numeric(char *locale, struct lconv *lconvp, char *newlocale)
381 if ((fd = openlocale("LC_NUMERIC", LC_NUMERIC, locale, newlocale)) < 0)
424 getlocale_monetary(char *locale, struct lconv *lconvp, char *newlocale)
431 if ((fd = openlocale("LC_MONETARY", LC_MONETARY, locale, newlocale)) < 0)
596 * Open a locale file. First, check the value of "locale"; if it's a null
600 * has no meaning then assume we are running in the C locale. It is expected
601 * That LC_default is set across the whole system. If the resulting locale is
603 * per-machine locale directory for the file in question; if it's not found
604 * there, try looking in the shared locale directory.
607 * Copy the name of the locale used into "newlocale".
609 * Exit with -1 if an error occured (invalid locale).
615 openlocale(char *category, int cat_id, char *locale, char *newlocale)
622 if (*locale == '\0') {
623 locale = getenv(category);
624 if (locale == NULL || *locale == '\0') {
625 locale = getenv("LANG");
626 if (locale == NULL || *locale == '\0') {
634 locale = Default;
638 if (strcmp(locale,_locales[cat_id-1]) == 0) {
639 (void) strcpy(newlocale, locale);
642 if (strlen(locale) > MAXLOCALENAME)
648 (void) strcat(pathname, locale);
653 (void) strcat(pathname, locale);
657 (void) strcpy(newlocale, locale);