Changeset 101 for trunk/src/user32/char.cpp
- Timestamp:
- Jun 11, 1999, 10:56:37 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/char.cpp
r96 r101 1 /* $Id: char.cpp,v 1. 3 1999-06-10 16:50:38phaller Exp $ */1 /* $Id: char.cpp,v 1.4 1999-06-11 08:56:37 phaller Exp $ */ 2 2 3 3 /* … … 12 12 * 13 13 */ 14 14 15 #include "user32.h" 16 17 #include <wctype.h> /* towupper, towlower support */ 15 18 16 19 … … 31 34 //****************************************************************************** 32 35 //****************************************************************************** 33 DWORD WIN32API CharLowerBuffW( LPWSTR arg1, DWORD arg2) 34 { 35 dprintf(("USER32: OS2CharLowerBuffW DOESN'T WORK\n")); 36 // NOTE: This will not work as is (needs UNICODE support) 37 return 0; 38 // return O32_CharLowerBuff(arg1, arg2); 39 } 40 //****************************************************************************** 41 //****************************************************************************** 42 LPWSTR WIN32API CharLowerW( LPWSTR arg1) 43 { 44 dprintf(("USER32: OS2CharLowerW DOESN'T WORK\n")); 45 // NOTE: This will not work as is (needs UNICODE support) 46 return NULL; 47 // return O32_CharLower(arg1); 36 DWORD WIN32API CharLowerBuffW(LPWSTR x,DWORD buflen) 37 { 38 DWORD done=0; 39 40 dprintf(("USER32: CharLowerBuffW(%08xh,%08xh)\n", 41 x, 42 buflen)); 43 44 if (!x) 45 return 0; /* YES */ 46 47 while (*x && (buflen--)) 48 { 49 *x=towlower(*x); 50 x++; 51 done++; 52 } 53 54 return done; 55 } 56 //****************************************************************************** 57 //****************************************************************************** 58 LPWSTR WIN32API CharLowerW( LPWSTR x) 59 { 60 dprintf(("USER32: CharLowerW(%08xh)\n", 61 x)); 62 63 if (HIWORD(x)) 64 { 65 LPWSTR s = x; 66 while (*s) 67 { 68 *s=towlower(*s); 69 s++; 70 } 71 return x; 72 } 73 else 74 return (LPWSTR)((UINT)towlower(LOWORD(x))); 48 75 } 49 76 //****************************************************************************** … … 51 78 LPSTR WIN32API CharNextA( LPCSTR arg1) 52 79 { 53 dprintf(("USER32: OS2CharNextA\n")); 80 dprintf(("USER32: OS2CharNextA(%08xh)\n", 81 arg1)); 82 54 83 return O32_CharNext(arg1); 55 84 } 56 85 //****************************************************************************** 57 86 //****************************************************************************** 58 LPWSTR WIN32API CharNextW( LPCWSTR arg1) 59 { 60 dprintf(("USER32: OS2CharNextW DOESN'T WORK\n")); 61 // NOTE: This will not work as is (needs UNICODE support) 62 return 0; 63 // return O32_CharNext(arg1); 87 LPWSTR WIN32API CharNextW(LPCWSTR x) 88 { 89 dprintf(("USER32: OS2CharNextW(%08xh)\n", 90 x)); 91 92 if (*x) 93 return (LPWSTR)(x+1); 94 else 95 return (LPWSTR)x; 64 96 } 65 97 //****************************************************************************** … … 72 104 //****************************************************************************** 73 105 //****************************************************************************** 74 LPWSTR WIN32API CharPrevW( LPCWSTR arg1, LPCWSTR arg2) 75 { 76 dprintf(("USER32: OS2CharPrevW DOESN'T WORK\n")); 77 // NOTE: This will not work as is (needs UNICODE support) 78 return 0; 79 // return O32_CharPrev(arg1, arg2); 106 LPWSTR WIN32API CharPrevW(LPCWSTR x, 107 LPCWSTR start) 108 { 109 dprintf(("USER32: OS2CharPrevW(%08xh,%08xh)\n", 110 x, 111 start)); 112 113 /* FIXME: add DBCS / codepage stuff */ 114 if (x>start) 115 return (LPWSTR)(x-1); 116 else 117 return (LPWSTR)x; 80 118 } 81 119 //****************************************************************************** … … 118 156 119 157 if((int)arg1 >> 16 != 0) { 120 158 dprintf(("USER32: OS2CharUpperA %s\n", arg1)); 121 159 } 122 160 else { 123 161 dprintf(("USER32: OS2CharUpperA %X\n", arg1)); 124 162 } 125 163 … … 127 165 128 166 if((int)rc >> 16 != 0) { 129 167 dprintf(("USER32: OS2CharUpperA %s\n", rc)); 130 168 } 131 169 else { 132 170 dprintf(("USER32: OS2CharUpperA %X\n", rc)); 133 171 } 134 172 … … 144 182 //****************************************************************************** 145 183 //****************************************************************************** 146 DWORD WIN32API CharUpperBuffW( LPWSTR arg1, DWORD arg2) 147 { 148 dprintf(("USER32: OS2CharUpperBuffW DOESN'T WORK\n")); 149 // NOTE: This will not work as is (needs UNICODE support) 150 return 0; 151 // return O32_CharUpperBuff(arg1, arg2); 152 } 153 //****************************************************************************** 154 //****************************************************************************** 155 LPWSTR WIN32API CharUpperW( LPWSTR arg1) 156 { 157 dprintf(("USER32: OS2CharUpperW DOESN'T WORK\n")); 158 // NOTE: This will not work as is (needs UNICODE support) 159 return 0; 160 // return O32_CharUpper(arg1); 184 DWORD WIN32API CharUpperBuffW(LPWSTR x, DWORD buflen) 185 { 186 DWORD done=0; 187 188 dprintf(("USER32: OS2CharUpperBuffW(%08xh,%08xh)\n", 189 x, 190 buflen)); 191 192 if (!x) 193 return 0; /* YES */ 194 195 while (*x && (buflen--)) 196 { 197 *x=towupper(*x); 198 x++; 199 done++; 200 } 201 202 return done; 203 } 204 //****************************************************************************** 205 //****************************************************************************** 206 LPWSTR WIN32API CharUpperW( LPWSTR x) 207 { 208 dprintf(("USER32: OS2CharUpperW(%08xh)\n", 209 x)); 210 211 if (HIWORD(x)) 212 { 213 LPWSTR s = x; 214 215 while (*s) 216 { 217 *s=towupper(*s); 218 s++; 219 } 220 return x; 221 } 222 else 223 return (LPWSTR)((UINT)towupper(LOWORD(x))); 161 224 } 162 225 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.