mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
(collate_read): If ignore_content and nowtok is tok_define, eat any tok_eol tokens.
This commit is contained in:
parent
d0b5557df8
commit
52683814b9
@ -2719,25 +2719,24 @@ collate_read (struct linereader *ldfile, struct localedef_t *result,
|
|||||||
while (nowtok == tok_define)
|
while (nowtok == tok_define)
|
||||||
{
|
{
|
||||||
if (ignore_content)
|
if (ignore_content)
|
||||||
{
|
lr_ignore_rest (ldfile, 0);
|
||||||
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");
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Simply add the new symbol. */
|
arg = lr_token (ldfile, charmap, result, NULL, verbose);
|
||||||
struct name_list *newsym = xmalloc (sizeof (*newsym)
|
if (arg->tok != tok_ident)
|
||||||
+ arg->val.str.lenmb + 1);
|
SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
|
||||||
memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
|
else
|
||||||
newsym->str[arg->val.str.lenmb] = '\0';
|
{
|
||||||
newsym->next = defined;
|
/* Simply add the new symbol. */
|
||||||
defined = newsym;
|
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
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user