Source code of Windows XP (NT5)
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.

106 lines
3.4 KiB

  1. /* xlocinfo.h internal header for Microsoft C */
  2. #pragma once
  3. #ifndef _XLOCINFO
  4. #define _XLOCINFO
  5. #include <ctype.h>
  6. #include <locale.h>
  7. #include <wchar.h>
  8. #ifndef _YVALS
  9. #include <yvals.h>
  10. #endif
  11. /* SUPPLEMENTAL CTYPE MACROS & DECLARATIONS */
  12. #define _XA 0x100 /* extra alphabetic */
  13. #define _XS 0x000 /* extra space */
  14. #define _BB _CONTROL /* BEL, BS, etc. */
  15. #define _CN _SPACE /* CR, FF, HT, NL, VT */
  16. #define _DI _DIGIT /* '0'-'9' */
  17. #define _LO _LOWER /* 'a'-'z' */
  18. #define _PU _PUNCT /* punctuation */
  19. #define _SP _BLANK /* space */
  20. #define _UP _UPPER /* 'A'-'Z' */
  21. #define _XD _HEX /* '0'-'9', 'A'-'F', 'a'-'f' */
  22. /* SUPPLEMENTAL LOCALE MACROS AND DECLARATIONS */
  23. #define _X_ALL LC_ALL
  24. #define _X_COLLATE LC_COLLATE
  25. #define _X_CTYPE LC_CTYPE
  26. #define _X_MONETARY LC_MONETARY
  27. #define _X_NUMERIC LC_NUMERIC
  28. #define _X_TIME LC_TIME
  29. #define _X_MAX LC_MAX
  30. #define _X_MESSAGE 6
  31. #define _NCAT 7
  32. #define _CATMASK(n) ((1 << (n)) >> 1)
  33. #define _M_COLLATE _CATMASK(_X_COLLATE)
  34. #define _M_CTYPE _CATMASK(_X_CTYPE)
  35. #define _M_MONETARY _CATMASK(_X_MONETARY)
  36. #define _M_NUMERIC _CATMASK(_X_NUMERIC)
  37. #define _M_TIME _CATMASK(_X_TIME)
  38. #define _M_MESSAGE _CATMASK(_X_MESSAGE)
  39. #define _M_ALL (_CATMASK(_NCAT) - 1)
  40. typedef struct _Collvec
  41. { /* stuff needed by _Strcoll, etc. */
  42. unsigned long _Hand; // LCID
  43. unsigned int _Page; // UINT
  44. } _Collvec;
  45. typedef struct _Ctypevec
  46. { /* stuff needed by _Tolower, etc. */
  47. unsigned long _Hand; // LCID
  48. unsigned int _Page; // UINT
  49. const short *_Table;
  50. int _Delfl;
  51. } _Ctypevec;
  52. typedef struct _Cvtvec
  53. { /* stuff needed by _Mbrtowc, etc. */
  54. unsigned long _Hand; // LCID
  55. unsigned int _Page; // UINT
  56. } _Cvtvec;
  57. /* FUNCTION DECLARATIONS */
  58. _C_LIB_DECL
  59. _CRTIMP2 _Collvec __cdecl _Getcoll();
  60. _CRTIMP2 _Ctypevec __cdecl _Getctype();
  61. _CRTIMP2 _Cvtvec __cdecl _Getcvt();
  62. _CRTIMP2 int __cdecl _Getdateorder();
  63. _CRTIMP2 char *__cdecl _Getdays();
  64. _CRTIMP2 char *__cdecl _Getmonths();
  65. _CRTIMP2 void *__cdecl _Gettnames();
  66. _CRTIMP2 int __cdecl _Mbrtowc(wchar_t *, const char *, size_t,
  67. mbstate_t *, const _Cvtvec *);
  68. _CRTIMP2 float __cdecl _Stof(const char *, char **, long);
  69. _CRTIMP2 double __cdecl _Stod(const char *, char **, long);
  70. _CRTIMP2 long double __cdecl _Stold(const char *, char **, long);
  71. _CRTIMP2 int __cdecl _Strcoll(const char *, const char *,
  72. const char *, const char *, const _Collvec *);
  73. _CRTIMP size_t __cdecl _Strftime(char *, size_t, const char *,
  74. const struct tm *, void *);
  75. _CRTIMP2 size_t __cdecl _Strxfrm(char *, char *,
  76. const char *, const char *, const _Collvec *);
  77. _CRTIMP2 int __cdecl _Tolower(int, const _Ctypevec *);
  78. _CRTIMP2 int __cdecl _Toupper(int, const _Ctypevec *);
  79. _CRTIMP2 int __cdecl _Wcrtomb(char *, wchar_t, mbstate_t *,
  80. const _Cvtvec *);
  81. _CRTIMP2 int __cdecl _Wcscoll(const wchar_t *, const wchar_t *,
  82. const wchar_t *, const wchar_t *, const _Collvec *);
  83. _CRTIMP2 size_t __cdecl _Wcsxfrm(wchar_t *, wchar_t *,
  84. const wchar_t *, const wchar_t *, const _Collvec *);
  85. _CRTIMP2 short __cdecl _Getwctype(wchar_t, const _Ctypevec *);
  86. _CRTIMP2 const wchar_t * __cdecl _Getwctypes(const wchar_t *, const wchar_t *,
  87. short*, const _Ctypevec*);
  88. _CRTIMP2 wchar_t __cdecl _Towlower(wchar_t, const _Ctypevec *);
  89. _CRTIMP2 wchar_t __cdecl _Towupper(wchar_t, const _Ctypevec *);
  90. _END_C_LIB_DECL
  91. #endif /* _XLOCINFO */
  92. /*
  93. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  94. * Consult your license regarding permissions and restrictions.
  95. V3.10:0009 */