Changeset 8938 for trunk/include/win/wine/unicode.h
- Timestamp:
- Jul 30, 2002, 2:55:06 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/win/wine/unicode.h
r8585 r8938 77 77 extern int utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ); 78 78 79 extern WCHAR WINAPI tolowerW( WCHAR ch ); 80 extern WCHAR WINAPI toupperW( WCHAR ch ); 81 82 extern unsigned short get_char_typeW( WCHAR ch ); 79 extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 ); 80 extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ); 81 extern WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ); 82 extern long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base ); 83 extern unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base ); 83 84 84 85 static inline int is_dbcs_leadbyte( const union cptable *table, unsigned char ch ) … … 87 88 } 88 89 90 static inline WCHAR tolowerW( WCHAR ch ) 91 { 92 extern const WCHAR casemap_lower[]; 93 return ch + casemap_lower[casemap_lower[ch >> 8] + (ch & 0xff)]; 94 } 95 96 static inline WCHAR toupperW( WCHAR ch ) 97 { 98 extern const WCHAR casemap_upper[]; 99 return ch + casemap_upper[casemap_upper[ch >> 8] + (ch & 0xff)]; 100 } 101 102 /* the character type contains the C1_* flags in the low 12 bits */ 103 /* and the C2_* type in the high 4 bits */ 104 static inline unsigned short get_char_typeW( WCHAR ch ) 105 { 106 extern const unsigned short wctype_table[]; 107 return wctype_table[wctype_table[ch >> 8] + (ch & 0xff)]; 108 } 109 110 inline static int iscntrlW( WCHAR wc ) 111 { 112 return get_char_typeW(wc) & C1_CNTRL; 113 } 114 115 inline static int ispunctW( WCHAR wc ) 116 { 117 return get_char_typeW(wc) & C1_PUNCT; 118 } 119 120 inline static int isspaceW( WCHAR wc ) 121 { 122 return get_char_typeW(wc) & C1_SPACE; 123 } 124 89 125 inline static int isdigitW( WCHAR wc ) 90 126 { … … 97 133 } 98 134 99 inline static int isspaceW( WCHAR wc ) 100 { 101 return get_char_typeW(wc) & C1_SPACE; 102 } 103 104 #define islowerW(a) IsCharLowerW(a) 105 #define isupperW(a) IsCharUpperW(a) 106 #define isalnumW(a) IsCharAlphaNumericW(a) 107 #define isalphaW(a) IsCharAlphaW(a) 135 inline static int islowerW( WCHAR wc ) 136 { 137 return get_char_typeW(wc) & C1_LOWER; 138 } 139 140 inline static int isupperW( WCHAR wc ) 141 { 142 return get_char_typeW(wc) & C1_UPPER; 143 } 144 145 inline static int isalnumW( WCHAR wc ) 146 { 147 return get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT|C1_LOWER|C1_UPPER); 148 } 149 150 inline static int isalphaW( WCHAR wc ) 151 { 152 return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER); 153 } 154 155 inline static int isgraphW( WCHAR wc ) 156 { 157 return get_char_typeW(wc) & (C1_ALPHA|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); 158 } 159 160 inline static int isprintW( WCHAR wc ) 161 { 162 return get_char_typeW(wc) & (C1_ALPHA|C1_BLANK|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); 163 } 108 164 109 165 … … 214 270 } 215 271 216 extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 );217 extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n );218 extern WCHAR *strstrW( const WCHAR *str, const WCHAR *sub );219 220 272 221 273 #if defined(__IBMC__) || defined(__IBMCPP__) || defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
Note:
See TracChangeset
for help on using the changeset viewer.