]> git.saurik.com Git - apple/libc.git/blobdiff - locale/FreeBSD/collcmp.c
Libc-1082.50.1.tar.gz
[apple/libc.git] / locale / FreeBSD / collcmp.c
index dde67a4e09488e48da403b4fca4727680f06b470..7f135bcc94bbbf3c0738f43bcb91e6ba787804f5 100644 (file)
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.18 2005/02/27 14:54:23 phantom Exp $");
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.18 2005/02/27 14:54:23 phantom Exp $");
 
-#include <string.h>
+#include <xlocale.h>
+#include <wchar.h>
 #include "collate.h"
 
 /*
  * Compare two characters using collate
  */
 
 #include "collate.h"
 
 /*
  * Compare two characters using collate
  */
 
-int __collate_range_cmp(int c1, int c2)
+__private_extern__ int
+__collate_range_cmp(wchar_t c1, wchar_t c2, locale_t loc)
 {
 {
-       static char s1[2], s2[2];
+       static wchar_t s1[2], s2[2];
 
        s1[0] = c1;
        s2[0] = c2;
 
        s1[0] = c1;
        s2[0] = c2;
-       return (strcoll(s1, s2));
+       return (wcscoll_l(s1, s2, loc));
 }
 }