mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
1999-12-26 Ulrich Drepper <drepper@cygnus.com> * ld-collate.c (struct element_t): Add field is_character and use it to distinguish real character from collating elements and symbols. (new_element): Take new parameter to initialize is_character. Change all callers. (handle_ellipsis): Use is_character field to make sure ellipsis is only used with characters. (collate_read): Fix reading of collating elements. * string/strxfrm.c: Correct loop end detection and memory access in the little optimization at the end. * locale/programs/ld-monetary.c (monetary_finish): Correct code to emit warnings. Provide default value for mon_decimal_point. * locale/programs/ld-collate.c (collate_finish): Don't crash if this category wasn't defined. (collate_output): Likewise. * locale/programs/ld-address.c: Don't emit message about not defined category if be_quiet. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-identification.c: Likewise. * locale/programs/ld-measurement.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-name.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-paper.c: Likewise. * locale/programs/ld-telephone.c: Likewise. * locale/programs/locfile.c (write_locale_data): Correct memory allocation for fname.
This commit is contained in:
@@ -267,9 +267,10 @@ STRXFRM (char *dest, const char *src, size_t n, __locale_t l)
|
||||
/* Handle the pushed elements now. */
|
||||
size_t backw;
|
||||
|
||||
for (backw = idxcnt - 1; backw >= backw_stop; --backw)
|
||||
backw = idxcnt;
|
||||
while (backw > backw_stop)
|
||||
{
|
||||
size_t len = weights[idxarr[backw]++];
|
||||
size_t len = weights[idxarr[--backw]++];
|
||||
|
||||
if (needed + len < n)
|
||||
while (len-- > 0)
|
||||
@@ -363,9 +364,10 @@ STRXFRM (char *dest, const char *src, size_t n, __locale_t l)
|
||||
/* Handle the pushed elements now. */
|
||||
size_t backw;
|
||||
|
||||
for (backw = idxmax - 1; backw >= backw_stop; --backw)
|
||||
backw = idxmax - 1;
|
||||
while (backw > backw_stop)
|
||||
{
|
||||
size_t len = weights[idxarr[backw]++];
|
||||
size_t len = weights[idxarr[--backw]++];
|
||||
if (len != 0)
|
||||
{
|
||||
buflen = utf8_encode (buf, val);
|
||||
@@ -398,7 +400,7 @@ STRXFRM (char *dest, const char *src, size_t n, __locale_t l)
|
||||
a `position' rule at the end and if no non-ignored character
|
||||
is found the last \1 byte is immediately followed by a \0 byte
|
||||
signalling this. We can avoid the \1 byte(s). */
|
||||
if (needed > 2 && dest[needed - 2] == '\1')
|
||||
if (needed <= n && needed > 2 && dest[needed - 2] == '\1')
|
||||
{
|
||||
/* Remove the \1 byte. */
|
||||
--needed;
|
||||
|
Reference in New Issue
Block a user