locale.h 1.5 KB

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