You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. locale.h
  3. Values appropriate for the formatting of monetary and other
  4. numberic quantities.
  5. */
  6. #ifndef _LOCALE_H_
  7. #define _LOCALE_H_
  8. #include "_ansi.h"
  9. #include <sys/cdefs.h>
  10. #define __need_NULL
  11. #include <stddef.h>
  12. #define LC_ALL 0
  13. #define LC_COLLATE 1
  14. #define LC_CTYPE 2
  15. #define LC_MONETARY 3
  16. #define LC_NUMERIC 4
  17. #define LC_TIME 5
  18. #define LC_MESSAGES 6
  19. #if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
  20. #include <sys/_locale.h>
  21. #define LC_ALL_MASK (1 << LC_ALL)
  22. #define LC_COLLATE_MASK (1 << LC_COLLATE)
  23. #define LC_CTYPE_MASK (1 << LC_CTYPE)
  24. #define LC_MONETARY_MASK (1 << LC_MONETARY)
  25. #define LC_NUMERIC_MASK (1 << LC_NUMERIC)
  26. #define LC_TIME_MASK (1 << LC_TIME)
  27. #define LC_MESSAGES_MASK (1 << LC_MESSAGES)
  28. #define LC_GLOBAL_LOCALE ((struct __locale_t *) -1)
  29. #endif /* __POSIX_VISIBLE >= 200809 */
  30. _BEGIN_STD_C
  31. struct lconv
  32. {
  33. char *decimal_point;
  34. char *thousands_sep;
  35. char *grouping;
  36. char *int_curr_symbol;
  37. char *currency_symbol;
  38. char *mon_decimal_point;
  39. char *mon_thousands_sep;
  40. char *mon_grouping;
  41. char *positive_sign;
  42. char *negative_sign;
  43. char int_frac_digits;
  44. char frac_digits;
  45. char p_cs_precedes;
  46. char p_sep_by_space;
  47. char n_cs_precedes;
  48. char n_sep_by_space;
  49. char p_sign_posn;
  50. char n_sign_posn;
  51. char int_n_cs_precedes;
  52. char int_n_sep_by_space;
  53. char int_n_sign_posn;
  54. char int_p_cs_precedes;
  55. char int_p_sep_by_space;
  56. char int_p_sign_posn;
  57. };
  58. struct _reent;
  59. char *_setlocale_r (struct _reent *, int, const char *);
  60. struct lconv *_localeconv_r (struct _reent *);
  61. struct __locale_t *_newlocale_r (struct _reent *, int, const char *,
  62. struct __locale_t *);
  63. void _freelocale_r (struct _reent *, struct __locale_t *);
  64. struct __locale_t *_duplocale_r (struct _reent *, struct __locale_t *);
  65. struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *);
  66. #ifndef _REENT_ONLY
  67. char *setlocale (int, const char *);
  68. struct lconv *localeconv (void);
  69. #if __POSIX_VISIBLE >= 200809
  70. locale_t newlocale (int, const char *, locale_t);
  71. void freelocale (locale_t);
  72. locale_t duplocale (locale_t);
  73. locale_t uselocale (locale_t);
  74. #endif /* __POSIX_VISIBLE >= 200809 */
  75. #endif /* _REENT_ONLY */
  76. _END_STD_C
  77. #endif /* _LOCALE_H_ */