diff options
author | Bruno Haible <bruno@clisp.org> | 2005-10-20 17:47:15 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:12:55 +0200 |
commit | 7c9eae8ca34a72d25e89d9ba3c1957541f3eabde (patch) | |
tree | 7da99e3ccc3678353254a6c3f36a243ff4bab652 | |
parent | 6ff3a5b2d2f4c79d92d02e6010e1c7df3a22fa07 (diff) | |
download | external_gettext-7c9eae8ca34a72d25e89d9ba3c1957541f3eabde.zip external_gettext-7c9eae8ca34a72d25e89d9ba3c1957541f3eabde.tar.gz external_gettext-7c9eae8ca34a72d25e89d9ba3c1957541f3eabde.tar.bz2 |
Simplify code.
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/explodename.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 99a7998..c712708 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,6 +1,11 @@ 2005-10-09 Bruno Haible <bruno@clisp.org> 2002-07-24 Ulrich Drepper <drepper@redhat.com> + * explodename.c (_nl_explode_name): Simplify. + +2005-10-09 Bruno Haible <bruno@clisp.org> +2002-07-24 Ulrich Drepper <drepper@redhat.com> + * explodename.c: Recognize the syntax language[_territory][.codeset][@modifier] instead of only diff --git a/gettext-runtime/intl/explodename.c b/gettext-runtime/intl/explodename.c index 04f82bd..8d3e146 100644 --- a/gettext-runtime/intl/explodename.c +++ b/gettext-runtime/intl/explodename.c @@ -119,7 +119,8 @@ _nl_explode_name (char *name, cp[0] = '\0'; *modifier = ++cp; - mask |= XPG_MODIFIER; + if (cp[0] != '\0') + mask |= XPG_MODIFIER; } if (*territory != NULL && (*territory)[0] == '\0') @@ -128,8 +129,5 @@ _nl_explode_name (char *name, if (*codeset != NULL && (*codeset)[0] == '\0') mask &= ~XPG_CODESET; - if (*modifier != NULL && (*modifier)[0] == '\0') - mask &= ~XPG_MODIFIER; - return mask; } |