freebsd-dev/lib/libc/string
Baptiste Daroussin 76e6db686e collate: Fix expansion substitions (broken upstream too)
Through testing, the user noted that some Cyrillic characters were not
sorting correctly, and this was confirmed.

After extensive testing and review, the localedef tool was eliminated
as the culprit.  The sustitutions were encoded correctly in LC_COLLATE.

The error was mainly in wcscoll where character expansions were
mishandled.  The main directive pass routines had to be written to
go back for a new collation value when the "state" variable was set.
Before pointers were being advanced, the second lookup was gettting
applied to the wrong character, etc.

The "eat expansion codes" section on collate.c also had a bug.  Later
own, the "state" variable logic was changed to only set if next
code was greater than zero (rather than >= 0).

Some additional cleanups got captured from previous work:
1) The previous commit moved the binary search comment from the
   correct location to a wrong location because it's wrong upstream
   in Illumos.  The comment has little value so I just removed it.
2) Don't check if pointers are null before freeing, this is
   redundant as free() handles null pointers.
3) The two binary search trees were standardized wrt initialization
4) On the binary search trees, a negative "high" exits rather than
   checking the table count again.

Submitted by:	marino
Obtained from:	DragonflyBSD
2015-10-23 23:24:03 +00:00
..
bcmp.3
bcmp.c
bcopy.3 Fix spelling. 2015-08-24 01:53:18 +00:00
bcopy.c
bstring.3
bzero.3 Update bzero(3) manpage to following the Posix Standard. 2015-08-24 01:51:10 +00:00
bzero.c
ffs.3 Document bitset(9) 2015-10-17 19:55:58 +00:00
ffs.c
ffsl.c
ffsll.c
fls.c
flsl.c
flsll.c
index.3
Makefile.inc
memccpy.3
memccpy.c
memchr.3
memchr.c
memcmp.3
memcmp.c
memcpy.3
memcpy.c
memmem.3
memmem.c
memmove.3
memmove.c
memrchr.c
memset.3
memset.c
stpcpy.c
stpncpy.c
strcasecmp.3
strcasecmp.c
strcasestr.c
strcat.3
strcat.c
strchr.3
strchr.c
strchrnul.c Add declaration to eliminate -Wmissing-prototypes warning. 2015-09-20 03:51:15 +00:00
strcmp.3
strcmp.c
strcoll.3
strcoll.c
strcpy.3
strcpy.c
strcspn.c
strdup.3
strdup.c
strerror.3
strerror.c
string.3
strlcat.c
strlcpy.3
strlcpy.c
strlen.3
strlen.c
strmode.3
strmode.c
strncat.c
strncmp.c
strncpy.c
strndup.c Replace strndup with OpenBSD's implementation. 2015-08-26 23:28:10 +00:00
strnlen.c
strnstr.c
strpbrk.3
strpbrk.c
strrchr.c
strsep.3
strsep.c
strsignal.c
strspn.3
strspn.c
strstr.3
strstr.c
strtok.3
strtok.c
strxfrm.3
strxfrm.c
swab.3
swab.c
Symbol.map
wcpcpy.c
wcpncpy.c
wcscasecmp.c
wcscat.c
wcschr.c
wcscmp.c
wcscoll.3
wcscoll.c collate: Fix expansion substitions (broken upstream too) 2015-10-23 23:24:03 +00:00
wcscpy.c
wcscspn.c
wcsdup.c
wcslcat.c
wcslcpy.c
wcslen.c
wcsncasecmp.c
wcsncat.c
wcsncmp.c
wcsncpy.c
wcsnlen.c
wcspbrk.c
wcsrchr.c
wcsspn.c
wcsstr.c
wcstok.3
wcstok.c
wcswidth.3
wcswidth.c
wcsxfrm.3
wcsxfrm.c
wmemchr.3
wmemchr.c
wmemcmp.c
wmemcpy.c
wmemmove.c
wmemset.c