xsltlocale.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #ifndef __XML_XSLTLOCALE_H__
  11. #define __XML_XSLTLOCALE_H__
  12. #include <libxml/xmlstring.h>
  13. #include "xsltexports.h"
  14. #ifdef HAVE_STRXFRM_L
  15. /*
  16. * XSLT_LOCALE_POSIX:
  17. * Macro indicating to use POSIX locale extensions
  18. */
  19. #define XSLT_LOCALE_POSIX
  20. #ifdef HAVE_LOCALE_H
  21. #include <locale.h>
  22. #endif
  23. #ifdef HAVE_XLOCALE_H
  24. #include <xlocale.h>
  25. #endif
  26. typedef locale_t xsltLocale;
  27. typedef xmlChar xsltLocaleChar;
  28. #elif defined(_WIN32) && !defined(__CYGWIN__)
  29. /*
  30. * XSLT_LOCALE_WINAPI:
  31. * Macro indicating to use WinAPI for extended locale support
  32. */
  33. #define XSLT_LOCALE_WINAPI
  34. #include <windows.h>
  35. #include <winnls.h>
  36. typedef LCID xsltLocale;
  37. typedef wchar_t xsltLocaleChar;
  38. #else
  39. /*
  40. * XSLT_LOCALE_NONE:
  41. * Macro indicating that there's no extended locale support
  42. */
  43. #define XSLT_LOCALE_NONE
  44. typedef void *xsltLocale;
  45. typedef xmlChar xsltLocaleChar;
  46. #endif
  47. XSLTPUBFUN xsltLocale XSLTCALL
  48. xsltNewLocale (const xmlChar *langName);
  49. XSLTPUBFUN void XSLTCALL
  50. xsltFreeLocale (xsltLocale locale);
  51. XSLTPUBFUN xsltLocaleChar * XSLTCALL
  52. xsltStrxfrm (xsltLocale locale,
  53. const xmlChar *string);
  54. XSLTPUBFUN int XSLTCALL
  55. xsltLocaleStrcmp (xsltLocale locale,
  56. const xsltLocaleChar *str1,
  57. const xsltLocaleChar *str2);
  58. XSLTPUBFUN void XSLTCALL
  59. xsltFreeLocales (void);
  60. #endif /* __XML_XSLTLOCALE_H__ */