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