home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / xlocinfo.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  3KB  |  100 lines

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