locale.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * locale.h
  3. *
  4. * Functions and types for localization (ie. changing the appearance of
  5. * output based on the standards of a certain country).
  6. *
  7. * This file is part of the Mingw32 package.
  8. *
  9. * Contributors:
  10. * Created by Colin Peters <[email protected]>
  11. *
  12. * THIS SOFTWARE IS NOT COPYRIGHTED
  13. *
  14. * This source code is offered for use in the public domain. You may
  15. * use, modify or distribute it freely.
  16. *
  17. * This code is distributed in the hope that it will be useful but
  18. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  19. * DISCLAIMED. This includes but is not limited to warranties of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21. *
  22. * $Revision: 1.2 $
  23. * $Author: bellard $
  24. * $Date: 2005/04/17 13:14:29 $
  25. *
  26. */
  27. #ifndef _LOCALE_H_
  28. #define _LOCALE_H_
  29. /* All the headers include this file. */
  30. #include <_mingw.h>
  31. /*
  32. * NOTE: I have tried to test this, but I am limited by my knowledge of
  33. * locale issues. The structure does not bomb if you look at the
  34. * values, and 'decimal_point' even seems to be correct. But the
  35. * rest of the values are, by default, not particularly useful
  36. * (read meaningless and not related to the international settings
  37. * of the system).
  38. */
  39. #define LC_ALL 0
  40. #define LC_COLLATE 1
  41. #define LC_CTYPE 2
  42. #define LC_MONETARY 3
  43. #define LC_NUMERIC 4
  44. #define LC_TIME 5
  45. #define LC_MIN LC_ALL
  46. #define LC_MAX LC_TIME
  47. #ifndef RC_INVOKED
  48. /*
  49. * The structure returned by 'localeconv'.
  50. */
  51. struct lconv
  52. {
  53. char* decimal_point;
  54. char* thousands_sep;
  55. char* grouping;
  56. char* int_curr_symbol;
  57. char* currency_symbol;
  58. char* mon_decimal_point;
  59. char* mon_thousands_sep;
  60. char* mon_grouping;
  61. char* positive_sign;
  62. char* negative_sign;
  63. char int_frac_digits;
  64. char frac_digits;
  65. char p_cs_precedes;
  66. char p_sep_by_space;
  67. char n_cs_precedes;
  68. char n_sep_by_space;
  69. char p_sign_posn;
  70. char n_sign_posn;
  71. };
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75. char* setlocale (int, const char*);
  76. struct lconv* localeconv (void);
  77. #ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
  78. # define __need_wchar_t
  79. # include <stddef.h>
  80. wchar_t* _wsetlocale(int, const wchar_t*);
  81. # define _WLOCALE_DEFINED
  82. #endif /* ndef _WLOCALE_DEFINED */
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif /* Not RC_INVOKED */
  87. #endif /* Not _LOCALE_H_ */