xsltlocale.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #ifdef XSLT_LOCALE_XLOCALE
  14. #include <locale.h>
  15. #include <xlocale.h>
  16. #ifdef __GLIBC__
  17. /*locale_t is defined only if _GNU_SOURCE is defined*/
  18. typedef __locale_t xsltLocale;
  19. #else
  20. typedef locale_t xsltLocale;
  21. #endif
  22. typedef xmlChar xsltLocaleChar;
  23. #elif defined(XSLT_LOCALE_WINAPI)
  24. #include <windows.h>
  25. #include <winnls.h>
  26. typedef LCID xsltLocale;
  27. typedef wchar_t xsltLocaleChar;
  28. #else
  29. /*
  30. * XSLT_LOCALE_NONE:
  31. * Macro indicating that locale are not supported
  32. */
  33. #ifndef XSLT_LOCALE_NONE
  34. #define XSLT_LOCALE_NONE
  35. #endif
  36. typedef void *xsltLocale;
  37. typedef xmlChar xsltLocaleChar;
  38. #endif
  39. xsltLocale xsltNewLocale(const xmlChar *langName);
  40. void xsltFreeLocale(xsltLocale locale);
  41. xsltLocaleChar *xsltStrxfrm(xsltLocale locale, const xmlChar *string);
  42. int xsltLocaleStrcmp(xsltLocale locale, const xsltLocaleChar *str1, const xsltLocaleChar *str2);
  43. #endif /* __XML_XSLTLOCALE_H__ */