aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-18 00:23:52 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-18 00:23:52 +0000
commit498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a (patch)
treea29c5a6acad6cd430cca56c33ce0d17e751ac3f9 /locale
parentce723583fc8c5241879dfb5c1d7f940ded72f283 (diff)
downloadglibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar
glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.gz
glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.tar.bz2
glibc-498b733ef0c21d5ecf9ef1dd284c48b2cecb7b0a.zip
Update.
* locale/programs/ld-ctype.c (ctype_output): Really write out mboutdigits information. * localedata/tst-trans.c: Add code to test printf's I flag with locale. * localedata/tst-trans.sh: Set GCONV_PATH for compilation environment. * localedata/tests/trans.def: Add outdigit information. * localedata/tst-mbswcs3.c: Remove comment.
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-ctype.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index bda89ec9bc..5b570ba00e 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -981,14 +981,14 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap,
them with a NUL byte following. The NUL byte wouldn't be
necessary but it makes it easier for the user. */
total = 0;
- for (cnt = elem - _NL_CTYPE_INDIGITS0_MB;
+ for (cnt = elem - _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_MB);
cnt < ctype->mbdigits_act; cnt += 10)
total += ctype->mbdigits[cnt]->nbytes + 1;
iov[2 + elem + offset].iov_base = (char *) alloca (total);
iov[2 + elem + offset].iov_len = total;
cp = iov[2 + elem + offset].iov_base;
- for (cnt = elem - _NL_CTYPE_INDIGITS0_MB;
+ for (cnt = elem - _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_MB);
cnt < ctype->mbdigits_act; cnt += 10)
{
cp = mempcpy (cp, ctype->mbdigits[cnt]->bytes,
@@ -1003,14 +1003,14 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap,
there might be more than one. We simply concatenate all of
them with a NUL byte following. The NUL byte wouldn't be
necessary but it makes it easier for the user. */
- cnt = elem - _NL_CTYPE_OUTDIGIT0_MB;
+ cnt = elem - _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_MB);
total = ctype->mboutdigits[cnt]->nbytes + 1;
iov[2 + elem + offset].iov_base = (char *) alloca (total);
iov[2 + elem + offset].iov_len = total;
*(char *) mempcpy (iov[2 + elem + offset].iov_base,
- ctype->mbdigits[cnt]->bytes,
- ctype->mbdigits[cnt]->nbytes) = '\0';
+ ctype->mboutdigits[cnt]->bytes,
+ ctype->mboutdigits[cnt]->nbytes) = '\0';
idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
@@ -1021,7 +1021,7 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap,
(uint32_t *) alloca (total * sizeof (uint32_t));
iov[2 + elem + offset].iov_len = total * sizeof (uint32_t);
- for (cnt = elem - _NL_CTYPE_INDIGITS0_WC;
+ for (cnt = elem - _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_WC);
cnt < ctype->wcdigits_act; cnt += 10)
((uint32_t *) iov[2 + elem + offset].iov_base)[cnt / 10]
= ctype->wcdigits[cnt];
@@ -1029,7 +1029,7 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap,
break;
case _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_WC) ... _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT9_WC):
- cnt = elem - _NL_CTYPE_OUTDIGIT0_WC;
+ cnt = elem - _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_WC);
iov[2 + elem + offset].iov_base = &ctype->wcoutdigits[cnt];
iov[2 + elem + offset].iov_len = sizeof (uint32_t);
idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;