* wctype/wctrans.c (wctrans): Use correct base index to access
extra mapping tables.
* locale/loadlocale.c (_nl_load_locale): Use actual number of
entries from file and not the fixed (minimal number from the
langinfo.h list.
1999-11-20 Ulrich Drepper <drepper@cygnus.com>
+ * wctype/wctrans.c (wctrans): Use correct base index to access
+ extra mapping tables.
+
+ * locale/loadlocale.c (_nl_load_locale): Use actual number of
+ entries from file and not the fixed (minimal number from the
+ langinfo.h list.
+
* locale/programs/ld-ctype.c (ctype_read): Fix reading of <U....>
values in charmaps.
}
newdata = malloc (sizeof *newdata
- + (_nl_category_num_items[category]
- * sizeof (union locale_data_value)));
+ + filedata->nstrings * sizeof (union locale_data_value));
if (! newdata)
goto puntmap;
newdata->filesize = st.st_size;
newdata->mmaped = mmaped;
newdata->usage_count = 0;
- newdata->nstrings = _nl_category_num_items[category];
+ newdata->nstrings = filedata->nstrings;
for (cnt = 0; cnt < newdata->nstrings; ++cnt)
{
off_t idx = filedata->strindex[cnt];
return (wctrans_t) __ctype_tolower;
/* We have to search the table. */
- result = (int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_WIDTH + cnt - 2);
+ result = (int32_t *) _NL_CURRENT (LC_CTYPE, _NL_NUM_LC_CTYPE + cnt - 2);
return (wctrans_t) (result + 128);
}