+1999-11-21 Ulrich Drepper <drepper@cygnus.com>
+
+ * locale/programs/ld-ctype.c (ctype_read): Correctly implement
+ 14652-style definition of new maps and classes.
+
1999-11-20 Ulrich Drepper <drepper@cygnus.com>
* locale/programs/ld-monetary.c (monetary_finish): Don't print
now = lr_token (ldfile, charmap, NULL);
if (now->tok == tok_ident || now->tok == tok_string)
{
- /* Must be one of the predefined class names. */
+ /* Must can be one of the predefined class names. */
for (cnt = 0; cnt < ctype->nr_charclass; ++cnt)
if (strcmp (ctype->classnames[cnt], now->val.str.startmb) == 0)
break;
else
#endif
{
- lr_error (ldfile, _("\
-unknown character class `%s' in category `LC_CTYPE'"),
- now->val.str.startmb);
- free (now->val.str.startmb);
+ /* OK, it's a new class. */
+ ctype_class_new (ldfile, ctype, now->val.str.startmb);
- lr_ignore_rest (ldfile, 0);
- continue;
+ class_bit = _ISwbit (ctype->nr_charclass - 1);
}
}
else
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
break;
- if (cnt < ctype->map_collection_nr)
- mapidx = cnt;
- else
- {
- lr_error (ldfile, _("unknown map `%s'"),
- now->val.str.startmb);
- lr_ignore_rest (ldfile, 0);
- break;
- }
+ if (cnt >= ctype->map_collection_nr)
+ /* OK, it's a new map. */
+ ctype_map_new (ldfile, ctype, now->val.str.startmb, charmap);
+
+ mapidx = cnt;
}
else if (now->tok < tok_toupper || now->tok > tok_tolower)
goto err_label;