aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-12 00:30:56 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-12 00:30:56 +0000
commit52683814b9d96378581665293c92483f3046597b (patch)
tree9aaa4c2cedbe7482333e66e8e959798567689047 /locale/programs
parentd0b5557df8fee6b8c75b9d888af6d46bf824f2fe (diff)
downloadglibc-52683814b9d96378581665293c92483f3046597b.tar
glibc-52683814b9d96378581665293c92483f3046597b.tar.gz
glibc-52683814b9d96378581665293c92483f3046597b.tar.bz2
glibc-52683814b9d96378581665293c92483f3046597b.zip
(collate_read): If ignore_content and nowtok is tok_define, eat any tok_eol tokens.
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-collate.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 6d8f3fb2f0..145a27f71a 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -2719,25 +2719,24 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
while (nowtok == tok_define)
{
if (ignore_content)
- {
- lr_ignore_rest (ldfile, 0);
- continue;
- }
-
- arg = lr_token (ldfile, charmap, result, NULL, verbose);
- if (arg->tok != tok_ident)
- SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+ lr_ignore_rest (ldfile, 0);
else
{
- /* Simply add the new symbol. */
- struct name_list *newsym = xmalloc (sizeof (*newsym)
- + arg->val.str.lenmb + 1);
- memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
- newsym->str[arg->val.str.lenmb] = '\0';
- newsym->next = defined;
- defined = newsym;
+ arg = lr_token (ldfile, charmap, result, NULL, verbose);
+ if (arg->tok != tok_ident)
+ SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+ else
+ {
+ /* Simply add the new symbol. */
+ struct name_list *newsym = xmalloc (sizeof (*newsym)
+ + arg->val.str.lenmb + 1);
+ memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
+ newsym->str[arg->val.str.lenmb] = '\0';
+ newsym->next = defined;
+ defined = newsym;
- lr_ignore_rest (ldfile, 1);
+ lr_ignore_rest (ldfile, 1);
+ }
}
do