| 1 | /* $Id: crt_wc.cpp,v 1.2 2000-02-21 23:11:30 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * The C RunTime DLL
|
|---|
| 5 | *
|
|---|
| 6 | * Implements C run-time functionality as known from UNIX.
|
|---|
| 7 | *
|
|---|
| 8 | * Partialy based on Wine
|
|---|
| 9 | *
|
|---|
| 10 | * Copyright 1996,1998 Marcus Meissner
|
|---|
| 11 | * Copyright 1996 Jukka Iivonen
|
|---|
| 12 | * Copyright 1997 Uwe Bonnes
|
|---|
| 13 | * Copyright 1999-2000 Jens Wiessner
|
|---|
| 14 | * Copyright 2000 Przemyslaw Dobrowolski
|
|---|
| 15 | *
|
|---|
| 16 | * CRTDLL - widechar functions
|
|---|
| 17 | *
|
|---|
| 18 | */
|
|---|
| 19 |
|
|---|
| 20 | #include <odin.h>
|
|---|
| 21 | #include <os2win.h>
|
|---|
| 22 | #include <wchar.h>
|
|---|
| 23 | #include <wctype.h>
|
|---|
| 24 | #include <heapstring.h>
|
|---|
| 25 | #include <string.h>
|
|---|
| 26 | #include "crtimps.h"
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | /*********************************************************************
|
|---|
| 30 | * _fgetwchar (CRTDLL.93)
|
|---|
| 31 | */
|
|---|
| 32 | wint_t CDECL CRTDLL__fgetwchar( void *i )
|
|---|
| 33 | {
|
|---|
| 34 | // TODO: Check if really ok.
|
|---|
| 35 | dprintf2(("CRTDLL: _fgetwchar -> _getch\n"));
|
|---|
| 36 | return CRTDLL__getch();
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | /*********************************************************************
|
|---|
| 41 | * CRTDLL__wcsdup (CRTDLL.317)
|
|---|
| 42 | */
|
|---|
| 43 | LPWSTR CDECL CRTDLL__wcsdup( LPCWSTR str )
|
|---|
| 44 | {
|
|---|
| 45 | dprintf2(("CRTDLL: _wcsdup\n"));
|
|---|
| 46 | LPWSTR ret = NULL;
|
|---|
| 47 | if (str)
|
|---|
| 48 | {
|
|---|
| 49 | int size = (wcslen((const wchar_t*)str) + 1) * sizeof(WCHAR);
|
|---|
| 50 | ret = (WCHAR*)CRTDLL_malloc( size );
|
|---|
| 51 | if (ret) memcpy( ret, str, size );
|
|---|
| 52 | }
|
|---|
| 53 | return ret;
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | /*********************************************************************
|
|---|
| 58 | * CRTDLL__wcsicmp (CRTDLL.318)
|
|---|
| 59 | */
|
|---|
| 60 | int CDECL CRTDLL__wcsicmp(LPWSTR str1, LPWSTR str2)
|
|---|
| 61 | {
|
|---|
| 62 | dprintf2(("CRTDLL: _wcsicmp(%08xh,%08xh)\n",
|
|---|
| 63 | str1,
|
|---|
| 64 | str2));
|
|---|
| 65 |
|
|---|
| 66 | return (CRTDLL__wcsnicmp(str1,
|
|---|
| 67 | str2,
|
|---|
| 68 | wcslen((wchar_t*) str1)));
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | /*********************************************************************
|
|---|
| 73 | * CRTDLL__wcsicoll (CRTDLL.319)
|
|---|
| 74 | */
|
|---|
| 75 | int CDECL CRTDLL__wcsicoll( LPCWSTR str1, LPCWSTR str2 )
|
|---|
| 76 | {
|
|---|
| 77 | dprintf2(("CRTDLL: _wcsicoll\n"));
|
|---|
| 78 | return CRTDLL__wcsicmp( (LPWSTR)str1, (LPWSTR)str2 );
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 | /*********************************************************************
|
|---|
| 83 | * CRTDLL__wcslwr (CRTDLL.320)
|
|---|
| 84 | */
|
|---|
| 85 | LPWSTR CDECL CRTDLL__wcslwr(LPWSTR str)
|
|---|
| 86 | {
|
|---|
| 87 | DWORD dwIndex;
|
|---|
| 88 |
|
|---|
| 89 | dprintf2(("CRTDLL: _wcslwr(%08xh)\n",
|
|---|
| 90 | str));
|
|---|
| 91 |
|
|---|
| 92 | for (dwIndex = wcslen((const wchar_t*)str);
|
|---|
| 93 | dwIndex;
|
|---|
| 94 | dwIndex--)
|
|---|
| 95 | {
|
|---|
| 96 | towlower(str[dwIndex]);
|
|---|
| 97 | }
|
|---|
| 98 |
|
|---|
| 99 | return (str);
|
|---|
| 100 | }
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 | /*********************************************************************
|
|---|
| 104 | * CRTDLL__wcsnicmp (CRTDLL.321)
|
|---|
| 105 | */
|
|---|
| 106 | int CDECL CRTDLL__wcsnicmp(LPCWSTR str1, LPCWSTR str2, int n)
|
|---|
| 107 | {
|
|---|
| 108 | dprintf2(("CRTDLL: _wcsnicmp(%08xh,%08xh,%08xh)\n",
|
|---|
| 109 | str1,
|
|---|
| 110 | str2,
|
|---|
| 111 | l));
|
|---|
| 112 |
|
|---|
| 113 | if (!n) return 0;
|
|---|
| 114 | while ((--n > 0) && *str1 && (towupper(*str1) == towupper(*str2)))
|
|---|
| 115 | {
|
|---|
| 116 | str1++;
|
|---|
| 117 | str2++;
|
|---|
| 118 | }
|
|---|
| 119 | return towupper(*str1) - towupper(*str2);
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 | /*********************************************************************
|
|---|
| 124 | * CRTDLL__wcsnset (CRTDLL.322)
|
|---|
| 125 | */
|
|---|
| 126 | LPWSTR CDECL CRTDLL__wcsnset( LPWSTR str, WCHAR c, INT n )
|
|---|
| 127 | {
|
|---|
| 128 | dprintf2(("CRTDLL: _wcsnset\n"));
|
|---|
| 129 | LPWSTR ret = str;
|
|---|
| 130 | while ((n-- > 0) && *str) *str++ = c;
|
|---|
| 131 | return ret;
|
|---|
| 132 | }
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | /*********************************************************************
|
|---|
| 136 | * CRTDLL__wcsrev (CRTDLL.323)
|
|---|
| 137 | */
|
|---|
| 138 | LPWSTR CDECL CRTDLL__wcsrev( LPWSTR str )
|
|---|
| 139 | {
|
|---|
| 140 | dprintf2(("CRTDLL: _wcsrev\n"));
|
|---|
| 141 | LPWSTR ret = str;
|
|---|
| 142 | LPWSTR end = str + wcslen((const wchar_t*)str) - 1;
|
|---|
| 143 | while (end > str)
|
|---|
| 144 | {
|
|---|
| 145 | WCHAR t = *end;
|
|---|
| 146 | *end-- = *str;
|
|---|
| 147 | *str++ = t;
|
|---|
| 148 | }
|
|---|
| 149 | return ret;
|
|---|
| 150 | }
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 | /*********************************************************************
|
|---|
| 154 | * CRTDLL__wcsset (CRTDLL.324)
|
|---|
| 155 | */
|
|---|
| 156 | LPWSTR CDECL CRTDLL__wcsset( LPWSTR str, WCHAR c )
|
|---|
| 157 | {
|
|---|
| 158 | dprintf2(("CRTDLL: _wcsset\n"));
|
|---|
| 159 | LPWSTR ret = str;
|
|---|
| 160 | while (*str) *str++ = c;
|
|---|
| 161 | return ret;
|
|---|
| 162 | }
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 | /*********************************************************************
|
|---|
| 166 | * CRTDLL__wcsupr (CRTDLL.325)
|
|---|
| 167 | */
|
|---|
| 168 | LPWSTR CDECL CRTDLL__wcsupr(LPWSTR str)
|
|---|
| 169 | {
|
|---|
| 170 | DWORD dwIndex;
|
|---|
| 171 |
|
|---|
| 172 | dprintf2(("CRTDLL: _wcsupr(%08xh)\n",
|
|---|
| 173 | str));
|
|---|
| 174 |
|
|---|
| 175 | for (dwIndex = wcslen((const wchar_t*)str);
|
|---|
| 176 | dwIndex;
|
|---|
| 177 | dwIndex--)
|
|---|
| 178 | {
|
|---|
| 179 | towupper(str[dwIndex]);
|
|---|
| 180 | }
|
|---|
| 181 |
|
|---|
| 182 | return (str);
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 | /*********************************************************************
|
|---|
| 187 | * _wtoi (CRTDLL.330)
|
|---|
| 188 | */
|
|---|
| 189 | int CDECL CRTDLL__wtoi( const wchar_t *s )
|
|---|
| 190 | {
|
|---|
| 191 | // int -32768-32768 = size 6 + null-terminatedstr
|
|---|
| 192 | char tempstr[7];
|
|---|
| 193 |
|
|---|
| 194 | WideCharToMultiByte(0, // = CP_ACP
|
|---|
| 195 | 0,
|
|---|
| 196 | (LPCWSTR)s,
|
|---|
| 197 | -1,
|
|---|
| 198 | tempstr,
|
|---|
| 199 | 7,
|
|---|
| 200 | NULL,
|
|---|
| 201 | NULL);
|
|---|
| 202 |
|
|---|
| 203 | return (atoi(tempstr));
|
|---|
| 204 | }
|
|---|
| 205 |
|
|---|
| 206 |
|
|---|
| 207 | /*********************************************************************
|
|---|
| 208 | * _wtol (CRTDLL.331)
|
|---|
| 209 | */
|
|---|
| 210 | long int CDECL CRTDLL__wtol( const wchar_t *s )
|
|---|
| 211 | {
|
|---|
| 212 | // long int -2147483647-2147483647 = size 10 + null-terminatedstr
|
|---|
| 213 | char tempstr[11];
|
|---|
| 214 | WideCharToMultiByte(0, // = CP_ACP
|
|---|
| 215 | 0,
|
|---|
| 216 | (LPCWSTR)s,
|
|---|
| 217 | -1,
|
|---|
| 218 | tempstr,
|
|---|
| 219 | 11,
|
|---|
| 220 | NULL,
|
|---|
| 221 | NULL);
|
|---|
| 222 |
|
|---|
| 223 | return (atol(tempstr));
|
|---|
| 224 |
|
|---|
| 225 | return 0;
|
|---|
| 226 | }
|
|---|
| 227 |
|
|---|
| 228 |
|
|---|
| 229 | /*********************************************************************
|
|---|
| 230 | * fgetwc (CRTDLL.366)
|
|---|
| 231 | */
|
|---|
| 232 | wint_t CDECL CRTDLL_fgetwc( FILE *f )
|
|---|
| 233 | {
|
|---|
| 234 | dprintf2(("CRTDLL: fgetwc\n"));
|
|---|
| 235 | return (fgetwc(f));
|
|---|
| 236 | }
|
|---|
| 237 |
|
|---|
| 238 |
|
|---|
| 239 | /*********************************************************************
|
|---|
| 240 | * fputwc (CRTDLL.373)
|
|---|
| 241 | */
|
|---|
| 242 | wint_t CDECL CRTDLL_fputwc( wint_t wc, FILE *strm )
|
|---|
| 243 | {
|
|---|
| 244 | dprintf2(("CRTDLL: fputwc\n"));
|
|---|
| 245 | return (fputwc(wc, strm));
|
|---|
| 246 | }
|
|---|
| 247 |
|
|---|
| 248 |
|
|---|
| 249 | /*********************************************************************
|
|---|
| 250 | * iswalnum (CRTDLL.402)
|
|---|
| 251 | */
|
|---|
| 252 | int CDECL CRTDLL_iswalnum(wint_t i)
|
|---|
| 253 | {
|
|---|
| 254 | dprintf2(("CRTDLL: iswalnum(%08xh)\n", i));
|
|---|
| 255 | return (iswalnum(i));
|
|---|
| 256 | }
|
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 | /*********************************************************************
|
|---|
| 260 | * iswalpha (CRTDLL.403)
|
|---|
| 261 | */
|
|---|
| 262 | int CDECL CRTDLL_iswalpha(wint_t i)
|
|---|
| 263 | {
|
|---|
| 264 | dprintf2(("CRTDLL: iswalpha(%08xh)\n", i));
|
|---|
| 265 | return (iswalpha(i));
|
|---|
| 266 | }
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 | /*********************************************************************
|
|---|
| 270 | * iswascii (CRTDLL.404)
|
|---|
| 271 | */
|
|---|
| 272 | int CDECL CRTDLL_iswascii(wint_t c)
|
|---|
| 273 | {
|
|---|
| 274 | dprintf2(("CRTDLL: iswascii\n", c));
|
|---|
| 275 | return (!((c)&(~0x7f)));
|
|---|
| 276 | }
|
|---|
| 277 |
|
|---|
| 278 |
|
|---|
| 279 | /*********************************************************************
|
|---|
| 280 | * iswcntrl (CRTDLL.405)
|
|---|
| 281 | */
|
|---|
| 282 | int CDECL CRTDLL_iswcntrl(wint_t i)
|
|---|
| 283 | {
|
|---|
| 284 | dprintf2(("CRTDLL: iswcntrl(%08xh)\n", i));
|
|---|
| 285 | return (iswcntrl(i));
|
|---|
| 286 | }
|
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 | /*********************************************************************
|
|---|
| 290 | * iswctype (CRTDLL.406)
|
|---|
| 291 | */
|
|---|
| 292 | int CDECL CRTDLL_iswctype(wint_t i, wctype_t wct)
|
|---|
| 293 | {
|
|---|
| 294 | dprintf2(("CRTDLL: iswctype(%08xh, %08xh)\n", i, wct));
|
|---|
| 295 | return (iswctype(i, wct));
|
|---|
| 296 | }
|
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 | /*********************************************************************
|
|---|
| 300 | * iswdigit (CRTDLL.407)
|
|---|
| 301 | */
|
|---|
| 302 | int CDECL CRTDLL_iswdigit(wint_t i)
|
|---|
| 303 | {
|
|---|
| 304 | dprintf2(("CRTDLL: iswdigit(%08xh)\n", i));
|
|---|
| 305 | return (iswdigit(i));
|
|---|
| 306 | }
|
|---|
| 307 |
|
|---|
| 308 |
|
|---|
| 309 | /*********************************************************************
|
|---|
| 310 | * iswgraph (CRTDLL.408)
|
|---|
| 311 | */
|
|---|
| 312 | int CDECL CRTDLL_iswgraph(wint_t i)
|
|---|
| 313 | {
|
|---|
| 314 | dprintf2(("CRTDLL: iswgraph(%08xh)\n", i));
|
|---|
| 315 | return (iswgraph(i));
|
|---|
| 316 | }
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 | /*********************************************************************
|
|---|
| 320 | * iswlower (CRTDLL.409)
|
|---|
| 321 | */
|
|---|
| 322 | int CDECL CRTDLL_iswlower(wint_t i)
|
|---|
| 323 | {
|
|---|
| 324 | dprintf2(("CRTDLL: iswlower(%08xh)\n", i));
|
|---|
| 325 | return (iswlower(i));
|
|---|
| 326 | }
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 | /*********************************************************************
|
|---|
| 330 | * iswprint (CRTDLL.410)
|
|---|
| 331 | */
|
|---|
| 332 | int CDECL CRTDLL_iswprint(wint_t i)
|
|---|
| 333 | {
|
|---|
| 334 | dprintf2(("CRTDLL: iswprint(%08xh)\n", i));
|
|---|
| 335 | return (iswprint(i));
|
|---|
| 336 | }
|
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 | /*********************************************************************
|
|---|
| 340 | * iswpunct (CRTDLL.411)
|
|---|
| 341 | */
|
|---|
| 342 | int CDECL CRTDLL_iswpunct(wint_t i)
|
|---|
| 343 | {
|
|---|
| 344 | dprintf2(("CRTDLL: iswpunct(%08xh)\n", i));
|
|---|
| 345 | return (iswpunct(i));
|
|---|
| 346 | }
|
|---|
| 347 |
|
|---|
| 348 |
|
|---|
| 349 | /*********************************************************************
|
|---|
| 350 | * iswspace (CRTDLL.412)
|
|---|
| 351 | */
|
|---|
| 352 | int CDECL CRTDLL_iswspace(wint_t i)
|
|---|
| 353 | {
|
|---|
| 354 | dprintf2(("CRTDLL: iswspace(%08xh)\n", i));
|
|---|
| 355 | return (iswspace(i));
|
|---|
| 356 | }
|
|---|
| 357 |
|
|---|
| 358 |
|
|---|
| 359 | /*********************************************************************
|
|---|
| 360 | * iswupper (CRTDLL.413)
|
|---|
| 361 | */
|
|---|
| 362 | int CDECL CRTDLL_iswupper(wint_t i)
|
|---|
| 363 | {
|
|---|
| 364 | dprintf2(("CRTDLL: iswupper(%08xh)\n", i));
|
|---|
| 365 | return (iswupper(i));
|
|---|
| 366 | }
|
|---|
| 367 |
|
|---|
| 368 |
|
|---|
| 369 | /*********************************************************************
|
|---|
| 370 | * iswxdigit (CRTDLL.414)
|
|---|
| 371 | */
|
|---|
| 372 | int CDECL CRTDLL_iswxdigit(wint_t i)
|
|---|
| 373 | {
|
|---|
| 374 | dprintf2(("CRTDLL: iswxdigit(%08xh)\n", i));
|
|---|
| 375 | return (iswxdigit(i));
|
|---|
| 376 | }
|
|---|
| 377 |
|
|---|
| 378 |
|
|---|
| 379 | /*********************************************************************
|
|---|
| 380 | * swprintf (CRTDLL.480)
|
|---|
| 381 | */
|
|---|
| 382 | int CDECL CRTDLL_swprintf(const LPWSTR str,
|
|---|
| 383 | int i,
|
|---|
| 384 | const LPWSTR format,
|
|---|
| 385 | ...)
|
|---|
| 386 | {
|
|---|
| 387 | va_list valist;
|
|---|
| 388 | int rc;
|
|---|
| 389 |
|
|---|
| 390 | dprintf2(("CRTDLL: swprintf(%s,%d,%s)\n",
|
|---|
| 391 | str,
|
|---|
| 392 | i,
|
|---|
| 393 | format));
|
|---|
| 394 |
|
|---|
| 395 | va_start( valist, format );
|
|---|
| 396 | rc = vswprintf( (wchar_t*)str,
|
|---|
| 397 | i,
|
|---|
| 398 | (wchar_t*)format,
|
|---|
| 399 | valist );
|
|---|
| 400 | va_end( valist );
|
|---|
| 401 | return rc;
|
|---|
| 402 | }
|
|---|
| 403 |
|
|---|
| 404 |
|
|---|
| 405 | /*********************************************************************
|
|---|
| 406 | * swscanf (CRTDLL.481)
|
|---|
| 407 | */
|
|---|
| 408 | int CDECL CRTDLL_swscanf( const wchar_t *s1, const wchar_t *s2, va_list arg )
|
|---|
| 409 | {
|
|---|
| 410 | dprintf(("CRTDLL: swscanf\n"));
|
|---|
| 411 | return (swscanf(s1, s2, arg));
|
|---|
| 412 | }
|
|---|
| 413 |
|
|---|
| 414 |
|
|---|
| 415 | /*********************************************************************
|
|---|
| 416 | * towlower (CRTDLL.490)
|
|---|
| 417 | */
|
|---|
| 418 | WCHAR CDECL CRTDLL_towlower(WCHAR c)
|
|---|
| 419 | {
|
|---|
| 420 | dprintf2(("CRTDLL: towlower(%c)\n",
|
|---|
| 421 | c));
|
|---|
| 422 |
|
|---|
| 423 | return (towlower(c));
|
|---|
| 424 | }
|
|---|
| 425 |
|
|---|
| 426 |
|
|---|
| 427 | /*********************************************************************
|
|---|
| 428 | * towupper (CRTDLL.491)
|
|---|
| 429 | */
|
|---|
| 430 | WCHAR CDECL CRTDLL_towupper(WCHAR c)
|
|---|
| 431 | {
|
|---|
| 432 | dprintf2(("CRTDLL: towupper(%c)\n",
|
|---|
| 433 | c));
|
|---|
| 434 |
|
|---|
| 435 | return (towupper(c));
|
|---|
| 436 | }
|
|---|
| 437 |
|
|---|
| 438 |
|
|---|
| 439 | /*********************************************************************
|
|---|
| 440 | * ungetwc (CRTDLL.493)
|
|---|
| 441 | */
|
|---|
| 442 | wint_t CDECL CRTDLL_ungetwc( wint_t wc, FILE *strm )
|
|---|
| 443 | {
|
|---|
| 444 | dprintf2(("CRTDLL: ungetwc\n"));
|
|---|
| 445 | return (ungetwc(wc, strm));
|
|---|
| 446 | }
|
|---|
| 447 |
|
|---|
| 448 |
|
|---|
| 449 | /*********************************************************************
|
|---|
| 450 | * vswprintf (CRTDLL.498)
|
|---|
| 451 | */
|
|---|
| 452 | int CDECL CRTDLL_vswprintf( wchar_t *s , size_t t, const wchar_t *format, va_list arg )
|
|---|
| 453 | {
|
|---|
| 454 | dprintf2(("CRTDLL: vswprintf\n"));
|
|---|
| 455 | return (vswprintf(s, t, format, arg));
|
|---|
| 456 | }
|
|---|
| 457 |
|
|---|
| 458 |
|
|---|
| 459 | /*********************************************************************
|
|---|
| 460 | * wcscat (CRTDLL.500)
|
|---|
| 461 | */
|
|---|
| 462 | wchar_t* CDECL CRTDLL_wcscat( wchar_t* str1,
|
|---|
| 463 | const wchar_t* str2)
|
|---|
| 464 | {
|
|---|
| 465 | dprintf2(("CRTDLL: wcscat(%08xh,%08xh)\n",
|
|---|
| 466 | str1,
|
|---|
| 467 | str2));
|
|---|
| 468 |
|
|---|
| 469 | return (wcscat(str1, str2));
|
|---|
| 470 | }
|
|---|
| 471 |
|
|---|
| 472 |
|
|---|
| 473 | /*********************************************************************
|
|---|
| 474 | * wcschr (CRTDLL.501)
|
|---|
| 475 | */
|
|---|
| 476 | wchar_t* CDECL CRTDLL_wcschr(const wchar_t* str,
|
|---|
| 477 | int i)
|
|---|
| 478 | {
|
|---|
| 479 | dprintf2(("CRTDLL: wcschr(%08xh,%08xh)\n",
|
|---|
| 480 | str,
|
|---|
| 481 | i));
|
|---|
| 482 |
|
|---|
| 483 | return (wcschr(str, i));
|
|---|
| 484 | }
|
|---|
| 485 |
|
|---|
| 486 |
|
|---|
| 487 | /*********************************************************************
|
|---|
| 488 | * wcscmp (CRTDLL.502)
|
|---|
| 489 | */
|
|---|
| 490 | int CDECL CRTDLL_wcscmp(const wchar_t* str1,
|
|---|
| 491 | const wchar_t* str2)
|
|---|
| 492 | {
|
|---|
| 493 | dprintf2(("CRTDLL: wcscmp(%08xh,%08xh)\n",
|
|---|
| 494 | str1,
|
|---|
| 495 | str2));
|
|---|
| 496 |
|
|---|
| 497 | return (wcscmp(str1, str2));
|
|---|
| 498 | }
|
|---|
| 499 |
|
|---|
| 500 |
|
|---|
| 501 | /*********************************************************************
|
|---|
| 502 | * wcscoll (CRTDLL.503)
|
|---|
| 503 | */
|
|---|
| 504 | DWORD CDECL CRTDLL_wcscoll(LPCWSTR str1, LPCWSTR str2)
|
|---|
| 505 | {
|
|---|
| 506 | dprintf2(("CRTDLL: wcscoll\n"));
|
|---|
| 507 | return (wcscoll((const wchar_t*)str1, (const wchar_t*)str2));
|
|---|
| 508 | }
|
|---|
| 509 |
|
|---|
| 510 |
|
|---|
| 511 | /*********************************************************************
|
|---|
| 512 | * wcscpy (CRTDLL.504)
|
|---|
| 513 | */
|
|---|
| 514 | wchar_t* CDECL CRTDLL_wcscpy( wchar_t* str1,
|
|---|
| 515 | const wchar_t* str2)
|
|---|
| 516 | {
|
|---|
| 517 | dprintf2(("CRTDLL: wcscpy(%08xh,%08xh)\n",
|
|---|
| 518 | str1,
|
|---|
| 519 | str2));
|
|---|
| 520 |
|
|---|
| 521 | return (wcscpy(str1, str2));
|
|---|
| 522 | }
|
|---|
| 523 |
|
|---|
| 524 |
|
|---|
| 525 | /*********************************************************************
|
|---|
| 526 | * wcscspn (CRTDLL.505)
|
|---|
| 527 | */
|
|---|
| 528 | size_t CDECL CRTDLL_wcscspn(const wchar_t* str1,
|
|---|
| 529 | wchar_t* str2)
|
|---|
| 530 | {
|
|---|
| 531 | dprintf2(("CRTDLL: wcscspn(%08xh,%08xh)\n",
|
|---|
| 532 | str1,
|
|---|
| 533 | str2));
|
|---|
| 534 |
|
|---|
| 535 | return (wcscspn(str1, str2));
|
|---|
| 536 | }
|
|---|
| 537 |
|
|---|
| 538 |
|
|---|
| 539 | /*********************************************************************
|
|---|
| 540 | * wcsftime (CRTDLL.506)
|
|---|
| 541 | */
|
|---|
| 542 | size_t CDECL CRTDLL_wcsftime( wchar_t *s, size_t maxsize,
|
|---|
| 543 | const wchar_t *format, const struct tm *timeptr )
|
|---|
| 544 | {
|
|---|
| 545 | dprintf2(("CRTDLL: wcsftime\n"));
|
|---|
| 546 | return (wcsftime(s, maxsize, format, timeptr));
|
|---|
| 547 | }
|
|---|
| 548 |
|
|---|
| 549 |
|
|---|
| 550 | /*********************************************************************
|
|---|
| 551 | * wcslen (CRTDLL.507)
|
|---|
| 552 | */
|
|---|
| 553 | size_t CDECL CRTDLL_wcslen(const wchar_t* str)
|
|---|
| 554 | {
|
|---|
| 555 | dprintf2(("CRTDLL: wcslen(%08xh)\n",
|
|---|
| 556 | str));
|
|---|
| 557 |
|
|---|
| 558 | return (wcslen(str));
|
|---|
| 559 | }
|
|---|
| 560 |
|
|---|
| 561 |
|
|---|
| 562 | /*********************************************************************
|
|---|
| 563 | * wcsncat (CRTDLL.508)
|
|---|
| 564 | */
|
|---|
| 565 | wchar_t* CDECL CRTDLL_wcsncat( wchar_t* str1,
|
|---|
| 566 | const wchar_t* str2,
|
|---|
| 567 | size_t i)
|
|---|
| 568 | {
|
|---|
| 569 | dprintf2(("CRTDLL: wcsncat(%08xh,%08xh,%08xh)\n",
|
|---|
| 570 | str1,
|
|---|
| 571 | str2,
|
|---|
| 572 | i));
|
|---|
| 573 |
|
|---|
| 574 | return (wcsncat(str1, str2, i));
|
|---|
| 575 | }
|
|---|
| 576 |
|
|---|
| 577 |
|
|---|
| 578 |
|
|---|
| 579 | /*********************************************************************
|
|---|
| 580 | * wcsncmp (CRTDLL.509)
|
|---|
| 581 | */
|
|---|
| 582 | int CDECL CRTDLL_wcsncmp(const wchar_t* str1,
|
|---|
| 583 | const wchar_t* str2,
|
|---|
| 584 | size_t i)
|
|---|
| 585 | {
|
|---|
| 586 | dprintf2(("CRTDLL: wcsncmp(%08xh,%08xh,%08xh)\n",
|
|---|
| 587 | str1,
|
|---|
| 588 | str2,
|
|---|
| 589 | i));
|
|---|
| 590 |
|
|---|
| 591 | return (wcsncmp(str1, str2, i));
|
|---|
| 592 | }
|
|---|
| 593 |
|
|---|
| 594 |
|
|---|
| 595 | /*********************************************************************
|
|---|
| 596 | * wcsncmp (CRTDLL.510)
|
|---|
| 597 | */
|
|---|
| 598 | wchar_t* CDECL CRTDLL_wcsncpy( wchar_t* str1,
|
|---|
| 599 | const wchar_t* str2,
|
|---|
| 600 | size_t i)
|
|---|
| 601 | {
|
|---|
| 602 | dprintf2(("CRTDLL: wcsncpy(%s,%s,%08xh)\n",
|
|---|
| 603 | str1,
|
|---|
| 604 | str2,
|
|---|
| 605 | i));
|
|---|
| 606 |
|
|---|
| 607 | return (wcsncpy(str1, str2, i));
|
|---|
| 608 | }
|
|---|
| 609 |
|
|---|
| 610 |
|
|---|
| 611 | /*********************************************************************
|
|---|
| 612 | * wcspbrk (CRTDLL.511)
|
|---|
| 613 | */
|
|---|
| 614 | wchar_t* CDECL CRTDLL_wcspbrk(const wchar_t* str1,
|
|---|
| 615 | const wchar_t* str2)
|
|---|
| 616 | {
|
|---|
| 617 | dprintf2(("CRTDLL: wcspbrk(%08xh,%08xh)\n",
|
|---|
| 618 | str1,
|
|---|
| 619 | str2));
|
|---|
| 620 |
|
|---|
| 621 | return (wcspbrk(str1, str2));
|
|---|
| 622 | }
|
|---|
| 623 |
|
|---|
| 624 |
|
|---|
| 625 | /*********************************************************************
|
|---|
| 626 | * wcsrchr (CRTDLL.512)
|
|---|
| 627 | */
|
|---|
| 628 | wchar_t* CDECL CRTDLL_wcsrchr(const wchar_t* str,
|
|---|
| 629 | size_t i)
|
|---|
| 630 | {
|
|---|
| 631 | dprintf2(("CRTDLL: wcsrchr(%08xh,%08xh)\n",
|
|---|
| 632 | str,
|
|---|
| 633 | i));
|
|---|
| 634 |
|
|---|
| 635 | return (wcsrchr(str, i));
|
|---|
| 636 | }
|
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 | /*********************************************************************
|
|---|
| 640 | * wcsspn (CRTDLL.513)
|
|---|
| 641 | */
|
|---|
| 642 | size_t CDECL CRTDLL_wcsspn(const wchar_t* str1,
|
|---|
| 643 | const wchar_t* str2)
|
|---|
| 644 | {
|
|---|
| 645 | dprintf2(("CRTDLL: wcsspn(%08xh,%08xh)\n",
|
|---|
| 646 | str1,
|
|---|
| 647 | str2));
|
|---|
| 648 |
|
|---|
| 649 | return (wcsspn(str1, str2));
|
|---|
| 650 | }
|
|---|
| 651 |
|
|---|
| 652 |
|
|---|
| 653 | /*********************************************************************
|
|---|
| 654 | * wcsstr (CRTDLL.514)
|
|---|
| 655 | */
|
|---|
| 656 | wchar_t* CDECL CRTDLL_wcsstr(const wchar_t* str1,
|
|---|
| 657 | const wchar_t* str2)
|
|---|
| 658 | {
|
|---|
| 659 | dprintf2(("CRTDLL: wcsstr(%s,%s)\n",
|
|---|
| 660 | str1,
|
|---|
| 661 | str2));
|
|---|
| 662 |
|
|---|
| 663 | return (wcsstr(str1, str2));
|
|---|
| 664 | }
|
|---|
| 665 |
|
|---|
| 666 |
|
|---|
| 667 | /*********************************************************************
|
|---|
| 668 | * wcstod (CRTDLL.515)
|
|---|
| 669 | */
|
|---|
| 670 | double CDECL CRTDLL_wcstod( const wchar_t *nptr, wchar_t **endptr )
|
|---|
| 671 | {
|
|---|
| 672 | dprintf2(("CRTDLL: wcstod\n"));
|
|---|
| 673 | return (wcstod(nptr, endptr));
|
|---|
| 674 | }
|
|---|
| 675 |
|
|---|
| 676 |
|
|---|
| 677 | /*********************************************************************
|
|---|
| 678 | * wcstok (CRTDLL.516)
|
|---|
| 679 | */
|
|---|
| 680 | wchar_t * CDECL CRTDLL_wcstok( wchar_t *s1, const wchar_t *s2, wchar_t **ptr )
|
|---|
| 681 | {
|
|---|
| 682 | dprintf2(("CRTDLL: wcstok(%08xh, %08xh, %08xh)\n",s1,s2,ptr));
|
|---|
| 683 | return (wcstok(s1, s2, ptr));
|
|---|
| 684 | }
|
|---|
| 685 |
|
|---|
| 686 |
|
|---|
| 687 | /*********************************************************************
|
|---|
| 688 | * wcstol (CRTDLL.517)
|
|---|
| 689 | */
|
|---|
| 690 | long int CDECL CRTDLL_wcstol( const wchar_t *s1, wchar_t **s2, int i )
|
|---|
| 691 | {
|
|---|
| 692 | dprintf2(("CRTDLL: wcstol(%08xh, %08xh, %08xh)\n",s1,s2,i));
|
|---|
| 693 | return (wcstol(s1, s2, i));
|
|---|
| 694 | }
|
|---|
| 695 |
|
|---|
| 696 |
|
|---|
| 697 | /*********************************************************************
|
|---|
| 698 | * wcstombs (CRTDLL.518)
|
|---|
| 699 | */
|
|---|
| 700 | size_t CDECL CRTDLL_wcstombs( char *s, const wchar_t *pwcs, size_t n )
|
|---|
| 701 | {
|
|---|
| 702 | dprintf2(("CRTDLL: wcstombs(%08xh, %08xh, %08xh)\n",s,pwcs,n));
|
|---|
| 703 | return (wcstombs(s, pwcs, n));
|
|---|
| 704 | }
|
|---|
| 705 |
|
|---|
| 706 |
|
|---|
| 707 | /*********************************************************************
|
|---|
| 708 | * wcstoul (CRTDLL.519)
|
|---|
| 709 | */
|
|---|
| 710 | unsigned long int CDECL CRTDLL_wcstoul( const wchar_t *s1, wchar_t **s2, int i )
|
|---|
| 711 | {
|
|---|
| 712 | dprintf2(("CRTDLL: wcstoul(%08xh, %08xh, %08xh)\n",s1,s2,i));
|
|---|
| 713 | return (wcstoul(s1, s2, i));
|
|---|
| 714 | }
|
|---|
| 715 |
|
|---|
| 716 |
|
|---|
| 717 | /*********************************************************************
|
|---|
| 718 | * wcsxfrm (CRTDLL.520)
|
|---|
| 719 | */
|
|---|
| 720 | size_t CDECL CRTDLL_wcsxfrm( wchar_t *s1, const wchar_t *s2, size_t n )
|
|---|
| 721 | {
|
|---|
| 722 | dprintf2(("CRTDLL: wcsxfrm\n"));
|
|---|
| 723 | return (wcsxfrm(s1, s2, n));
|
|---|
| 724 | }
|
|---|
| 725 |
|
|---|
| 726 |
|
|---|
| 727 | /*********************************************************************
|
|---|
| 728 | * wctomb (CRTDLL.521)
|
|---|
| 729 | */
|
|---|
| 730 | int CDECL CRTDLL_wctomb( LPSTR dst, WCHAR ch )
|
|---|
| 731 | {
|
|---|
| 732 | dprintf2(("CRTDLL: wctomb\n"));
|
|---|
| 733 | return (wctomb((char*)dst,ch));
|
|---|
| 734 | }
|
|---|