home *** CD-ROM | disk | FTP | other *** search
/ Beginning C++ Through Gam…rogramming (2nd Edition) / BCGP2E.ISO / bloodshed / devcpp-4.9.9.2_setup.exe / mbctype.h < prev    next >
C/C++ Source or Header  |  2005-01-29  |  2KB  |  98 lines

  1. /* 
  2.  * mbctype.h
  3.  *
  4.  * Functions for testing multibyte character types and converting characters.
  5.  *
  6.  * This file is part of the Mingw32 package.
  7.  *
  8.  *
  9.  *  THIS SOFTWARE IS NOT COPYRIGHTED
  10.  *
  11.  *  This source code is offered for use in the public domain. You may
  12.  *  use, modify or distribute it freely.
  13.  *
  14.  *  This code is distributed in the hope that it will be useful but
  15.  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  16.  *  DISCLAIMED. This includes but is not limited to warranties of
  17.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  */
  20.  
  21. #ifndef _MBCTYPE_H_
  22. #define _MBCTYPE_H_
  23.  
  24. /* All the headers include this file. */
  25. #include <_mingw.h>
  26.  
  27. /* return values for _mbsbtype  and  _mbbtype in mbstring.h */
  28. #define _MBC_SINGLE 0 
  29. #define _MBC_LEAD 1  
  30. #define _MBC_TRAIL 2
  31. #define _MBC_ILLEGAL (-1)
  32.  
  33. /*  args for setmbcp (in lieu of actual codepage)  */
  34. #define _MB_CP_SBCS 0
  35. #define _MB_CP_OEM (-2)
  36. #define _MB_CP_ANSI (-3)
  37. #define _MB_CP_LOCALE (-4)
  38.  
  39. /* TODO: bit masks */
  40. /*
  41. #define _MS
  42. #define _MP
  43. #define _M1
  44. #define _M2
  45. #define _SBUP
  46. #define _SBLOW
  47. */
  48.  
  49. #ifndef RC_INVOKED
  50.  
  51. #ifdef __cplusplus 
  52. extern "C" {
  53. #endif
  54.  
  55. #ifndef    __STRICT_ANSI__
  56.  
  57. _CRTIMP int __cdecl _setmbcp (int);
  58. _CRTIMP int __cdecl _getmbcp (void);
  59.  
  60. /* byte classification  */
  61. /* NB: Corresponding _ismbc* functions are in mbstring.h */
  62.  
  63. _CRTIMP int __cdecl _ismbbalpha (unsigned int);
  64. _CRTIMP int __cdecl _ismbbalnum (unsigned int);
  65. _CRTIMP int __cdecl _ismbbgraph (unsigned int);
  66. _CRTIMP int __cdecl _ismbbprint (unsigned int);
  67. _CRTIMP int __cdecl _ismbbpunct (unsigned int);
  68.  
  69. _CRTIMP int __cdecl _ismbbkana (unsigned int);
  70. _CRTIMP int __cdecl _ismbbkalnum (unsigned int);
  71. _CRTIMP int __cdecl _ismbbkprint (unsigned int);
  72. _CRTIMP int __cdecl _ismbbkpunct (unsigned int);
  73.  
  74.  
  75. /* these are also in mbstring.h */
  76. _CRTIMP int __cdecl _ismbblead (unsigned int);
  77. _CRTIMP int __cdecl _ismbbtrail (unsigned int);
  78. _CRTIMP int __cdecl _ismbslead (const unsigned char*, const unsigned char*);
  79. _CRTIMP int __cdecl _ismbstrail (const unsigned char*, const unsigned char*);
  80.  
  81. #ifdef __DECLSPEC_SUPPORTED
  82. __MINGW_IMPORT unsigned char _mbctype[];
  83. __MINGW_IMPORT unsigned char _mbcasemap[];
  84. #endif
  85.  
  86. /* TODO : _MBCS_ mappings go in tchar.h */
  87.  
  88. #endif    /* Not strict ANSI */
  89.  
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93.  
  94. #endif    /* Not RC_INVOKED */
  95.  
  96. #endif    /* Not _MCTYPE_H_ */
  97.  
  98.