+2007-10-12 Ulrich Drepper <drepper@redhat.com>
+
+ * locale/programs/ld-collate.c (collate_read): Optimize a bit.
+ (skip_to): Fix problems with parameter of elifdef/elifndef.
+
2007-10-11 Ulrich Drepper <drepper@redhat.com>
* iconv/gconv_simple.c: Add some branch prediction.
if (nowtok == tok_eof || nowtok == tok_end)
return nowtok;
}
- else if ((!to_endif && (nowtok == tok_else || nowtok == tok_elifdef
- || nowtok == tok_elifndef))
- || nowtok == tok_endif)
+ else if (nowtok == tok_endif || (!to_endif && nowtok == tok_else))
{
lr_ignore_rest (ldfile, 1);
return nowtok;
}
+ else if (!to_endif && (nowtok == tok_elifdef || nowtok == tok_elifndef))
+ {
+ /* Do not read the rest of the line. */
+ return nowtok;
+ }
else if (nowtok == tok_else)
{
lr_error (ldfile, _("%s: more then one 'else'"), "LC_COLLATE");
/* The rest of the line containing `LC_COLLATE' must be free. */
lr_ignore_rest (ldfile, 1);
- do
+ while (1)
{
- now = lr_token (ldfile, charmap, result, NULL, verbose);
- nowtok = now->tok;
- }
- while (nowtok == tok_eol);
+ do
+ {
+ now = lr_token (ldfile, charmap, result, NULL, verbose);
+ nowtok = now->tok;
+ }
+ while (nowtok == tok_eol);
+
+ if (nowtok != tok_define)
+ break;
- while (nowtok == tok_define)
- {
if (ignore_content)
lr_ignore_rest (ldfile, 0);
else
lr_ignore_rest (ldfile, 1);
}
}
-
- do
- {
- now = lr_token (ldfile, charmap, result, NULL, verbose);
- nowtok = now->tok;
- }
- while (nowtok == tok_eol);
}
if (nowtok == tok_copy)