aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-10-23 23:24:03 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-10-23 23:24:03 +0000
commit76e6db686ee8b58439225873b4898fc1bf55e66e (patch)
treee24e224b306db89a732b7908e43d8b75ee603121 /contrib
parent332fe83717dc05abac9b7309da797273549d02ea (diff)
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
Notes
svn path=/projects/collation/; revision=289860
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions