Lines Matching refs:new
200 * Allocates a new, uninitialised, locale.
205 locale_t new = calloc(sizeof(struct _xlocale), 1);
207 new->header.destructor = destruct_locale;
208 new->monetary_locale_changed = 1;
209 new->numeric_locale_changed = 1;
210 return (new);
213 copyflags(locale_t new, locale_t old)
215 new->using_monetary_locale = old->using_monetary_locale;
216 new->using_numeric_locale = old->using_numeric_locale;
217 new->using_time_locale = old->using_time_locale;
218 new->using_messages_locale = old->using_messages_locale;
221 static int dupcomponent(int type, locale_t base, locale_t new)
228 new->components[type] = constructors[type](src->locale, new);
229 if (new->components[type]) {
230 strncpy(new->components[type]->locale, src->locale,
234 new->components[type] = xlocale_retain(base->components[type]);
242 return (0 != new->components[type]);
259 locale_t new = alloc_locale();
260 if (NULL == new) {
265 copyflags(new, base);
278 new->components[type] =
279 constructors[type](realLocale, new);
280 if (new->components[type]) {
281 strncpy(new->components[type]->locale,
288 if (!dupcomponent(type, base, new)) {
296 xlocale_release(new);
297 new = NULL;
300 return (new);
305 locale_t new = alloc_locale();
310 if (NULL == new) {
315 copyflags(new, base);
318 dupcomponent(type, base, new);
321 return (new);