mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Update.
* locale/programs/ld-collate.c (collate_finish): Always define weight for UNDEFINED if not defined by the user but don't complain unless it is needed in the multibyte character table. (collate_output): Add extra dummy elements in wide char tables in the same way done for multibyte. Always output undefined entry in wide character table. Contributed by Richard Henderson, Jakub Jelinek and others.
This commit is contained in:
parent
cd7de27bf3
commit
3ac4f91b92
@ -1,5 +1,12 @@
|
||||
1999-12-30 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* locale/programs/ld-collate.c (collate_finish): Always define
|
||||
weight for UNDEFINED if not defined by the user but don't complain
|
||||
unless it is needed in the multibyte character table.
|
||||
(collate_output): Add extra dummy elements in wide char tables in the
|
||||
same way done for multibyte. Always output undefined entry in
|
||||
wide character table.
|
||||
|
||||
* locale/Makefile (categories): Remove commented-out old definition.
|
||||
|
||||
* locale/programs/ld-collate.c (insert_value): Don't pass wide string
|
||||
@ -32,7 +39,7 @@
|
||||
|
||||
* soft-fp/*: Tons of new files to implement floating-point arithmetic
|
||||
in software.
|
||||
Contributed by Richard Henderson, Jakub Jelinek and others.
|
||||
Contributed by Richard Henderson, Jakub Jelinek and others.
|
||||
|
||||
1999-12-29 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
|
@ -1717,17 +1717,24 @@ Computing table size for collation table might take a while..."),
|
||||
/* Now determine whether the UNDEFINED entry is needed and if yes,
|
||||
whether it was defined. */
|
||||
collate->undefined.used_in_level = need_undefined ? ~0ul : 0;
|
||||
if (need_undefined && collate->undefined.file == NULL)
|
||||
if (collate->undefined.file == NULL)
|
||||
{
|
||||
error (0, 0, _("no definition of `UNDEFINED'"));
|
||||
if (need_undefined)
|
||||
{
|
||||
error (0, 0, _("no definition of `UNDEFINED'"));
|
||||
|
||||
/* Add UNDEFINED at the end. */
|
||||
collate->undefined.mborder =
|
||||
(int *) obstack_alloc (&collate->mempool, nrules * sizeof (int));
|
||||
/* Add UNDEFINED at the end. */
|
||||
collate->undefined.mborder =
|
||||
(int *) obstack_alloc (&collate->mempool, nrules * sizeof (int));
|
||||
|
||||
for (i = 0; i < nrules; ++i)
|
||||
collate->undefined.mborder[i] = mbact[i]++;
|
||||
for (i = 0; i < nrules; ++i)
|
||||
collate->undefined.mborder[i] = mbact[i]++;
|
||||
}
|
||||
|
||||
/* In any case we will need the definition for the wide character
|
||||
case. But we will not complain that it is missing since the
|
||||
specification strangely enough does not seem to account for
|
||||
this. */
|
||||
collate->undefined.wcorder = wcact++;
|
||||
}
|
||||
|
||||
@ -2179,6 +2186,26 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
|
||||
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
|
||||
++cnt;
|
||||
|
||||
/* Since we are using the sign of an integer to mark indirection the
|
||||
offsets in the arrays we are indirectly referring to must not be
|
||||
zero since -0 == 0. Therefore we add a bit of dummy content. */
|
||||
if (sizeof (int) == sizeof (int32_t))
|
||||
{
|
||||
obstack_int_grow (&extrapool, 0);
|
||||
obstack_int_grow (&indirectpool, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
int32_t zero = 0;
|
||||
obstack_grow (&extrapool, &zero, sizeof (zero));
|
||||
obstack_grow (&indirectpool, &zero, sizeof (zero));
|
||||
}
|
||||
|
||||
/* Now insert the `UNDEFINED' value if it is used. Since this value
|
||||
will probably be used more than once it is good to store the
|
||||
weights only once. */
|
||||
output_weightwc (&weightpool, collate, &collate->undefined);
|
||||
|
||||
/* Generate the table. Walk through the lists of sequences
|
||||
starting with the same byte and add them one after the other to
|
||||
the table. In case we have more than one sequence starting with
|
||||
|
Loading…
Reference in New Issue
Block a user