View | Details | Raw Unified | Return to bug 179721 | Differences between
and this patch

Collapse All | Expand All

(-)lib/libc/locale/collate.h (-1 / +2 lines)
Lines 128-134 Link Here
128
int	__collate_equiv_value(locale_t, const wchar_t *, size_t);
128
int	__collate_equiv_value(locale_t, const wchar_t *, size_t);
129
void	_collate_lookup(struct xlocale_collate *,const wchar_t *, int *, int *,
129
void	_collate_lookup(struct xlocale_collate *,const wchar_t *, int *, int *,
130
	int, const int **);
130
	int, const int **);
131
int	__collate_range_cmp(struct xlocale_collate *, wchar_t, wchar_t);
131
int	__collate_range_cmp(struct xlocale_collate *, char, wchar);
132
int	__wcollate_range_cmp(struct xlocale_collate *, wchar_t, wchar_t);
132
size_t	_collate_wxfrm(struct xlocale_collate *, const wchar_t *, wchar_t *,
133
size_t	_collate_wxfrm(struct xlocale_collate *, const wchar_t *, wchar_t *,
133
	size_t);
134
	size_t);
134
size_t	_collate_sxfrm(struct xlocale_collate *, const wchar_t *, char *,
135
size_t	_collate_sxfrm(struct xlocale_collate *, const wchar_t *, char *,
(-)lib/libc/locale/collcmp.c (-3 / +15 lines)
Lines 41-54 Link Here
41
 * Compare two characters using collate
41
 * Compare two characters using collate
42
 */
42
 */
43
43
44
int __collate_range_cmp(struct xlocale_collate *table, wchar_t c1, wchar_t c2)
44
int __collate_range_cmp(struct xlocale_collate *table, char c1, char c2)
45
{
45
{
46
	char s1[2], s2[2];
47
48
	s1[0] = c1;
49
	s1[1] = '\0';
50
	s2[0] = c2;
51
	s2[1] = '\0';
52
	struct _xlocale l = {{0}};
53
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
54
	return (strcoll_l(s1, s2, &l));
55
}
56
int __wcollate_range_cmp(struct xlocale_collate *table, wchar_t c1, wchar_t c2)
57
{
46
	wchar_t s1[2], s2[2];
58
	wchar_t s1[2], s2[2];
47
59
48
	s1[0] = c1;
60
	s1[0] = c1;
49
	s1[1] = 0;
61
	s1[1] = L'\0';
50
	s2[0] = c2;
62
	s2[0] = c2;
51
	s2[1] = 0;
63
	s2[1] = L'\0';
52
	struct _xlocale l = {{0}};
64
	struct _xlocale l = {{0}};
53
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
65
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
54
	return (wcscoll_l(s1, s2, &l));
66
	return (wcscoll_l(s1, s2, &l));

Return to bug 179721