diff options
Diffstat (limited to 'intl/explodename.c')
-rw-r--r-- | intl/explodename.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/intl/explodename.c b/intl/explodename.c index 8dad496..8fe928f 100644 --- a/intl/explodename.c +++ b/intl/explodename.c @@ -47,6 +47,17 @@ /* @@ end of prolog @@ */ +char * +_nl_find_language (const char *name) +{ + while (name[0] != '\0' && name[0] != '_' && name[0] != '@' + && name[0] != '+' && name[0] != ',') + ++name; + + return (char *) name; +} + + int _nl_explode_name (name, language, modifier, territory, codeset, normalized_codeset, special, sponsor, revision) @@ -78,9 +89,7 @@ _nl_explode_name (name, language, modifier, territory, codeset, mask = 0; syntax = undecided; *language = cp = name; - while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' - && cp[0] != '+' && cp[0] != ',') - ++cp; + cp = _nl_find_language (*language); if (*language == cp) /* This does not make sense: language has to be specified. Use |