]>
Commit | Line | Data |
---|---|---|
1 | --- collcmp.c.bsdnew 2009-11-09 15:05:25.000000000 -0800 | |
2 | +++ collcmp.c 2009-11-09 15:23:31.000000000 -0800 | |
3 | @@ -27,18 +27,20 @@ | |
4 | #include <sys/cdefs.h> | |
5 | __FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.18 2005/02/27 14:54:23 phantom Exp $"); | |
6 | ||
7 | -#include <string.h> | |
8 | +#include <xlocale.h> | |
9 | +#include <wchar.h> | |
10 | #include "collate.h" | |
11 | ||
12 | /* | |
13 | * Compare two characters using collate | |
14 | */ | |
15 | ||
16 | -int __collate_range_cmp(int c1, int c2) | |
17 | +__private_extern__ int | |
18 | +__collate_range_cmp(wchar_t c1, wchar_t c2, locale_t loc) | |
19 | { | |
20 | - static char s1[2], s2[2]; | |
21 | + static wchar_t s1[2], s2[2]; | |
22 | ||
23 | s1[0] = c1; | |
24 | s2[0] = c2; | |
25 | - return (strcoll(s1, s2)); | |
26 | + return (wcscoll_l(s1, s2, loc)); | |
27 | } |