| 1 | /* $Id: crtdll.cpp,v 1.6 1999-09-28 13:26:34 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * The C RunTime DLL
|
|---|
| 5 | *
|
|---|
| 6 | * Implements C run-time functionality as known from UNIX.
|
|---|
| 7 | *
|
|---|
| 8 | * Copyright 1996,1998 Marcus Meissner
|
|---|
| 9 | * Copyright 1996 Jukka Iivonen
|
|---|
| 10 | * Copyright 1997 Uwe Bonnes
|
|---|
| 11 | * Copyright 1999 Jens Wiessner
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | #include <os2win.h>
|
|---|
| 16 | #include <stdio.h>
|
|---|
| 17 | #include <stdlib.h>
|
|---|
| 18 | #include <string.h>
|
|---|
| 19 | #include <odinwrap.h>
|
|---|
| 20 | #include <misc.h>
|
|---|
| 21 | #include <unicode.h>
|
|---|
| 22 | #include <heapstring.h>
|
|---|
| 23 | #include <ctype.h>
|
|---|
| 24 | #include <setjmp.h>
|
|---|
| 25 | #include <except.h>
|
|---|
| 26 | #include <debugtools.h>
|
|---|
| 27 |
|
|---|
| 28 | #include <wchar.h>
|
|---|
| 29 | #include <wctype.h>
|
|---|
| 30 | #include <math.h>
|
|---|
| 31 | #include <locale.h>
|
|---|
| 32 | #include <signal.h>
|
|---|
| 33 | #include <io.h>
|
|---|
| 34 | #include <assert.h>
|
|---|
| 35 | #include <process.h>
|
|---|
| 36 | #include <float.h>
|
|---|
| 37 | #include <conio.h>
|
|---|
| 38 | #include <direct.h>
|
|---|
| 39 | #include <malloc.h>
|
|---|
| 40 | #include <drive.h>
|
|---|
| 41 | #include <fcntl.h>
|
|---|
| 42 | #include <sys\utime.h>
|
|---|
| 43 | #include <sys\stat.h>
|
|---|
| 44 |
|
|---|
| 45 | #include <crtdll.h>
|
|---|
| 46 | #include "crtinc.h"
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | DEFAULT_DEBUG_CHANNEL(crtdll)
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | /*********************************************************************
|
|---|
| 53 | * CRTDLL_MainInit (CRTDLL.init)
|
|---|
| 54 | */
|
|---|
| 55 | BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|---|
| 56 | {
|
|---|
| 57 | if (fdwReason == DLL_PROCESS_ATTACH) {
|
|---|
| 58 | CRTDLL__fdopen(0,"r");
|
|---|
| 59 | CRTDLL__fdopen(1,"w");
|
|---|
| 60 | CRTDLL__fdopen(2,"w");
|
|---|
| 61 | }
|
|---|
| 62 | return TRUE;
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | /*********************************************************************
|
|---|
| 67 | * new (CRTDLL.001)
|
|---|
| 68 | */
|
|---|
| 69 | VOID* CDECL CRTDLL_new(DWORD size)
|
|---|
| 70 | {
|
|---|
| 71 | dprintf(("CRTDLL: ??2@YAPAXI@Z\n"));
|
|---|
| 72 | VOID* result;
|
|---|
| 73 | if(!(result = HeapAlloc(GetProcessHeap(),0,size)) && new_handler)
|
|---|
| 74 | (*new_handler)();
|
|---|
| 75 | return result;
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 | /*********************************************************************
|
|---|
| 80 | * delete (CRTDLL.002)
|
|---|
| 81 | */
|
|---|
| 82 | VOID CDECL CRTDLL_delete(VOID* ptr)
|
|---|
| 83 | {
|
|---|
| 84 | dprintf(("CRTDLL: ??3@YAXPAX@Z\n"));
|
|---|
| 85 | HeapFree(GetProcessHeap(),0,ptr);
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 | /*********************************************************************
|
|---|
| 90 | * set_new_handler(CRTDLL.003)
|
|---|
| 91 | */
|
|---|
| 92 | new_handler_type CDECL CRTDLL_set_new_handler(new_handler_type func)
|
|---|
| 93 | {
|
|---|
| 94 | dprintf(("CRTDLL: ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z\n"));
|
|---|
| 95 | new_handler_type old_handler = new_handler;
|
|---|
| 96 | new_handler = func;
|
|---|
| 97 | return old_handler;
|
|---|
| 98 | }
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | /*********************************************************************
|
|---|
| 102 | * _XcptFilter (CRTDLL.21)
|
|---|
| 103 | * FIXME - Could not find anything about it
|
|---|
| 104 | */
|
|---|
| 105 | INT CDECL CRTDLL__XcptFilter(DWORD ret)
|
|---|
| 106 | {
|
|---|
| 107 | dprintf(("CRTDLL: XcptFilter not implemented.\n"));
|
|---|
| 108 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 109 | return FALSE;
|
|---|
| 110 | }
|
|---|
| 111 |
|
|---|
| 112 | /*********************************************************************
|
|---|
| 113 | * _GetMainArgs (CRTDLL.22)
|
|---|
| 114 | */
|
|---|
| 115 | DWORD CDECL CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
|
|---|
| 116 | LPSTR *environ,DWORD flag)
|
|---|
| 117 | {
|
|---|
| 118 | char *cmdline;
|
|---|
| 119 | char **xargv;
|
|---|
| 120 | int xargc,i,afterlastspace;
|
|---|
| 121 | DWORD version;
|
|---|
| 122 |
|
|---|
| 123 | dprintf(("CRTDLL: GetMainArgs\n"));
|
|---|
| 124 |
|
|---|
| 125 | CRTDLL_acmdln_dll = cmdline = HEAP_strdupA( GetProcessHeap(), 0,
|
|---|
| 126 | GetCommandLineA() );
|
|---|
| 127 |
|
|---|
| 128 | version = GetVersion();
|
|---|
| 129 | CRTDLL_osver_dll = version >> 16;
|
|---|
| 130 | CRTDLL_winminor_dll = version & 0xFF;
|
|---|
| 131 | CRTDLL_winmajor_dll = (version>>8) & 0xFF;
|
|---|
| 132 | CRTDLL_baseversion_dll = version >> 16;
|
|---|
| 133 | CRTDLL_winver_dll = ((version >> 8) & 0xFF) + ((version & 0xFF) << 8);
|
|---|
| 134 | CRTDLL_baseminor_dll = (version >> 16) & 0xFF;
|
|---|
| 135 | CRTDLL_basemajor_dll = (version >> 24) & 0xFF;
|
|---|
| 136 | CRTDLL_osversion_dll = version & 0xFFFF;
|
|---|
| 137 | CRTDLL_osminor_dll = version & 0xFF;
|
|---|
| 138 | CRTDLL_osmajor_dll = (version>>8) & 0xFF;
|
|---|
| 139 |
|
|---|
| 140 | /* missing threading init */
|
|---|
| 141 | /*
|
|---|
| 142 | i=0;xargv=NULL;xargc=0;afterlastspace=0;
|
|---|
| 143 | dprintf(("CRTDLL: GetMainArgs i loop\n"));
|
|---|
| 144 | while (cmdline[i]) {
|
|---|
| 145 | if (cmdline[i]==' ') {
|
|---|
| 146 | dprintf(("CRTDLL: GetMainArgs *1\n"));
|
|---|
| 147 | xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
|
|---|
| 148 | sizeof(char*)*(++xargc));
|
|---|
| 149 | cmdline[i]='\0';
|
|---|
| 150 | xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
|
|---|
| 151 | cmdline+afterlastspace);
|
|---|
| 152 | i++;
|
|---|
| 153 | dprintf(("CRTDLL: GetMainArgs *2\n"));
|
|---|
| 154 | while (cmdline[i]==' ')
|
|---|
| 155 | i++;
|
|---|
| 156 | if (cmdline[i])
|
|---|
| 157 | afterlastspace=i;
|
|---|
| 158 | dprintf(("CRTDLL: GetMainArgs *3\n"));
|
|---|
| 159 | } else
|
|---|
| 160 | i++;
|
|---|
| 161 |
|
|---|
| 162 | }
|
|---|
| 163 | xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
|
|---|
| 164 | sizeof(char*)*(++xargc));
|
|---|
| 165 | dprintf(("CRTDLL: GetMainArgs *4\n"));
|
|---|
| 166 | cmdline[i]='\0';
|
|---|
| 167 | dprintf(("CRTDLL: GetMainArgs *5\n"));
|
|---|
| 168 | xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
|
|---|
| 169 | cmdline+afterlastspace);
|
|---|
| 170 | dprintf(("CRTDLL: GetMainArgs *6\n"));
|
|---|
| 171 | dprintf(("CRTDLL: GetMainArgs *7\n"));
|
|---|
| 172 | CRTDLL_argc_dll = xargc;
|
|---|
| 173 | dprintf(("CRTDLL: GetMainArgs *8\n"));
|
|---|
| 174 | *argc = xargc;
|
|---|
| 175 | dprintf(("CRTDLL: GetMainArgs *9\n"));
|
|---|
| 176 | CRTDLL_argv_dll = xargv;
|
|---|
| 177 | dprintf(("CRTDLL: GetMainArgs *11\n"));
|
|---|
| 178 | *argv = xargv;
|
|---|
| 179 | */
|
|---|
| 180 | dprintf(("CRTDLL: GetMainArgs end\n"));
|
|---|
| 181 | CRTDLL_environ_dll = *environ = GetEnvironmentStringsA();
|
|---|
| 182 | return 0;
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 | /*********************************************************************
|
|---|
| 187 | * __dllonexit (CRTDLL.25)
|
|---|
| 188 | */
|
|---|
| 189 | VOID CDECL CRTDLL___dllonexit ()
|
|---|
| 190 | {
|
|---|
| 191 | dprintf(("__dllonexit not implemented.\n"));
|
|---|
| 192 | }
|
|---|
| 193 |
|
|---|
| 194 |
|
|---|
| 195 | /*********************************************************************
|
|---|
| 196 | * CRTDLL___isascii (CRTDLL.28)
|
|---|
| 197 | */
|
|---|
| 198 | int CDECL CRTDLL___isascii(int i)
|
|---|
| 199 | {
|
|---|
| 200 | dprintf(("CRTDLL: __isascii not implemented.\n"));
|
|---|
| 201 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 202 | return FALSE;
|
|---|
| 203 | }
|
|---|
| 204 |
|
|---|
| 205 |
|
|---|
| 206 | /*********************************************************************
|
|---|
| 207 | * CRTDLL___iscsym (CRTDLL.29)
|
|---|
| 208 | */
|
|---|
| 209 | int CDECL CRTDLL___iscsym(int i)
|
|---|
| 210 | {
|
|---|
| 211 | dprintf(("CRTDLL: __iscsym not implemented.\n"));
|
|---|
| 212 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 213 | return FALSE;
|
|---|
| 214 | }
|
|---|
| 215 |
|
|---|
| 216 |
|
|---|
| 217 | /*********************************************************************
|
|---|
| 218 | * CRTDLL___iscsymf (CRTDLL.30)
|
|---|
| 219 | */
|
|---|
| 220 | int CDECL CRTDLL___iscsymf(int i)
|
|---|
| 221 | {
|
|---|
| 222 | dprintf(("CRTDLL: __iscsymf not implemented.\n"));
|
|---|
| 223 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 224 | return FALSE;
|
|---|
| 225 | }
|
|---|
| 226 |
|
|---|
| 227 |
|
|---|
| 228 | /*********************************************************************
|
|---|
| 229 | * __mb_cur_max_dll (CRTDLL.31)
|
|---|
| 230 | * FIXME - Could not find anything about it
|
|---|
| 231 | */
|
|---|
| 232 | INT CDECL CRTDLL___mb_cur_max_dll(DWORD ret)
|
|---|
| 233 | {
|
|---|
| 234 | dprintf(("CRTDLL: __mb_cur_max_dll not implemented.\n"));
|
|---|
| 235 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 236 | return FALSE;
|
|---|
| 237 | }
|
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 | /*********************************************************************
|
|---|
| 241 | * CRTDLL___threadhandle (CRTDLL.32)
|
|---|
| 242 | */
|
|---|
| 243 | unsigned long CDECL CRTDLL___threadhandle( void )
|
|---|
| 244 | {
|
|---|
| 245 | dprintf(("CRTDLL: __threadhandle not implemented.\n"));
|
|---|
| 246 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 247 | return FALSE;
|
|---|
| 248 | }
|
|---|
| 249 |
|
|---|
| 250 |
|
|---|
| 251 | /*********************************************************************
|
|---|
| 252 | * CRTDLL___threadid (CRTDLL.33)
|
|---|
| 253 | */
|
|---|
| 254 | int * CDECL CRTDLL___threadid(void)
|
|---|
| 255 | {
|
|---|
| 256 | dprintf(("CRTDLL: __threadid not implemented.\n"));
|
|---|
| 257 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 258 | return FALSE;
|
|---|
| 259 | }
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 | /*********************************************************************
|
|---|
| 263 | * CRTDLL__abnormal_termination (CRTDLL.36)
|
|---|
| 264 | */
|
|---|
| 265 | int CDECL CRTDLL__abnormal_termination(void)
|
|---|
| 266 | {
|
|---|
| 267 | dprintf(("CRTDLL: _abnormal_termination not implemented.\n"));
|
|---|
| 268 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 269 | return FALSE;
|
|---|
| 270 | }
|
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 | /*********************************************************************
|
|---|
| 274 | * CRTDLL__access (CRTDLL.37)
|
|---|
| 275 | */
|
|---|
| 276 | int CDECL CRTDLL__access(const char *path,int mode)
|
|---|
| 277 | {
|
|---|
| 278 | dprintf(("CRTDLL: _access\n"));
|
|---|
| 279 | return (_access(path, mode));
|
|---|
| 280 | }
|
|---|
| 281 |
|
|---|
| 282 |
|
|---|
| 283 | /*********************************************************************
|
|---|
| 284 | * _aexit_rtn_dll (CRTDLL.39)
|
|---|
| 285 | * FIXME - Could not find anything about it
|
|---|
| 286 | */
|
|---|
| 287 | INT CDECL CRTDLL__aexit_rtn_dll(DWORD ret)
|
|---|
| 288 | {
|
|---|
| 289 | dprintf(("CRTDLL: _aexit_rtn_dll not implemented.\n"));
|
|---|
| 290 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 291 | return FALSE;
|
|---|
| 292 | }
|
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 | /*********************************************************************
|
|---|
| 296 | * _amsg_exit (CRTDLL.40)
|
|---|
| 297 | * FIXME - Could not find anything about it
|
|---|
| 298 | */
|
|---|
| 299 | INT CDECL CRTDLL__amsg_exit(DWORD ret)
|
|---|
| 300 | {
|
|---|
| 301 | dprintf(("CRTDLL: _amsg_exit not implemented.\n"));
|
|---|
| 302 | return 0;
|
|---|
| 303 | }
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 | /*********************************************************************
|
|---|
| 307 | * CRTDLL__assert (CRTDLL.41)
|
|---|
| 308 | */
|
|---|
| 309 | void CDECL CRTDLL__assert( char *s1, char *s2, int i)
|
|---|
| 310 | {
|
|---|
| 311 | dprintf(("CRTDLL: _assert\n"));
|
|---|
| 312 | _assert(s1, s2, i);
|
|---|
| 313 | }
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 | /*********************************************************************
|
|---|
| 317 | * CRTDLL__beginthread (CRTDLL.46)
|
|---|
| 318 | */
|
|---|
| 319 | unsigned long CDECL CRTDLL__beginthread( register void (*start_address)(void *),
|
|---|
| 320 | unsigned stack_size, void *arglist )
|
|---|
| 321 | {
|
|---|
| 322 | dprintf(("CRTDLL: _beginthread not implemented.\n"));
|
|---|
| 323 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 324 | return FALSE;
|
|---|
| 325 | }
|
|---|
| 326 |
|
|---|
| 327 |
|
|---|
| 328 | /*********************************************************************
|
|---|
| 329 | * _c_exit (CRTDLL.47)
|
|---|
| 330 | *
|
|---|
| 331 | */
|
|---|
| 332 | void CDECL CRTDLL__c_exit(INT ret)
|
|---|
| 333 | {
|
|---|
| 334 | dprintf(("_c_exit(%d)\n",ret));
|
|---|
| 335 | ExitProcess(ret);
|
|---|
| 336 | }
|
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 | /*********************************************************************
|
|---|
| 340 | * _cexit (CRTDLL.49)
|
|---|
| 341 | *
|
|---|
| 342 | */
|
|---|
| 343 | void CDECL CRTDLL__cexit(INT ret)
|
|---|
| 344 | {
|
|---|
| 345 | dprintf(("_cexit(%d)\n",ret));
|
|---|
| 346 | ExitProcess(ret);
|
|---|
| 347 | }
|
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 | /*********************************************************************
|
|---|
| 351 | * _chdir (CRTDLL.51)
|
|---|
| 352 | */
|
|---|
| 353 | INT CDECL CRTDLL__chdir(LPCSTR newdir)
|
|---|
| 354 | {
|
|---|
| 355 | dprintf(("CRTDLL: chdir\n"));
|
|---|
| 356 | if (!SetCurrentDirectoryA(newdir))
|
|---|
| 357 | return 1;
|
|---|
| 358 | return 0;
|
|---|
| 359 | }
|
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 | /*********************************************************************
|
|---|
| 363 | * _chdrive (CRTDLL.52)
|
|---|
| 364 | *
|
|---|
| 365 | * newdir [I] drive to change to, A=1
|
|---|
| 366 | *
|
|---|
| 367 | */
|
|---|
| 368 | BOOL CDECL CRTDLL__chdrive(INT newdrive)
|
|---|
| 369 | {
|
|---|
| 370 | /* FIXME: generates errnos */
|
|---|
| 371 | dprintf(("CRTDLL: _chdrive\n"));
|
|---|
| 372 | return DRIVE_SetCurrentDrive(newdrive-1);
|
|---|
| 373 | }
|
|---|
| 374 |
|
|---|
| 375 |
|
|---|
| 376 | /*********************************************************************
|
|---|
| 377 | * CRTDLL__close (CRTDLL.57)
|
|---|
| 378 | */
|
|---|
| 379 | int CDECL CRTDLL__close(int handle)
|
|---|
| 380 | {
|
|---|
| 381 | dprintf(("CRTDLL: _close\n"));
|
|---|
| 382 | return (_close(handle));
|
|---|
| 383 | }
|
|---|
| 384 |
|
|---|
| 385 |
|
|---|
| 386 | /*********************************************************************
|
|---|
| 387 | * CRTDLL__control87 (CRTDLL.60)
|
|---|
| 388 | */
|
|---|
| 389 | unsigned CDECL CRTDLL__control87(unsigned i1,unsigned i2)
|
|---|
| 390 | {
|
|---|
| 391 | dprintf(("CRTDLL: _control87\n"));
|
|---|
| 392 | return (_control87(i1, i2));
|
|---|
| 393 | }
|
|---|
| 394 |
|
|---|
| 395 |
|
|---|
| 396 | /*********************************************************************
|
|---|
| 397 | * CRTDLL__controlfp (CRTDLL.61)
|
|---|
| 398 | * FIXME - Could not find anything about it
|
|---|
| 399 | */
|
|---|
| 400 | INT CDECL CRTDLL__controlfp(DWORD ret)
|
|---|
| 401 | {
|
|---|
| 402 | dprintf(("CRTDLL: _controlfp not implemented.\n"));
|
|---|
| 403 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 404 | return FALSE;
|
|---|
| 405 | }
|
|---|
| 406 |
|
|---|
| 407 |
|
|---|
| 408 | /*********************************************************************
|
|---|
| 409 | * CRTDLL__cwait (CRTDLL.69)
|
|---|
| 410 | */
|
|---|
| 411 | int CDECL CRTDLL__cwait( int *status, int process_id, int action_code )
|
|---|
| 412 | {
|
|---|
| 413 | dprintf(("CRTDLL: _cwait\n"));
|
|---|
| 414 | return (_cwait(status, process_id, action_code));
|
|---|
| 415 | }
|
|---|
| 416 |
|
|---|
| 417 |
|
|---|
| 418 | /*********************************************************************
|
|---|
| 419 | * CRTDLL__dup (CRTDLL.71)
|
|---|
| 420 | */
|
|---|
| 421 | int CDECL CRTDLL__dup(int handle)
|
|---|
| 422 | {
|
|---|
| 423 | dprintf(("CRTDLL: _dup\n"));
|
|---|
| 424 | return (_dup(handle));
|
|---|
| 425 | }
|
|---|
| 426 |
|
|---|
| 427 |
|
|---|
| 428 | /*********************************************************************
|
|---|
| 429 | * CRTDLL__dup2 (CRTDLL.72)
|
|---|
| 430 | */
|
|---|
| 431 | int CDECL CRTDLL__dup2(int handle1,int handle2)
|
|---|
| 432 | {
|
|---|
| 433 | dprintf(("CRTDLL: _dup2\n"));
|
|---|
| 434 | return (_dup2(handle1, handle2));
|
|---|
| 435 | }
|
|---|
| 436 |
|
|---|
| 437 |
|
|---|
| 438 | /*********************************************************************
|
|---|
| 439 | * CRTDLL__ecvt (CRTDLL.73)
|
|---|
| 440 | */
|
|---|
| 441 | char * CDECL CRTDLL__ecvt( double val, int ndig, int *dec, int *sign )
|
|---|
| 442 | {
|
|---|
| 443 | dprintf(("CRTDLL: _ecvt\n"));
|
|---|
| 444 | return (_ecvt(val, ndig, dec, sign));
|
|---|
| 445 | }
|
|---|
| 446 |
|
|---|
| 447 |
|
|---|
| 448 | /*********************************************************************
|
|---|
| 449 | * CRTDLL__endthread (CRTDLL.74)
|
|---|
| 450 | */
|
|---|
| 451 | void CDECL CRTDLL__endthread(void)
|
|---|
| 452 | {
|
|---|
| 453 | dprintf(("CRTDLL: _endthread\n"));
|
|---|
| 454 | _endthread ();
|
|---|
| 455 | }
|
|---|
| 456 |
|
|---|
| 457 |
|
|---|
| 458 | /*********************************************************************
|
|---|
| 459 | * CRTDLL__errno (CRTDLL.77)
|
|---|
| 460 | */
|
|---|
| 461 | int * CDECL CRTDLL__errno(void)
|
|---|
| 462 | {
|
|---|
| 463 | dprintf(("CRTDLL: _errno\n"));
|
|---|
| 464 | return (_errno());
|
|---|
| 465 | }
|
|---|
| 466 |
|
|---|
| 467 |
|
|---|
| 468 | /*********************************************************************
|
|---|
| 469 | * _except_handler2 (CRTDLL.78)
|
|---|
| 470 | */
|
|---|
| 471 | INT CDECL CRTDLL__except_handler2 ( PEXCEPTION_RECORD rec,
|
|---|
| 472 | PEXCEPTION_FRAME frame, PCONTEXT context,
|
|---|
| 473 | PEXCEPTION_FRAME *dispatcher)
|
|---|
| 474 | {
|
|---|
| 475 | dprintf(("CRTDLL: _except_handler2\n"));
|
|---|
| 476 | return 1;
|
|---|
| 477 | }
|
|---|
| 478 |
|
|---|
| 479 |
|
|---|
| 480 | /*********************************************************************
|
|---|
| 481 | * _exit (CRTDLL.87)
|
|---|
| 482 | */
|
|---|
| 483 | VOID CDECL CRTDLL__exit(DWORD ret)
|
|---|
| 484 | {
|
|---|
| 485 | dprintf(("CRTDLL: _exit\n"));
|
|---|
| 486 | ExitProcess(ret);
|
|---|
| 487 | }
|
|---|
| 488 |
|
|---|
| 489 |
|
|---|
| 490 | /*********************************************************************
|
|---|
| 491 | * CRTDLL__expand (CRTDLL.88)
|
|---|
| 492 | */
|
|---|
| 493 | void * CDECL CRTDLL__expand( void *ptr, size_t size )
|
|---|
| 494 | {
|
|---|
| 495 | dprintf(("CRTDLL: _expand not implemented.\n"));
|
|---|
| 496 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 497 | return FALSE;
|
|---|
| 498 | }
|
|---|
| 499 |
|
|---|
| 500 |
|
|---|
| 501 | /*********************************************************************
|
|---|
| 502 | * CRTDLL__fcvt (CRTDLL.90)
|
|---|
| 503 | */
|
|---|
| 504 | char * CDECL CRTDLL__fcvt( double val, int ndig, int *dec, int *sign )
|
|---|
| 505 | {
|
|---|
| 506 | dprintf(("CRTDLL: _fcvt\n"));
|
|---|
| 507 | return (_fcvt(val, ndig, dec, sign));
|
|---|
| 508 | }
|
|---|
| 509 |
|
|---|
| 510 |
|
|---|
| 511 | /*********************************************************************
|
|---|
| 512 | * _fdopen (CRTDLL.91)
|
|---|
| 513 | */
|
|---|
| 514 | CRTDLL_FILE * CDECL CRTDLL__fdopen(INT handle, LPCSTR mode)
|
|---|
| 515 | {
|
|---|
| 516 | dprintf(("CRTDLL: fdopen\n"));
|
|---|
| 517 | CRTDLL_FILE *file;
|
|---|
| 518 |
|
|---|
| 519 | switch (handle)
|
|---|
| 520 | {
|
|---|
| 521 | case 0:
|
|---|
| 522 | file = CRTDLL_stdin;
|
|---|
| 523 | if (!file->handle) file->handle = GetStdHandle( STD_INPUT_HANDLE );
|
|---|
| 524 | break;
|
|---|
| 525 | case 1:
|
|---|
| 526 | file = CRTDLL_stdout;
|
|---|
| 527 | if (!file->handle) file->handle = GetStdHandle( STD_OUTPUT_HANDLE );
|
|---|
| 528 | break;
|
|---|
| 529 | case 2:
|
|---|
| 530 | file=CRTDLL_stderr;
|
|---|
| 531 | if (!file->handle) file->handle = GetStdHandle( STD_ERROR_HANDLE );
|
|---|
| 532 | break;
|
|---|
| 533 | default:
|
|---|
| 534 | file = (PCRTDLL_FILE)HeapAlloc( GetProcessHeap(), 0, sizeof(*file) );
|
|---|
| 535 | file->handle = handle;
|
|---|
| 536 | break;
|
|---|
| 537 | }
|
|---|
| 538 | return file;
|
|---|
| 539 | }
|
|---|
| 540 |
|
|---|
| 541 |
|
|---|
| 542 | /*********************************************************************
|
|---|
| 543 | * CRTDLL__fgetchar (CRTDLL.92)
|
|---|
| 544 | */
|
|---|
| 545 | int CDECL CRTDLL__fgetchar( void )
|
|---|
| 546 | {
|
|---|
| 547 | dprintf(("CRTDLL: _fgetchar\n"));
|
|---|
| 548 | return (_fgetchar());
|
|---|
| 549 | }
|
|---|
| 550 |
|
|---|
| 551 |
|
|---|
| 552 | /*********************************************************************
|
|---|
| 553 | * CRTDLL__fgetwchar (CRTDLL.93)
|
|---|
| 554 | */
|
|---|
| 555 | wint_t CDECL CRTDLL__fgetwchar( void *i )
|
|---|
| 556 | {
|
|---|
| 557 | dprintf(("CRTDLL: _fgetwchar not implemented.\n"));
|
|---|
| 558 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 559 | return FALSE;
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 |
|
|---|
| 563 | /*********************************************************************
|
|---|
| 564 | * _findclose (CRTDLL.098)
|
|---|
| 565 | */
|
|---|
| 566 | int CDECL CRTDLL__findclose( long handle )
|
|---|
| 567 | {
|
|---|
| 568 | dprintf(("CRTDLL: _findclose not implemented.\n"));
|
|---|
| 569 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 570 | return FALSE;
|
|---|
| 571 | }
|
|---|
| 572 |
|
|---|
| 573 |
|
|---|
| 574 | /*********************************************************************
|
|---|
| 575 | * _findfirst (CRTDLL.099)
|
|---|
| 576 | */
|
|---|
| 577 | DWORD CDECL CRTDLL__findfirst(LPCSTR fname, struct find_t * x2)
|
|---|
| 578 | {
|
|---|
| 579 | dprintf(("CRTDLL: _findfirst not implemented.\n"));
|
|---|
| 580 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 581 | return FALSE;
|
|---|
| 582 | }
|
|---|
| 583 |
|
|---|
| 584 |
|
|---|
| 585 | /*********************************************************************
|
|---|
| 586 | * _findnext (CRTDLL.100)
|
|---|
| 587 | */
|
|---|
| 588 | INT CDECL CRTDLL__findnext(DWORD hand, struct find_t * x2)
|
|---|
| 589 | {
|
|---|
| 590 | dprintf(("CRTDLL: _findnext not implemented.\n"));
|
|---|
| 591 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 592 | return FALSE;
|
|---|
| 593 | }
|
|---|
| 594 |
|
|---|
| 595 |
|
|---|
| 596 | /*********************************************************************
|
|---|
| 597 | * _finite (CRTDLL.101)
|
|---|
| 598 | */
|
|---|
| 599 | INT CDECL CRTDLL__finite(double x)
|
|---|
| 600 | {
|
|---|
| 601 | dprintf(("CRTDLL: _finite not implemented.\n"));
|
|---|
| 602 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 603 | return FALSE;
|
|---|
| 604 | }
|
|---|
| 605 |
|
|---|
| 606 |
|
|---|
| 607 | /*********************************************************************
|
|---|
| 608 | * _fpreset (CRTDLL.107)
|
|---|
| 609 | */
|
|---|
| 610 | INT CDECL CRTDLL__fpreset(void)
|
|---|
| 611 | {
|
|---|
| 612 | dprintf(("CRTDLL: _fpreset not implemented.\n"));
|
|---|
| 613 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 614 | return FALSE;
|
|---|
| 615 | }
|
|---|
| 616 |
|
|---|
| 617 |
|
|---|
| 618 | /*********************************************************************
|
|---|
| 619 | * _fputchar (CRTDLL.108)
|
|---|
| 620 | */
|
|---|
| 621 | INT CDECL CRTDLL__fputchar( int c )
|
|---|
| 622 | {
|
|---|
| 623 | dprintf(("CRTDLL: _fputchar\n"));
|
|---|
| 624 | return(_fputchar(c));
|
|---|
| 625 | }
|
|---|
| 626 |
|
|---|
| 627 |
|
|---|
| 628 | /*********************************************************************
|
|---|
| 629 | * _fputwchar (CRTDLL.109)
|
|---|
| 630 | */
|
|---|
| 631 | wint_t CDECL CRTDLL__fputwchar( wint_t )
|
|---|
| 632 | {
|
|---|
| 633 | dprintf(("CRTDLL: _fputwchar not implemented.\n"));
|
|---|
| 634 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 635 | return FALSE;
|
|---|
| 636 | }
|
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 | /*********************************************************************
|
|---|
| 640 | * _fsopen (CRTDLL.110)
|
|---|
| 641 | */
|
|---|
| 642 | FILE * CDECL CRTDLL__fsopen( const char *filename, const char *mode, int shflag )
|
|---|
| 643 | {
|
|---|
| 644 | dprintf(("CRTDLL: _fsopen not implemented.\n"));
|
|---|
| 645 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 646 | return FALSE;
|
|---|
| 647 | }
|
|---|
| 648 |
|
|---|
| 649 |
|
|---|
| 650 | /*********************************************************************
|
|---|
| 651 | * _fstat (CRTDLL.111)
|
|---|
| 652 | */
|
|---|
| 653 | int CDECL CRTDLL__fstat(int file, struct stat* buf)
|
|---|
| 654 | {
|
|---|
| 655 | dprintf(("CRTDLL: _fstat not implemented.\n"));
|
|---|
| 656 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 657 | return FALSE;
|
|---|
| 658 | }
|
|---|
| 659 |
|
|---|
| 660 |
|
|---|
| 661 | /*********************************************************************
|
|---|
| 662 | * _ftime (CRTDLL.112)
|
|---|
| 663 | */
|
|---|
| 664 | int CDECL CRTDLL__ftime( struct timeb *timeptr )
|
|---|
| 665 | {
|
|---|
| 666 | dprintf(("CRTDLL: _ftime not implemented.\n"));
|
|---|
| 667 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 668 | return FALSE;
|
|---|
| 669 | }
|
|---|
| 670 |
|
|---|
| 671 |
|
|---|
| 672 | /*********************************************************************
|
|---|
| 673 | * _fullpath (CRTDLL.114)
|
|---|
| 674 | */
|
|---|
| 675 | char * CDECL CRTDLL__fullpath( char *buf, char *path, size_t size )
|
|---|
| 676 | {
|
|---|
| 677 | dprintf(("CRTDLL: _fullpath\n"));
|
|---|
| 678 | return (_fullpath(buf, path, size));
|
|---|
| 679 | }
|
|---|
| 680 |
|
|---|
| 681 |
|
|---|
| 682 | /*********************************************************************
|
|---|
| 683 | * _gcvt (CRTDLL.116)
|
|---|
| 684 | */
|
|---|
| 685 | char * CDECL CRTDLL__gcvt( double val, int ndig, char *buf )
|
|---|
| 686 | {
|
|---|
| 687 | dprintf(("CRTDLL: _gcvt\n"));
|
|---|
| 688 | return (_gcvt(val, ndig, buf));
|
|---|
| 689 | }
|
|---|
| 690 |
|
|---|
| 691 |
|
|---|
| 692 | /*********************************************************************
|
|---|
| 693 | * _get_osfhandle (CRTDLL.117)
|
|---|
| 694 | */
|
|---|
| 695 | long CDECL CRTDLL__get_osfhandle( int posixhandle )
|
|---|
| 696 | {
|
|---|
| 697 | dprintf(("CRTDLL: _gcvt not implemented.\n"));
|
|---|
| 698 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 699 | return FALSE;
|
|---|
| 700 | }
|
|---|
| 701 |
|
|---|
| 702 |
|
|---|
| 703 | /*********************************************************************
|
|---|
| 704 | * _getch (CRTDLL.118)
|
|---|
| 705 | */
|
|---|
| 706 | int CDECL CRTDLL__getch(void)
|
|---|
| 707 | {
|
|---|
| 708 | dprintf(("CRTDLL: _getch\n"));
|
|---|
| 709 | return (_getch());
|
|---|
| 710 | }
|
|---|
| 711 |
|
|---|
| 712 |
|
|---|
| 713 | /*********************************************************************
|
|---|
| 714 | * _getche (CRTDLL.119)
|
|---|
| 715 | */
|
|---|
| 716 | int CDECL CRTDLL__getche(void)
|
|---|
| 717 | {
|
|---|
| 718 | dprintf(("CRTDLL: _getche\n"));
|
|---|
| 719 | return (_getche());
|
|---|
| 720 | }
|
|---|
| 721 |
|
|---|
| 722 |
|
|---|
| 723 | /*********************************************************************
|
|---|
| 724 | * _getcwd (CRTDLL.120)
|
|---|
| 725 | */
|
|---|
| 726 | char * CDECL CRTDLL__getcwd( char *buf, size_t size )
|
|---|
| 727 | {
|
|---|
| 728 | dprintf(("CRTDLL: _getcwd\n"));
|
|---|
| 729 | return (_getcwd(buf, size));
|
|---|
| 730 | }
|
|---|
| 731 |
|
|---|
| 732 |
|
|---|
| 733 | /*********************************************************************
|
|---|
| 734 | * _getdcwd (CRTDLL.121)
|
|---|
| 735 | */
|
|---|
| 736 | char * CDECL CRTDLL__getdcwd( int drive, char *buffer, size_t maxlen )
|
|---|
| 737 | {
|
|---|
| 738 | dprintf(("CRTDLL: _getdcwd\n"));
|
|---|
| 739 | return (_getdcwd(drive, buffer, maxlen));
|
|---|
| 740 | }
|
|---|
| 741 |
|
|---|
| 742 |
|
|---|
| 743 | /*********************************************************************
|
|---|
| 744 | * _getdiskfree (CRTDLL.122)
|
|---|
| 745 | */
|
|---|
| 746 | unsigned CDECL CRTDLL__getdiskfree( unsigned drive, struct _diskfree_t *diskspace)
|
|---|
| 747 | {
|
|---|
| 748 | dprintf(("CRTDLL: _getdiskfree not implemented.\n"));
|
|---|
| 749 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 750 | return FALSE;
|
|---|
| 751 | }
|
|---|
| 752 |
|
|---|
| 753 |
|
|---|
| 754 | /*********************************************************************
|
|---|
| 755 | * _getdrive (CRTDLL.124)
|
|---|
| 756 | */
|
|---|
| 757 | unsigned CDECL CRTDLL__getdrive( void )
|
|---|
| 758 | {
|
|---|
| 759 | dprintf(("CRTDLL: _getdrive\n"));
|
|---|
| 760 | return DRIVE_GetCurrentDrive() + 1;
|
|---|
| 761 | }
|
|---|
| 762 |
|
|---|
| 763 |
|
|---|
| 764 | /*********************************************************************
|
|---|
| 765 | * _getw (CRTDLL.128)
|
|---|
| 766 | */
|
|---|
| 767 | int CDECL CRTDLL__getw( FILE *fp )
|
|---|
| 768 | {
|
|---|
| 769 | dprintf(("CRTDLL: _getw not implemented.\n"));
|
|---|
| 770 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 771 | return FALSE;
|
|---|
| 772 | }
|
|---|
| 773 |
|
|---|
| 774 |
|
|---|
| 775 | /*******************************************************************
|
|---|
| 776 | * _global_unwind2 (CRTDLL.129)
|
|---|
| 777 | */
|
|---|
| 778 | void CDECL CRTDLL__global_unwind2( PEXCEPTION_FRAME frame )
|
|---|
| 779 | {
|
|---|
| 780 | dprintf(("CRTDLL: global_undwind2\n"));
|
|---|
| 781 | RtlUnwind( frame, 0, NULL, 0 );
|
|---|
| 782 | }
|
|---|
| 783 |
|
|---|
| 784 |
|
|---|
| 785 | /*********************************************************************
|
|---|
| 786 | * _heapchk (CRTDLL.130)
|
|---|
| 787 | */
|
|---|
| 788 | int CDECL CRTDLL__heapchk( void )
|
|---|
| 789 | {
|
|---|
| 790 | dprintf(("CRTDLL: _heapchk\n"));
|
|---|
| 791 | return (_heapchk());
|
|---|
| 792 | }
|
|---|
| 793 |
|
|---|
| 794 |
|
|---|
| 795 | /*********************************************************************
|
|---|
| 796 | * _heapmin (CRTDLL.131)
|
|---|
| 797 | */
|
|---|
| 798 | int CDECL CRTDLL__heapmin( void )
|
|---|
| 799 | {
|
|---|
| 800 | dprintf(("CRTDLL: _heapmin\n"));
|
|---|
| 801 | return (_heapmin());
|
|---|
| 802 | }
|
|---|
| 803 |
|
|---|
| 804 |
|
|---|
| 805 | /*********************************************************************
|
|---|
| 806 | * _heapset (CRTDLL.132)
|
|---|
| 807 | */
|
|---|
| 808 | int CDECL CRTDLL__heapset( unsigned int fill )
|
|---|
| 809 | {
|
|---|
| 810 | dprintf(("CRTDLL: _heapset\n"));
|
|---|
| 811 | return (_heapset(fill));
|
|---|
| 812 | }
|
|---|
| 813 |
|
|---|
| 814 |
|
|---|
| 815 | /*********************************************************************
|
|---|
| 816 | * _heapwalk (CRTDLL.133)
|
|---|
| 817 | */
|
|---|
| 818 | int CDECL CRTDLL__heapwalk( struct _heapinfo *entry )
|
|---|
| 819 | {
|
|---|
| 820 | dprintf(("CRTDLL: _heapwalk not implemented.\n"));
|
|---|
| 821 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 822 | return FALSE;
|
|---|
| 823 | }
|
|---|
| 824 |
|
|---|
| 825 |
|
|---|
| 826 | /*********************************************************************
|
|---|
| 827 | * _initterm (CRTDLL.135)
|
|---|
| 828 | */
|
|---|
| 829 | DWORD CDECL CRTDLL__initterm(_INITTERMFUN *start,_INITTERMFUN *end)
|
|---|
| 830 | {
|
|---|
| 831 | dprintf(("CRTDLL: initterm\n"));
|
|---|
| 832 | _INITTERMFUN *current;
|
|---|
| 833 |
|
|---|
| 834 | current=start;
|
|---|
| 835 | while (current<end) {
|
|---|
| 836 | if (*current) (*current)();
|
|---|
| 837 | current++;
|
|---|
| 838 | }
|
|---|
| 839 | return 0;
|
|---|
| 840 | }
|
|---|
| 841 |
|
|---|
| 842 |
|
|---|
| 843 | /*********************************************************************
|
|---|
| 844 | * _isatty (CRTDLL.137)
|
|---|
| 845 | */
|
|---|
| 846 | BOOL CDECL CRTDLL__isatty(DWORD x)
|
|---|
| 847 | {
|
|---|
| 848 | dprintf(("(%ld)\n",x));
|
|---|
| 849 | return TRUE;
|
|---|
| 850 | }
|
|---|
| 851 |
|
|---|
| 852 |
|
|---|
| 853 | /*********************************************************************
|
|---|
| 854 | * _isctype (CRTDLL.138)
|
|---|
| 855 | */
|
|---|
| 856 | BOOL CDECL CRTDLL__isctype(CHAR x,CHAR type)
|
|---|
| 857 | {
|
|---|
| 858 | dprintf(("CRTDLL: isctype\n"));
|
|---|
| 859 | if ((type & CRTDLL_SPACE) && isspace(x))
|
|---|
| 860 | return TRUE;
|
|---|
| 861 | if ((type & CRTDLL_PUNCT) && ispunct(x))
|
|---|
| 862 | return TRUE;
|
|---|
| 863 | if ((type & CRTDLL_LOWER) && islower(x))
|
|---|
| 864 | return TRUE;
|
|---|
| 865 | if ((type & CRTDLL_UPPER) && isupper(x))
|
|---|
| 866 | return TRUE;
|
|---|
| 867 | if ((type & CRTDLL_ALPHA) && isalpha(x))
|
|---|
| 868 | return TRUE;
|
|---|
| 869 | if ((type & CRTDLL_DIGIT) && isdigit(x))
|
|---|
| 870 | return TRUE;
|
|---|
| 871 | if ((type & CRTDLL_CONTROL) && iscntrl(x))
|
|---|
| 872 | return TRUE;
|
|---|
| 873 | /* check CRTDLL_LEADBYTE */
|
|---|
| 874 | return FALSE;
|
|---|
| 875 | }
|
|---|
| 876 |
|
|---|
| 877 |
|
|---|
| 878 | /*********************************************************************
|
|---|
| 879 | * _ismbbalnum (CRTDLL.139)
|
|---|
| 880 | */
|
|---|
| 881 | int CDECL CRTDLL__ismbbalnum( unsigned int ch )
|
|---|
| 882 | {
|
|---|
| 883 | dprintf(("CRTDLL: _ismbbalnum not implemented.\n"));
|
|---|
| 884 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 885 | return FALSE;
|
|---|
| 886 | }
|
|---|
| 887 |
|
|---|
| 888 |
|
|---|
| 889 | /*********************************************************************
|
|---|
| 890 | * _ismbbalpha (CRTDLL.140)
|
|---|
| 891 | */
|
|---|
| 892 | int CDECL CRTDLL__ismbbalpha( unsigned int ch )
|
|---|
| 893 | {
|
|---|
| 894 | dprintf(("CRTDLL: _ismbbalpha not implemented.\n"));
|
|---|
| 895 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 896 | return FALSE;
|
|---|
| 897 | }
|
|---|
| 898 |
|
|---|
| 899 |
|
|---|
| 900 | /*********************************************************************
|
|---|
| 901 | * _ismbbgraph (CRTDLL.141)
|
|---|
| 902 | */
|
|---|
| 903 | int CDECL CRTDLL__ismbbgraph( unsigned int ch )
|
|---|
| 904 | {
|
|---|
| 905 | dprintf(("CRTDLL: _ismbbgraph not implemented.\n"));
|
|---|
| 906 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 907 | return FALSE;
|
|---|
| 908 | }
|
|---|
| 909 |
|
|---|
| 910 |
|
|---|
| 911 | /*********************************************************************
|
|---|
| 912 | * _ismbbkalnum (CRTDLL.142)
|
|---|
| 913 | */
|
|---|
| 914 | int CDECL CRTDLL__ismbbkalnum( unsigned int ch )
|
|---|
| 915 | {
|
|---|
| 916 | dprintf(("CRTDLL: _ismbbkalnum not implemented.\n"));
|
|---|
| 917 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 918 | return FALSE;
|
|---|
| 919 | }
|
|---|
| 920 |
|
|---|
| 921 |
|
|---|
| 922 | /*********************************************************************
|
|---|
| 923 | * _ismbbkana (CRTDLL.143)
|
|---|
| 924 | */
|
|---|
| 925 | int CDECL CRTDLL__ismbbkana( unsigned int ch )
|
|---|
| 926 | {
|
|---|
| 927 | dprintf(("CRTDLL: _ismbbkana not implemented.\n"));
|
|---|
| 928 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 929 | return FALSE;
|
|---|
| 930 | }
|
|---|
| 931 |
|
|---|
| 932 |
|
|---|
| 933 | /*********************************************************************
|
|---|
| 934 | * _ismbbkpunct (CRTDLL.144)
|
|---|
| 935 | */
|
|---|
| 936 | int CDECL CRTDLL__ismbbkpunct( unsigned int ch )
|
|---|
| 937 | {
|
|---|
| 938 | dprintf(("CRTDLL: _ismbbkpunct not implemented.\n"));
|
|---|
| 939 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 940 | return FALSE;
|
|---|
| 941 | }
|
|---|
| 942 |
|
|---|
| 943 |
|
|---|
| 944 | /*********************************************************************
|
|---|
| 945 | * _ismbblead (CRTDLL.145)
|
|---|
| 946 | */
|
|---|
| 947 | int CDECL CRTDLL__ismbblead( unsigned int ch )
|
|---|
| 948 | {
|
|---|
| 949 | dprintf(("CRTDLL: _ismbblead not implemented.\n"));
|
|---|
| 950 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 951 | return FALSE;
|
|---|
| 952 | }
|
|---|
| 953 |
|
|---|
| 954 |
|
|---|
| 955 | /*********************************************************************
|
|---|
| 956 | * _ismbbprint (CRTDLL.146)
|
|---|
| 957 | */
|
|---|
| 958 | int CDECL CRTDLL__ismbbprint( unsigned int ch )
|
|---|
| 959 | {
|
|---|
| 960 | dprintf(("CRTDLL: _ismbbprint not implemented.\n"));
|
|---|
| 961 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 962 | return FALSE;
|
|---|
| 963 | }
|
|---|
| 964 |
|
|---|
| 965 |
|
|---|
| 966 | /*********************************************************************
|
|---|
| 967 | * _ismbbpunct (CRTDLL.147)
|
|---|
| 968 | */
|
|---|
| 969 | int CDECL CRTDLL__ismbbpunct( unsigned int ch )
|
|---|
| 970 | {
|
|---|
| 971 | dprintf(("CRTDLL: _ismbbpunct not implemented.\n"));
|
|---|
| 972 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 973 | return FALSE;
|
|---|
| 974 | }
|
|---|
| 975 |
|
|---|
| 976 |
|
|---|
| 977 | /*********************************************************************
|
|---|
| 978 | * _ismbbtrail (CRTDLL.148)
|
|---|
| 979 | */
|
|---|
| 980 | int CDECL CRTDLL__ismbbtrail( unsigned int ch )
|
|---|
| 981 | {
|
|---|
| 982 | dprintf(("CRTDLL: _ismbbtrail not implemented.\n"));
|
|---|
| 983 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 984 | return FALSE;
|
|---|
| 985 | }
|
|---|
| 986 |
|
|---|
| 987 |
|
|---|
| 988 | /*********************************************************************
|
|---|
| 989 | * _ismbcalpha (CRTDLL.149)
|
|---|
| 990 | */
|
|---|
| 991 | int CDECL CRTDLL__ismbcalpha( unsigned int ch )
|
|---|
| 992 | {
|
|---|
| 993 | dprintf(("CRTDLL: _ismbcalpha not implemented.\n"));
|
|---|
| 994 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 995 | return FALSE;
|
|---|
| 996 | }
|
|---|
| 997 |
|
|---|
| 998 |
|
|---|
| 999 | /*********************************************************************
|
|---|
| 1000 | * _ismbcdigit (CRTDLL.150)
|
|---|
| 1001 | */
|
|---|
| 1002 | int CDECL CRTDLL__ismbcdigit( unsigned int ch )
|
|---|
| 1003 | {
|
|---|
| 1004 | dprintf(("CRTDLL: _ismbcdigit not implemented.\n"));
|
|---|
| 1005 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1006 | return FALSE;
|
|---|
| 1007 | }
|
|---|
| 1008 |
|
|---|
| 1009 |
|
|---|
| 1010 | /*********************************************************************
|
|---|
| 1011 | * _ismbchira (CRTDLL.151)
|
|---|
| 1012 | */
|
|---|
| 1013 | int CDECL CRTDLL__ismbchira( unsigned int ch )
|
|---|
| 1014 | {
|
|---|
| 1015 | dprintf(("CRTDLL: _ismbchira not implemented.\n"));
|
|---|
| 1016 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1017 | return FALSE;
|
|---|
| 1018 | }
|
|---|
| 1019 |
|
|---|
| 1020 |
|
|---|
| 1021 | /*********************************************************************
|
|---|
| 1022 | * _ismbckata (CRTDLL.152)
|
|---|
| 1023 | */
|
|---|
| 1024 | int CDECL CRTDLL__ismbckata( unsigned int ch )
|
|---|
| 1025 | {
|
|---|
| 1026 | dprintf(("CRTDLL: _ismbckata not implemented.\n"));
|
|---|
| 1027 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1028 | return FALSE;
|
|---|
| 1029 | }
|
|---|
| 1030 |
|
|---|
| 1031 | /*********************************************************************
|
|---|
| 1032 | * _ismbcl0 (CRTDLL.153)
|
|---|
| 1033 | */
|
|---|
| 1034 | int CDECL CRTDLL__ismbcl0( unsigned int ch )
|
|---|
| 1035 | {
|
|---|
| 1036 | dprintf(("CRTDLL: _ismbcl0 not implemented.\n"));
|
|---|
| 1037 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1038 | return FALSE;
|
|---|
| 1039 | }
|
|---|
| 1040 |
|
|---|
| 1041 |
|
|---|
| 1042 | /*********************************************************************
|
|---|
| 1043 | * _ismbcl1 (CRTDLL.154)
|
|---|
| 1044 | */
|
|---|
| 1045 | int CDECL CRTDLL__ismbcl1( unsigned int ch )
|
|---|
| 1046 | {
|
|---|
| 1047 | dprintf(("CRTDLL: _ismbcl1 not implemented.\n"));
|
|---|
| 1048 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1049 | return FALSE;
|
|---|
| 1050 | }
|
|---|
| 1051 |
|
|---|
| 1052 |
|
|---|
| 1053 | /*********************************************************************
|
|---|
| 1054 | * _ismbcl2 (CRTDLL.155)
|
|---|
| 1055 | */
|
|---|
| 1056 | int CDECL CRTDLL__ismbcl2( unsigned int ch )
|
|---|
| 1057 | {
|
|---|
| 1058 | dprintf(("CRTDLL: _ismbcl2 not implemented.\n"));
|
|---|
| 1059 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1060 | return FALSE;
|
|---|
| 1061 | }
|
|---|
| 1062 |
|
|---|
| 1063 |
|
|---|
| 1064 | /*********************************************************************
|
|---|
| 1065 | * _ismbclegal (CRTDLL.156)
|
|---|
| 1066 | */
|
|---|
| 1067 | int CDECL CRTDLL__ismbclegal( unsigned int ch )
|
|---|
| 1068 | {
|
|---|
| 1069 | dprintf(("CRTDLL: _ismbclegal not implemented.\n"));
|
|---|
| 1070 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1071 | return FALSE;
|
|---|
| 1072 | }
|
|---|
| 1073 |
|
|---|
| 1074 |
|
|---|
| 1075 | /*********************************************************************
|
|---|
| 1076 | * _ismbclower (CRTDLL.157)
|
|---|
| 1077 | */
|
|---|
| 1078 | int CDECL CRTDLL__ismbclower( unsigned int ch )
|
|---|
| 1079 | {
|
|---|
| 1080 | dprintf(("CRTDLL: _ismbclower not implemented.\n"));
|
|---|
| 1081 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1082 | return FALSE;
|
|---|
| 1083 | }
|
|---|
| 1084 |
|
|---|
| 1085 |
|
|---|
| 1086 | /*********************************************************************
|
|---|
| 1087 | * _ismbcprint (CRTDLL.158)
|
|---|
| 1088 | */
|
|---|
| 1089 | int CDECL CRTDLL__ismbcprint( unsigned int ch )
|
|---|
| 1090 | {
|
|---|
| 1091 | dprintf(("CRTDLL: _ismbcprint not implemented.\n"));
|
|---|
| 1092 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1093 | return FALSE;
|
|---|
| 1094 | }
|
|---|
| 1095 |
|
|---|
| 1096 |
|
|---|
| 1097 | /*********************************************************************
|
|---|
| 1098 | * _ismbcspace (CRTDLL.159)
|
|---|
| 1099 | */
|
|---|
| 1100 | int CDECL CRTDLL__ismbcspace( unsigned int ch )
|
|---|
| 1101 | {
|
|---|
| 1102 | dprintf(("CRTDLL: _ismbcspace not implemented.\n"));
|
|---|
| 1103 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1104 | return FALSE;
|
|---|
| 1105 | }
|
|---|
| 1106 |
|
|---|
| 1107 |
|
|---|
| 1108 | /*********************************************************************
|
|---|
| 1109 | * _ismbcsymbol (CRTDLL.160)
|
|---|
| 1110 | */
|
|---|
| 1111 | int CDECL CRTDLL__ismbcsymbol( unsigned int ch )
|
|---|
| 1112 | {
|
|---|
| 1113 | dprintf(("CRTDLL: _ismbcsymbol not implemented.\n"));
|
|---|
| 1114 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1115 | return FALSE;
|
|---|
| 1116 | }
|
|---|
| 1117 |
|
|---|
| 1118 |
|
|---|
| 1119 | /*********************************************************************
|
|---|
| 1120 | * _ismbcupper (CRTDLL.161)
|
|---|
| 1121 | */
|
|---|
| 1122 | int CDECL CRTDLL__ismbcupper( unsigned int ch )
|
|---|
| 1123 | {
|
|---|
| 1124 | dprintf(("CRTDLL: _ismbcupper not implemented.\n"));
|
|---|
| 1125 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1126 | return FALSE;
|
|---|
| 1127 | }
|
|---|
| 1128 |
|
|---|
| 1129 |
|
|---|
| 1130 | /*******************************************************************
|
|---|
| 1131 | * _local_unwind2 (CRTDLL.172)
|
|---|
| 1132 | */
|
|---|
| 1133 | void CDECL CRTDLL__local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr )
|
|---|
| 1134 | {
|
|---|
| 1135 | dprintf(("CRTDLL: local_undwind2\n"));
|
|---|
| 1136 | }
|
|---|
| 1137 |
|
|---|
| 1138 |
|
|---|
| 1139 | /*********************************************************************
|
|---|
| 1140 | * _locking (CRTDLL.173)
|
|---|
| 1141 | */
|
|---|
| 1142 | int CDECL CRTDLL__locking(int handle,int mode,unsigned long nbyte)
|
|---|
| 1143 | {
|
|---|
| 1144 | dprintf(("CRTDLL: _locking not implemented.\n"));
|
|---|
| 1145 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1146 | return FALSE;
|
|---|
| 1147 | }
|
|---|
| 1148 |
|
|---|
| 1149 |
|
|---|
| 1150 | /*********************************************************************
|
|---|
| 1151 | * _lrotl (CRTDLL.175)
|
|---|
| 1152 | */
|
|---|
| 1153 | unsigned long CDECL CRTDLL__lrotl( unsigned long value, unsigned int shift )
|
|---|
| 1154 | {
|
|---|
| 1155 | dprintf(("CRTDLL: _lrotl\n"));
|
|---|
| 1156 | return (_lrotl(value, shift));
|
|---|
| 1157 | }
|
|---|
| 1158 |
|
|---|
| 1159 |
|
|---|
| 1160 | /*********************************************************************
|
|---|
| 1161 | * _lrotr (CRTDLL.176)
|
|---|
| 1162 | */
|
|---|
| 1163 | unsigned long CDECL CRTDLL__lrotr( unsigned long value, unsigned int shift )
|
|---|
| 1164 | {
|
|---|
| 1165 | dprintf(("CRTDLL: _lrotr\n"));
|
|---|
| 1166 | return (_lrotr(value, shift));
|
|---|
| 1167 | }
|
|---|
| 1168 |
|
|---|
| 1169 |
|
|---|
| 1170 | /*********************************************************************
|
|---|
| 1171 | * _lseek (CRTDLL.178)
|
|---|
| 1172 | */
|
|---|
| 1173 | long CDECL CRTDLL__lseek(int handle,long offset,int origin)
|
|---|
| 1174 | {
|
|---|
| 1175 | dprintf(("CRTDLL: _lssek\n"));
|
|---|
| 1176 | return (_lseek(handle, offset, origin));
|
|---|
| 1177 | }
|
|---|
| 1178 |
|
|---|
| 1179 |
|
|---|
| 1180 | /*********************************************************************
|
|---|
| 1181 | * _makepath (CRTDLL.180)
|
|---|
| 1182 | */
|
|---|
| 1183 | void CDECL CRTDLL__makepath( char *path, char *drive,
|
|---|
| 1184 | char *dir, char *fname, char *ext )
|
|---|
| 1185 | {
|
|---|
| 1186 | dprintf(("CRTDLL: _makepath\n"));
|
|---|
| 1187 | _makepath(path, drive, dir, fname, ext);
|
|---|
| 1188 | }
|
|---|
| 1189 |
|
|---|
| 1190 |
|
|---|
| 1191 | #if (__IBMCPP__ > 300)
|
|---|
| 1192 | #define exception _exception
|
|---|
| 1193 | #endif
|
|---|
| 1194 |
|
|---|
| 1195 | /*********************************************************************
|
|---|
| 1196 | * _matherr (CRTDLL.181)
|
|---|
| 1197 | */
|
|---|
| 1198 | double CDECL CRTDLL__matherr( struct exception * excep )
|
|---|
| 1199 | {
|
|---|
| 1200 | dprintf(("CRTDLL: _matherr\n"));
|
|---|
| 1201 | return (_matherr(excep));
|
|---|
| 1202 | }
|
|---|
| 1203 |
|
|---|
| 1204 |
|
|---|
| 1205 | /*********************************************************************
|
|---|
| 1206 | * _mbbtombc (CRTDLL.182)
|
|---|
| 1207 | */
|
|---|
| 1208 | unsigned int CDECL CRTDLL__mbbtombc( unsigned int ch )
|
|---|
| 1209 | {
|
|---|
| 1210 | dprintf(("CRTDLL: _mbbtombc\n"));
|
|---|
| 1211 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1212 | return FALSE;
|
|---|
| 1213 | }
|
|---|
| 1214 |
|
|---|
| 1215 |
|
|---|
| 1216 | /*********************************************************************
|
|---|
| 1217 | * _mbbtype (CRTDLL.183)
|
|---|
| 1218 | */
|
|---|
| 1219 | int CDECL CRTDLL__mbbtype( unsigned char s, int i )
|
|---|
| 1220 | {
|
|---|
| 1221 | dprintf(("CRTDLL: _mbbtype not implemented.\n"));
|
|---|
| 1222 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1223 | return FALSE;
|
|---|
| 1224 | }
|
|---|
| 1225 |
|
|---|
| 1226 |
|
|---|
| 1227 | /*********************************************************************
|
|---|
| 1228 | * _mbccpy (CRTDLL.184)
|
|---|
| 1229 | */
|
|---|
| 1230 | void CDECL CRTDLL__mbccpy( unsigned char *dest, const unsigned char *ch )
|
|---|
| 1231 | {
|
|---|
| 1232 | dprintf(("CRTDLL: _mbccpy not implemented.\n"));
|
|---|
| 1233 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1234 | }
|
|---|
| 1235 |
|
|---|
| 1236 |
|
|---|
| 1237 | /*********************************************************************
|
|---|
| 1238 | * _mbcjistojms (CRTDLL.185)
|
|---|
| 1239 | */
|
|---|
| 1240 | int CDECL CRTDLL__mbcjistojms( unsigned int ch )
|
|---|
| 1241 | {
|
|---|
| 1242 | dprintf(("CRTDLL: _mbcjistojms not implemented.\n"));
|
|---|
| 1243 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1244 | return FALSE;
|
|---|
| 1245 | }
|
|---|
| 1246 |
|
|---|
| 1247 |
|
|---|
| 1248 | /*********************************************************************
|
|---|
| 1249 | * _mbcjmstojis (CRTDLL.186)
|
|---|
| 1250 | */
|
|---|
| 1251 | int CDECL CRTDLL__mbcjmstojis( unsigned int ch )
|
|---|
| 1252 | {
|
|---|
| 1253 | dprintf(("CRTDLL: _mbcjmstojis not implemented.\n"));
|
|---|
| 1254 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1255 | return FALSE;
|
|---|
| 1256 | }
|
|---|
| 1257 |
|
|---|
| 1258 |
|
|---|
| 1259 | /*********************************************************************
|
|---|
| 1260 | * _mbclen (CRTDLL.187)
|
|---|
| 1261 | */
|
|---|
| 1262 | size_t CDECL CRTDLL__mbclen( const unsigned char *ch )
|
|---|
| 1263 | {
|
|---|
| 1264 | dprintf(("CRTDLL: _mbclen not implemented.\n"));
|
|---|
| 1265 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1266 | return FALSE;
|
|---|
| 1267 | }
|
|---|
| 1268 |
|
|---|
| 1269 |
|
|---|
| 1270 | /*********************************************************************
|
|---|
| 1271 | * _mbctohira (CRTDLL.188)
|
|---|
| 1272 | */
|
|---|
| 1273 | int CDECL CRTDLL__mbctohira( unsigned int ch )
|
|---|
| 1274 | {
|
|---|
| 1275 | dprintf(("CRTDLL: _mbctohira not implemented.\n"));
|
|---|
| 1276 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1277 | return FALSE;
|
|---|
| 1278 | }
|
|---|
| 1279 |
|
|---|
| 1280 |
|
|---|
| 1281 | /*********************************************************************
|
|---|
| 1282 | * _mbctokata (CRTDLL.189)
|
|---|
| 1283 | */
|
|---|
| 1284 | int CDECL CRTDLL__mbctokata( unsigned int ch )
|
|---|
| 1285 | {
|
|---|
| 1286 | dprintf(("CRTDLL: _mbctokata not implemented.\n"));
|
|---|
| 1287 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1288 | return FALSE;
|
|---|
| 1289 | }
|
|---|
| 1290 |
|
|---|
| 1291 |
|
|---|
| 1292 | /*********************************************************************
|
|---|
| 1293 | * _mbctolower (CRTDLL.190)
|
|---|
| 1294 | */
|
|---|
| 1295 | unsigned int CDECL CRTDLL__mbctolower( unsigned int ch )
|
|---|
| 1296 | {
|
|---|
| 1297 | dprintf(("CRTDLL: _mbctolower not implemented.\n"));
|
|---|
| 1298 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1299 | return FALSE;
|
|---|
| 1300 | }
|
|---|
| 1301 |
|
|---|
| 1302 |
|
|---|
| 1303 | /*********************************************************************
|
|---|
| 1304 | * _mbctombb (CRTDLL.191)
|
|---|
| 1305 | */
|
|---|
| 1306 | unsigned int CDECL CRTDLL__mbctombb( unsigned int ch )
|
|---|
| 1307 | {
|
|---|
| 1308 | dprintf(("CRTDLL: _mbctombb not implemented.\n"));
|
|---|
| 1309 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1310 | return FALSE;
|
|---|
| 1311 | }
|
|---|
| 1312 |
|
|---|
| 1313 |
|
|---|
| 1314 | /*********************************************************************
|
|---|
| 1315 | * _mbctoupper (CRTDLL.192)
|
|---|
| 1316 | */
|
|---|
| 1317 | unsigned int CDECL CRTDLL__mbctoupper( unsigned int ch )
|
|---|
| 1318 | {
|
|---|
| 1319 | dprintf(("CRTDLL: _mbctoupper not implemented.\n"));
|
|---|
| 1320 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1321 | return FALSE;
|
|---|
| 1322 | }
|
|---|
| 1323 |
|
|---|
| 1324 |
|
|---|
| 1325 | /*********************************************************************
|
|---|
| 1326 | * _mbsbtype (CRTDLL.194)
|
|---|
| 1327 | */
|
|---|
| 1328 | int CDECL CRTDLL__mbsbtype( const unsigned char *s1, int ch )
|
|---|
| 1329 | {
|
|---|
| 1330 | dprintf(("CRTDLL: _mbsbtype not implemented.\n"));
|
|---|
| 1331 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1332 | return FALSE;
|
|---|
| 1333 | }
|
|---|
| 1334 |
|
|---|
| 1335 |
|
|---|
| 1336 | /*********************************************************************
|
|---|
| 1337 | * _mbscat (CRTDLL.195)
|
|---|
| 1338 | */
|
|---|
| 1339 | unsigned char * CDECL CRTDLL__mbscat( unsigned char *s1, const unsigned char *s2 )
|
|---|
| 1340 | {
|
|---|
| 1341 | dprintf(("CRTDLL: _mbscat not implemented.\n"));
|
|---|
| 1342 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1343 | return FALSE;
|
|---|
| 1344 | }
|
|---|
| 1345 |
|
|---|
| 1346 |
|
|---|
| 1347 | /*********************************************************************
|
|---|
| 1348 | * _mbschr (CRTDLL.196)
|
|---|
| 1349 | */
|
|---|
| 1350 | unsigned char * CDECL CRTDLL__mbschr( const unsigned char *s, unsigned int ch )
|
|---|
| 1351 | {
|
|---|
| 1352 | dprintf(("CRTDLL: _mbschr not implemented.\n"));
|
|---|
| 1353 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1354 | return FALSE;
|
|---|
| 1355 | }
|
|---|
| 1356 |
|
|---|
| 1357 |
|
|---|
| 1358 | /*********************************************************************
|
|---|
| 1359 | * _mbscmp (CRTDLL.197)
|
|---|
| 1360 | */
|
|---|
| 1361 | int CDECL CRTDLL__mbscmp( const unsigned char *s1, const unsigned char *s2 )
|
|---|
| 1362 | {
|
|---|
| 1363 | dprintf(("CRTDLL: _mbscmp not implemented.\n"));
|
|---|
| 1364 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1365 | return FALSE;
|
|---|
| 1366 | }
|
|---|
| 1367 |
|
|---|
| 1368 |
|
|---|
| 1369 | /*********************************************************************
|
|---|
| 1370 | * _mbscpy (CRTDLL.198)
|
|---|
| 1371 | */
|
|---|
| 1372 | unsigned char * CDECL CRTDLL__mbscpy( unsigned char *s1, const unsigned char *s2 )
|
|---|
| 1373 | {
|
|---|
| 1374 | dprintf(("CRTDLL: _mbscpy not implemented.\n"));
|
|---|
| 1375 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1376 | return FALSE;
|
|---|
| 1377 | }
|
|---|
| 1378 |
|
|---|
| 1379 |
|
|---|
| 1380 | /*********************************************************************
|
|---|
| 1381 | * _mbscspn (CRTDLL.199)
|
|---|
| 1382 | */
|
|---|
| 1383 | size_t CDECL CRTDLL__mbscspn( const unsigned char *s, const unsigned char *charset )
|
|---|
| 1384 | {
|
|---|
| 1385 | dprintf(("CRTDLL: _mbscspn not implemented.\n"));
|
|---|
| 1386 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1387 | return FALSE;
|
|---|
| 1388 | }
|
|---|
| 1389 |
|
|---|
| 1390 |
|
|---|
| 1391 | /*********************************************************************
|
|---|
| 1392 | * CRTDLL__mbsdec (CRTDLL.200)
|
|---|
| 1393 | */
|
|---|
| 1394 | unsigned char * CDECL CRTDLL__mbsdec( const unsigned char *s, const unsigned char *ch )
|
|---|
| 1395 | {
|
|---|
| 1396 | dprintf(("CRTDLL: _mbsdec not implemented.\n"));
|
|---|
| 1397 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1398 | return FALSE;
|
|---|
| 1399 | }
|
|---|
| 1400 |
|
|---|
| 1401 |
|
|---|
| 1402 | /*********************************************************************
|
|---|
| 1403 | * CRTDLL__mbsdec (CRTDLL.201)
|
|---|
| 1404 | */
|
|---|
| 1405 | unsigned char * CDECL CRTDLL__mbsdup( unsigned char *src )
|
|---|
| 1406 | {
|
|---|
| 1407 | dprintf(("CRTDLL: _mbsdup not implemented.\n"));
|
|---|
| 1408 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1409 | return FALSE;
|
|---|
| 1410 | }
|
|---|
| 1411 |
|
|---|
| 1412 |
|
|---|
| 1413 | /*********************************************************************
|
|---|
| 1414 | * CRTDLL__mbsicmp (CRTDLL.202)
|
|---|
| 1415 | */
|
|---|
| 1416 | int CDECL CRTDLL__mbsicmp( const unsigned char *x, const unsigned char *y )
|
|---|
| 1417 | {
|
|---|
| 1418 | dprintf(("CRTDLL: _mbsicmp\n"));
|
|---|
| 1419 | do {
|
|---|
| 1420 | if (!*x)
|
|---|
| 1421 | return !!*y;
|
|---|
| 1422 | if (!*y)
|
|---|
| 1423 | return !!*x;
|
|---|
| 1424 | /* FIXME: MBCS handling... */
|
|---|
| 1425 | if (*x!=*y)
|
|---|
| 1426 | return 1;
|
|---|
| 1427 | x++;
|
|---|
| 1428 | y++;
|
|---|
| 1429 | } while (1);
|
|---|
| 1430 | }
|
|---|
| 1431 |
|
|---|
| 1432 |
|
|---|
| 1433 | /*********************************************************************
|
|---|
| 1434 | * CRTDLL__mbsinc (CRTDLL.203)
|
|---|
| 1435 | */
|
|---|
| 1436 | LPSTR CDECL CRTDLL__mbsinc( LPCSTR str )
|
|---|
| 1437 | {
|
|---|
| 1438 | dprintf(("CRTDLL: _mbsinc\n"));
|
|---|
| 1439 | int len = mblen( str, MB_LEN_MAX );
|
|---|
| 1440 | if (len < 1) len = 1;
|
|---|
| 1441 | return (LPSTR)(str + len);
|
|---|
| 1442 | }
|
|---|
| 1443 |
|
|---|
| 1444 |
|
|---|
| 1445 | /*********************************************************************
|
|---|
| 1446 | * CRTDLL__mbslen (CRTDLL.204)
|
|---|
| 1447 | */
|
|---|
| 1448 | INT CDECL CRTDLL__mbslen( LPCSTR str )
|
|---|
| 1449 | {
|
|---|
| 1450 | dprintf(("CRTDLL: _mbslen\n"));
|
|---|
| 1451 | INT len, total = 0;
|
|---|
| 1452 | while ((len = mblen( str, MB_LEN_MAX )) > 0)
|
|---|
| 1453 | {
|
|---|
| 1454 | str += len;
|
|---|
| 1455 | total++;
|
|---|
| 1456 | }
|
|---|
| 1457 | return total;
|
|---|
| 1458 | }
|
|---|
| 1459 |
|
|---|
| 1460 |
|
|---|
| 1461 | /*********************************************************************
|
|---|
| 1462 | * CRTDLL__mbslwr (CRTDLL.205)
|
|---|
| 1463 | */
|
|---|
| 1464 | unsigned char * CDECL CRTDLL__mbslwr( unsigned char *s )
|
|---|
| 1465 | {
|
|---|
| 1466 | dprintf(("CRTDLL: _mbslwr not implemented.\n"));
|
|---|
| 1467 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1468 | return FALSE;
|
|---|
| 1469 | }
|
|---|
| 1470 |
|
|---|
| 1471 |
|
|---|
| 1472 | /*********************************************************************
|
|---|
| 1473 | * CRTDLL__mbsnbcat (CRTDLL.206)
|
|---|
| 1474 | */
|
|---|
| 1475 | unsigned char * CDECL CRTDLL__mbsnbcat( unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1476 | {
|
|---|
| 1477 | dprintf(("CRTDLL: _mbsnbcat not implemented.\n"));
|
|---|
| 1478 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1479 | return FALSE;
|
|---|
| 1480 | }
|
|---|
| 1481 |
|
|---|
| 1482 |
|
|---|
| 1483 | /*********************************************************************
|
|---|
| 1484 | * CRTDLL__mbsnbcmp (CRTDLL.207)
|
|---|
| 1485 | */
|
|---|
| 1486 | int CDECL CRTDLL__mbsnbcmp( const unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1487 | {
|
|---|
| 1488 | dprintf(("CRTDLL: _mbsnbcmp not implemented.\n"));
|
|---|
| 1489 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1490 | return FALSE;
|
|---|
| 1491 | }
|
|---|
| 1492 |
|
|---|
| 1493 |
|
|---|
| 1494 | /*********************************************************************
|
|---|
| 1495 | * CRTDLL__mbsnbcnt (CRTDLL.208)
|
|---|
| 1496 | */
|
|---|
| 1497 | size_t CDECL CRTDLL__mbsnbcnt( const unsigned char *s, size_t n )
|
|---|
| 1498 | {
|
|---|
| 1499 | dprintf(("CRTDLL: _mbsnbcnt not implemented.\n"));
|
|---|
| 1500 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1501 | return FALSE;
|
|---|
| 1502 | }
|
|---|
| 1503 |
|
|---|
| 1504 |
|
|---|
| 1505 | /*********************************************************************
|
|---|
| 1506 | * CRTDLL__mbsnbcpy (CRTDLL.209)
|
|---|
| 1507 | */
|
|---|
| 1508 | unsigned char * CDECL CRTDLL__mbsnbcpy( unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1509 | {
|
|---|
| 1510 | dprintf(("CRTDLL: _mbsnbcpy not implemented.\n"));
|
|---|
| 1511 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1512 | return FALSE;
|
|---|
| 1513 | }
|
|---|
| 1514 |
|
|---|
| 1515 |
|
|---|
| 1516 | /*********************************************************************
|
|---|
| 1517 | * CRTDLL__mbsnbicmp (CRTDLL.210)
|
|---|
| 1518 | */
|
|---|
| 1519 | int CDECL CRTDLL__mbsnbicmp( const unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1520 | {
|
|---|
| 1521 | dprintf(("CRTDLL: _mbsnbicmp not implemented.\n"));
|
|---|
| 1522 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1523 | return FALSE;
|
|---|
| 1524 | }
|
|---|
| 1525 |
|
|---|
| 1526 |
|
|---|
| 1527 | /*********************************************************************
|
|---|
| 1528 | * CRTDLL__mbsnbset (CRTDLL.211)
|
|---|
| 1529 | */
|
|---|
| 1530 | unsigned char * CDECL CRTDLL__mbsnbset( unsigned char *s, unsigned int ch, size_t n )
|
|---|
| 1531 | {
|
|---|
| 1532 | dprintf(("CRTDLL: _mbsnbset not implemented.\n"));
|
|---|
| 1533 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1534 | return FALSE;
|
|---|
| 1535 | }
|
|---|
| 1536 |
|
|---|
| 1537 |
|
|---|
| 1538 | /*********************************************************************
|
|---|
| 1539 | * CRTDLL__mbsncat (CRTDLL.212)
|
|---|
| 1540 | */
|
|---|
| 1541 | unsigned char * CDECL CRTDLL__mbsncat( unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1542 | {
|
|---|
| 1543 | dprintf(("CRTDLL: _mbsncat not implemented.\n"));
|
|---|
| 1544 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1545 | return FALSE;
|
|---|
| 1546 | }
|
|---|
| 1547 |
|
|---|
| 1548 |
|
|---|
| 1549 | /*********************************************************************
|
|---|
| 1550 | * CRTDLL__mbsnccnt (CRTDLL.213)
|
|---|
| 1551 | */
|
|---|
| 1552 | size_t CDECL CRTDLL__mbsnccnt( const unsigned char *s, size_t n )
|
|---|
| 1553 | {
|
|---|
| 1554 | dprintf(("CRTDLL: _mbsnccnt not implemented.\n"));
|
|---|
| 1555 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1556 | return FALSE;
|
|---|
| 1557 | }
|
|---|
| 1558 |
|
|---|
| 1559 |
|
|---|
| 1560 | /*********************************************************************
|
|---|
| 1561 | * CRTDLL__mbsncmp (CRTDLL.214)
|
|---|
| 1562 | */
|
|---|
| 1563 | int CDECL CRTDLL__mbsncmp( const unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1564 | {
|
|---|
| 1565 | dprintf(("CRTDLL: _mbsncmp not implemented.\n"));
|
|---|
| 1566 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1567 | return FALSE;
|
|---|
| 1568 | }
|
|---|
| 1569 |
|
|---|
| 1570 |
|
|---|
| 1571 | /*********************************************************************
|
|---|
| 1572 | * CRTDLL__mbsncpy (CRTDLL.215)
|
|---|
| 1573 | */
|
|---|
| 1574 | unsigned char * CDECL CRTDLL__mbsncpy( unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1575 | {
|
|---|
| 1576 | dprintf(("CRTDLL: _mbsncpy not implemented.\n"));
|
|---|
| 1577 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1578 | return FALSE;
|
|---|
| 1579 | }
|
|---|
| 1580 |
|
|---|
| 1581 |
|
|---|
| 1582 | /*********************************************************************
|
|---|
| 1583 | * CRTDLL__mbsnextc (CRTDLL.216)
|
|---|
| 1584 | */
|
|---|
| 1585 | unsigned int CDECL CRTDLL__mbsnextc( const unsigned char *s )
|
|---|
| 1586 | {
|
|---|
| 1587 | dprintf(("CRTDLL: _mbsnextc not implemented.\n"));
|
|---|
| 1588 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1589 | return FALSE;
|
|---|
| 1590 | }
|
|---|
| 1591 |
|
|---|
| 1592 |
|
|---|
| 1593 | /*********************************************************************
|
|---|
| 1594 | * CRTDLL__mbsnicmp (CRTDLL.217)
|
|---|
| 1595 | */
|
|---|
| 1596 | int CDECL CRTDLL__mbsnicmp( const unsigned char *s1, const unsigned char *s2, size_t n )
|
|---|
| 1597 | {
|
|---|
| 1598 | dprintf(("CRTDLL: _mbsnicmp not implemented.\n"));
|
|---|
| 1599 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1600 | return FALSE;
|
|---|
| 1601 | }
|
|---|
| 1602 |
|
|---|
| 1603 |
|
|---|
| 1604 | /*********************************************************************
|
|---|
| 1605 | * CRTDLL__mbsninc (CRTDLL.218)
|
|---|
| 1606 | */
|
|---|
| 1607 | unsigned char * CDECL CRTDLL__mbsninc( const unsigned char *s, size_t count )
|
|---|
| 1608 | {
|
|---|
| 1609 | dprintf(("CRTDLL: _mbsninc not implemented.\n"));
|
|---|
| 1610 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1611 | return FALSE;
|
|---|
| 1612 | }
|
|---|
| 1613 |
|
|---|
| 1614 |
|
|---|
| 1615 | /*********************************************************************
|
|---|
| 1616 | * CRTDLL__mbsnset (CRTDLL.219)
|
|---|
| 1617 | */
|
|---|
| 1618 | unsigned char * CDECL CRTDLL__mbsnset( unsigned char *s, unsigned int ch, size_t n )
|
|---|
| 1619 | {
|
|---|
| 1620 | dprintf(("CRTDLL: _mbsnset not implemented.\n"));
|
|---|
| 1621 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1622 | return FALSE;
|
|---|
| 1623 | }
|
|---|
| 1624 |
|
|---|
| 1625 |
|
|---|
| 1626 | /*********************************************************************
|
|---|
| 1627 | * CRTDLL__mbspbrk (CRTDLL.220)
|
|---|
| 1628 | */
|
|---|
| 1629 | unsigned char * CDECL CRTDLL__mbspbrk( const unsigned char *s, const unsigned char *charset )
|
|---|
| 1630 | {
|
|---|
| 1631 | dprintf(("CRTDLL: _mbspbrk not implemented.\n"));
|
|---|
| 1632 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1633 | return FALSE;
|
|---|
| 1634 | }
|
|---|
| 1635 |
|
|---|
| 1636 |
|
|---|
| 1637 | /*********************************************************************
|
|---|
| 1638 | * CRTDLL__mbsrchr (CRTDLL.221)
|
|---|
| 1639 | */
|
|---|
| 1640 | LPSTR CDECL CRTDLL__mbsrchr(LPSTR s,CHAR x)
|
|---|
| 1641 | {
|
|---|
| 1642 | dprintf(("CRTDLL: _mbsrchr\n"));
|
|---|
| 1643 | /* FIXME: handle multibyte strings */
|
|---|
| 1644 | return strrchr(s,x);
|
|---|
| 1645 | }
|
|---|
| 1646 |
|
|---|
| 1647 |
|
|---|
| 1648 | /*********************************************************************
|
|---|
| 1649 | * CRTDLL__mbsrev (CRTDLL.222)
|
|---|
| 1650 | */
|
|---|
| 1651 | unsigned char * CDECL CRTDLL__mbsrev( unsigned char *s )
|
|---|
| 1652 | {
|
|---|
| 1653 | dprintf(("CRTDLL: _mbsrev not implemented.\n"));
|
|---|
| 1654 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1655 | return FALSE;
|
|---|
| 1656 | }
|
|---|
| 1657 |
|
|---|
| 1658 |
|
|---|
| 1659 | /*********************************************************************
|
|---|
| 1660 | * CRTDLL__mbsset (CRTDLL.223)
|
|---|
| 1661 | */
|
|---|
| 1662 | unsigned char * CDECL CRTDLL__mbsset( unsigned char *s, unsigned int ch )
|
|---|
| 1663 | {
|
|---|
| 1664 | dprintf(("CRTDLL: _mbsset not implemented.\n"));
|
|---|
| 1665 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1666 | return FALSE;
|
|---|
| 1667 | }
|
|---|
| 1668 |
|
|---|
| 1669 |
|
|---|
| 1670 | /*********************************************************************
|
|---|
| 1671 | * CRTDLL__mbsspn (CRTDLL.224)
|
|---|
| 1672 | */
|
|---|
| 1673 | size_t CDECL CRTDLL__mbsspn( const unsigned char *s, const unsigned char *charset )
|
|---|
| 1674 | {
|
|---|
| 1675 | dprintf(("CRTDLL: _mbsspn not implemented.\n"));
|
|---|
| 1676 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1677 | return FALSE;
|
|---|
| 1678 | }
|
|---|
| 1679 |
|
|---|
| 1680 |
|
|---|
| 1681 | /*********************************************************************
|
|---|
| 1682 | * CRTDLL__mbsspnp (CRTDLL.225)
|
|---|
| 1683 | */
|
|---|
| 1684 | unsigned char * CDECL CRTDLL__mbsspnp( const unsigned char *s, const unsigned char *charset )
|
|---|
| 1685 | {
|
|---|
| 1686 | dprintf(("CRTDLL: _mbsspnp not implemented.\n"));
|
|---|
| 1687 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1688 | return FALSE;
|
|---|
| 1689 | }
|
|---|
| 1690 |
|
|---|
| 1691 |
|
|---|
| 1692 | /*********************************************************************
|
|---|
| 1693 | * CRTDLL__mbsstr (CRTDLL.226)
|
|---|
| 1694 | */
|
|---|
| 1695 | unsigned char * CDECL CRTDLL__mbsstr( const unsigned char *s1, const unsigned char *s2 )
|
|---|
| 1696 | {
|
|---|
| 1697 | dprintf(("CRTDLL: _mbsstr not implemented.\n"));
|
|---|
| 1698 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1699 | return FALSE;
|
|---|
| 1700 | }
|
|---|
| 1701 |
|
|---|
| 1702 |
|
|---|
| 1703 | /*********************************************************************
|
|---|
| 1704 | * CRTDLL__mbstok (CRTDLL.227)
|
|---|
| 1705 | */
|
|---|
| 1706 | unsigned char * CDECL CRTDLL__mbstok( unsigned char *s, const unsigned char *delim )
|
|---|
| 1707 | {
|
|---|
| 1708 | dprintf(("CRTDLL: _mbstok not implemented.\n"));
|
|---|
| 1709 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1710 | return FALSE;
|
|---|
| 1711 | }
|
|---|
| 1712 |
|
|---|
| 1713 |
|
|---|
| 1714 | /*********************************************************************
|
|---|
| 1715 | * CRTDLL__mbsupr (CRTDLL.229)
|
|---|
| 1716 | */
|
|---|
| 1717 | unsigned char * CDECL CRTDLL__mbsupr( unsigned char *s )
|
|---|
| 1718 | {
|
|---|
| 1719 | dprintf(("CRTDLL: _mbsupr not implemented.\n"));
|
|---|
| 1720 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1721 | return FALSE;
|
|---|
| 1722 | }
|
|---|
| 1723 |
|
|---|
| 1724 |
|
|---|
| 1725 | /*********************************************************************
|
|---|
| 1726 | * _mkdir (CRTDLL.232)
|
|---|
| 1727 | */
|
|---|
| 1728 | INT CDECL CRTDLL__mkdir(LPCSTR newdir)
|
|---|
| 1729 | {
|
|---|
| 1730 | dprintf(("CRTDLL: mkdir\n"));
|
|---|
| 1731 | if (!CreateDirectoryA(newdir,NULL))
|
|---|
| 1732 | return -1;
|
|---|
| 1733 | return 0;
|
|---|
| 1734 | }
|
|---|
| 1735 |
|
|---|
| 1736 |
|
|---|
| 1737 | /*********************************************************************
|
|---|
| 1738 | * _mktemp (CRTDLL.233)
|
|---|
| 1739 | */
|
|---|
| 1740 | char * CDECL CRTDLL__mktemp( char * templt )
|
|---|
| 1741 | {
|
|---|
| 1742 | dprintf(("CRTDLL: _mktemp not implemented.\n"));
|
|---|
| 1743 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1744 | return FALSE;
|
|---|
| 1745 | }
|
|---|
| 1746 |
|
|---|
| 1747 |
|
|---|
| 1748 | /*********************************************************************
|
|---|
| 1749 | * _msize (CRTDLL.234)
|
|---|
| 1750 | */
|
|---|
| 1751 | size_t CDECL CRTDLL__msize( void *ptr )
|
|---|
| 1752 | {
|
|---|
| 1753 | dprintf(("CRTDLL: _msize\n"));
|
|---|
| 1754 | return (_msize(ptr));
|
|---|
| 1755 | }
|
|---|
| 1756 |
|
|---|
| 1757 |
|
|---|
| 1758 | /*********************************************************************
|
|---|
| 1759 | * _open (CRTDLL.237)
|
|---|
| 1760 | */
|
|---|
| 1761 | HFILE CDECL CRTDLL__open(LPCSTR path,INT flags)
|
|---|
| 1762 | {
|
|---|
| 1763 | dprintf(("CRTDLL: _open\n"));
|
|---|
| 1764 | DWORD access = 0, creation = 0;
|
|---|
| 1765 | HFILE ret;
|
|---|
| 1766 |
|
|---|
| 1767 | switch(flags & 3)
|
|---|
| 1768 | {
|
|---|
| 1769 | case O_RDONLY: access |= GENERIC_READ; break;
|
|---|
| 1770 | case O_WRONLY: access |= GENERIC_WRITE; break;
|
|---|
| 1771 | case O_RDWR: access |= GENERIC_WRITE | GENERIC_READ; break;
|
|---|
| 1772 | }
|
|---|
| 1773 |
|
|---|
| 1774 | if (flags & 0x0100) /* O_CREAT */
|
|---|
| 1775 | {
|
|---|
| 1776 | if (flags & 0x0400) /* O_EXCL */
|
|---|
| 1777 | creation = CREATE_NEW;
|
|---|
| 1778 | else if (flags & 0x0200) /* O_TRUNC */
|
|---|
| 1779 | creation = CREATE_ALWAYS;
|
|---|
| 1780 | else
|
|---|
| 1781 | creation = OPEN_ALWAYS;
|
|---|
| 1782 | }
|
|---|
| 1783 | else /* no O_CREAT */
|
|---|
| 1784 | {
|
|---|
| 1785 | if (flags & 0x0200) /* O_TRUNC */
|
|---|
| 1786 | creation = TRUNCATE_EXISTING;
|
|---|
| 1787 | else
|
|---|
| 1788 | creation = OPEN_EXISTING;
|
|---|
| 1789 | }
|
|---|
| 1790 | if (flags & 0x0008) /* O_APPEND */
|
|---|
| 1791 | dprintf(("O_APPEND not supported\n" ));
|
|---|
| 1792 | if (flags & 0xf0f4)
|
|---|
| 1793 | dprintf(("CRTDLL_open file unsupported flags 0x%04x\n",flags));
|
|---|
| 1794 | /* End Fixme */
|
|---|
| 1795 |
|
|---|
| 1796 | ret = CreateFileA( path, access, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
|---|
| 1797 | NULL, creation, FILE_ATTRIBUTE_NORMAL, -1 );
|
|---|
| 1798 | dprintf(("CRTDLL_open file %s mode 0x%04x got handle %d\n", path,flags,ret));
|
|---|
| 1799 | return ret;
|
|---|
| 1800 | }
|
|---|
| 1801 |
|
|---|
| 1802 |
|
|---|
| 1803 | /*********************************************************************
|
|---|
| 1804 | * _open_osfhandle (CRTDLL.238)
|
|---|
| 1805 | */
|
|---|
| 1806 | INT CDECL CRTDLL__open_osfhandle( long osfhandle, int flags )
|
|---|
| 1807 | {
|
|---|
| 1808 | dprintf(("CRTDLL: _open_osfhandle\n"));
|
|---|
| 1809 | HFILE handle;
|
|---|
| 1810 |
|
|---|
| 1811 | switch (osfhandle) {
|
|---|
| 1812 | case STD_INPUT_HANDLE :
|
|---|
| 1813 | case 0 :
|
|---|
| 1814 | handle=0;
|
|---|
| 1815 | break;
|
|---|
| 1816 | case STD_OUTPUT_HANDLE:
|
|---|
| 1817 | case 1:
|
|---|
| 1818 | handle=1;
|
|---|
| 1819 | break;
|
|---|
| 1820 | case STD_ERROR_HANDLE:
|
|---|
| 1821 | case 2:
|
|---|
| 1822 | handle=2;
|
|---|
| 1823 | break;
|
|---|
| 1824 | default:
|
|---|
| 1825 | return (-1);
|
|---|
| 1826 | }
|
|---|
| 1827 | dprintf(("(handle %08lx,flags %d) return %d\n",
|
|---|
| 1828 | osfhandle,flags,handle));
|
|---|
| 1829 | return handle;
|
|---|
| 1830 | }
|
|---|
| 1831 |
|
|---|
| 1832 |
|
|---|
| 1833 | /*********************************************************************
|
|---|
| 1834 | * _pclose (CRTDLL.244)
|
|---|
| 1835 | */
|
|---|
| 1836 | INT CDECL CRTDLL__pclose( FILE *fp )
|
|---|
| 1837 | {
|
|---|
| 1838 | dprintf(("CRTDLL: _pclose not implemented.\n"));
|
|---|
| 1839 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1840 | return FALSE;
|
|---|
| 1841 | }
|
|---|
| 1842 |
|
|---|
| 1843 |
|
|---|
| 1844 | /*********************************************************************
|
|---|
| 1845 | * _pctype_dll (CRTDLL.245)
|
|---|
| 1846 | * FIXME - Could not find anything about it
|
|---|
| 1847 | */
|
|---|
| 1848 | INT CDECL CRTDLL__pctype_dll(DWORD ret)
|
|---|
| 1849 | {
|
|---|
| 1850 | dprintf(("CRTDLL: _pctype_dll not implemented.\n"));
|
|---|
| 1851 | return 0;
|
|---|
| 1852 | }
|
|---|
| 1853 |
|
|---|
| 1854 |
|
|---|
| 1855 | /*********************************************************************
|
|---|
| 1856 | * _pipe (CRTDLL.247)
|
|---|
| 1857 | */
|
|---|
| 1858 | INT CDECL CRTDLL__pipe( int *phandles, unsigned psize, int textmode )
|
|---|
| 1859 | {
|
|---|
| 1860 | dprintf(("CRTDLL: _pipe not implemented.\n"));
|
|---|
| 1861 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1862 | return FALSE;
|
|---|
| 1863 | }
|
|---|
| 1864 |
|
|---|
| 1865 |
|
|---|
| 1866 | /*********************************************************************
|
|---|
| 1867 | * _popen (CRTDLL.248)
|
|---|
| 1868 | */
|
|---|
| 1869 | FILE * CDECL CRTDLL__popen( const char *command, const char *mode )
|
|---|
| 1870 | {
|
|---|
| 1871 | dprintf(("CRTDLL: _popen not implemented.\n"));
|
|---|
| 1872 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1873 | return FALSE;
|
|---|
| 1874 | }
|
|---|
| 1875 |
|
|---|
| 1876 | /*********************************************************************
|
|---|
| 1877 | * _read (CRTDLL.254)
|
|---|
| 1878 | */
|
|---|
| 1879 | INT CDECL CRTDLL__read(INT fd, LPVOID buf, UINT count)
|
|---|
| 1880 | {
|
|---|
| 1881 | dprintf(("CRTDLL: _read not implemented.\n"));
|
|---|
| 1882 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1883 | return FALSE;
|
|---|
| 1884 | }
|
|---|
| 1885 |
|
|---|
| 1886 |
|
|---|
| 1887 | /*********************************************************************
|
|---|
| 1888 | * _putw (CRTDLL.252)
|
|---|
| 1889 | */
|
|---|
| 1890 | INT CDECL CRTDLL__putw( int binint, FILE *fp )
|
|---|
| 1891 | {
|
|---|
| 1892 | dprintf(("CRTDLL: _putw not implemented.\n"));
|
|---|
| 1893 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1894 | return FALSE;
|
|---|
| 1895 | }
|
|---|
| 1896 |
|
|---|
| 1897 |
|
|---|
| 1898 | /*********************************************************************
|
|---|
| 1899 | * CRTDLL__rotl (CRTDLL.257)
|
|---|
| 1900 | */
|
|---|
| 1901 | unsigned int CDECL CRTDLL__rotl( unsigned int value, unsigned int shift )
|
|---|
| 1902 | {
|
|---|
| 1903 | dprintf(("CRTDLL: _rotl\n"));
|
|---|
| 1904 | return (_rotl(value, shift));
|
|---|
| 1905 | }
|
|---|
| 1906 |
|
|---|
| 1907 |
|
|---|
| 1908 | /*********************************************************************
|
|---|
| 1909 | * CRTDLL__rotr (CRTDLL.258)
|
|---|
| 1910 | */
|
|---|
| 1911 | unsigned int CDECL CRTDLL__rotr( unsigned int value, unsigned int shift )
|
|---|
| 1912 | {
|
|---|
| 1913 | dprintf(("CRTDLL: _rotr\n"));
|
|---|
| 1914 | return (_rotr(value, shift));
|
|---|
| 1915 | }
|
|---|
| 1916 |
|
|---|
| 1917 |
|
|---|
| 1918 | /*********************************************************************
|
|---|
| 1919 | * CRTDLL__searchenv (CRTDLL.260)
|
|---|
| 1920 | */
|
|---|
| 1921 | void CDECL CRTDLL__searchenv( const char *name, const char *env_var, char *buf )
|
|---|
| 1922 | {
|
|---|
| 1923 | dprintf(("CRTDLL: _searchenv not implemented.\n"));
|
|---|
| 1924 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 1925 | }
|
|---|
| 1926 |
|
|---|
| 1927 |
|
|---|
| 1928 | /*********************************************************************
|
|---|
| 1929 | * CRTDLL__setjmp (CRTDLL.262)
|
|---|
| 1930 | */
|
|---|
| 1931 | int CDECL CRTDLL__setjmp( jmp_buf env )
|
|---|
| 1932 | {
|
|---|
| 1933 | dprintf(("CRTDLL: _setjmp -> setjmp\n"));
|
|---|
| 1934 | return(setjmp( env));
|
|---|
| 1935 | }
|
|---|
| 1936 |
|
|---|
| 1937 |
|
|---|
| 1938 | /*********************************************************************
|
|---|
| 1939 | * _setmode (CRTDLL.263)
|
|---|
| 1940 | * FIXME: At present we ignore the request to translate CR/LF to LF.
|
|---|
| 1941 | *
|
|---|
| 1942 | * We allways translate when we read with fgets, we never do with fread
|
|---|
| 1943 | *
|
|---|
| 1944 | */
|
|---|
| 1945 | INT CDECL CRTDLL__setmode( INT fh,INT mode)
|
|---|
| 1946 | {
|
|---|
| 1947 | /* FIXME */
|
|---|
| 1948 | dprintf(("on fhandle %d mode %s, STUB.\n",
|
|---|
| 1949 | fh,(mode=O_TEXT)?"O_TEXT":
|
|---|
| 1950 | (mode=O_BINARY)?"O_BINARY":"UNKNOWN"));
|
|---|
| 1951 | return -1;
|
|---|
| 1952 | }
|
|---|
| 1953 |
|
|---|
| 1954 |
|
|---|
| 1955 | /*********************************************************************
|
|---|
| 1956 | * _sleep (CRTDLL.265)
|
|---|
| 1957 | */
|
|---|
| 1958 | VOID CDECL CRTDLL__sleep(unsigned long timeout)
|
|---|
| 1959 | {
|
|---|
| 1960 | dprintf(("CRTDLL__sleep for %ld milliseconds\n",timeout));
|
|---|
| 1961 | Sleep((timeout)?timeout:1);
|
|---|
| 1962 | }
|
|---|
| 1963 |
|
|---|
| 1964 |
|
|---|
| 1965 | /*********************************************************************
|
|---|
| 1966 | * CRTDLL__stat (CRTDLL.278)
|
|---|
| 1967 | */
|
|---|
| 1968 | int CDECL CRTDLL__stat( const char *s1, struct stat * n )
|
|---|
| 1969 | {
|
|---|
| 1970 | dprintf(("CRTDLL: _stat\n"));
|
|---|
| 1971 | return(_stat(s1, n));
|
|---|
| 1972 | }
|
|---|
| 1973 |
|
|---|
| 1974 |
|
|---|
| 1975 | /*********************************************************************
|
|---|
| 1976 | * CRTDLL__strdate (CRTDLL.281)
|
|---|
| 1977 | */
|
|---|
| 1978 | char * CDECL CRTDLL__strdate( char *buf )
|
|---|
| 1979 | {
|
|---|
| 1980 | dprintf(("CRTDLL: _strdate\n"));
|
|---|
| 1981 | return(_strdate(buf));
|
|---|
| 1982 | }
|
|---|
| 1983 |
|
|---|
| 1984 |
|
|---|
| 1985 | /*********************************************************************
|
|---|
| 1986 | * CRTDLL__strdec (CRTDLL.282)
|
|---|
| 1987 | */
|
|---|
| 1988 | char * CDECL CRTDLL__strdec( const char *, const char *p )
|
|---|
| 1989 | {
|
|---|
| 1990 | dprintf(("CRTDLL: _strdec\n"));
|
|---|
| 1991 | return( (char *)(p-1) );
|
|---|
| 1992 | }
|
|---|
| 1993 |
|
|---|
| 1994 |
|
|---|
| 1995 | /*********************************************************************
|
|---|
| 1996 | * CRTDLL__strdup (CRTDLL.283)
|
|---|
| 1997 | */
|
|---|
| 1998 | LPSTR CDECL CRTDLL__strdup(LPCSTR ptr)
|
|---|
| 1999 | {
|
|---|
| 2000 | dprintf(("CRTDLL: _strdup\n"));
|
|---|
| 2001 | return HEAP_strdupA(GetProcessHeap(),0,ptr);
|
|---|
| 2002 | }
|
|---|
| 2003 |
|
|---|
| 2004 |
|
|---|
| 2005 | /*********************************************************************
|
|---|
| 2006 | * CRTDLL__stricoll (CRTDLL.286)
|
|---|
| 2007 | */
|
|---|
| 2008 | int CDECL CRTDLL__stricoll( const char *s1, const char *s2 )
|
|---|
| 2009 | {
|
|---|
| 2010 | dprintf(("CRTDLL: _stricoll not implemented.\n"));
|
|---|
| 2011 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2012 | return FALSE;
|
|---|
| 2013 | }
|
|---|
| 2014 |
|
|---|
| 2015 |
|
|---|
| 2016 | /*********************************************************************
|
|---|
| 2017 | * CRTDLL__strinc (CRTDLL.287)
|
|---|
| 2018 | */
|
|---|
| 2019 | char * CDECL CRTDLL__strinc( const char *p )
|
|---|
| 2020 | {
|
|---|
| 2021 | dprintf(("CRTDLL: _strinc\n"));
|
|---|
| 2022 | return( (char *)(p+1) );
|
|---|
| 2023 | }
|
|---|
| 2024 |
|
|---|
| 2025 |
|
|---|
| 2026 | /*********************************************************************
|
|---|
| 2027 | * CRTDLL__strncnt (CRTDLL.289)
|
|---|
| 2028 | */
|
|---|
| 2029 | size_t CDECL CRTDLL__strncnt( const char *p, size_t l )
|
|---|
| 2030 | {
|
|---|
| 2031 | dprintf(("CRTDLL: _strncnt\n"));
|
|---|
| 2032 | size_t i;
|
|---|
| 2033 | i = strlen(p);
|
|---|
| 2034 | return( (i>l) ? l : i );
|
|---|
| 2035 | }
|
|---|
| 2036 |
|
|---|
| 2037 | /*********************************************************************
|
|---|
| 2038 | * CRTDLL__strnextc (CRTDLL.290)
|
|---|
| 2039 | */
|
|---|
| 2040 | unsigned int CDECL CRTDLL__strnextc( const char *p )
|
|---|
| 2041 | {
|
|---|
| 2042 | dprintf(("CRTDLL: _strnextc\n"));
|
|---|
| 2043 | return( (unsigned int)*p );
|
|---|
| 2044 | }
|
|---|
| 2045 |
|
|---|
| 2046 |
|
|---|
| 2047 | /*********************************************************************
|
|---|
| 2048 | * CRTDLL__strninc (CRTDLL.292)
|
|---|
| 2049 | */
|
|---|
| 2050 | char * CDECL CRTDLL__strninc( const char *p, size_t l )
|
|---|
| 2051 | {
|
|---|
| 2052 | dprintf(("CRTDLL: _strninc\n"));
|
|---|
| 2053 | return( (char *)(p+l) );
|
|---|
| 2054 | }
|
|---|
| 2055 |
|
|---|
| 2056 |
|
|---|
| 2057 | /*********************************************************************
|
|---|
| 2058 | * CRTDLL__strnset (CRTDLL.293)
|
|---|
| 2059 | */
|
|---|
| 2060 | char * CDECL CRTDLL__strnset( char *string, int c, size_t len )
|
|---|
| 2061 | {
|
|---|
| 2062 | dprintf(("CRTDLL: _strnset not implemented.\n"));
|
|---|
| 2063 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2064 | return FALSE;
|
|---|
| 2065 | }
|
|---|
| 2066 |
|
|---|
| 2067 |
|
|---|
| 2068 | /*********************************************************************
|
|---|
| 2069 | * CRTDLL__strrev (CRTDLL.294)
|
|---|
| 2070 | */
|
|---|
| 2071 | char * CDECL CRTDLL__strrev( char *string )
|
|---|
| 2072 | {
|
|---|
| 2073 | dprintf(("CRTDLL: _strrev not implemented.\n"));
|
|---|
| 2074 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2075 | return FALSE;
|
|---|
| 2076 | }
|
|---|
| 2077 |
|
|---|
| 2078 |
|
|---|
| 2079 | /*********************************************************************
|
|---|
| 2080 | * CRTDLL__strset (CRTDLL.295)
|
|---|
| 2081 | */
|
|---|
| 2082 | char * CDECL CRTDLL__strset( char *string, int c )
|
|---|
| 2083 | {
|
|---|
| 2084 | dprintf(("CRTDLL: _strset not implemented.\n"));
|
|---|
| 2085 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2086 | return FALSE;
|
|---|
| 2087 | }
|
|---|
| 2088 |
|
|---|
| 2089 |
|
|---|
| 2090 | /*********************************************************************
|
|---|
| 2091 | * CRTDLL__strspnp (CRTDLL.296)
|
|---|
| 2092 | */
|
|---|
| 2093 | char * CDECL CRTDLL__strspnp( const char *p1, const char *p2 )
|
|---|
| 2094 | {
|
|---|
| 2095 | dprintf(("CRTDLL: _strspnp\n"));
|
|---|
| 2096 | return( (*(p1 += strspn(p1,p2))!='\0') ? (char*)p1 : NULL );
|
|---|
| 2097 | }
|
|---|
| 2098 |
|
|---|
| 2099 |
|
|---|
| 2100 | /*********************************************************************
|
|---|
| 2101 | * CRTDLL__strtime (CRTDLL.297)
|
|---|
| 2102 | */
|
|---|
| 2103 | char * CDECL CRTDLL__strtime( char *buf )
|
|---|
| 2104 | {
|
|---|
| 2105 | dprintf(("CRTDLL: _strtime\n"));
|
|---|
| 2106 | return (_strtime(buf));
|
|---|
| 2107 | }
|
|---|
| 2108 |
|
|---|
| 2109 |
|
|---|
| 2110 | /*********************************************************************
|
|---|
| 2111 | * CRTDLL__tempnam (CRTDLL.303)
|
|---|
| 2112 | */
|
|---|
| 2113 | char * CDECL CRTDLL__tempnam( char *dir, char *prefix )
|
|---|
| 2114 | {
|
|---|
| 2115 | dprintf(("CRTDLL: _tempnam\n"));
|
|---|
| 2116 | return (_tempnam(dir, prefix));
|
|---|
| 2117 | }
|
|---|
| 2118 |
|
|---|
| 2119 |
|
|---|
| 2120 | /*********************************************************************
|
|---|
| 2121 | * CRTDLL__tolower (CRTDLL.305)
|
|---|
| 2122 | */
|
|---|
| 2123 | int CDECL CRTDLL__tolower(int n)
|
|---|
| 2124 | {
|
|---|
| 2125 | dprintf(("CRTDLL: _tolower\n"));
|
|---|
| 2126 | return (_tolower(n));
|
|---|
| 2127 | }
|
|---|
| 2128 |
|
|---|
| 2129 |
|
|---|
| 2130 | /*********************************************************************
|
|---|
| 2131 | * CRTDLL__toupper (CRTDLL.306)
|
|---|
| 2132 | */
|
|---|
| 2133 | int CDECL CRTDLL__toupper(int n)
|
|---|
| 2134 | {
|
|---|
| 2135 | dprintf(("CRTDLL: _toupper\n"));
|
|---|
| 2136 | return (_toupper(n));
|
|---|
| 2137 | }
|
|---|
| 2138 |
|
|---|
| 2139 |
|
|---|
| 2140 | /*********************************************************************
|
|---|
| 2141 | * _unlink (CRTDLL.312)
|
|---|
| 2142 | */
|
|---|
| 2143 | INT CDECL CRTDLL__unlink(LPCSTR pathname)
|
|---|
| 2144 | {
|
|---|
| 2145 | dprintf(("CRTDLL: _unlink\n"));
|
|---|
| 2146 | int ret=0;
|
|---|
| 2147 | DOS_FULL_NAME full_name;
|
|---|
| 2148 |
|
|---|
| 2149 | if (!DOSFS_GetFullName( pathname, FALSE, (CHAR*)&full_name )) {
|
|---|
| 2150 | dprintf(("CRTDLL_unlink file %s bad name\n",pathname));
|
|---|
| 2151 | return EOF;
|
|---|
| 2152 | }
|
|---|
| 2153 |
|
|---|
| 2154 | ret=unlink(full_name.long_name);
|
|---|
| 2155 | dprintf(("(%s unix %s)\n",
|
|---|
| 2156 | pathname,full_name.long_name));
|
|---|
| 2157 | if(ret)
|
|---|
| 2158 | dprintf((" Failed!\n"));
|
|---|
| 2159 |
|
|---|
| 2160 | return ret;
|
|---|
| 2161 | }
|
|---|
| 2162 |
|
|---|
| 2163 |
|
|---|
| 2164 | /*********************************************************************
|
|---|
| 2165 | * CRTDLL__utime (CRTDLL.314)
|
|---|
| 2166 | */
|
|---|
| 2167 | int CDECL CRTDLL__utime( char *path, struct utimbuf * times )
|
|---|
| 2168 | {
|
|---|
| 2169 | dprintf(("CRTDLL: _utime\n"));
|
|---|
| 2170 | return (_utime(path, times));
|
|---|
| 2171 | }
|
|---|
| 2172 |
|
|---|
| 2173 |
|
|---|
| 2174 | /*********************************************************************
|
|---|
| 2175 | * CRTDLL__vsnwprintf (CRTDLL.316)
|
|---|
| 2176 | */
|
|---|
| 2177 | int CDECL CRTDLL__vsnwprintf( wchar_t *s1, size_t n, const wchar_t *s2, va_list arg )
|
|---|
| 2178 | {
|
|---|
| 2179 | dprintf(("CRTDLL: _vsnwprintf not implemented.\n"));
|
|---|
| 2180 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2181 | return FALSE;
|
|---|
| 2182 | }
|
|---|
| 2183 |
|
|---|
| 2184 |
|
|---|
| 2185 | /*********************************************************************
|
|---|
| 2186 | * CRTDLL__wcsdup (CRTDLL.317)
|
|---|
| 2187 | */
|
|---|
| 2188 | LPWSTR CDECL CRTDLL__wcsdup( LPCWSTR str )
|
|---|
| 2189 | {
|
|---|
| 2190 | dprintf(("CRTDLL: _wcsdup\n"));
|
|---|
| 2191 | LPWSTR ret = NULL;
|
|---|
| 2192 | if (str)
|
|---|
| 2193 | {
|
|---|
| 2194 | int size = (wcslen((const wchar_t*)str) + 1) * sizeof(WCHAR);
|
|---|
| 2195 | // FIXME ret = CRTDLL_malloc( size );
|
|---|
| 2196 | if (ret) memcpy( ret, str, size );
|
|---|
| 2197 | }
|
|---|
| 2198 | return ret;
|
|---|
| 2199 | }
|
|---|
| 2200 |
|
|---|
| 2201 |
|
|---|
| 2202 | /*********************************************************************
|
|---|
| 2203 | * CRTDLL__wcsicoll (CRTDLL.319)
|
|---|
| 2204 | */
|
|---|
| 2205 | int CDECL CRTDLL__wcsicoll( LPCWSTR str1, LPCWSTR str2 )
|
|---|
| 2206 | {
|
|---|
| 2207 | dprintf(("CRTDLL: _wcsicoll\n"));
|
|---|
| 2208 | return NTDLL__wcsicmp( str1, str2 );
|
|---|
| 2209 | }
|
|---|
| 2210 |
|
|---|
| 2211 |
|
|---|
| 2212 | /*********************************************************************
|
|---|
| 2213 | * CRTDLL__wcsnset (CRTDLL.322)
|
|---|
| 2214 | */
|
|---|
| 2215 | LPWSTR CDECL CRTDLL__wcsnset( LPWSTR str, WCHAR c, INT n )
|
|---|
| 2216 | {
|
|---|
| 2217 | dprintf(("CRTDLL: _wcsnset\n"));
|
|---|
| 2218 | LPWSTR ret = str;
|
|---|
| 2219 | while ((n-- > 0) && *str) *str++ = c;
|
|---|
| 2220 | return ret;
|
|---|
| 2221 | }
|
|---|
| 2222 |
|
|---|
| 2223 |
|
|---|
| 2224 | /*********************************************************************
|
|---|
| 2225 | * CRTDLL__wcsrev (CRTDLL.323)
|
|---|
| 2226 | */
|
|---|
| 2227 | LPWSTR CDECL CRTDLL__wcsrev( LPWSTR str )
|
|---|
| 2228 | {
|
|---|
| 2229 | dprintf(("CRTDLL: _wcsrev\n"));
|
|---|
| 2230 | LPWSTR ret = str;
|
|---|
| 2231 | LPWSTR end = str + wcslen((const wchar_t*)str) - 1;
|
|---|
| 2232 | while (end > str)
|
|---|
| 2233 | {
|
|---|
| 2234 | WCHAR t = *end;
|
|---|
| 2235 | *end-- = *str;
|
|---|
| 2236 | *str++ = t;
|
|---|
| 2237 | }
|
|---|
| 2238 | return ret;
|
|---|
| 2239 | }
|
|---|
| 2240 |
|
|---|
| 2241 |
|
|---|
| 2242 | /*********************************************************************
|
|---|
| 2243 | * CRTDLL__wcsset (CRTDLL.324)
|
|---|
| 2244 | */
|
|---|
| 2245 | LPWSTR CDECL CRTDLL__wcsset( LPWSTR str, WCHAR c )
|
|---|
| 2246 | {
|
|---|
| 2247 | dprintf(("CRTDLL: _wcsset\n"));
|
|---|
| 2248 | LPWSTR ret = str;
|
|---|
| 2249 | while (*str) *str++ = c;
|
|---|
| 2250 | return ret;
|
|---|
| 2251 | }
|
|---|
| 2252 |
|
|---|
| 2253 |
|
|---|
| 2254 | /*********************************************************************
|
|---|
| 2255 | * _write (CRTDLL.329)
|
|---|
| 2256 | */
|
|---|
| 2257 | INT CDECL CRTDLL__write(INT fd,LPCVOID buf,UINT count)
|
|---|
| 2258 | {
|
|---|
| 2259 | dprintf(("CRTDLL: _write\n"));
|
|---|
| 2260 | INT len=0;
|
|---|
| 2261 |
|
|---|
| 2262 | if (fd == -1)
|
|---|
| 2263 | len = -1;
|
|---|
| 2264 | else if (fd<=2)
|
|---|
| 2265 | len = (UINT)write(fd,buf,(LONG)count);
|
|---|
| 2266 | else
|
|---|
| 2267 | len = _lwrite(fd,(LPCSTR)buf,count);
|
|---|
| 2268 | dprintf(("%d/%d byte to dfh %d from %p,\n",
|
|---|
| 2269 | len,count,fd,buf));
|
|---|
| 2270 | return len;
|
|---|
| 2271 | }
|
|---|
| 2272 |
|
|---|
| 2273 |
|
|---|
| 2274 | /*********************************************************************
|
|---|
| 2275 | * isleadbyte (CRTDLL.335)
|
|---|
| 2276 | */
|
|---|
| 2277 | void CDECL CRTDLL_abort( void )
|
|---|
| 2278 | {
|
|---|
| 2279 | dprintf(("CRTDLL: abort\n"));
|
|---|
| 2280 | abort();
|
|---|
| 2281 | }
|
|---|
| 2282 |
|
|---|
| 2283 |
|
|---|
| 2284 | /*********************************************************************
|
|---|
| 2285 | * acos (CRTDLL.336)
|
|---|
| 2286 | */
|
|---|
| 2287 | double CDECL CRTDLL_acos( double x )
|
|---|
| 2288 | {
|
|---|
| 2289 | dprintf(("CRTDLL: acos\n"));
|
|---|
| 2290 | return (acos(x));
|
|---|
| 2291 | }
|
|---|
| 2292 |
|
|---|
| 2293 |
|
|---|
| 2294 | /*********************************************************************
|
|---|
| 2295 | * asctime (CRTDLL.338)
|
|---|
| 2296 | */
|
|---|
| 2297 | char * CDECL CRTDLL_asctime( const struct tm *timeptr )
|
|---|
| 2298 | {
|
|---|
| 2299 | dprintf(("CRTDLL: asctime\n"));
|
|---|
| 2300 | return (asctime(timeptr));
|
|---|
| 2301 | }
|
|---|
| 2302 |
|
|---|
| 2303 |
|
|---|
| 2304 | /*********************************************************************
|
|---|
| 2305 | * asin (CRTDLL.339)
|
|---|
| 2306 | */
|
|---|
| 2307 | double CDECL CRTDLL_asin( double x )
|
|---|
| 2308 | {
|
|---|
| 2309 | dprintf(("CRTDLL: asin\n"));
|
|---|
| 2310 | return (asin(x));
|
|---|
| 2311 | }
|
|---|
| 2312 |
|
|---|
| 2313 |
|
|---|
| 2314 | /*********************************************************************
|
|---|
| 2315 | * atan2 (CRTDLL.341)
|
|---|
| 2316 | */
|
|---|
| 2317 | double CDECL CRTDLL_atan2( double y, double x )
|
|---|
| 2318 | {
|
|---|
| 2319 | dprintf(("CRTDLL: atan2\n"));
|
|---|
| 2320 | return (atan2(y, x));
|
|---|
| 2321 | }
|
|---|
| 2322 |
|
|---|
| 2323 |
|
|---|
| 2324 | /*********************************************************************
|
|---|
| 2325 | * atexit (CRTDLL.342)
|
|---|
| 2326 | */
|
|---|
| 2327 | int CDECL CRTDLL_atexit( register void ( *func )( void ) )
|
|---|
| 2328 | {
|
|---|
| 2329 | dprintf(("CRTDLL: atexit not implemented.\n"));
|
|---|
| 2330 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2331 | return FALSE;
|
|---|
| 2332 | }
|
|---|
| 2333 |
|
|---|
| 2334 |
|
|---|
| 2335 | /*********************************************************************
|
|---|
| 2336 | * atof (CRTDLL.343)
|
|---|
| 2337 | */
|
|---|
| 2338 | double CDECL CRTDLL_atof( const char *nptr )
|
|---|
| 2339 | {
|
|---|
| 2340 | dprintf(("CRTDLL: atof\n"));
|
|---|
| 2341 | return (atof(nptr));
|
|---|
| 2342 | }
|
|---|
| 2343 |
|
|---|
| 2344 |
|
|---|
| 2345 | /*********************************************************************
|
|---|
| 2346 | * bsearch (CRTDLL.346)
|
|---|
| 2347 | */
|
|---|
| 2348 | void * CDECL CRTDLL_bsearch( const void *key, const void *base, size_t nmemb,
|
|---|
| 2349 | size_t size, int (*compar)(const void *pkey, const void *pbase) )
|
|---|
| 2350 | {
|
|---|
| 2351 | dprintf(("CRTDLL: bsearch not implemented.\n"));
|
|---|
| 2352 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2353 | return FALSE;
|
|---|
| 2354 | }
|
|---|
| 2355 |
|
|---|
| 2356 |
|
|---|
| 2357 | /*********************************************************************
|
|---|
| 2358 | * calloc (CRTDLL.347)
|
|---|
| 2359 | */
|
|---|
| 2360 | void * CDECL CRTDLL_calloc( size_t n, size_t size )
|
|---|
| 2361 | {
|
|---|
| 2362 | dprintf(("CRTDLL: calloc\n"));
|
|---|
| 2363 | return (calloc(n, size));
|
|---|
| 2364 | }
|
|---|
| 2365 |
|
|---|
| 2366 |
|
|---|
| 2367 | /*********************************************************************
|
|---|
| 2368 | * clearerr (CRTDLL.349)
|
|---|
| 2369 | */
|
|---|
| 2370 | void CDECL CRTDLL_clearerr( FILE *fp )
|
|---|
| 2371 | {
|
|---|
| 2372 | dprintf(("CRTDLL: clearerr\n"));
|
|---|
| 2373 | clearerr(fp);
|
|---|
| 2374 | }
|
|---|
| 2375 |
|
|---|
| 2376 |
|
|---|
| 2377 | /*********************************************************************
|
|---|
| 2378 | * clock (CRTDLL.350)
|
|---|
| 2379 | */
|
|---|
| 2380 | clock_t CDECL CRTDLL_clock( void )
|
|---|
| 2381 | {
|
|---|
| 2382 | dprintf(("CRTDLL: clock\n"));
|
|---|
| 2383 | return (clock());
|
|---|
| 2384 | }
|
|---|
| 2385 |
|
|---|
| 2386 |
|
|---|
| 2387 | /*********************************************************************
|
|---|
| 2388 | * cosh (CRTDLL.352)
|
|---|
| 2389 | */
|
|---|
| 2390 | double CDECL CRTDLL_cosh( double x )
|
|---|
| 2391 | {
|
|---|
| 2392 | dprintf(("CRTDLL: cosh\n"));
|
|---|
| 2393 | return (cosh(x));
|
|---|
| 2394 | }
|
|---|
| 2395 |
|
|---|
| 2396 |
|
|---|
| 2397 | /*********************************************************************
|
|---|
| 2398 | * ctime (CRTDLL.353)
|
|---|
| 2399 | */
|
|---|
| 2400 | char * CDECL CRTDLL_ctime( const time_t *timer )
|
|---|
| 2401 | {
|
|---|
| 2402 | dprintf(("CRTDLL: ctime\n"));
|
|---|
| 2403 | return (ctime(timer));
|
|---|
| 2404 | }
|
|---|
| 2405 |
|
|---|
| 2406 |
|
|---|
| 2407 | /*********************************************************************
|
|---|
| 2408 | * difftime (CRTDLL.354)
|
|---|
| 2409 | */
|
|---|
| 2410 | double CDECL CRTDLL_difftime( time_t t1, time_t t0 )
|
|---|
| 2411 | {
|
|---|
| 2412 | dprintf(("CRTDLL: difftime\n"));
|
|---|
| 2413 | return (difftime(t1, t0));
|
|---|
| 2414 | }
|
|---|
| 2415 |
|
|---|
| 2416 |
|
|---|
| 2417 | /*********************************************************************
|
|---|
| 2418 | * div (CRTDLL.355)
|
|---|
| 2419 | */
|
|---|
| 2420 | div_t CDECL CRTDLL_div( int numer, int denom )
|
|---|
| 2421 | {
|
|---|
| 2422 | dprintf(("CRTDLL: div\n"));
|
|---|
| 2423 | return (div(numer, denom));
|
|---|
| 2424 | }
|
|---|
| 2425 |
|
|---|
| 2426 |
|
|---|
| 2427 | /*********************************************************************
|
|---|
| 2428 | * exit (CRTDLL.356)
|
|---|
| 2429 | */
|
|---|
| 2430 | void CDECL CRTDLL_exit(DWORD ret)
|
|---|
| 2431 | {
|
|---|
| 2432 | dprintf(("CRTDLL: exit\n"));
|
|---|
| 2433 | ExitProcess(ret);
|
|---|
| 2434 | }
|
|---|
| 2435 |
|
|---|
| 2436 |
|
|---|
| 2437 | /*********************************************************************
|
|---|
| 2438 | * exp (CRTDLL.357)
|
|---|
| 2439 | */
|
|---|
| 2440 | double CDECL CRTDLL_exp( double x )
|
|---|
| 2441 | {
|
|---|
| 2442 | dprintf(("CRTDLL: exp\n"));
|
|---|
| 2443 | return (exp(x));
|
|---|
| 2444 | }
|
|---|
| 2445 |
|
|---|
| 2446 |
|
|---|
| 2447 | /*********************************************************************
|
|---|
| 2448 | * fclose (CRTDLL.359)
|
|---|
| 2449 | */
|
|---|
| 2450 | int CDECL CRTDLL_fclose( FILE *fp )
|
|---|
| 2451 | {
|
|---|
| 2452 | dprintf(("CRTDLL: fclose\n"));
|
|---|
| 2453 | return (fclose(fp));
|
|---|
| 2454 | }
|
|---|
| 2455 |
|
|---|
| 2456 |
|
|---|
| 2457 | /*********************************************************************
|
|---|
| 2458 | * feof (CRTDLL.360)
|
|---|
| 2459 | */
|
|---|
| 2460 | int CDECL CRTDLL_feof( FILE *fp )
|
|---|
| 2461 | {
|
|---|
| 2462 | dprintf(("CRTDLL: feof\n"));
|
|---|
| 2463 | return (feof(fp));
|
|---|
| 2464 | }
|
|---|
| 2465 |
|
|---|
| 2466 |
|
|---|
| 2467 | /*********************************************************************
|
|---|
| 2468 | * ferror (CRTDLL.361)
|
|---|
| 2469 | */
|
|---|
| 2470 | int CDECL CRTDLL_ferror( FILE *fp )
|
|---|
| 2471 | {
|
|---|
| 2472 | dprintf(("CRTDLL: ferror\n"));
|
|---|
| 2473 | return (ferror(fp));
|
|---|
| 2474 | }
|
|---|
| 2475 |
|
|---|
| 2476 |
|
|---|
| 2477 | /*********************************************************************
|
|---|
| 2478 | * fflush (CRTDLL.362)
|
|---|
| 2479 | */
|
|---|
| 2480 | int CDECL CRTDLL_fflush( FILE *fp )
|
|---|
| 2481 | {
|
|---|
| 2482 | dprintf(("CRTDLL: fflush\n"));
|
|---|
| 2483 | return (fflush(fp));
|
|---|
| 2484 | }
|
|---|
| 2485 |
|
|---|
| 2486 |
|
|---|
| 2487 | /*********************************************************************
|
|---|
| 2488 | * fgetc (CRTDLL.363)
|
|---|
| 2489 | */
|
|---|
| 2490 | int CDECL CRTDLL_fgetc( FILE *fp )
|
|---|
| 2491 | {
|
|---|
| 2492 | dprintf(("CRTDLL: fgetc\n"));
|
|---|
| 2493 | return (fgetc(fp));
|
|---|
| 2494 | }
|
|---|
| 2495 |
|
|---|
| 2496 |
|
|---|
| 2497 | /*********************************************************************
|
|---|
| 2498 | * fgetpos (CRTDLL.364)
|
|---|
| 2499 | */
|
|---|
| 2500 | int CDECL CRTDLL_fgetpos( FILE *fp, fpos_t *pos )
|
|---|
| 2501 | {
|
|---|
| 2502 | dprintf(("CRTDLL: fgetpos\n"));
|
|---|
| 2503 | return (fgetpos(fp, pos));
|
|---|
| 2504 | }
|
|---|
| 2505 |
|
|---|
| 2506 |
|
|---|
| 2507 | /*********************************************************************
|
|---|
| 2508 | * fgets (CRTDLL.365)
|
|---|
| 2509 | */
|
|---|
| 2510 | char * CDECL CRTDLL_fgets( char *s, int n, FILE *fp )
|
|---|
| 2511 | {
|
|---|
| 2512 | dprintf(("CRTDLL: fgets\n"));
|
|---|
| 2513 | return (fgets(s, n, fp));
|
|---|
| 2514 | }
|
|---|
| 2515 |
|
|---|
| 2516 |
|
|---|
| 2517 | /*********************************************************************
|
|---|
| 2518 | * fgetwc (CRTDLL.366)
|
|---|
| 2519 | */
|
|---|
| 2520 | wint_t CDECL CRTDLL_fgetwc( FILE *f )
|
|---|
| 2521 | {
|
|---|
| 2522 | dprintf(("CRTDLL: fgetwc\n"));
|
|---|
| 2523 | return (fgetwc(f));
|
|---|
| 2524 | }
|
|---|
| 2525 |
|
|---|
| 2526 |
|
|---|
| 2527 | /*********************************************************************
|
|---|
| 2528 | * fmod (CRTDLL.368)
|
|---|
| 2529 | */
|
|---|
| 2530 | double CDECL CRTDLL_fmod(double x, double y )
|
|---|
| 2531 | {
|
|---|
| 2532 | dprintf(("CRTDLL: fmod\n"));
|
|---|
| 2533 | return (fmod(x,y));
|
|---|
| 2534 | }
|
|---|
| 2535 |
|
|---|
| 2536 |
|
|---|
| 2537 | /*********************************************************************
|
|---|
| 2538 | * fopen (CRTDLL.369)
|
|---|
| 2539 | */
|
|---|
| 2540 | FILE * CDECL CRTDLL_fopen( const char *filename, const char *mode )
|
|---|
| 2541 | {
|
|---|
| 2542 | dprintf(("CRTDLL: fopen\n"));
|
|---|
| 2543 | return (fopen( filename, mode));
|
|---|
| 2544 | }
|
|---|
| 2545 |
|
|---|
| 2546 |
|
|---|
| 2547 | /*********************************************************************
|
|---|
| 2548 | * fprintf (CRTDLL.370)
|
|---|
| 2549 | */
|
|---|
| 2550 | INT CDECL CRTDLL_fprintf( CRTDLL_FILE *file, LPSTR format, ... )
|
|---|
| 2551 | {
|
|---|
| 2552 | dprintf(("CRTDLL: fprintf\n"));
|
|---|
| 2553 | va_list valist;
|
|---|
| 2554 | INT res;
|
|---|
| 2555 |
|
|---|
| 2556 | va_start( valist, format );
|
|---|
| 2557 | res = CRTDLL_vfprintf( file, format, valist );
|
|---|
| 2558 | va_end( valist );
|
|---|
| 2559 | return res;
|
|---|
| 2560 | }
|
|---|
| 2561 |
|
|---|
| 2562 |
|
|---|
| 2563 | /*********************************************************************
|
|---|
| 2564 | * fputc (CRTDLL.371)
|
|---|
| 2565 | */
|
|---|
| 2566 | int CDECL CRTDLL_fputc( int c, FILE *fp )
|
|---|
| 2567 | {
|
|---|
| 2568 | dprintf(("CRTDLL: fputc\n"));
|
|---|
| 2569 | return (fputc(c, fp));
|
|---|
| 2570 | }
|
|---|
| 2571 |
|
|---|
| 2572 |
|
|---|
| 2573 | /*********************************************************************
|
|---|
| 2574 | * fputs (CRTDLL.372)
|
|---|
| 2575 | */
|
|---|
| 2576 | int CDECL CRTDLL_fputs( const char *s, FILE *fp )
|
|---|
| 2577 | {
|
|---|
| 2578 | dprintf(("CRTDLL: fputs\n"));
|
|---|
| 2579 | return (fputs(s, fp));
|
|---|
| 2580 | }
|
|---|
| 2581 |
|
|---|
| 2582 |
|
|---|
| 2583 | /*********************************************************************
|
|---|
| 2584 | * fputwc (CRTDLL.373)
|
|---|
| 2585 | */
|
|---|
| 2586 | wint_t CDECL CRTDLL_fputwc( wint_t wc, FILE *strm )
|
|---|
| 2587 | {
|
|---|
| 2588 | dprintf(("CRTDLL: fputwc\n"));
|
|---|
| 2589 | return (fputwc(wc, strm));
|
|---|
| 2590 | }
|
|---|
| 2591 |
|
|---|
| 2592 |
|
|---|
| 2593 | /*********************************************************************
|
|---|
| 2594 | * fread (CRTDLL.374)
|
|---|
| 2595 | */
|
|---|
| 2596 | size_t CDECL CRTDLL_fread( void *ptr, size_t size, size_t n, FILE *fp )
|
|---|
| 2597 | {
|
|---|
| 2598 | dprintf(("CRTDLL: fread\n"));
|
|---|
| 2599 | return (fread(ptr, size, n, fp));
|
|---|
| 2600 | }
|
|---|
| 2601 |
|
|---|
| 2602 |
|
|---|
| 2603 | /*********************************************************************
|
|---|
| 2604 | * free (CRTDLL.375)
|
|---|
| 2605 | */
|
|---|
| 2606 | VOID CDECL CRTDLL_free(LPVOID ptr)
|
|---|
| 2607 | {
|
|---|
| 2608 | dprintf(("CRTDLL: free\n"));
|
|---|
| 2609 | HeapFree(GetProcessHeap(),0,ptr);
|
|---|
| 2610 | }
|
|---|
| 2611 |
|
|---|
| 2612 |
|
|---|
| 2613 | /*********************************************************************
|
|---|
| 2614 | * freopen (CRTDLL.376)
|
|---|
| 2615 | */
|
|---|
| 2616 | FILE * CDECL CRTDLL_freopen( const char *filename, const char *mode, FILE *fp )
|
|---|
| 2617 | {
|
|---|
| 2618 | dprintf(("CRTDLL: freopen\n"));
|
|---|
| 2619 | return (freopen(filename, mode, fp));
|
|---|
| 2620 | }
|
|---|
| 2621 |
|
|---|
| 2622 |
|
|---|
| 2623 | /*********************************************************************
|
|---|
| 2624 | * frexp (CRTDLL.377)
|
|---|
| 2625 | */
|
|---|
| 2626 | double CDECL CRTDLL_frexp( double value, int *exp )
|
|---|
| 2627 | {
|
|---|
| 2628 | dprintf(("CRTDLL: frexp\n"));
|
|---|
| 2629 | return (frexp(value, exp));
|
|---|
| 2630 | }
|
|---|
| 2631 |
|
|---|
| 2632 |
|
|---|
| 2633 | /*********************************************************************
|
|---|
| 2634 | * fscanf (CRTDLL.378)
|
|---|
| 2635 | */
|
|---|
| 2636 | int CDECL CRTDLL_fscanf( FILE*fp, const char *format, ... )
|
|---|
| 2637 | {
|
|---|
| 2638 | dprintf(("CRTDLL: fscanf\n"));
|
|---|
| 2639 | #if 0
|
|---|
| 2640 | va_list valist;
|
|---|
| 2641 | INT res;
|
|---|
| 2642 |
|
|---|
| 2643 | va_start( valist, format );
|
|---|
| 2644 | #ifdef HAVE_VFSCANF
|
|---|
| 2645 | res = vfscanf( xlat_file_ptr(stream), format, valist );
|
|---|
| 2646 | #endif
|
|---|
| 2647 | va_end( valist );
|
|---|
| 2648 | return res;
|
|---|
| 2649 | #endif
|
|---|
| 2650 | dprintf(("broken\n"));
|
|---|
| 2651 | return 0;
|
|---|
| 2652 | }
|
|---|
| 2653 |
|
|---|
| 2654 |
|
|---|
| 2655 | /*********************************************************************
|
|---|
| 2656 | * fseek (CRTDLL.379)
|
|---|
| 2657 | */
|
|---|
| 2658 | int CDECL CRTDLL_fseek( FILE *file, long int offset, int whence )
|
|---|
| 2659 | {
|
|---|
| 2660 | dprintf(("CRTDLL: fseek\n"));
|
|---|
| 2661 | dprintf(("file %p to 0x%08lx pos %s\n",
|
|---|
| 2662 | file,offset,(whence==SEEK_SET)?"SEEK_SET":
|
|---|
| 2663 | (whence==SEEK_CUR)?"SEEK_CUR":
|
|---|
| 2664 | (whence==SEEK_END)?"SEEK_END":"UNKNOWN"));
|
|---|
| 2665 | // FIXME if (SetFilePointer( file->handle, offset, NULL, whence ) != 0xffffffff)
|
|---|
| 2666 | // FIXME return 0;
|
|---|
| 2667 | dprintf((" failed!\n"));
|
|---|
| 2668 | return -1;
|
|---|
| 2669 | }
|
|---|
| 2670 |
|
|---|
| 2671 |
|
|---|
| 2672 | /*********************************************************************
|
|---|
| 2673 | * fsetpos (CRTDLL.380)
|
|---|
| 2674 | */
|
|---|
| 2675 | int CDECL CRTDLL_fsetpos( FILE *fp, const fpos_t *pos )
|
|---|
| 2676 | {
|
|---|
| 2677 | dprintf(("CRTDLL: fsetpos\n"));
|
|---|
| 2678 | return (fsetpos(fp, pos));
|
|---|
| 2679 | }
|
|---|
| 2680 |
|
|---|
| 2681 |
|
|---|
| 2682 | /*********************************************************************
|
|---|
| 2683 | * ftell (CRTDLL.381)
|
|---|
| 2684 | */
|
|---|
| 2685 | long int CDECL CRTDLL_ftell( FILE *fp )
|
|---|
| 2686 | {
|
|---|
| 2687 | dprintf(("CRTDLL: ftell\n"));
|
|---|
| 2688 | return (ftell(fp));
|
|---|
| 2689 | }
|
|---|
| 2690 |
|
|---|
| 2691 |
|
|---|
| 2692 | /*********************************************************************
|
|---|
| 2693 | * fwprintf (CRTDLL.382)
|
|---|
| 2694 | */
|
|---|
| 2695 | int CDECL CRTDLL_fwprintf( FILE *strm, const wchar_t *format, ... )
|
|---|
| 2696 | {
|
|---|
| 2697 | dprintf(("CRTDLL: fwprintf not implemented.\n"));
|
|---|
| 2698 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2699 | return FALSE;
|
|---|
| 2700 | }
|
|---|
| 2701 |
|
|---|
| 2702 |
|
|---|
| 2703 | /*********************************************************************
|
|---|
| 2704 | * fwrite (CRTDLL.383)
|
|---|
| 2705 | */
|
|---|
| 2706 | DWORD CDECL CRTDLL_fwrite( LPVOID ptr, INT size, INT nmemb, CRTDLL_FILE *file )
|
|---|
| 2707 | {
|
|---|
| 2708 | DWORD ret;
|
|---|
| 2709 |
|
|---|
| 2710 | dprintf(("CRTDLL: fwrite\n"));
|
|---|
| 2711 | if (!WriteFile( file->handle, ptr, size * nmemb, &ret, NULL ))
|
|---|
| 2712 | dprintf((" failed!\n"));
|
|---|
| 2713 |
|
|---|
| 2714 | return ret / size;
|
|---|
| 2715 | }
|
|---|
| 2716 |
|
|---|
| 2717 |
|
|---|
| 2718 | /*********************************************************************
|
|---|
| 2719 | * fwscanf (CRTDLL.384)
|
|---|
| 2720 | */
|
|---|
| 2721 | int CDECL CRTDLL_fwscanf( FILE *strm, const wchar_t *format, ... )
|
|---|
| 2722 | {
|
|---|
| 2723 | dprintf(("CRTDLL: fwscanf not implemented.\n"));
|
|---|
| 2724 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2725 | return FALSE;
|
|---|
| 2726 | }
|
|---|
| 2727 |
|
|---|
| 2728 |
|
|---|
| 2729 | /*********************************************************************
|
|---|
| 2730 | * getc (CRTDLL.385)
|
|---|
| 2731 | */
|
|---|
| 2732 | int CDECL CRTDLL_getc( FILE *fp )
|
|---|
| 2733 | {
|
|---|
| 2734 | dprintf(("CRTDLL: getc\n"));
|
|---|
| 2735 | return (getc(fp));
|
|---|
| 2736 | }
|
|---|
| 2737 |
|
|---|
| 2738 |
|
|---|
| 2739 | /*********************************************************************
|
|---|
| 2740 | * getchar (CRTDLL.386)
|
|---|
| 2741 | */
|
|---|
| 2742 | int CDECL CRTDLL_getchar( void )
|
|---|
| 2743 | {
|
|---|
| 2744 | dprintf(("CRTDLL: getchar\n"));
|
|---|
| 2745 | return (getchar());
|
|---|
| 2746 | }
|
|---|
| 2747 |
|
|---|
| 2748 |
|
|---|
| 2749 | /*********************************************************************
|
|---|
| 2750 | * getenv (CRTDLL.387)
|
|---|
| 2751 | */
|
|---|
| 2752 | char * CDECL CRTDLL_getenv( const char *name )
|
|---|
| 2753 | {
|
|---|
| 2754 | dprintf(("CRTDLL: getenv\n"));
|
|---|
| 2755 | return (getenv(name));
|
|---|
| 2756 | }
|
|---|
| 2757 |
|
|---|
| 2758 |
|
|---|
| 2759 | /*********************************************************************
|
|---|
| 2760 | * gets (CRTDLL.388)
|
|---|
| 2761 | */
|
|---|
| 2762 | char * CDECL CRTDLL_gets( char *s )
|
|---|
| 2763 | {
|
|---|
| 2764 | dprintf(("CRTDLL: gets\n"));
|
|---|
| 2765 | return (gets(s));
|
|---|
| 2766 | }
|
|---|
| 2767 |
|
|---|
| 2768 |
|
|---|
| 2769 | /*********************************************************************
|
|---|
| 2770 | * gmtime (CRTDLL.389)
|
|---|
| 2771 | */
|
|---|
| 2772 | struct tm * CDECL CRTDLL_gmtime( const time_t *timer )
|
|---|
| 2773 | {
|
|---|
| 2774 | dprintf(("CRTDLL: gmtime\n"));
|
|---|
| 2775 | return (gmtime(timer));
|
|---|
| 2776 | }
|
|---|
| 2777 |
|
|---|
| 2778 |
|
|---|
| 2779 | /*********************************************************************
|
|---|
| 2780 | * is_wctype (CRTDLL.390)
|
|---|
| 2781 | * FIXME - Could not find anything about it
|
|---|
| 2782 | */
|
|---|
| 2783 | INT CDECL CRTDLL_is_wctype(DWORD ret)
|
|---|
| 2784 | {
|
|---|
| 2785 | dprintf(("CRTDLL: is_wctype\n"));
|
|---|
| 2786 | return 0;
|
|---|
| 2787 | }
|
|---|
| 2788 |
|
|---|
| 2789 |
|
|---|
| 2790 | /*********************************************************************
|
|---|
| 2791 | * isalnum (CRTDLL.391)
|
|---|
| 2792 | */
|
|---|
| 2793 | int CDECL CRTDLL_isalnum(int i)
|
|---|
| 2794 | {
|
|---|
| 2795 | dprintf(("CRTDLL: isalnum(%08xh)\n", i));
|
|---|
| 2796 | return (isalnum(i));
|
|---|
| 2797 | }
|
|---|
| 2798 |
|
|---|
| 2799 |
|
|---|
| 2800 | /*********************************************************************
|
|---|
| 2801 | * iscntrl (CRTDLL.393)
|
|---|
| 2802 | */
|
|---|
| 2803 | int CDECL CRTDLL_iscntrl(int i)
|
|---|
| 2804 | {
|
|---|
| 2805 | dprintf(("CRTDLL: iscntrl(%08xh)\n", i));
|
|---|
| 2806 | return (iscntrl(i));
|
|---|
| 2807 | }
|
|---|
| 2808 |
|
|---|
| 2809 |
|
|---|
| 2810 | /*********************************************************************
|
|---|
| 2811 | * isgraph (CRTDLL.395)
|
|---|
| 2812 | */
|
|---|
| 2813 | int CDECL CRTDLL_isgraph(int i)
|
|---|
| 2814 | {
|
|---|
| 2815 | dprintf(("CRTDLL: isgraph(%08xh)\n", i));
|
|---|
| 2816 | return (isgraph(i));
|
|---|
| 2817 | }
|
|---|
| 2818 |
|
|---|
| 2819 |
|
|---|
| 2820 | /*********************************************************************
|
|---|
| 2821 | * isleadbyte (CRTDLL.396)
|
|---|
| 2822 | */
|
|---|
| 2823 | int CDECL CRTDLL_isleadbyte(int i)
|
|---|
| 2824 | {
|
|---|
| 2825 | dprintf(("CRTDLL: isleadbyte(%08xh) not implemented.\n", i));
|
|---|
| 2826 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2827 | return FALSE;
|
|---|
| 2828 | }
|
|---|
| 2829 |
|
|---|
| 2830 |
|
|---|
| 2831 | /*********************************************************************
|
|---|
| 2832 | * ispunct (CRTDLL.399)
|
|---|
| 2833 | */
|
|---|
| 2834 | int CDECL CRTDLL_ispunct(int i)
|
|---|
| 2835 | {
|
|---|
| 2836 | dprintf(("CRTDLL: ispunct(%08xh)\n", i));
|
|---|
| 2837 | return (ispunct(i));
|
|---|
| 2838 | }
|
|---|
| 2839 |
|
|---|
| 2840 |
|
|---|
| 2841 | /*********************************************************************
|
|---|
| 2842 | * iswalnum (CRTDLL.402)
|
|---|
| 2843 | */
|
|---|
| 2844 | int CDECL CRTDLL_iswalnum(wint_t i)
|
|---|
| 2845 | {
|
|---|
| 2846 | dprintf(("CRTDLL: iswalnum(%08xh)\n", i));
|
|---|
| 2847 | return (iswalnum(i));
|
|---|
| 2848 | }
|
|---|
| 2849 |
|
|---|
| 2850 |
|
|---|
| 2851 | /*********************************************************************
|
|---|
| 2852 | * iswascii (CRTDLL.404)
|
|---|
| 2853 | */
|
|---|
| 2854 | int CDECL CRTDLL_iswascii(wint_t i)
|
|---|
| 2855 | {
|
|---|
| 2856 | dprintf(("CRTDLL: iswascii(%08xh) not implemented.\n", i));
|
|---|
| 2857 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 2858 | return FALSE;
|
|---|
| 2859 | }
|
|---|
| 2860 |
|
|---|
| 2861 |
|
|---|
| 2862 | /*********************************************************************
|
|---|
| 2863 | * iswcntrl (CRTDLL.405)
|
|---|
| 2864 | */
|
|---|
| 2865 | int CDECL CRTDLL_iswcntrl(wint_t i)
|
|---|
| 2866 | {
|
|---|
| 2867 | dprintf(("CRTDLL: iswcntrl(%08xh)\n", i));
|
|---|
| 2868 | return (iswcntrl(i));
|
|---|
| 2869 | }
|
|---|
| 2870 |
|
|---|
| 2871 |
|
|---|
| 2872 | /*********************************************************************
|
|---|
| 2873 | * iswdigit (CRTDLL.407)
|
|---|
| 2874 | */
|
|---|
| 2875 | int CDECL CRTDLL_iswdigit(wint_t i)
|
|---|
| 2876 | {
|
|---|
| 2877 | dprintf(("CRTDLL: iswdigit(%08xh)\n", i));
|
|---|
| 2878 | return (iswdigit(i));
|
|---|
| 2879 | }
|
|---|
| 2880 |
|
|---|
| 2881 |
|
|---|
| 2882 | /*********************************************************************
|
|---|
| 2883 | * iswgraph (CRTDLL.408)
|
|---|
| 2884 | */
|
|---|
| 2885 | int CDECL CRTDLL_iswgraph(wint_t i)
|
|---|
| 2886 | {
|
|---|
| 2887 | dprintf(("CRTDLL: iswgraph(%08xh)\n", i));
|
|---|
| 2888 | return (iswgraph(i));
|
|---|
| 2889 | }
|
|---|
| 2890 |
|
|---|
| 2891 |
|
|---|
| 2892 | /*********************************************************************
|
|---|
| 2893 | * iswlower (CRTDLL.409)
|
|---|
| 2894 | */
|
|---|
| 2895 | int CDECL CRTDLL_iswlower(wint_t i)
|
|---|
| 2896 | {
|
|---|
| 2897 | dprintf(("CRTDLL: iswlower(%08xh)\n", i));
|
|---|
| 2898 | return (iswlower(i));
|
|---|
| 2899 | }
|
|---|
| 2900 |
|
|---|
| 2901 |
|
|---|
| 2902 | /*********************************************************************
|
|---|
| 2903 | * iswprint (CRTDLL.410)
|
|---|
| 2904 | */
|
|---|
| 2905 | int CDECL CRTDLL_iswprint(wint_t i)
|
|---|
| 2906 | {
|
|---|
| 2907 | dprintf(("CRTDLL: iswprint(%08xh)\n", i));
|
|---|
| 2908 | return (iswprint(i));
|
|---|
| 2909 | }
|
|---|
| 2910 |
|
|---|
| 2911 |
|
|---|
| 2912 | /*********************************************************************
|
|---|
| 2913 | * iswpunct (CRTDLL.411)
|
|---|
| 2914 | */
|
|---|
| 2915 | int CDECL CRTDLL_iswpunct(wint_t i)
|
|---|
| 2916 | {
|
|---|
| 2917 | dprintf(("CRTDLL: iswpunct(%08xh)\n", i));
|
|---|
| 2918 | return (iswpunct(i));
|
|---|
| 2919 | }
|
|---|
| 2920 |
|
|---|
| 2921 |
|
|---|
| 2922 | /*********************************************************************
|
|---|
| 2923 | * iswspace (CRTDLL.412)
|
|---|
| 2924 | */
|
|---|
| 2925 | int CDECL CRTDLL_iswspace(wint_t i)
|
|---|
| 2926 | {
|
|---|
| 2927 | dprintf(("CRTDLL: iswspace(%08xh)\n", i));
|
|---|
| 2928 | return (iswspace(i));
|
|---|
| 2929 | }
|
|---|
| 2930 |
|
|---|
| 2931 |
|
|---|
| 2932 | /*********************************************************************
|
|---|
| 2933 | * iswupper (CRTDLL.413)
|
|---|
| 2934 | */
|
|---|
| 2935 | int CDECL CRTDLL_iswupper(wint_t i)
|
|---|
| 2936 | {
|
|---|
| 2937 | dprintf(("CRTDLL: iswupper(%08xh)\n", i));
|
|---|
| 2938 | return (iswupper(i));
|
|---|
| 2939 | }
|
|---|
| 2940 |
|
|---|
| 2941 |
|
|---|
| 2942 | /*********************************************************************
|
|---|
| 2943 | * iswxdigit (CRTDLL.414)
|
|---|
| 2944 | */
|
|---|
| 2945 | int CDECL CRTDLL_iswxdigit(wint_t i)
|
|---|
| 2946 | {
|
|---|
| 2947 | dprintf(("CRTDLL: iswxdigit(%08xh)\n", i));
|
|---|
| 2948 | return (iswxdigit(i));
|
|---|
| 2949 | }
|
|---|
| 2950 |
|
|---|
| 2951 |
|
|---|
| 2952 | /*********************************************************************
|
|---|
| 2953 | * ldexp (CRTDLL.417)
|
|---|
| 2954 | */
|
|---|
| 2955 | double CDECL CRTDLL_ldexp( double x, int exp )
|
|---|
| 2956 | {
|
|---|
| 2957 | dprintf(("CRTDLL: ldexp\n"));
|
|---|
| 2958 | return (ldexp(x, exp));
|
|---|
| 2959 | }
|
|---|
| 2960 |
|
|---|
| 2961 |
|
|---|
| 2962 | /*********************************************************************
|
|---|
| 2963 | * ldiv (CRTDLL.418)
|
|---|
| 2964 | */
|
|---|
| 2965 | ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom )
|
|---|
| 2966 | {
|
|---|
| 2967 | dprintf(("CRTDLL: ldiv\n"));
|
|---|
| 2968 | return (ldiv(numer, denom));
|
|---|
| 2969 | }
|
|---|
| 2970 |
|
|---|
| 2971 |
|
|---|
| 2972 | /*********************************************************************
|
|---|
| 2973 | * localeconv (CRTDLL.419)
|
|---|
| 2974 | */
|
|---|
| 2975 | struct lconv * CDECL CRTDLL_localeconv(void)
|
|---|
| 2976 | {
|
|---|
| 2977 | dprintf(("CRTDLL: localeconv\n"));
|
|---|
| 2978 | return (localeconv());
|
|---|
| 2979 | }
|
|---|
| 2980 |
|
|---|
| 2981 |
|
|---|
| 2982 | /*********************************************************************
|
|---|
| 2983 | * localtime (CRTDLL.420)
|
|---|
| 2984 | */
|
|---|
| 2985 | struct tm * CDECL CRTDLL_localtime( const time_t *timer )
|
|---|
| 2986 | {
|
|---|
| 2987 | dprintf(("CRTDLL: localtime\n"));
|
|---|
| 2988 | return (localtime(timer));
|
|---|
| 2989 | }
|
|---|
| 2990 |
|
|---|
| 2991 |
|
|---|
| 2992 | /*********************************************************************
|
|---|
| 2993 | * log10 (CRTDLL.422)
|
|---|
| 2994 | */
|
|---|
| 2995 | double CDECL CRTDLL_log10( double x )
|
|---|
| 2996 | {
|
|---|
| 2997 | dprintf(("CRTDLL: log10\n"));
|
|---|
| 2998 | return (log10(x));
|
|---|
| 2999 | }
|
|---|
| 3000 |
|
|---|
| 3001 |
|
|---|
| 3002 | /*********************************************************************
|
|---|
| 3003 | * longjmp (CRTDLL.423)
|
|---|
| 3004 | */
|
|---|
| 3005 | VOID CDECL CRTDLL_longjmp(jmp_buf env, int val)
|
|---|
| 3006 | {
|
|---|
| 3007 | dprintf(("CRTDLL: longjmp\n"));
|
|---|
| 3008 | longjmp(env, val);
|
|---|
| 3009 | }
|
|---|
| 3010 |
|
|---|
| 3011 |
|
|---|
| 3012 | /*********************************************************************
|
|---|
| 3013 | * malloc (CRTDLL.424)
|
|---|
| 3014 | */
|
|---|
| 3015 | VOID* CDECL CRTDLL_malloc(DWORD size)
|
|---|
| 3016 | {
|
|---|
| 3017 | dprintf(("CRTDLL: malloc\n"));
|
|---|
| 3018 | return HeapAlloc(GetProcessHeap(),0,size);
|
|---|
| 3019 | }
|
|---|
| 3020 |
|
|---|
| 3021 |
|
|---|
| 3022 | /*********************************************************************
|
|---|
| 3023 | * mblen (CRTDLL.425)
|
|---|
| 3024 | */
|
|---|
| 3025 | INT CDECL CRTDLL_mblen( const char *s, size_t n )
|
|---|
| 3026 | {
|
|---|
| 3027 | dprintf(("CRTDLL: mblen\n"));
|
|---|
| 3028 | return (mblen(s, n));
|
|---|
| 3029 | }
|
|---|
| 3030 |
|
|---|
| 3031 |
|
|---|
| 3032 | /*********************************************************************
|
|---|
| 3033 | * CRTDLL_mbtowc (CRTDLL.427)
|
|---|
| 3034 | */
|
|---|
| 3035 | INT CDECL CRTDLL_mbtowc( WCHAR *dst, LPCSTR str, INT n )
|
|---|
| 3036 | {
|
|---|
| 3037 | dprintf(("CRTDLL: _mbtowc\n"));
|
|---|
| 3038 | wchar_t res;
|
|---|
| 3039 | int ret = mbtowc( &res, str, n );
|
|---|
| 3040 | if (dst) *dst = (WCHAR)res;
|
|---|
| 3041 | return ret;
|
|---|
| 3042 | }
|
|---|
| 3043 |
|
|---|
| 3044 |
|
|---|
| 3045 | /*********************************************************************
|
|---|
| 3046 | * mktime (CRTDLL.433)
|
|---|
| 3047 | */
|
|---|
| 3048 | time_t CDECL CRTDLL_mktime( struct tm *timeptr )
|
|---|
| 3049 | {
|
|---|
| 3050 | dprintf(("CRTDLL: mktime\n"));
|
|---|
| 3051 | return mktime( timeptr );
|
|---|
| 3052 | }
|
|---|
| 3053 |
|
|---|
| 3054 |
|
|---|
| 3055 | /*********************************************************************
|
|---|
| 3056 | * modf (CRTDLL.434)
|
|---|
| 3057 | */
|
|---|
| 3058 | double CDECL CRTDLL_modf( double value, double *iptr )
|
|---|
| 3059 | {
|
|---|
| 3060 | dprintf(("CRTDLL: modf\n"));
|
|---|
| 3061 | return modf( value, iptr );
|
|---|
| 3062 | }
|
|---|
| 3063 |
|
|---|
| 3064 |
|
|---|
| 3065 | /*********************************************************************
|
|---|
| 3066 | * perror (CRTDLL.435)
|
|---|
| 3067 | */
|
|---|
| 3068 | void CDECL CRTDLL_perror( const char *s )
|
|---|
| 3069 | {
|
|---|
| 3070 | dprintf(("CRTDLL: perror\n"));
|
|---|
| 3071 | perror( s );
|
|---|
| 3072 | }
|
|---|
| 3073 |
|
|---|
| 3074 |
|
|---|
| 3075 | /*********************************************************************
|
|---|
| 3076 | * printf (CRTDLL.437)
|
|---|
| 3077 | */
|
|---|
| 3078 | int CDECL CRTDLL_printf( const char *format, ... )
|
|---|
| 3079 | {
|
|---|
| 3080 | dprintf(("CRTDLL: printf not implemented.\n"));
|
|---|
| 3081 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3082 | return FALSE;
|
|---|
| 3083 | }
|
|---|
| 3084 |
|
|---|
| 3085 |
|
|---|
| 3086 | /*********************************************************************
|
|---|
| 3087 | * putc (CRTDLL.438)
|
|---|
| 3088 | */
|
|---|
| 3089 | int CDECL CRTDLL_putc( int c, FILE *fp )
|
|---|
| 3090 | {
|
|---|
| 3091 | dprintf(("CRTDLL: putc\n"));
|
|---|
| 3092 | return putc( c, fp );
|
|---|
| 3093 | }
|
|---|
| 3094 |
|
|---|
| 3095 |
|
|---|
| 3096 | /*********************************************************************
|
|---|
| 3097 | * putchar (CRTDLL.439)
|
|---|
| 3098 | */
|
|---|
| 3099 | int CDECL CRTDLL_putchar( int c )
|
|---|
| 3100 | {
|
|---|
| 3101 | dprintf(("CRTDLL: putchar\n"));
|
|---|
| 3102 | return putchar( c );
|
|---|
| 3103 | }
|
|---|
| 3104 |
|
|---|
| 3105 |
|
|---|
| 3106 | /*********************************************************************
|
|---|
| 3107 | * puts (CRTDLL.440)
|
|---|
| 3108 | */
|
|---|
| 3109 | int CDECL CRTDLL_puts( const char *s )
|
|---|
| 3110 | {
|
|---|
| 3111 | dprintf(("CRTDLL: puts\n"));
|
|---|
| 3112 | return puts( s );
|
|---|
| 3113 | }
|
|---|
| 3114 |
|
|---|
| 3115 |
|
|---|
| 3116 | /*********************************************************************
|
|---|
| 3117 | * raise (CRTDLL.442)
|
|---|
| 3118 | */
|
|---|
| 3119 | int CDECL CRTDLL_raise( int sig )
|
|---|
| 3120 | {
|
|---|
| 3121 | dprintf(("CRTDLL: raise\n"));
|
|---|
| 3122 | return raise( sig );
|
|---|
| 3123 | }
|
|---|
| 3124 |
|
|---|
| 3125 |
|
|---|
| 3126 | /*********************************************************************
|
|---|
| 3127 | * rand (CRTDLL.443)
|
|---|
| 3128 | */
|
|---|
| 3129 | int CDECL CRTDLL_rand( void )
|
|---|
| 3130 | {
|
|---|
| 3131 | dprintf(("CRTDLL: rand\n"));
|
|---|
| 3132 | return (rand());
|
|---|
| 3133 | }
|
|---|
| 3134 |
|
|---|
| 3135 |
|
|---|
| 3136 | /*********************************************************************
|
|---|
| 3137 | * realloc (CRTDLL.444)
|
|---|
| 3138 | */
|
|---|
| 3139 | void * CDECL CRTDLL_realloc( void *ptr, size_t size )
|
|---|
| 3140 | {
|
|---|
| 3141 | dprintf(("CRTDLL: realloc\n"));
|
|---|
| 3142 | return HeapReAlloc( GetProcessHeap(), 0, ptr, size );
|
|---|
| 3143 | }
|
|---|
| 3144 |
|
|---|
| 3145 |
|
|---|
| 3146 | /*********************************************************************
|
|---|
| 3147 | * remove (CRTDLL.445)
|
|---|
| 3148 | */
|
|---|
| 3149 | INT CDECL CRTDLL_remove(LPCSTR file)
|
|---|
| 3150 | {
|
|---|
| 3151 | dprintf(("CRTDLL: remove\n"));
|
|---|
| 3152 | if (!DeleteFileA(file))
|
|---|
| 3153 | return -1;
|
|---|
| 3154 | return 0;
|
|---|
| 3155 | }
|
|---|
| 3156 |
|
|---|
| 3157 |
|
|---|
| 3158 | /*********************************************************************
|
|---|
| 3159 | * rename (CRTDLL.446)
|
|---|
| 3160 | */
|
|---|
| 3161 | int CDECL CRTDLL_rename (const char *old, const char *new2)
|
|---|
| 3162 | {
|
|---|
| 3163 | dprintf(("CRTDLL: rename\n"));
|
|---|
| 3164 | return (rename(old, new2));
|
|---|
| 3165 | }
|
|---|
| 3166 |
|
|---|
| 3167 |
|
|---|
| 3168 | /*********************************************************************
|
|---|
| 3169 | * rewind (CRTDLL.447)
|
|---|
| 3170 | */
|
|---|
| 3171 | void CDECL CRTDLL_rewind( FILE *fp )
|
|---|
| 3172 | {
|
|---|
| 3173 | dprintf(("CRTDLL: rewind\n"));
|
|---|
| 3174 | rewind(fp);
|
|---|
| 3175 | }
|
|---|
| 3176 |
|
|---|
| 3177 |
|
|---|
| 3178 | /*********************************************************************
|
|---|
| 3179 | * scanf (CRTDLL.448)
|
|---|
| 3180 | */
|
|---|
| 3181 | int CDECL CRTDLL_scanf( const char *format, ... )
|
|---|
| 3182 | {
|
|---|
| 3183 | dprintf(("CRTDLL: scanf not implemented.\n"));
|
|---|
| 3184 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3185 | return FALSE;
|
|---|
| 3186 | }
|
|---|
| 3187 |
|
|---|
| 3188 |
|
|---|
| 3189 | /*********************************************************************
|
|---|
| 3190 | * setbuf (CRTDLL.449)
|
|---|
| 3191 | */
|
|---|
| 3192 | void CDECL CRTDLL_setbuf( FILE *fp, char *buf )
|
|---|
| 3193 | {
|
|---|
| 3194 | dprintf(("CRTDLL: setbuf\n"));
|
|---|
| 3195 | setbuf(fp, buf);
|
|---|
| 3196 | }
|
|---|
| 3197 |
|
|---|
| 3198 |
|
|---|
| 3199 | /*********************************************************************
|
|---|
| 3200 | * setlocale (CRTDLL.450)
|
|---|
| 3201 | */
|
|---|
| 3202 | char * CDECL CRTDLL_setlocale(int category,const char *locale)
|
|---|
| 3203 | {
|
|---|
| 3204 | dprintf(("CRTDLL: setlocale\n"));
|
|---|
| 3205 | return (setlocale(category, locale));
|
|---|
| 3206 | }
|
|---|
| 3207 |
|
|---|
| 3208 |
|
|---|
| 3209 | /*********************************************************************
|
|---|
| 3210 | * setvbuf (CRTDLL.451)
|
|---|
| 3211 | */
|
|---|
| 3212 | int CDECL CRTDLL_setvbuf( FILE *fp, char *buf, int mode, size_t size )
|
|---|
| 3213 | {
|
|---|
| 3214 | dprintf(("CRTDLL: setvbuf\n"));
|
|---|
| 3215 | return (setvbuf(fp, buf, mode, size));
|
|---|
| 3216 | }
|
|---|
| 3217 |
|
|---|
| 3218 |
|
|---|
| 3219 | /*********************************************************************
|
|---|
| 3220 | * signal (CRTDLL.452)
|
|---|
| 3221 | */
|
|---|
| 3222 | void CDECL CRTDLL_signal( int sig, void (*func)(int))
|
|---|
| 3223 | {
|
|---|
| 3224 | dprintf(("CRTDLL: signal not implemented.\n"));
|
|---|
| 3225 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3226 | }
|
|---|
| 3227 |
|
|---|
| 3228 |
|
|---|
| 3229 | /*********************************************************************
|
|---|
| 3230 | * sinh (CRTDLL.454)
|
|---|
| 3231 | */
|
|---|
| 3232 | double CDECL CRTDLL_sinh( double x )
|
|---|
| 3233 | {
|
|---|
| 3234 | dprintf(("CRTDLL: sinh\n"));
|
|---|
| 3235 | return (sinh(x));
|
|---|
| 3236 | }
|
|---|
| 3237 |
|
|---|
| 3238 |
|
|---|
| 3239 | /*********************************************************************
|
|---|
| 3240 | * srand (CRTDLL.457)
|
|---|
| 3241 | */
|
|---|
| 3242 | void CDECL CRTDLL_srand( unsigned int seed )
|
|---|
| 3243 | {
|
|---|
| 3244 | dprintf(("CRTDLL: srand\n"));
|
|---|
| 3245 | srand(seed);
|
|---|
| 3246 | }
|
|---|
| 3247 |
|
|---|
| 3248 |
|
|---|
| 3249 | /*********************************************************************
|
|---|
| 3250 | * strcoll (CRTDLL.462)
|
|---|
| 3251 | */
|
|---|
| 3252 | int CDECL CRTDLL_strcoll( const char *s1, const char *s2 )
|
|---|
| 3253 | {
|
|---|
| 3254 | dprintf(("CRTDLL: strcoll\n"));
|
|---|
| 3255 | return strcoll(s1, s2);
|
|---|
| 3256 | }
|
|---|
| 3257 |
|
|---|
| 3258 |
|
|---|
| 3259 | /*********************************************************************
|
|---|
| 3260 | * strerror (CRTDLL.465)
|
|---|
| 3261 | */
|
|---|
| 3262 | char * CDECL CRTDLL_strerror( int errnum )
|
|---|
| 3263 | {
|
|---|
| 3264 | dprintf(("CRTDLL: strerror\n"));
|
|---|
| 3265 | return strerror(errnum);
|
|---|
| 3266 | }
|
|---|
| 3267 |
|
|---|
| 3268 |
|
|---|
| 3269 | /*********************************************************************
|
|---|
| 3270 | * strftime (CRTDLL.466)
|
|---|
| 3271 | */
|
|---|
| 3272 | size_t CDECL CRTDLL_strftime( char *s, size_t maxsiz, const char *fmt, const struct tm *tp )
|
|---|
| 3273 | {
|
|---|
| 3274 | dprintf(("CRTDLL: strftime\n"));
|
|---|
| 3275 | return strftime(s, maxsiz, fmt, tp);
|
|---|
| 3276 | }
|
|---|
| 3277 |
|
|---|
| 3278 |
|
|---|
| 3279 | /*********************************************************************
|
|---|
| 3280 | * strtod (CRTDLL.475)
|
|---|
| 3281 | */
|
|---|
| 3282 | double CDECL CRTDLL_strtod( const char *nptr, char **endptr )
|
|---|
| 3283 | {
|
|---|
| 3284 | dprintf(("CRTDLL: strtod\n"));
|
|---|
| 3285 | return strtod(nptr, endptr);
|
|---|
| 3286 | }
|
|---|
| 3287 |
|
|---|
| 3288 |
|
|---|
| 3289 | /*********************************************************************
|
|---|
| 3290 | * strtok (CRTDLL.476)
|
|---|
| 3291 | */
|
|---|
| 3292 | char * CDECL CRTDLL_strtok( char *s1, const char *s2 )
|
|---|
| 3293 | {
|
|---|
| 3294 | dprintf(("CRTDLL: strtok\n"));
|
|---|
| 3295 | return strtok(s1, s2);
|
|---|
| 3296 | }
|
|---|
| 3297 |
|
|---|
| 3298 |
|
|---|
| 3299 | /*********************************************************************
|
|---|
| 3300 | * strtol (CRTDLL.477)
|
|---|
| 3301 | */
|
|---|
| 3302 | long int CDECL CRTDLL_strtol( const char *nptr, char **endptr, int base )
|
|---|
| 3303 | {
|
|---|
| 3304 | dprintf(("CRTDLL: strtol\n"));
|
|---|
| 3305 | return strtol(nptr, endptr, base);
|
|---|
| 3306 | }
|
|---|
| 3307 |
|
|---|
| 3308 |
|
|---|
| 3309 | /*********************************************************************
|
|---|
| 3310 | * strtoul (CRTDLL.478)
|
|---|
| 3311 | */
|
|---|
| 3312 | unsigned long CDECL CRTDLL_strtoul( const char *nptr, char **endptr, int base )
|
|---|
| 3313 | {
|
|---|
| 3314 | dprintf(("CRTDLL: strtoul\n"));
|
|---|
| 3315 | return strtoul(nptr, endptr, base);
|
|---|
| 3316 | }
|
|---|
| 3317 |
|
|---|
| 3318 |
|
|---|
| 3319 | /*********************************************************************
|
|---|
| 3320 | * strxfrm (CRTDLL.479)
|
|---|
| 3321 | */
|
|---|
| 3322 | size_t CDECL CRTDLL_strxfrm( char *s1, const char *s2, size_t n )
|
|---|
| 3323 | {
|
|---|
| 3324 | dprintf(("CRTDLL: strxfrm\n"));
|
|---|
| 3325 | return strxfrm(s1, s2, n);
|
|---|
| 3326 | }
|
|---|
| 3327 |
|
|---|
| 3328 |
|
|---|
| 3329 | /*********************************************************************
|
|---|
| 3330 | * swscanf (CRTDLL.481)
|
|---|
| 3331 | */
|
|---|
| 3332 | int CDECL CRTDLL_swscanf( const wchar_t *s1, const wchar_t *s2, ... )
|
|---|
| 3333 | {
|
|---|
| 3334 | dprintf(("CRTDLL: swscanf not implemented.\n"));
|
|---|
| 3335 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3336 | return FALSE;
|
|---|
| 3337 | }
|
|---|
| 3338 |
|
|---|
| 3339 |
|
|---|
| 3340 | /*********************************************************************
|
|---|
| 3341 | * system (CRTDLL.482)
|
|---|
| 3342 | */
|
|---|
| 3343 | int CDECL CRTDLL_system( const char *string )
|
|---|
| 3344 | {
|
|---|
| 3345 | dprintf(("CRTDLL: system\n"));
|
|---|
| 3346 | return system(string);
|
|---|
| 3347 | }
|
|---|
| 3348 |
|
|---|
| 3349 |
|
|---|
| 3350 | /*********************************************************************
|
|---|
| 3351 | * tanh (CRTDLL.485)
|
|---|
| 3352 | */
|
|---|
| 3353 | double CDECL CRTDLL_tanh( double x )
|
|---|
| 3354 | {
|
|---|
| 3355 | dprintf(("CRTDLL: tanh\n"));
|
|---|
| 3356 | return tanh(x);
|
|---|
| 3357 | }
|
|---|
| 3358 |
|
|---|
| 3359 |
|
|---|
| 3360 | /*********************************************************************
|
|---|
| 3361 | * time (CRTDLL.485)
|
|---|
| 3362 | */
|
|---|
| 3363 | time_t CDECL CRTDLL_time( time_t *timer )
|
|---|
| 3364 | {
|
|---|
| 3365 | dprintf(("CRTDLL: time\n"));
|
|---|
| 3366 |
|
|---|
| 3367 | return time(timer);
|
|---|
| 3368 | }
|
|---|
| 3369 |
|
|---|
| 3370 |
|
|---|
| 3371 | /*********************************************************************
|
|---|
| 3372 | * tmpfile (CRTDLL.486)
|
|---|
| 3373 | */
|
|---|
| 3374 | FILE * CDECL CRTDLL_tmpfile( void )
|
|---|
| 3375 | {
|
|---|
| 3376 | dprintf(("CRTDLL: tmpfile\n"));
|
|---|
| 3377 | return (tmpfile());
|
|---|
| 3378 | }
|
|---|
| 3379 |
|
|---|
| 3380 |
|
|---|
| 3381 | /*********************************************************************
|
|---|
| 3382 | * tmpnam (CRTDLL.487)
|
|---|
| 3383 | */
|
|---|
| 3384 | char * CDECL CRTDLL_tmpnam( char *s )
|
|---|
| 3385 | {
|
|---|
| 3386 | dprintf(("CRTDLL: tmpnam\n"));
|
|---|
| 3387 | return (tmpnam(s));
|
|---|
| 3388 | }
|
|---|
| 3389 |
|
|---|
| 3390 |
|
|---|
| 3391 | /*********************************************************************
|
|---|
| 3392 | * ungetc (CRTDLL.492)
|
|---|
| 3393 | */
|
|---|
| 3394 | INT CDECL CRTDLL_ungetc(int c)
|
|---|
| 3395 | {
|
|---|
| 3396 | dprintf(("CRTDLL: ungetc not implemented.\n"));
|
|---|
| 3397 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3398 | return FALSE;
|
|---|
| 3399 | }
|
|---|
| 3400 |
|
|---|
| 3401 |
|
|---|
| 3402 | /*********************************************************************
|
|---|
| 3403 | * ungetwc (CRTDLL.493)
|
|---|
| 3404 | */
|
|---|
| 3405 | wint_t CDECL CRTDLL_ungetwc( wint_t wc, FILE *strm )
|
|---|
| 3406 | {
|
|---|
| 3407 | dprintf(("CRTDLL: ungetwc\n"));
|
|---|
| 3408 | return (ungetwc(wc, strm));
|
|---|
| 3409 | }
|
|---|
| 3410 |
|
|---|
| 3411 |
|
|---|
| 3412 | /*********************************************************************
|
|---|
| 3413 | * vfprintf (CRTDLL.494)
|
|---|
| 3414 | */
|
|---|
| 3415 | INT CDECL CRTDLL_vfprintf( CRTDLL_FILE *file, LPSTR format, va_list args )
|
|---|
| 3416 | {
|
|---|
| 3417 | dprintf(("CRTDLL: vprintf\n"));
|
|---|
| 3418 | char buffer[2048]; /* FIXME... */
|
|---|
| 3419 | vsprintf( buffer, format, args );
|
|---|
| 3420 | return CRTDLL_fwrite( buffer, 1, strlen(buffer), file );
|
|---|
| 3421 | }
|
|---|
| 3422 |
|
|---|
| 3423 |
|
|---|
| 3424 | /*********************************************************************
|
|---|
| 3425 | * vfwprintf (CRTDLL.495)
|
|---|
| 3426 | */
|
|---|
| 3427 | int CDECL CRTDLL_vfwprintf( FILE *F, const wchar_t *s, va_list arg )
|
|---|
| 3428 | {
|
|---|
| 3429 | dprintf(("CRTDLL: vfwprintf not implemented.\n"));
|
|---|
| 3430 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3431 | return FALSE;
|
|---|
| 3432 | }
|
|---|
| 3433 |
|
|---|
| 3434 |
|
|---|
| 3435 | /*********************************************************************
|
|---|
| 3436 | * vprintf (CRTDLL.496)
|
|---|
| 3437 | */
|
|---|
| 3438 | int CDECL CRTDLL_vprintf( const char *format, __va_list arg )
|
|---|
| 3439 | {
|
|---|
| 3440 | dprintf(("CRTDLL: vprintf\n"));
|
|---|
| 3441 | return (vprintf(format, arg));
|
|---|
| 3442 | }
|
|---|
| 3443 |
|
|---|
| 3444 |
|
|---|
| 3445 | /*********************************************************************
|
|---|
| 3446 | * vswprintf (CRTDLL.498)
|
|---|
| 3447 | */
|
|---|
| 3448 | int CDECL CRTDLL_vswprintf( wchar_t *s , size_t t, const wchar_t *format, va_list arg )
|
|---|
| 3449 | {
|
|---|
| 3450 | dprintf(("CRTDLL: vswprintf\n"));
|
|---|
| 3451 | return (vswprintf(s, t, format, arg));
|
|---|
| 3452 | }
|
|---|
| 3453 |
|
|---|
| 3454 |
|
|---|
| 3455 | /*********************************************************************
|
|---|
| 3456 | * vwprintf (CRTDLL.499)
|
|---|
| 3457 | */
|
|---|
| 3458 | int CDECL CRTDLL_vwprintf( const wchar_t *s, va_list arg)
|
|---|
| 3459 | {
|
|---|
| 3460 | dprintf(("CRTDLL: vwprintf not implemented.\n"));
|
|---|
| 3461 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3462 | return FALSE;
|
|---|
| 3463 | }
|
|---|
| 3464 |
|
|---|
| 3465 |
|
|---|
| 3466 | /*********************************************************************
|
|---|
| 3467 | * wcscoll (CRTDLL.503)
|
|---|
| 3468 | */
|
|---|
| 3469 | int CDECL CRTDLL_wcscoll(const wchar_t *s1, const wchar_t *s2)
|
|---|
| 3470 | {
|
|---|
| 3471 | dprintf(("CRTDLL: wcscoll\n"));
|
|---|
| 3472 | return (wcscoll(s1, s2));
|
|---|
| 3473 | }
|
|---|
| 3474 |
|
|---|
| 3475 |
|
|---|
| 3476 | /*********************************************************************
|
|---|
| 3477 | * wcsftime (CRTDLL.506)
|
|---|
| 3478 | */
|
|---|
| 3479 | size_t CDECL CRTDLL_wcsftime( wchar_t *s, size_t maxsize,
|
|---|
| 3480 | const wchar_t *format, const struct tm *timeptr )
|
|---|
| 3481 | {
|
|---|
| 3482 | dprintf(("CRTDLL: wcsftime\n"));
|
|---|
| 3483 | return (wcsftime(s, maxsize, format, timeptr));
|
|---|
| 3484 | }
|
|---|
| 3485 |
|
|---|
| 3486 |
|
|---|
| 3487 | /*********************************************************************
|
|---|
| 3488 | * wcstod (CRTDLL.515)
|
|---|
| 3489 | */
|
|---|
| 3490 | double CDECL CRTDLL_wcstod( const wchar_t *nptr, wchar_t **endptr )
|
|---|
| 3491 | {
|
|---|
| 3492 | dprintf(("CRTDLL: wcstod\n"));
|
|---|
| 3493 | return (wcstod(nptr, endptr));
|
|---|
| 3494 | }
|
|---|
| 3495 |
|
|---|
| 3496 |
|
|---|
| 3497 | /*********************************************************************
|
|---|
| 3498 | * wcsxfrm (CRTDLL.520)
|
|---|
| 3499 | */
|
|---|
| 3500 | size_t CDECL CRTDLL_wcsxfrm( wchar_t *s1, const wchar_t *s2, size_t n )
|
|---|
| 3501 | {
|
|---|
| 3502 | dprintf(("CRTDLL: wcsxfrm\n"));
|
|---|
| 3503 | return (wcsxfrm(s1, s2, n));
|
|---|
| 3504 | }
|
|---|
| 3505 |
|
|---|
| 3506 |
|
|---|
| 3507 | /*********************************************************************
|
|---|
| 3508 | * wcstomb (CRTDLL.521)
|
|---|
| 3509 | */
|
|---|
| 3510 | int CDECL CRTDLL_wctomb( char *s, wchar_t wchar )
|
|---|
| 3511 | {
|
|---|
| 3512 | dprintf(("CRTDLL: wctomb\n"));
|
|---|
| 3513 | return (wctomb(s,wchar));
|
|---|
| 3514 | }
|
|---|
| 3515 |
|
|---|
| 3516 |
|
|---|
| 3517 | /*********************************************************************
|
|---|
| 3518 | * wprintf (CRTDLL.522)
|
|---|
| 3519 | */
|
|---|
| 3520 | int CDECL CRTDLL_wprintf( const wchar_t *s, ... )
|
|---|
| 3521 | {
|
|---|
| 3522 | dprintf(("CRTDLL: wprintf not implemented.\n"));
|
|---|
| 3523 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3524 | return FALSE;
|
|---|
| 3525 | }
|
|---|
| 3526 |
|
|---|
| 3527 |
|
|---|
| 3528 | /*********************************************************************
|
|---|
| 3529 | * wscanf (CRTDLL.523)
|
|---|
| 3530 | */
|
|---|
| 3531 | int CDECL CRTDLL_wscanf( const wchar_t *s, ... )
|
|---|
| 3532 | {
|
|---|
| 3533 | dprintf(("CRTDLL: wscanf not implemented.\n"));
|
|---|
| 3534 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|---|
| 3535 | return FALSE;
|
|---|
| 3536 | }
|
|---|