locale.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <sys/cdefs.h>
  8. __BEGIN_DECLS
  9. enum {
  10. LC_ALL,
  11. #define LC_ALL LC_ALL
  12. LC_NUMERIC,
  13. #define LC_NUMERIC LC_NUMERIC
  14. LC_CTYPE,
  15. #define LC_CTYPE LC_CTYPE
  16. LC_COLLATE,
  17. #define LC_COLLATE LC_COLLATE
  18. LC_TIME,
  19. #define LC_TIME LC_TIME
  20. LC_MONETARY,
  21. #define LC_MONETARY LC_MONETARY
  22. LC_MESSAGES,
  23. #define LC_MESSAGES LC_MESSAGES
  24. };
  25. struct lconv {
  26. char* decimal_point;
  27. char* thousands_sep;
  28. char* grouping;
  29. char* int_curr_symbol;
  30. char* currency_symbol;
  31. char* mon_decimal_point;
  32. char* mon_thousands_sep;
  33. char* mon_grouping;
  34. char* positive_sign;
  35. char* negative_sign;
  36. char int_frac_digits;
  37. char frac_digits;
  38. char p_cs_precedes;
  39. char p_sep_by_space;
  40. char n_cs_precedes;
  41. char n_sep_by_space;
  42. char p_sign_posn;
  43. char n_sign_posn;
  44. char int_p_cs_precedes;
  45. char int_p_sep_by_space;
  46. char int_n_cs_precedes;
  47. char int_n_sep_by_space;
  48. char int_p_sign_posn;
  49. char int_n_sign_posn;
  50. };
  51. struct lconv* localeconv(void);
  52. char* setlocale(int category, char const* locale);
  53. __END_DECLS