locale.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #ifndef __LOCALE
  10. #define __LOCALE
  11. #pragma lib "/$M/lib/ape/libap.a"
  12. #include <stddef.h>
  13. #define LC_ALL 0
  14. #define LC_COLLATE 1
  15. #define LC_CTYPE 2
  16. #define LC_MONETARY 3
  17. #define LC_NUMERIC 4
  18. #define LC_TIME 5
  19. struct lconv {
  20. int8_t *decimal_point;
  21. int8_t *thousands_sep;
  22. int8_t *grouping;
  23. int8_t *int_curr_symbol;
  24. int8_t *currency_symbol;
  25. int8_t *mon_decimal_point;
  26. int8_t *mon_thousands_sep;
  27. int8_t *mon_grouping;
  28. int8_t *positive_sign;
  29. int8_t *negative_sign;
  30. int8_t int_frac_digits;
  31. int8_t frac_digits;
  32. int8_t p_cs_precedes;
  33. int8_t p_sep_by_space;
  34. int8_t n_cs_precedes;
  35. int8_t n_sep_by_space;
  36. int8_t p_sign_posn;
  37. int8_t n_sign_posn;
  38. };
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. extern int8_t *setlocale(int, const int8_t *);
  43. extern struct lconv *localeconv(void);
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif /* __LOCALE */