b7b1b1ff2729e5dfbcc7a539098ac043488abc7b
[reactos.git] / sdk / include / reactos / libs / libxslt / xsltlocale.h
1 /*
2 * Summary: Locale handling
3 * Description: Interfaces for locale handling. Needed for language dependent
4 * sorting.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Nick Wellnhofer
9 */
10
11 #ifndef __XML_XSLTLOCALE_H__
12 #define __XML_XSLTLOCALE_H__
13
14 #include <libxml/xmlstring.h>
15 #include "xsltexports.h"
16
17 #ifdef XSLT_LOCALE_XLOCALE
18
19 #include <locale.h>
20 #include <xlocale.h>
21
22 #ifdef __GLIBC__
23 /*locale_t is defined only if _GNU_SOURCE is defined*/
24 typedef __locale_t xsltLocale;
25 #else
26 typedef locale_t xsltLocale;
27 #endif
28 typedef xmlChar xsltLocaleChar;
29
30 #elif defined(XSLT_LOCALE_WINAPI)
31
32 #ifdef __REACTOS__
33 #define WIN32_NO_STATUS
34 #include <windef.h>
35 #include <winbase.h>
36 #else /* __REACTOS__ */
37 #include <windows.h>
38 #endif /* __REACTOS__ */
39 #include <winnls.h>
40
41 typedef LCID xsltLocale;
42 typedef wchar_t xsltLocaleChar;
43
44 #else
45
46 /*
47 * XSLT_LOCALE_NONE:
48 * Macro indicating that locale are not supported
49 */
50 #ifndef XSLT_LOCALE_NONE
51 #define XSLT_LOCALE_NONE
52 #endif
53
54 typedef void *xsltLocale;
55 typedef xmlChar xsltLocaleChar;
56
57 #endif
58
59 XSLTPUBFUN xsltLocale XSLTCALL
60 xsltNewLocale (const xmlChar *langName);
61 XSLTPUBFUN void XSLTCALL
62 xsltFreeLocale (xsltLocale locale);
63 XSLTPUBFUN xsltLocaleChar * XSLTCALL
64 xsltStrxfrm (xsltLocale locale,
65 const xmlChar *string);
66 XSLTPUBFUN int XSLTCALL
67 xsltLocaleStrcmp (xsltLocale locale,
68 const xsltLocaleChar *str1,
69 const xsltLocaleChar *str2);
70 XSLTPUBFUN void XSLTCALL
71 xsltFreeLocales (void);
72
73 #endif /* __XML_XSLTLOCALE_H__ */