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
32typedef locale_t xsltLocale;
33typedef xmlChar xsltLocaleChar;
34
35#elif defined(_WIN32) && !defined(__CYGWIN__)
36
37/*
38 * XSLT_LOCALE_WINAPI:
39 * Macro indicating to use WinAPI for extended locale support
40 */
41#define XSLT_LOCALE_WINAPI
42
43#include <windows.h>
44#include <winnls.h>
45
46typedef LCID xsltLocale;
47typedef wchar_t xsltLocaleChar;
48
49#else
50
51/*
52 * XSLT_LOCALE_NONE:
53 * Macro indicating that there's no extended locale support
54 */
55#define XSLT_LOCALE_NONE
56
57typedef void *xsltLocale;
58typedef xmlChar xsltLocaleChar;
59
60#endif
61
62XSLTPUBFUN xsltLocale XSLTCALL
63 xsltNewLocale (const xmlChar *langName);
64XSLTPUBFUN void XSLTCALL
65 xsltFreeLocale (xsltLocale locale);
66XSLTPUBFUN xsltLocaleChar * XSLTCALL
67 xsltStrxfrm (xsltLocale locale,
68 const xmlChar *string);
69XSLTPUBFUN int XSLTCALL
70 xsltLocaleStrcmp (xsltLocale locale,
71 const xsltLocaleChar *str1,
72 const xsltLocaleChar *str2);
73XSLTPUBFUN void XSLTCALL
74 xsltFreeLocales (void);
75
76#endif /* __XML_XSLTLOCALE_H__ */
77

source code of include/libxslt/xsltlocale.h