Lines Matching +full:- +full:i
2 Copyright (c) 1996 - 2002 FreeBSD Project
32 <<newlocale>>---create or modify a locale object
57 bitwise-inclusive OR of the symbolic constants LC_CTYPE_MASK,
59 LC_MESSAGES_MASK, or any of the other implementation-defined LC_*_MASK
72 "POSIX" Specifies the minimal environment for C-language translation
77 "" Specifies an implementation-defined native environment. This
102 <<newlocale>> is POSIX-1.2008.
135 int i; in newlocale() local
140 for (i = 1; i < _LC_LAST; ++i) in newlocale()
142 if (((1 << i) & category_mask) != 0) in newlocale()
146 const char *cat = (locale[0] == '\0') ? __get_locale_env (i) in newlocale()
153 strcpy (new_categories[i], cat); in newlocale()
156 strcpy (new_categories[i], base ? base->categories[i] : "C"); in newlocale()
159 for (i = 1; i < _LC_LAST; ++i) in newlocale()
163 if (base && (((1 << i) & category_mask) == 0 in newlocale()
164 || !strcmp (base->categories[i], new_categories[i]))) in newlocale()
166 strcpy (tmp_locale.categories[i], new_categories[i]); in newlocale()
167 if (i == LC_CTYPE) in newlocale()
169 tmp_locale.wctomb = base->wctomb; in newlocale()
170 tmp_locale.mbtowc = base->mbtowc; in newlocale()
171 tmp_locale.cjk_lang = base->cjk_lang; in newlocale()
172 tmp_locale.ctype_ptr = base->ctype_ptr; in newlocale()
178 tmp_locale.lc_cat[i].ptr = base->lc_cat[i].ptr; in newlocale()
179 tmp_locale.lc_cat[i].buf = (void *) -1; in newlocale()
181 if (i == LC_CTYPE) in newlocale()
182 strcpy (tmp_locale.ctype_codeset, base->ctype_codeset); in newlocale()
183 else if (i == LC_MESSAGES) in newlocale()
184 strcpy (tmp_locale.message_codeset, base->message_codeset); in newlocale()
188 else if (((1 << i) & category_mask) != 0) in newlocale()
191 if (!strcmp (new_categories[i], "C") in newlocale()
192 || !strcmp (new_categories[i], "POSIX")) in newlocale()
195 else if (!__loadlocale (&tmp_locale, i, new_categories[i])) in newlocale()
212 for (i = 1; i < _LC_LAST; ++i) in newlocale()
213 if (tmp_locale.lc_cat[i].buf == (const void *) -1) in newlocale()
215 tmp_locale.lc_cat[i].buf = base->lc_cat[i].buf; in newlocale()
217 base->lc_cat[i].ptr = base->lc_cat[i].buf = NULL; in newlocale()
230 for (i = 1; i < _LC_LAST; ++i) in newlocale()
231 if (((1 << i) & category_mask) != 0 in newlocale()
232 && tmp_locale.lc_cat[i].buf in newlocale()
233 && tmp_locale.lc_cat[i].buf != (const void *) -1) in newlocale()
235 free ((void *) tmp_locale.lc_cat[i].ptr); in newlocale()
236 free (tmp_locale.lc_cat[i].buf); in newlocale()