mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 10:22:41 +08:00
(ctype_read): Allow more than one default_missing character being specified, pick the first representable.
This commit is contained in:
parent
fb4dfa0c81
commit
c9f79e0878
@ -2688,10 +2688,13 @@ with character code range values one must use the absolute ellipsis `...'"));
|
||||
{
|
||||
uint32_t *wstr;
|
||||
|
||||
while (1)
|
||||
{
|
||||
/* We expect a single character or string as the
|
||||
argument. */
|
||||
now = lr_token (ldfile, charmap, NULL);
|
||||
wstr = read_widestring (ldfile, now, charmap, repertoire);
|
||||
wstr = read_widestring (ldfile, now, charmap,
|
||||
repertoire);
|
||||
|
||||
if (wstr != NULL)
|
||||
{
|
||||
@ -2701,7 +2704,8 @@ with character code range values one must use the absolute ellipsis `...'"));
|
||||
%s: duplicate `default_missing' definition"), "LC_CTYPE");
|
||||
error_at_line (0, 0, ctype->default_missing_file,
|
||||
ctype->default_missing_lineno,
|
||||
_("previous definition was here"));
|
||||
_("\
|
||||
previous definition was here"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2709,8 +2713,26 @@ with character code range values one must use the absolute ellipsis `...'"));
|
||||
ctype->default_missing_file = ldfile->fname;
|
||||
ctype->default_missing_lineno = ldfile->lineno;
|
||||
}
|
||||
}
|
||||
lr_ignore_rest (ldfile, 1);
|
||||
break;
|
||||
}
|
||||
else if (wstr == (uint32_t *) -1l)
|
||||
/* This was an syntax error. */
|
||||
break;
|
||||
|
||||
/* Maybe there is another replacement we can use. */
|
||||
now = lr_token (ldfile, charmap, NULL);
|
||||
if (now->tok == tok_eol || now->tok == tok_eof)
|
||||
{
|
||||
/* Nothing found. We tell the user. */
|
||||
lr_error (ldfile, _("\
|
||||
%s: no representable `default_missing' definition found"), LC_CTYPE);
|
||||
break;
|
||||
}
|
||||
if (now->tok != tok_semicolon)
|
||||
goto translit_syntax;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
else if (now->tok == tok_translit_ignore)
|
||||
|
Loading…
Reference in New Issue
Block a user