diff options
author | Bruno Haible <bruno@clisp.org> | 2001-03-11 15:56:56 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-03-11 15:56:56 +0000 |
commit | f89e8f89ae77957d018fb0029e072a0a5d33e7f5 (patch) | |
tree | 0583b83cf2c55c0bcd136567af44afd1c186cfd6 /intl/localcharset.c | |
parent | a82573ba8b5677ebf82c10473f90f78c4afee62b (diff) | |
download | external_gettext-f89e8f89ae77957d018fb0029e072a0a5d33e7f5.zip external_gettext-f89e8f89ae77957d018fb0029e072a0a5d33e7f5.tar.gz external_gettext-f89e8f89ae77957d018fb0029e072a0a5d33e7f5.tar.bz2 |
Re-add support for BeOS, broken by DJGPP changes.
Diffstat (limited to 'intl/localcharset.c')
-rw-r--r-- | intl/localcharset.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/intl/localcharset.c b/intl/localcharset.c index 201483c..22e09e4 100644 --- a/intl/localcharset.c +++ b/intl/localcharset.c @@ -255,18 +255,17 @@ locale_charset () if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; - else if (codeset[0] != '\0') - { - /* Resolve alias. */ - for (aliases = get_charset_aliases (); - *aliases != '\0'; - aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) - if (!strcmp (codeset, aliases)) - { - codeset = aliases + strlen (aliases) + 1; - break; - } - } + + /* Resolve alias. */ + for (aliases = get_charset_aliases (); + *aliases != '\0'; + aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) + if (strcmp (codeset, aliases) == 0 + || (aliases[0] == '*' && aliases[1] == '\0')) + { + codeset = aliases + strlen (aliases) + 1; + break; + } return codeset; } |