1
0

locale.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef _LOCALE_H
  2. #define _LOCALE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define NULL 0L
  8. #define LC_CTYPE 0
  9. #define LC_NUMERIC 1
  10. #define LC_TIME 2
  11. #define LC_COLLATE 3
  12. #define LC_MONETARY 4
  13. #define LC_MESSAGES 5
  14. #define LC_ALL 6
  15. struct lconv {
  16. char *decimal_point;
  17. char *thousands_sep;
  18. char *grouping;
  19. char *int_curr_symbol;
  20. char *currency_symbol;
  21. char *mon_decimal_point;
  22. char *mon_thousands_sep;
  23. char *mon_grouping;
  24. char *positive_sign;
  25. char *negative_sign;
  26. char int_frac_digits;
  27. char frac_digits;
  28. char p_cs_precedes;
  29. char p_sep_by_space;
  30. char n_cs_precedes;
  31. char n_sep_by_space;
  32. char p_sign_posn;
  33. char n_sign_posn;
  34. char int_p_cs_precedes;
  35. char int_p_sep_by_space;
  36. char int_n_cs_precedes;
  37. char int_n_sep_by_space;
  38. char int_p_sign_posn;
  39. char int_n_sign_posn;
  40. };
  41. char *setlocale (int, const char *);
  42. struct lconv *localeconv(void);
  43. #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  44. || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
  45. #define __NEED_locale_t
  46. #include <bits/alltypes.h>
  47. #define LC_GLOBAL_LOCALE ((locale_t)-1)
  48. #define LC_CTYPE_MASK (1<<LC_CTYPE)
  49. #define LC_NUMERIC_MASK (1<<LC_NUMERIC)
  50. #define LC_TIME_MASK (1<<LC_TIME)
  51. #define LC_COLLATE_MASK (1<<LC_COLLATE)
  52. #define LC_MONETARY_MASK (1<<LC_MONETARY)
  53. #define LC_MESSAGES_MASK (1<<LC_MESSAGES)
  54. #define LC_ALL_MASK 0x7fffffff
  55. locale_t duplocale(locale_t);
  56. void freelocale(locale_t);
  57. locale_t newlocale(int, const char *, locale_t);
  58. locale_t uselocale(locale_t);
  59. #endif
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif