- {
- int category = categories[i].cat;
- int category_mask = categories[i].mask;
- const char *name = nl_langinfo (_NL_LOCALE_NAME (category));
- if (name[0] == '\0')
- /* Fallback code for glibc < 2.4, which did not implement
- nl_langinfo (_NL_LOCALE_NAME (category)). */
- name = setlocale (category, NULL);
- if (strcmp (name, base_name) != 0)
- {
- locale_t copy = newlocale (category_mask, name, base_copy);
- if (copy == NULL)
- {
- int saved_errno = errno;
- freelocale (base_copy);
- errno = saved_errno;
- return NULL;
- }
- /* No need to call freelocale (base_copy) if copy != base_copy;
- the newlocale function already takes care of doing it. */
- base_copy = copy;
- }
- }
+ {
+ int category = categories[i].cat;
+ int category_mask = categories[i].mask;
+ const char *name = setlocale (category, NULL);
+ if (strcmp (name, base_name) != 0)
+ {
+ locale_t copy = newlocale (category_mask, name, base_copy);
+ if (copy == NULL)
+ {
+ int saved_errno = errno;
+ freelocale (base_copy);
+ errno = saved_errno;
+ return NULL;
+ }
+ /* No need to call freelocale (base_copy) if copy != base_copy;
+ the newlocale function already takes care of doing it. */
+ base_copy = copy;
+ }
+ }