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 HAVE_STRXFRM_L 18 19 /* 20 * XSLT_LOCALE_POSIX: 21 * Macro indicating to use POSIX locale extensions 22 */ 23 #define XSLT_LOCALE_POSIX 24 25 #ifdef HAVE_LOCALE_H 26 #include <locale.h> 27 #endif 28 #ifdef HAVE_XLOCALE_H 29 #include <xlocale.h> 30 #endif 31 32 typedef locale_t xsltLocale; 33 typedef xmlChar xsltLocaleChar; 34 35 #elif defined(_WIN32) 36 37 /* 38 * XSLT_LOCALE_WINAPI: 39 * Macro indicating to use WinAPI for extended locale support 40 */ 41 #define XSLT_LOCALE_WINAPI 42 43 #ifdef __REACTOS__ 44 #define WIN32_NO_STATUS 45 #include <windef.h> 46 #include <winbase.h> 47 #else /* __REACTOS__ */ 48 #include <windows.h> 49 #endif /* __REACTOS__ */ 50 #include <winnls.h> 51 52 typedef LCID xsltLocale; 53 typedef wchar_t xsltLocaleChar; 54 55 #else 56 57 /* 58 * XSLT_LOCALE_NONE: 59 * Macro indicating that there's no extended locale support 60 */ 61 #define XSLT_LOCALE_NONE 62 63 typedef void *xsltLocale; 64 typedef xmlChar xsltLocaleChar; 65 66 #endif 67 68 XSLTPUBFUN xsltLocale XSLTCALL 69 xsltNewLocale (const xmlChar *langName); 70 XSLTPUBFUN void XSLTCALL 71 xsltFreeLocale (xsltLocale locale); 72 XSLTPUBFUN xsltLocaleChar * XSLTCALL 73 xsltStrxfrm (xsltLocale locale, 74 const xmlChar *string); 75 XSLTPUBFUN int XSLTCALL 76 xsltLocaleStrcmp (xsltLocale locale, 77 const xsltLocaleChar *str1, 78 const xsltLocaleChar *str2); 79 XSLTPUBFUN void XSLTCALL 80 xsltFreeLocales (void); 81 82 #endif /* __XML_XSLTLOCALE_H__ */ 83