]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/collate.h.patch
Libc-391.tar.gz
[apple/libc.git] / locale / FreeBSD / collate.h.patch
1 --- collate.h.orig 2003-05-20 15:21:44.000000000 -0700
2 +++ collate.h 2005-02-19 14:36:36.000000000 -0800
3 @@ -31,7 +31,9 @@
4 #define _COLLATE_H_
5
6 #include <sys/cdefs.h>
7 +#ifndef __LIBC__
8 #include <sys/types.h>
9 +#endif /* !__LIBC__ */
10 #include <limits.h>
11
12 #define STR_LEN 10
13 @@ -43,24 +45,32 @@
14 int prim, sec;
15 };
16 struct __collate_st_chain_pri {
17 - u_char str[STR_LEN];
18 + unsigned char str[STR_LEN];
19 int prim, sec;
20 };
21
22 +#ifndef __LIBC__
23 extern int __collate_load_error;
24 extern int __collate_substitute_nontrivial;
25 #define __collate_substitute_table (*__collate_substitute_table_ptr)
26 -extern u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
27 +extern unsigned char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
28 #define __collate_char_pri_table (*__collate_char_pri_table_ptr)
29 extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
30 extern struct __collate_st_chain_pri *__collate_chain_pri_table;
31 +#endif /* !__LIBC__ */
32
33 __BEGIN_DECLS
34 -u_char *__collate_strdup(u_char *);
35 -u_char *__collate_substitute(const u_char *);
36 -int __collate_load_tables(const char *);
37 -void __collate_lookup(const u_char *, int *, int *, int *);
38 +unsigned char *__collate_strdup(unsigned char *);
39 +#ifdef __LIBC__
40 +unsigned char *__collate_substitute_l(const unsigned char *, locale_t);
41 +int __collate_load_tables(const char *, locale_t);
42 +void __collate_lookup_l(const unsigned char *, int *, int *, int *, locale_t);
43 +int __collate_range_cmp(int, int, locale_t);
44 +#else /* !__LIBC__ */
45 +unsigned char *__collate_substitute(const unsigned char *);
46 +void __collate_lookup(const unsigned char *, int *, int *, int *);
47 int __collate_range_cmp(int, int);
48 +#endif /* __LIBC__ */
49 #ifdef COLLATE_DEBUG
50 void __collate_print_tables(void);
51 #endif