diff options
author | Bruno Haible <bruno@clisp.org> | 2009-12-12 12:22:07 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-12-12 16:13:42 +0100 |
commit | c4031b5252bc3c539b5c041c2e30fd7fb88382d9 (patch) | |
tree | aa1e352796505a4b7def4083ace1dedb94e96c98 /gettext-tools/tests/setlocale.c | |
parent | 24d34031721a97d3e7b498ccbf8b5779d2acc93e (diff) | |
download | external_gettext-c4031b5252bc3c539b5c041c2e30fd7fb88382d9.zip external_gettext-c4031b5252bc3c539b5c041c2e30fd7fb88382d9.tar.gz external_gettext-c4031b5252bc3c539b5c041c2e30fd7fb88382d9.tar.bz2 |
Untabify.
Diffstat (limited to 'gettext-tools/tests/setlocale.c')
-rw-r--r-- | gettext-tools/tests/setlocale.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/gettext-tools/tests/setlocale.c b/gettext-tools/tests/setlocale.c index 95ae0b2..7e4fdd8 100644 --- a/gettext-tools/tests/setlocale.c +++ b/gettext-tools/tests/setlocale.c @@ -106,58 +106,58 @@ setlocale (int category, SETLOCALE_CONST char *locale) strcpy (copy, locale); if (category == LC_ALL) - { - while ((facetp = facets) != NULL) - { - facets = facetp->next; - free (facetp->current_locale); - free (facetp); - } - if (current_locale != C_string) - free (current_locale); - current_locale = copy; - } + { + while ((facetp = facets) != NULL) + { + facets = facetp->next; + free (facetp->current_locale); + free (facetp); + } + if (current_locale != C_string) + free (current_locale); + current_locale = copy; + } else - { - for (facetp = facets; facetp != NULL; facetp = facetp->next) - if (category == facetp->category) - { - free (facetp->current_locale); - facetp->current_locale = copy; - break; - } - if (facetp == NULL) - { - facetp = (struct list *) malloc (sizeof (struct list)); - facetp->category = category; - facetp->current_locale = copy; - facetp->next = facets; - facets = facetp; - } - } + { + for (facetp = facets; facetp != NULL; facetp = facetp->next) + if (category == facetp->category) + { + free (facetp->current_locale); + facetp->current_locale = copy; + break; + } + if (facetp == NULL) + { + facetp = (struct list *) malloc (sizeof (struct list)); + facetp->category = category; + facetp->current_locale = copy; + facetp->next = facets; + facets = facetp; + } + } } retval = current_locale; for (facetp = facets; facetp != NULL; facetp = facetp->next) if (category == facetp->category) { - retval = facetp->current_locale; - break; + retval = facetp->current_locale; + break; } if (retval[0] == '\0') { retval = getenv ("LC_ALL"); if (retval == NULL || retval[0] == '\0') - { - retval = getenv (category_to_name (category)); - if (retval == NULL || retval[0] == '\0') - { - retval = getenv ("LANG"); - if (retval == NULL || retval[0] == '\0') - retval = "C"; - } - } + { + retval = getenv (category_to_name (category)); + if (retval == NULL || retval[0] == '\0') + { + retval = getenv ("LANG"); + if (retval == NULL || retval[0] == '\0') + retval = "C"; + } + } } return retval; } |