source: trunk/src/crtdll/crtdll.cpp@ 1118

Last change on this file since 1118 was 1118, checked in by sandervl, 26 years ago

Lots of changes by several people (see changelog for 4 October

File size: 109.1 KB
Line 
1/* $Id: crtdll.cpp,v 1.7 1999-10-04 09:55:54 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 <libc\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 <search.h>
43#include <sys\utime.h>
44#include <sys\stat.h>
45
46#include <crtdll.h>
47#include "crtinc.h"
48
49
50DEFAULT_DEBUG_CHANNEL(crtdll)
51
52
53/*********************************************************************
54 * CRTDLL_MainInit (CRTDLL.init)
55 */
56BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
57{
58 if (fdwReason == DLL_PROCESS_ATTACH) {
59 CRTDLL__fdopen(0,"r");
60 CRTDLL__fdopen(1,"w");
61 CRTDLL__fdopen(2,"w");
62 }
63 return TRUE;
64}
65
66
67/*********************************************************************
68 * new (CRTDLL.001)
69 */
70VOID* CDECL CRTDLL_new(DWORD size)
71{
72 dprintf(("CRTDLL: ??2@YAPAXI@Z\n"));
73 VOID* result;
74 if(!(result = HeapAlloc(GetProcessHeap(),0,size)) && new_handler)
75 (*new_handler)();
76 return result;
77}
78
79
80/*********************************************************************
81 * delete (CRTDLL.002)
82 */
83VOID CDECL CRTDLL_delete(VOID* ptr)
84{
85 dprintf(("CRTDLL: ??3@YAXPAX@Z\n"));
86 HeapFree(GetProcessHeap(),0,ptr);
87}
88
89
90/*********************************************************************
91 * set_new_handler(CRTDLL.003)
92 */
93new_handler_type CDECL CRTDLL_set_new_handler(new_handler_type func)
94{
95 dprintf(("CRTDLL: ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z\n"));
96 new_handler_type old_handler = new_handler;
97 new_handler = func;
98 return old_handler;
99}
100
101
102/*********************************************************************
103 * _CIacos (CRTDLL.004)
104 */
105double CDECL CRTDLL__CIacos( double x )
106{
107 dprintf(("NTDLL: _CIacos\n"));
108 dprintf(("should be register function\n"));
109 return acos(x);
110}
111
112
113/*********************************************************************
114 * _CIasin (CRTDLL.005)
115 */
116double CDECL CRTDLL__CIasin( double x )
117{
118 dprintf(("NTDLL: _CIasin\n"));
119 dprintf(("should be register function\n"));
120 return asin(x);
121}
122
123
124/*********************************************************************
125 * _CIatan (CRTDLL.006)
126 */
127double CDECL CRTDLL__CIatan( double x )
128{
129 dprintf(("NTDLL: _CIatan\n"));
130 dprintf(("should be register function\n"));
131 return atan(x);
132}
133
134
135/*********************************************************************
136 * _CIatan2 (CRTDLL.007)
137 */
138double CDECL CRTDLL__CIatan2( double x, double y )
139{
140 dprintf(("NTDLL: _CIatan2\n"));
141 dprintf(("should be register function\n"));
142 return atan2(x,y);
143}
144
145
146/*********************************************************************
147 * _CIcos (CRTDLL.008)
148 */
149double CDECL CRTDLL__CIcos( double x )
150{
151 dprintf(("NTDLL: _CIcos\n"));
152 dprintf(("should be register function\n"));
153 return cos(x);
154}
155
156
157/*********************************************************************
158 * _CIcosh (CRTDLL.009)
159 */
160double CDECL CRTDLL__CIcosh( double x )
161{
162 dprintf(("NTDLL: _CIcosh\n"));
163 dprintf(("should be register function\n"));
164 return cosh(x);
165}
166
167
168/*********************************************************************
169 * _CIexp (CRTDLL.010)
170 */
171double CDECL CRTDLL__CIexp( double x )
172{
173 dprintf(("NTDLL: _CIexp\n"));
174 dprintf(("should be register function\n"));
175 return exp(x);
176}
177
178
179/*********************************************************************
180 * _CIfmod (CRTDLL.011)
181 */
182double CDECL CRTDLL__CIfmod( double x, double y )
183{
184 dprintf(("NTDLL: _CIfmod\n"));
185 dprintf(("should be register function\n"));
186 return fmod(x,y);
187}
188
189
190/*********************************************************************
191 * _CIlog (CRTDLL.012)
192 */
193double CDECL CRTDLL__CIlog( double x )
194{
195 dprintf(("NTDLL: _CIlog\n"));
196 dprintf(("should be register function\n"));
197 return log(x);
198}
199
200
201/*********************************************************************
202 * _CIlog10 (CRTDLL.013)
203 */
204double CDECL CRTDLL__CIlog10( double x )
205{
206 dprintf(("NTDLL: _CIlog10\n"));
207 dprintf(("should be register function\n"));
208 return log10(x);
209}
210
211
212/*********************************************************************
213 * _CIsin (CRTDLL.015)
214 */
215double CDECL CRTDLL__CIsin( double x )
216{
217 dprintf(("NTDLL: _CIsin\n"));
218 dprintf(("should be register function\n"));
219 return sin(x);
220}
221
222
223/*********************************************************************
224 * _CIsinh (CRTDLL.016)
225 */
226double CDECL CRTDLL__CIsinh( double x )
227{
228 dprintf(("NTDLL: _CIsinh\n"));
229 dprintf(("should be register function\n"));
230 return sinh(x);
231}
232
233
234/*********************************************************************
235 * _CIsqrt (CRTDLL.017)
236 */
237double CDECL CRTDLL__CIsqrt( double x )
238{
239 dprintf(("NTDLL: _CIsqrt\n"));
240 dprintf(("should be register function\n"));
241 return acos(x);
242}
243
244
245/*********************************************************************
246 * _CItan (CRTDLL.018)
247 */
248double CDECL CRTDLL__CItan( double x )
249{
250 dprintf(("NTDLL: _CItan\n"));
251 dprintf(("should be register function\n"));
252 return tan(x);
253}
254
255
256/*********************************************************************
257 * _CItanh (CRTDLL.019)
258 */
259double CDECL CRTDLL__CItanh( double x )
260{
261 dprintf(("NTDLL: _CItanh\n"));
262 dprintf(("should be register function\n"));
263 return tanh(x);
264}
265
266
267/*********************************************************************
268 * _XcptFilter (CRTDLL.21)
269 * FIXME - Could not find anything about it
270 */
271INT CDECL CRTDLL__XcptFilter(DWORD ret)
272{
273 dprintf(("CRTDLL: XcptFilter not implemented.\n"));
274 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
275 return FALSE;
276}
277
278
279/*********************************************************************
280 * _GetMainArgs (CRTDLL.22)
281 */
282DWORD CDECL CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
283 LPSTR *environ,DWORD flag)
284{
285 char *cmdline;
286 char **xargv;
287 int xargc,i,afterlastspace;
288 DWORD version;
289
290 dprintf(("CRTDLL: GetMainArgs\n"));
291
292 CRTDLL_acmdln_dll = cmdline = HEAP_strdupA( GetProcessHeap(), 0,
293 GetCommandLineA() );
294
295 version = GetVersion();
296 CRTDLL_osver_dll = version >> 16;
297 CRTDLL_winminor_dll = version & 0xFF;
298 CRTDLL_winmajor_dll = (version>>8) & 0xFF;
299 CRTDLL_baseversion_dll = version >> 16;
300 CRTDLL_winver_dll = ((version >> 8) & 0xFF) + ((version & 0xFF) << 8);
301 CRTDLL_baseminor_dll = (version >> 16) & 0xFF;
302 CRTDLL_basemajor_dll = (version >> 24) & 0xFF;
303 CRTDLL_osversion_dll = version & 0xFFFF;
304 CRTDLL_osminor_dll = version & 0xFF;
305 CRTDLL_osmajor_dll = (version>>8) & 0xFF;
306
307 /* missing threading init */
308
309 i=0;xargv=NULL;xargc=0;afterlastspace=0;
310/*
311 dprintf(("CRTDLL: GetMainArgs i loop\n"));
312 while (cmdline[i]) {
313 if (cmdline[i]==' ') {
314 dprintf(("CRTDLL: GetMainArgs *1\n"));
315 xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
316 sizeof(char*)*(++xargc));
317 cmdline[i]='\0';
318 xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
319 cmdline+afterlastspace);
320 i++;
321 dprintf(("CRTDLL: GetMainArgs *2\n"));
322 while (cmdline[i]==' ')
323 i++;
324 if (cmdline[i])
325 afterlastspace=i;
326 dprintf(("CRTDLL: GetMainArgs *3\n"));
327
328 } else
329 i++;
330
331 }
332
333 xargv=(char**)HeapReAlloc( GetProcessHeap(), 0, xargv,
334 sizeof(char*)*(++xargc));
335 dprintf(("CRTDLL: GetMainArgs *4\n"));
336 cmdline[i]='\0';
337 dprintf(("CRTDLL: GetMainArgs *5\n"));
338 xargv[xargc-1] = HEAP_strdupA( GetProcessHeap(), 0,
339 cmdline+afterlastspace);
340*/
341 CRTDLL_argc_dll = xargc;
342 *argc = xargc;
343 CRTDLL_argv_dll = xargv;
344 *argv = xargv;
345 dprintf(("CRTDLL: GetMainArgs end\n"));
346 CRTDLL_environ_dll = *environ = GetEnvironmentStringsA();
347 return 0;
348}
349
350
351/*********************************************************************
352 * __dllonexit (CRTDLL.25)
353 */
354VOID CDECL CRTDLL___dllonexit ()
355{
356 dprintf(("__dllonexit not implemented.\n"));
357}
358
359
360/*********************************************************************
361 * __doserrno (CRTDLL.26)
362 */
363long * CDECL CRTDLL___doserrno()
364{
365 dprintf(("__doserrno not implemented.\n"));
366 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
367 return FALSE;
368// return _doserrno();
369}
370
371
372/*********************************************************************
373 * CRTDLL___isascii (CRTDLL.28)
374 */
375int CDECL CRTDLL___isascii(int i)
376{
377 dprintf(("CRTDLL: __isascii not implemented.\n"));
378 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
379 return FALSE;
380}
381
382
383/*********************************************************************
384 * CRTDLL___iscsym (CRTDLL.29)
385 */
386int CDECL CRTDLL___iscsym(int i)
387{
388 dprintf(("CRTDLL: __iscsym not implemented.\n"));
389 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
390 return FALSE;
391}
392
393
394/*********************************************************************
395 * CRTDLL___iscsymf (CRTDLL.30)
396 */
397int CDECL CRTDLL___iscsymf(int i)
398{
399 dprintf(("CRTDLL: __iscsymf not implemented.\n"));
400 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
401 return FALSE;
402}
403
404
405/*********************************************************************
406 * __mb_cur_max_dll (CRTDLL.31)
407 * FIXME - Could not find anything about it
408 */
409INT CDECL CRTDLL___mb_cur_max_dll(DWORD ret)
410{
411 dprintf(("CRTDLL: __mb_cur_max_dll not implemented.\n"));
412 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
413 return FALSE;
414}
415
416
417/*********************************************************************
418 * CRTDLL___threadhandle (CRTDLL.32)
419 */
420unsigned long CDECL CRTDLL___threadhandle( void )
421{
422 dprintf(("CRTDLL: __threadhandle not implemented.\n"));
423 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
424 return FALSE;
425}
426
427
428/*********************************************************************
429 * CRTDLL___threadid (CRTDLL.33)
430 */
431int * CDECL CRTDLL___threadid(void)
432{
433 dprintf(("CRTDLL: __threadid not implemented.\n"));
434 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
435 return FALSE;
436}
437
438
439/*********************************************************************
440 * CRTDLL__abnormal_termination (CRTDLL.36)
441 */
442int CDECL CRTDLL__abnormal_termination(void)
443{
444 dprintf(("CRTDLL: _abnormal_termination not implemented.\n"));
445 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
446 return FALSE;
447}
448
449
450/*********************************************************************
451 * CRTDLL__access (CRTDLL.37)
452 */
453int CDECL CRTDLL__access(const char *path,int mode)
454{
455 dprintf(("CRTDLL: _access\n"));
456 return (_access(path, mode));
457}
458
459
460/*********************************************************************
461 * _aexit_rtn_dll (CRTDLL.39)
462 * FIXME - Could not find anything about it
463 */
464INT CDECL CRTDLL__aexit_rtn_dll(DWORD ret)
465{
466 dprintf(("CRTDLL: _aexit_rtn_dll not implemented.\n"));
467 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
468 return FALSE;
469}
470
471
472/*********************************************************************
473 * _amsg_exit (CRTDLL.40)
474 * FIXME - Could not find anything about it
475 */
476INT CDECL CRTDLL__amsg_exit(DWORD ret)
477{
478 dprintf(("CRTDLL: _amsg_exit not implemented.\n"));
479 return 0;
480}
481
482
483/*********************************************************************
484 * CRTDLL__assert (CRTDLL.41)
485 */
486void CDECL CRTDLL__assert( char *s1, char *s2, int i)
487{
488 dprintf(("CRTDLL: _assert\n"));
489 _assert(s1, s2, i);
490}
491
492
493/*********************************************************************
494 * CRTDLL__beep (CRTDLL.45)
495 */
496void CDECL CRTDLL__beep(unsigned i1, unsigned i2)
497{
498 dprintf(("_beep not implemented.\n"));
499}
500
501
502/*********************************************************************
503 * CRTDLL__beginthread (CRTDLL.46)
504 */
505unsigned long CDECL CRTDLL__beginthread( register void (*start_address)(void *),
506 unsigned stack_size, void *arglist )
507{
508 dprintf(("CRTDLL: _beginthread not implemented.\n"));
509 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
510 return FALSE;
511}
512
513
514/*********************************************************************
515 * _c_exit (CRTDLL.47)
516 *
517 */
518void CDECL CRTDLL__c_exit(INT ret)
519{
520 dprintf(("_c_exit(%d)\n",ret));
521 ExitProcess(ret);
522}
523
524
525/*********************************************************************
526 * CRTDLL__cabs (CRTDLL.48)
527 */
528double CDECL CRTDLL__cabs(struct complex * c)
529{
530 dprintf(("CRTDLL: _cabs not implemented.\n"));
531 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
532 return FALSE;
533// return (_cabs(c));
534}
535
536
537/*********************************************************************
538 * _cexit (CRTDLL.49)
539 *
540 */
541void CDECL CRTDLL__cexit(INT ret)
542{
543 dprintf(("_cexit(%d)\n",ret));
544 ExitProcess(ret);
545}
546
547
548/*********************************************************************
549 * CRTDLL__cgets (CRTDLL.50)
550 */
551char * CDECL CRTDLL__cgets( char *s )
552{
553 dprintf(("CRTDLL: _cgets\n"));
554 return (_cgets(s));
555}
556
557
558/*********************************************************************
559 * _chdir (CRTDLL.51)
560 */
561INT CDECL CRTDLL__chdir(LPCSTR newdir)
562{
563 dprintf(("CRTDLL: chdir\n"));
564 if (!SetCurrentDirectoryA(newdir))
565 return 1;
566 return 0;
567}
568
569
570/*********************************************************************
571 * _chdrive (CRTDLL.52)
572 *
573 * newdir [I] drive to change to, A=1
574 *
575 */
576BOOL CDECL CRTDLL__chdrive(INT newdrive)
577{
578 /* FIXME: generates errnos */
579 dprintf(("CRTDLL: _chdrive\n"));
580 return DRIVE_SetCurrentDrive(newdrive-1);
581}
582
583
584/*********************************************************************
585 * CRTDLL__chgsign (CRTDLL.53)
586 */
587double CDECL CRTDLL__chgsign(double x)
588{
589 dprintf(("CRTDLL: _chgsign not implemented.\n"));
590 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
591 return FALSE;
592}
593
594
595/*********************************************************************
596 * CRTDLL__chmod (CRTDLL.54)
597 */
598int CDECL CRTDLL__chmod( const char *s, int i)
599{
600 dprintf(("CRTDLL: _chmod\n"));
601 return (_chmod(s, i));
602}
603
604
605/*********************************************************************
606 * CRTDLL__chsize (CRTDLL.55)
607 */
608int CDECL CRTDLL__chsize( int i, long l )
609{
610 dprintf(("CRTDLL: _chsize\n"));
611 return (_chsize(i, l));
612}
613
614
615/*********************************************************************
616 * CRTDLL__clearfp (CRTDLL.56)
617 */
618unsigned int CDECL CRTDLL__clearfp( void )
619{
620 dprintf(("CRTDLL: _clearfp\n"));
621 return (_clear87());
622}
623
624
625/*********************************************************************
626 * CRTDLL__close (CRTDLL.57)
627 */
628int CDECL CRTDLL__close(int handle)
629{
630 dprintf(("CRTDLL: _close\n"));
631 return (_close(handle));
632}
633
634
635/*********************************************************************
636 * CRTDLL__control87 (CRTDLL.60)
637 */
638unsigned CDECL CRTDLL__control87(unsigned i1,unsigned i2)
639{
640 dprintf(("CRTDLL: _control87\n"));
641 return (_control87(i1, i2));
642}
643
644
645/*********************************************************************
646 * CRTDLL__controlfp (CRTDLL.61)
647 */
648unsigned CDECL CRTDLL__controlfp(unsigned i1,unsigned i2)
649{
650 dprintf(("CRTDLL: _controlfp\n"));
651 return (_control87(i1, i2));
652}
653
654
655/*********************************************************************
656 * CRTDLL__copysign (CRTDLL.62)
657 */
658double CDECL CRTDLL__copysign( double x, double y )
659{
660 dprintf(("CRTDLL: _copysign not implemented.\n"));
661 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
662 return FALSE;
663}
664
665
666/*********************************************************************
667 * CRTDLL__cprintf (CRTDLL.63)
668 */
669INT CDECL CRTDLL__cprintf( char *s, ... )
670{
671 dprintf(("CRTDLL: _cprintf not implemented.\n"));
672 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
673 return FALSE;
674}
675
676
677/*********************************************************************
678 * CRTDLL__cputs (CRTDLL.65)
679 */
680INT CDECL CRTDLL__cputs( char * s )
681{
682 dprintf(("CRTDLL: _cputs\n"));
683 return (_cputs(s));
684}
685
686
687/*********************************************************************
688 * CRTDLL__creat (CRTDLL.66)
689 */
690INT CDECL CRTDLL__creat( const char *s, int i )
691{
692 dprintf(("CRTDLL: _creat\n"));
693 return (_creat(s, i));
694}
695
696
697/*********************************************************************
698 * CRTDLL__cscanf (CRTDLL.67)
699 */
700INT CDECL CRTDLL__cscanf( char *s, ... )
701{
702 dprintf(("CRTDLL: _cscanf not implemented.\n"));
703 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
704 return FALSE;
705}
706
707
708/*********************************************************************
709 * CRTDLL__cwait (CRTDLL.69)
710 */
711int CDECL CRTDLL__cwait( int *status, int process_id, int action_code )
712{
713 dprintf(("CRTDLL: _cwait\n"));
714 return (_cwait(status, process_id, action_code));
715}
716
717
718/*********************************************************************
719 * CRTDLL__dup (CRTDLL.71)
720 */
721int CDECL CRTDLL__dup(int handle)
722{
723 dprintf(("CRTDLL: _dup\n"));
724 return (_dup(handle));
725}
726
727
728/*********************************************************************
729 * CRTDLL__dup2 (CRTDLL.72)
730 */
731int CDECL CRTDLL__dup2(int handle1,int handle2)
732{
733 dprintf(("CRTDLL: _dup2\n"));
734 return (_dup2(handle1, handle2));
735}
736
737
738/*********************************************************************
739 * CRTDLL__ecvt (CRTDLL.73)
740 */
741char * CDECL CRTDLL__ecvt( double val, int ndig, int *dec, int *sign )
742{
743 dprintf(("CRTDLL: _ecvt\n"));
744 return (_ecvt(val, ndig, dec, sign));
745}
746
747
748/*********************************************************************
749 * CRTDLL__endthread (CRTDLL.74)
750 */
751void CDECL CRTDLL__endthread(void)
752{
753 dprintf(("CRTDLL: _endthread\n"));
754 _endthread ();
755}
756
757
758/*********************************************************************
759 * CRTDLL__errno (CRTDLL.77)
760 */
761int * CDECL CRTDLL__errno(void)
762{
763 dprintf(("CRTDLL: _errno\n"));
764 return (_errno());
765}
766
767
768/*********************************************************************
769 * _except_handler2 (CRTDLL.78)
770 */
771INT CDECL CRTDLL__except_handler2 ( PEXCEPTION_RECORD rec,
772 PEXCEPTION_FRAME frame, PCONTEXT context,
773 PEXCEPTION_FRAME *dispatcher)
774{
775 dprintf(("CRTDLL: _except_handler2\n"));
776 return 1;
777}
778
779
780/*********************************************************************
781 * CRTDLL__execl (CRTDLL.79)
782 */
783int CDECL CRTDLL__execl( char *s1, char *s2, ...)
784{
785 dprintf(("CRTDLL: _execl not implemented.\n"));
786 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
787 return FALSE;
788}
789
790
791/*********************************************************************
792 * CRTDLL__execle (CRTDLL.80)
793 */
794int CDECL CRTDLL__execle( char *s1, char *s2, ...)
795{
796 dprintf(("CRTDLL: _execle not implemented.\n"));
797 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
798 return FALSE;
799}
800
801
802/*********************************************************************
803 * CRTDLL__execlp (CRTDLL.81)
804 */
805int CDECL CRTDLL__execlp( char *s1, char *s2, ...)
806{
807 dprintf(("CRTDLL: _execlp not implemented.\n"));
808 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
809 return FALSE;
810}
811
812
813/*********************************************************************
814 * CRTDLL__execlpe (CRTDLL.82)
815 */
816int CDECL CRTDLL__execlpe( char *s1, char *s2, ...)
817{
818 dprintf(("CRTDLL: _execlpe not implemented.\n"));
819 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
820 return FALSE;
821}
822
823
824/*********************************************************************
825 * CRTDLL__execv (CRTDLL.83)
826 */
827int CDECL CRTDLL__execv( char *s1, char **s2)
828{
829 dprintf(("CRTDLL: _execv\n"));
830 return (_execv(s1, s2));
831}
832
833
834/*********************************************************************
835 * CRTDLL__execve (CRTDLL.84)
836 */
837int CDECL CRTDLL__execve( char *s1, char **s2, char **s3)
838{
839 dprintf(("CRTDLL: _execve\n"));
840 return (_execve(s1, s2, s3));
841}
842
843
844/*********************************************************************
845 * CRTDLL__execvp (CRTDLL.85)
846 */
847int CDECL CRTDLL__execvp( char *s1, char **s2)
848{
849 dprintf(("CRTDLL: _execvp\n"));
850 return (_execvp(s1, s2));
851}
852
853
854/*********************************************************************
855 * CRTDLL__execvpe (CRTDLL.86)
856 */
857int CDECL CRTDLL__execvpe( char *s1, char **s2, char **s3)
858{
859 dprintf(("CRTDLL: _execvpe\n"));
860 return (_execvpe(s1, s2, s3));
861}
862
863
864/*********************************************************************
865 * _exit (CRTDLL.87)
866 */
867VOID CDECL CRTDLL__exit(DWORD ret)
868{
869 dprintf(("CRTDLL: _exit\n"));
870 ExitProcess(ret);
871}
872
873
874/*********************************************************************
875 * CRTDLL__expand (CRTDLL.88)
876 */
877void * CDECL CRTDLL__expand( void *ptr, size_t size )
878{
879 dprintf(("CRTDLL: _expand not implemented.\n"));
880 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
881 return FALSE;
882}
883
884
885/*********************************************************************
886 * CRTDLL__fcloseall (CRTDLL.89)
887 */
888int CDECL CRTDLL__fcloseall( void )
889{
890 dprintf(("CRTDLL: _fcloseall\n"));
891 return (_fcloseall());
892}
893
894
895/*********************************************************************
896 * CRTDLL__fcvt (CRTDLL.90)
897 */
898char * CDECL CRTDLL__fcvt( double val, int ndig, int *dec, int *sign )
899{
900 dprintf(("CRTDLL: _fcvt\n"));
901 return (_fcvt(val, ndig, dec, sign));
902}
903
904
905/*********************************************************************
906 * _fdopen (CRTDLL.91)
907 */
908CRTDLL_FILE * CDECL CRTDLL__fdopen(INT handle, LPCSTR mode)
909{
910 dprintf(("CRTDLL: fdopen\n"));
911 CRTDLL_FILE *file;
912
913 switch (handle)
914 {
915 case 0:
916 file = CRTDLL_stdin;
917 if (!file->handle) file->handle = GetStdHandle( STD_INPUT_HANDLE );
918 break;
919 case 1:
920 file = CRTDLL_stdout;
921 if (!file->handle) file->handle = GetStdHandle( STD_OUTPUT_HANDLE );
922 break;
923 case 2:
924 file=CRTDLL_stderr;
925 if (!file->handle) file->handle = GetStdHandle( STD_ERROR_HANDLE );
926 break;
927 default:
928 file = (PCRTDLL_FILE)HeapAlloc( GetProcessHeap(), 0, sizeof(*file) );
929 file->handle = handle;
930 break;
931 }
932 return file;
933}
934
935
936/*********************************************************************
937 * CRTDLL__fgetchar (CRTDLL.92)
938 */
939int CDECL CRTDLL__fgetchar( void )
940{
941 dprintf(("CRTDLL: _fgetchar\n"));
942 return (_fgetchar());
943}
944
945
946/*********************************************************************
947 * CRTDLL__fgetwchar (CRTDLL.93)
948 */
949wint_t CDECL CRTDLL__fgetwchar( void *i )
950{
951 dprintf(("CRTDLL: _fgetwchar not implemented.\n"));
952 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
953 return FALSE;
954}
955
956
957/*********************************************************************
958 * CRTDLL__filbuf (CRTDLL.94)
959 */
960int CDECL CRTDLL__filbuf(FILE * f)
961{
962 dprintf(("CRTDLL: _filbuf not implemented.\n"));
963 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
964 return FALSE;
965}
966
967
968/*********************************************************************
969 * CRTDLL__filelength (CRTDLL.96)
970 */
971long CDECL CRTDLL__filelength( int i )
972{
973 dprintf(("CRTDLL: _filelength\n"));
974 return (_filelength(i));
975}
976
977
978/*********************************************************************
979 * CRTDLL__fileno (CRTDLL.97)
980 */
981int CDECL CRTDLL__fileno(FILE * f)
982{
983 dprintf(("CRTDLL: _fileno\n"));
984 return (_fileno(f));
985}
986
987
988/*********************************************************************
989* _findclose (CRTDLL.098)
990*/
991int CDECL CRTDLL__findclose( long handle )
992{
993 dprintf(("CRTDLL: _findclose not implemented.\n"));
994 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
995 return FALSE;
996}
997
998
999 /*********************************************************************
1000 * _findfirst (CRTDLL.099)
1001 */
1002DWORD CDECL CRTDLL__findfirst(LPCSTR fname, struct find_t * x2)
1003{
1004 dprintf(("CRTDLL: _findfirst not implemented.\n"));
1005 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1006 return FALSE;
1007}
1008
1009
1010/*********************************************************************
1011 * _findnext (CRTDLL.100)
1012 */
1013INT CDECL CRTDLL__findnext(DWORD hand, struct find_t * x2)
1014{
1015 dprintf(("CRTDLL: _findnext not implemented.\n"));
1016 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1017 return FALSE;
1018}
1019
1020
1021/*********************************************************************
1022 * _finite (CRTDLL.101)
1023 */
1024INT CDECL CRTDLL__finite(double x)
1025{
1026 dprintf(("CRTDLL: _finite not implemented.\n"));
1027 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1028 return FALSE;
1029}
1030
1031
1032/*********************************************************************
1033 * _flsbuf (CRTDLL.102)
1034 */
1035INT CDECL CRTDLL__flsbuf(int i, FILE * f)
1036{
1037 dprintf(("CRTDLL: _flsbuf not implemented.\n"));
1038 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1039 return FALSE;
1040}
1041
1042
1043/*********************************************************************
1044 * _flushall (CRTDLL.103)
1045 */
1046INT CDECL CRTDLL__flushall(void)
1047{
1048 dprintf(("CRTDLL: _flushall\n"));
1049 return (_flushall());
1050}
1051
1052
1053/*********************************************************************
1054 * _fpclass (CRTDLL.105)
1055 */
1056INT CDECL CRTDLL__fpclass( double x )
1057{
1058 dprintf(("CRTDLL: _fpclass not implemented.\n"));
1059 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1060 return FALSE;
1061}
1062
1063
1064/*********************************************************************
1065 * _fpieee_flt (CRTDLL.106)
1066 */
1067INT CDECL CRTDLL__fpieee_flt( unsigned long exc_code, struct _EXCEPTION_POINTERS *exc_info, int handler)
1068{
1069 dprintf(("CRTDLL: _fpieee_flt not implemented.\n"));
1070 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1071 return FALSE;
1072}
1073
1074
1075
1076/*********************************************************************
1077 * _fpreset (CRTDLL.107)
1078 */
1079INT CDECL CRTDLL__fpreset(void)
1080{
1081 dprintf(("CRTDLL: _fpreset not implemented.\n"));
1082 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1083 return FALSE;
1084}
1085
1086
1087/*********************************************************************
1088 * _fputchar (CRTDLL.108)
1089 */
1090INT CDECL CRTDLL__fputchar( int c )
1091{
1092 dprintf(("CRTDLL: _fputchar\n"));
1093 return(_fputchar(c));
1094}
1095
1096
1097/*********************************************************************
1098 * _fputwchar (CRTDLL.109)
1099 */
1100wint_t CDECL CRTDLL__fputwchar( wint_t )
1101{
1102 dprintf(("CRTDLL: _fputwchar not implemented.\n"));
1103 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1104 return FALSE;
1105}
1106
1107
1108/*********************************************************************
1109 * _fsopen (CRTDLL.110)
1110 */
1111FILE * CDECL CRTDLL__fsopen( const char *filename, const char *mode, int shflag )
1112{
1113 dprintf(("CRTDLL: _fsopen not implemented.\n"));
1114 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1115 return FALSE;
1116}
1117
1118
1119/*********************************************************************
1120 * _fstat (CRTDLL.111)
1121 */
1122int CDECL CRTDLL__fstat(int file, struct stat* buf)
1123{
1124 dprintf(("CRTDLL: _fstat not implemented.\n"));
1125 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1126 return FALSE;
1127}
1128
1129
1130/*********************************************************************
1131 * _ftime (CRTDLL.112)
1132 */
1133int CDECL CRTDLL__ftime( struct timeb *timeptr )
1134{
1135 dprintf(("CRTDLL: _ftime not implemented.\n"));
1136 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1137 return FALSE;
1138}
1139
1140
1141/*********************************************************************
1142 * _fullpath (CRTDLL.114)
1143 */
1144char * CDECL CRTDLL__fullpath( char *buf, char *path, size_t size )
1145{
1146 dprintf(("CRTDLL: _fullpath\n"));
1147 return (_fullpath(buf, path, size));
1148}
1149
1150
1151/*********************************************************************
1152 * _futime (CRTDLL.115)
1153 */
1154int CDECL CRTDLL__futime( int handle, struct _utimbuf *filetime )
1155{
1156 dprintf(("CRTDLL: _futime not implemented.\n"));
1157 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1158 return FALSE;
1159}
1160
1161
1162/*********************************************************************
1163 * _gcvt (CRTDLL.116)
1164 */
1165char * CDECL CRTDLL__gcvt( double val, int ndig, char *buf )
1166{
1167 dprintf(("CRTDLL: _gcvt\n"));
1168 return (_gcvt(val, ndig, buf));
1169}
1170
1171
1172/*********************************************************************
1173 * _get_osfhandle (CRTDLL.117)
1174 */
1175long CDECL CRTDLL__get_osfhandle( int posixhandle )
1176{
1177 dprintf(("CRTDLL: _gcvt not implemented.\n"));
1178 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1179 return FALSE;
1180}
1181
1182
1183/*********************************************************************
1184 * _getch (CRTDLL.118)
1185 */
1186int CDECL CRTDLL__getch(void)
1187{
1188 dprintf(("CRTDLL: _getch\n"));
1189 return (_getch());
1190}
1191
1192
1193/*********************************************************************
1194 * _getche (CRTDLL.119)
1195 */
1196int CDECL CRTDLL__getche(void)
1197{
1198 dprintf(("CRTDLL: _getche\n"));
1199 return (_getche());
1200}
1201
1202
1203/*********************************************************************
1204 * _getcwd (CRTDLL.120)
1205 */
1206char * CDECL CRTDLL__getcwd( char *buf, size_t size )
1207{
1208 dprintf(("CRTDLL: _getcwd\n"));
1209 return (_getcwd(buf, size));
1210}
1211
1212
1213/*********************************************************************
1214 * _getdcwd (CRTDLL.121)
1215 */
1216char * CDECL CRTDLL__getdcwd( int drive, char *buffer, size_t maxlen )
1217{
1218 dprintf(("CRTDLL: _getdcwd\n"));
1219 return (_getdcwd(drive, buffer, maxlen));
1220}
1221
1222
1223/*********************************************************************
1224 * _getdiskfree (CRTDLL.122)
1225 */
1226unsigned CDECL CRTDLL__getdiskfree( unsigned drive, struct _diskfree_t *diskspace)
1227{
1228 dprintf(("CRTDLL: _getdiskfree not implemented.\n"));
1229 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1230 return FALSE;
1231}
1232
1233
1234/*********************************************************************
1235 * _getdrive (CRTDLL.124)
1236 */
1237unsigned CDECL CRTDLL__getdrive( void )
1238{
1239 dprintf(("CRTDLL: _getdrive\n"));
1240 return DRIVE_GetCurrentDrive() + 1;
1241}
1242
1243
1244/*********************************************************************
1245 * _getdrives (CRTDLL.125)
1246 */
1247unsigned long CDECL CRTDLL__getdrives(void)
1248{
1249 dprintf(("CRTDLL: _getdrives not implemented.\n"));
1250 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1251 return FALSE;
1252}
1253
1254
1255/*********************************************************************
1256 * _getpid (CRTDLL.126)
1257 */
1258int CDECL CRTDLL__getpid( void )
1259{
1260 dprintf(("CRTDLL: _getpid\n"));
1261 return (_getpid());
1262}
1263
1264
1265/*********************************************************************
1266 * _getw (CRTDLL.128)
1267 */
1268int CDECL CRTDLL__getw( FILE *fp )
1269{
1270 dprintf(("CRTDLL: _getw not implemented.\n"));
1271 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1272 return FALSE;
1273}
1274
1275
1276/*******************************************************************
1277 * _global_unwind2 (CRTDLL.129)
1278 */
1279void CDECL CRTDLL__global_unwind2( PEXCEPTION_FRAME frame )
1280{
1281 dprintf(("CRTDLL: global_undwind2\n"));
1282 RtlUnwind( frame, 0, NULL, 0 );
1283}
1284
1285
1286/*********************************************************************
1287 * _heapchk (CRTDLL.130)
1288 */
1289int CDECL CRTDLL__heapchk( void )
1290{
1291 dprintf(("CRTDLL: _heapchk\n"));
1292 return (_heapchk());
1293}
1294
1295
1296/*********************************************************************
1297 * _heapmin (CRTDLL.131)
1298 */
1299int CDECL CRTDLL__heapmin( void )
1300{
1301 dprintf(("CRTDLL: _heapmin\n"));
1302 return (_heapmin());
1303}
1304
1305
1306/*********************************************************************
1307 * _heapset (CRTDLL.132)
1308 */
1309int CDECL CRTDLL__heapset( unsigned int fill )
1310{
1311 dprintf(("CRTDLL: _heapset\n"));
1312 return (_heapset(fill));
1313}
1314
1315
1316/*********************************************************************
1317 * _heapwalk (CRTDLL.133)
1318 */
1319int CDECL CRTDLL__heapwalk( struct _heapinfo *entry )
1320{
1321 dprintf(("CRTDLL: _heapwalk not implemented.\n"));
1322 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1323 return FALSE;
1324}
1325
1326
1327/*********************************************************************
1328 * _hypot (CRTDLL.134)
1329 */
1330double CDECL CRTDLL__hypot(double x1, double x2)
1331{
1332 dprintf(("CRTDLL: _hypot not implemented.\n"));
1333 return (_hypot(x1, x2));
1334}
1335
1336
1337/*********************************************************************
1338 * _initterm (CRTDLL.135)
1339 */
1340DWORD CDECL CRTDLL__initterm(_INITTERMFUN *start,_INITTERMFUN *end)
1341{
1342 dprintf(("CRTDLL: initterm\n"));
1343 _INITTERMFUN *current;
1344
1345 current=start;
1346 while (current<end) {
1347 if (*current) (*current)();
1348 current++;
1349 }
1350 return 0;
1351}
1352
1353
1354/*********************************************************************
1355 * _isatty (CRTDLL.137)
1356 */
1357BOOL CDECL CRTDLL__isatty(DWORD x)
1358{
1359 dprintf(("(%ld)\n",x));
1360 return TRUE;
1361}
1362
1363
1364/*********************************************************************
1365 * _isctype (CRTDLL.138)
1366 */
1367BOOL CDECL CRTDLL__isctype(CHAR x,CHAR type)
1368{
1369 dprintf(("CRTDLL: isctype\n"));
1370 if ((type & CRTDLL_SPACE) && isspace(x))
1371 return TRUE;
1372 if ((type & CRTDLL_PUNCT) && ispunct(x))
1373 return TRUE;
1374 if ((type & CRTDLL_LOWER) && islower(x))
1375 return TRUE;
1376 if ((type & CRTDLL_UPPER) && isupper(x))
1377 return TRUE;
1378 if ((type & CRTDLL_ALPHA) && isalpha(x))
1379 return TRUE;
1380 if ((type & CRTDLL_DIGIT) && isdigit(x))
1381 return TRUE;
1382 if ((type & CRTDLL_CONTROL) && iscntrl(x))
1383 return TRUE;
1384 /* check CRTDLL_LEADBYTE */
1385 return FALSE;
1386}
1387
1388
1389/*********************************************************************
1390 * _ismbbalnum (CRTDLL.139)
1391 */
1392int CDECL CRTDLL__ismbbalnum( unsigned int ch )
1393{
1394 dprintf(("CRTDLL: _ismbbalnum not implemented.\n"));
1395 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1396 return FALSE;
1397}
1398
1399
1400/*********************************************************************
1401 * _ismbbalpha (CRTDLL.140)
1402 */
1403int CDECL CRTDLL__ismbbalpha( unsigned int ch )
1404{
1405 dprintf(("CRTDLL: _ismbbalpha not implemented.\n"));
1406 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1407 return FALSE;
1408}
1409
1410
1411/*********************************************************************
1412 * _ismbbgraph (CRTDLL.141)
1413 */
1414int CDECL CRTDLL__ismbbgraph( unsigned int ch )
1415{
1416 dprintf(("CRTDLL: _ismbbgraph not implemented.\n"));
1417 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1418 return FALSE;
1419}
1420
1421
1422/*********************************************************************
1423 * _ismbbkalnum (CRTDLL.142)
1424 */
1425int CDECL CRTDLL__ismbbkalnum( unsigned int ch )
1426{
1427 dprintf(("CRTDLL: _ismbbkalnum not implemented.\n"));
1428 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1429 return FALSE;
1430}
1431
1432
1433/*********************************************************************
1434 * _ismbbkana (CRTDLL.143)
1435 */
1436int CDECL CRTDLL__ismbbkana( unsigned int ch )
1437{
1438 dprintf(("CRTDLL: _ismbbkana not implemented.\n"));
1439 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1440 return FALSE;
1441}
1442
1443
1444/*********************************************************************
1445 * _ismbbkpunct (CRTDLL.144)
1446 */
1447int CDECL CRTDLL__ismbbkpunct( unsigned int ch )
1448{
1449 dprintf(("CRTDLL: _ismbbkpunct not implemented.\n"));
1450 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1451 return FALSE;
1452}
1453
1454
1455/*********************************************************************
1456 * _ismbblead (CRTDLL.145)
1457 */
1458int CDECL CRTDLL__ismbblead( unsigned int ch )
1459{
1460 dprintf(("CRTDLL: _ismbblead not implemented.\n"));
1461 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1462 return FALSE;
1463}
1464
1465
1466/*********************************************************************
1467 * _ismbbprint (CRTDLL.146)
1468 */
1469int CDECL CRTDLL__ismbbprint( unsigned int ch )
1470{
1471 dprintf(("CRTDLL: _ismbbprint not implemented.\n"));
1472 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1473 return FALSE;
1474}
1475
1476
1477/*********************************************************************
1478 * _ismbbpunct (CRTDLL.147)
1479 */
1480int CDECL CRTDLL__ismbbpunct( unsigned int ch )
1481{
1482 dprintf(("CRTDLL: _ismbbpunct not implemented.\n"));
1483 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1484 return FALSE;
1485}
1486
1487
1488/*********************************************************************
1489 * _ismbbtrail (CRTDLL.148)
1490 */
1491int CDECL CRTDLL__ismbbtrail( unsigned int ch )
1492{
1493 dprintf(("CRTDLL: _ismbbtrail not implemented.\n"));
1494 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1495 return FALSE;
1496}
1497
1498
1499/*********************************************************************
1500 * _ismbcalpha (CRTDLL.149)
1501 */
1502int CDECL CRTDLL__ismbcalpha( unsigned int ch )
1503{
1504 dprintf(("CRTDLL: _ismbcalpha not implemented.\n"));
1505 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1506 return FALSE;
1507}
1508
1509
1510/*********************************************************************
1511 * _ismbcdigit (CRTDLL.150)
1512 */
1513int CDECL CRTDLL__ismbcdigit( unsigned int ch )
1514{
1515 dprintf(("CRTDLL: _ismbcdigit not implemented.\n"));
1516 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1517 return FALSE;
1518}
1519
1520
1521/*********************************************************************
1522 * _ismbchira (CRTDLL.151)
1523 */
1524int CDECL CRTDLL__ismbchira( unsigned int ch )
1525{
1526 dprintf(("CRTDLL: _ismbchira not implemented.\n"));
1527 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1528 return FALSE;
1529}
1530
1531
1532/*********************************************************************
1533 * _ismbckata (CRTDLL.152)
1534 */
1535int CDECL CRTDLL__ismbckata( unsigned int ch )
1536{
1537 dprintf(("CRTDLL: _ismbckata not implemented.\n"));
1538 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1539 return FALSE;
1540}
1541
1542/*********************************************************************
1543 * _ismbcl0 (CRTDLL.153)
1544 */
1545int CDECL CRTDLL__ismbcl0( unsigned int ch )
1546{
1547 dprintf(("CRTDLL: _ismbcl0 not implemented.\n"));
1548 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1549 return FALSE;
1550}
1551
1552
1553/*********************************************************************
1554 * _ismbcl1 (CRTDLL.154)
1555 */
1556int CDECL CRTDLL__ismbcl1( unsigned int ch )
1557{
1558 dprintf(("CRTDLL: _ismbcl1 not implemented.\n"));
1559 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1560 return FALSE;
1561}
1562
1563
1564/*********************************************************************
1565 * _ismbcl2 (CRTDLL.155)
1566 */
1567int CDECL CRTDLL__ismbcl2( unsigned int ch )
1568{
1569 dprintf(("CRTDLL: _ismbcl2 not implemented.\n"));
1570 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1571 return FALSE;
1572}
1573
1574
1575/*********************************************************************
1576 * _ismbclegal (CRTDLL.156)
1577 */
1578int CDECL CRTDLL__ismbclegal( unsigned int ch )
1579{
1580 dprintf(("CRTDLL: _ismbclegal not implemented.\n"));
1581 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1582 return FALSE;
1583}
1584
1585
1586/*********************************************************************
1587 * _ismbclower (CRTDLL.157)
1588 */
1589int CDECL CRTDLL__ismbclower( unsigned int ch )
1590{
1591 dprintf(("CRTDLL: _ismbclower not implemented.\n"));
1592 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1593 return FALSE;
1594}
1595
1596
1597/*********************************************************************
1598 * _ismbcprint (CRTDLL.158)
1599 */
1600int CDECL CRTDLL__ismbcprint( unsigned int ch )
1601{
1602 dprintf(("CRTDLL: _ismbcprint not implemented.\n"));
1603 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1604 return FALSE;
1605}
1606
1607
1608/*********************************************************************
1609 * _ismbcspace (CRTDLL.159)
1610 */
1611int CDECL CRTDLL__ismbcspace( unsigned int ch )
1612{
1613 dprintf(("CRTDLL: _ismbcspace not implemented.\n"));
1614 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1615 return FALSE;
1616}
1617
1618
1619/*********************************************************************
1620 * _ismbcsymbol (CRTDLL.160)
1621 */
1622int CDECL CRTDLL__ismbcsymbol( unsigned int ch )
1623{
1624 dprintf(("CRTDLL: _ismbcsymbol not implemented.\n"));
1625 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1626 return FALSE;
1627}
1628
1629
1630/*********************************************************************
1631 * _ismbcupper (CRTDLL.161)
1632 */
1633int CDECL CRTDLL__ismbcupper( unsigned int ch )
1634{
1635 dprintf(("CRTDLL: _ismbcupper not implemented.\n"));
1636 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1637 return FALSE;
1638}
1639
1640
1641/*********************************************************************
1642 * _ismbslead (CRTDLL.162)
1643 */
1644int CDECL CRTDLL__ismbslead(const unsigned char *s1, const unsigned char *s2)
1645{
1646 dprintf(("CRTDLL: _ismbslead not implemented.\n"));
1647 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1648 return FALSE;
1649}
1650
1651
1652/*********************************************************************
1653 * _ismbstrail (CRTDLL.163)
1654 */
1655int CDECL CRTDLL__ismbstrail(const unsigned char *s1, const unsigned char *s2)
1656{
1657 dprintf(("CRTDLL: _ismbstrail not implemented.\n"));
1658 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1659 return FALSE;
1660}
1661
1662
1663/*********************************************************************
1664 * _isnan (CRTDLL.164)
1665 */
1666int CDECL CRTDLL__isnan( double x )
1667{
1668 dprintf(("CRTDLL: _isnan not implemented.\n"));
1669 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1670 return FALSE;
1671}
1672
1673
1674/*********************************************************************
1675 * _j0 (CRTDLL.166)
1676 */
1677double CDECL CRTDLL__j0(double x)
1678{
1679 dprintf(("CRTDLL: _j0\n"));
1680 return (_j0(x));
1681}
1682
1683
1684/*********************************************************************
1685 * _j1 (CRTDLL.167)
1686 */
1687double CDECL CRTDLL__j1(double x)
1688{
1689 dprintf(("CRTDLL: _j1\n"));
1690 return (_j1(x));}
1691
1692
1693/*********************************************************************
1694 * _jn (CRTDLL.168)
1695 */
1696double CDECL CRTDLL__jn(int i, double x)
1697{
1698 dprintf(("CRTDLL: _jn\n"));
1699 return (_jn(i, x));
1700}
1701
1702
1703/*********************************************************************
1704 * _kbhit (CRTDLL.169)
1705 */
1706int CDECL CRTDLL__kbhit( void )
1707{
1708 dprintf(("CRTDLL: _kbhit\n"));
1709 return (_kbhit());
1710}
1711
1712
1713/*********************************************************************
1714 * _lfind (CRTDLL.170)
1715 */
1716void * CDECL CRTDLL__lfind(const void *v1, const void *v2, unsigned int *i1, unsigned int i2,
1717 int (CDECL *i3)(const void *v3, const void *v4))
1718{
1719 dprintf(("CRTDLL: _lfind not implemented.\n"));
1720 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1721 return FALSE;
1722// return (_lfind(v1,v2,i1,i2,i3(v3,v4)));
1723}
1724
1725
1726/*******************************************************************
1727 * _local_unwind2 (CRTDLL.172)
1728 */
1729void CDECL CRTDLL__local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr )
1730{
1731 dprintf(("CRTDLL: local_undwind2\n"));
1732}
1733
1734
1735/*********************************************************************
1736 * _locking (CRTDLL.173)
1737 */
1738int CDECL CRTDLL__locking(int handle,int mode,unsigned long nbyte)
1739{
1740 dprintf(("CRTDLL: _locking not implemented.\n"));
1741 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1742 return FALSE;
1743}
1744
1745
1746/*********************************************************************
1747 * _logb (CRTDLL.174)
1748 */
1749double CDECL CRTDLL__logb( double x )
1750{
1751 dprintf(("CRTDLL: _logb not implemented.\n"));
1752 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1753 return FALSE;
1754}
1755
1756
1757/*********************************************************************
1758 * _lrotl (CRTDLL.175)
1759 */
1760unsigned long CDECL CRTDLL__lrotl( unsigned long value, unsigned int shift )
1761{
1762 dprintf(("CRTDLL: _lrotl\n"));
1763 return (_lrotl(value, shift));
1764}
1765
1766
1767/*********************************************************************
1768 * _lrotr (CRTDLL.176)
1769 */
1770unsigned long CDECL CRTDLL__lrotr( unsigned long value, unsigned int shift )
1771{
1772 dprintf(("CRTDLL: _lrotr\n"));
1773 return (_lrotr(value, shift));
1774}
1775
1776
1777/*********************************************************************
1778 * _lsearch (CRTDLL.177)
1779 */
1780void * CDECL CRTDLL__lsearch(const void *v1, void *v2, unsigned int *i1, unsigned int i2,
1781 int (CDECL *i3)(const void *v3, const void *v4))
1782{
1783 dprintf(("CRTDLL: _lsearch not implemented.\n"));
1784 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1785 return FALSE;
1786// return (_lsearch(v1,v2,i1,i2,i3(v3,v4)));
1787}
1788
1789
1790/*********************************************************************
1791 * _lseek (CRTDLL.178)
1792 */
1793long CDECL CRTDLL__lseek(int handle,long offset,int origin)
1794{
1795 dprintf(("CRTDLL: _lssek\n"));
1796 return (_lseek(handle, offset, origin));
1797}
1798
1799
1800/*********************************************************************
1801 * _makepath (CRTDLL.180)
1802 */
1803void CDECL CRTDLL__makepath( char *path, char *drive,
1804 char *dir, char *fname, char *ext )
1805{
1806 dprintf(("CRTDLL: _makepath\n"));
1807 _makepath(path, drive, dir, fname, ext);
1808}
1809
1810
1811#if (__IBMCPP__ > 300)
1812#define exception _exception
1813#endif
1814
1815/*********************************************************************
1816 * _matherr (CRTDLL.181)
1817 */
1818double CDECL CRTDLL__matherr( struct exception * excep )
1819{
1820 dprintf(("CRTDLL: _matherr\n"));
1821 return (_matherr(excep));
1822}
1823
1824
1825/*********************************************************************
1826 * _mbbtombc (CRTDLL.182)
1827 */
1828unsigned int CDECL CRTDLL__mbbtombc( unsigned int ch )
1829{
1830 dprintf(("CRTDLL: _mbbtombc\n"));
1831 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1832 return FALSE;
1833}
1834
1835
1836/*********************************************************************
1837 * _mbbtype (CRTDLL.183)
1838 */
1839int CDECL CRTDLL__mbbtype( unsigned char s, int i )
1840{
1841 dprintf(("CRTDLL: _mbbtype not implemented.\n"));
1842 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1843 return FALSE;
1844}
1845
1846
1847/*********************************************************************
1848 * _mbccpy (CRTDLL.184)
1849 */
1850void CDECL CRTDLL__mbccpy( unsigned char *dest, const unsigned char *ch )
1851{
1852 dprintf(("CRTDLL: _mbccpy not implemented.\n"));
1853 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1854}
1855
1856
1857/*********************************************************************
1858 * _mbcjistojms (CRTDLL.185)
1859 */
1860int CDECL CRTDLL__mbcjistojms( unsigned int ch )
1861{
1862 dprintf(("CRTDLL: _mbcjistojms not implemented.\n"));
1863 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1864 return FALSE;
1865}
1866
1867
1868/*********************************************************************
1869 * _mbcjmstojis (CRTDLL.186)
1870 */
1871int CDECL CRTDLL__mbcjmstojis( unsigned int ch )
1872{
1873 dprintf(("CRTDLL: _mbcjmstojis not implemented.\n"));
1874 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1875 return FALSE;
1876}
1877
1878
1879/*********************************************************************
1880 * _mbclen (CRTDLL.187)
1881 */
1882size_t CDECL CRTDLL__mbclen( const unsigned char *ch )
1883{
1884 dprintf(("CRTDLL: _mbclen not implemented.\n"));
1885 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1886 return FALSE;
1887}
1888
1889
1890/*********************************************************************
1891 * _mbctohira (CRTDLL.188)
1892 */
1893int CDECL CRTDLL__mbctohira( unsigned int ch )
1894{
1895 dprintf(("CRTDLL: _mbctohira not implemented.\n"));
1896 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1897 return FALSE;
1898}
1899
1900
1901/*********************************************************************
1902 * _mbctokata (CRTDLL.189)
1903 */
1904int CDECL CRTDLL__mbctokata( unsigned int ch )
1905{
1906 dprintf(("CRTDLL: _mbctokata not implemented.\n"));
1907 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1908 return FALSE;
1909}
1910
1911
1912/*********************************************************************
1913 * _mbctolower (CRTDLL.190)
1914 */
1915unsigned int CDECL CRTDLL__mbctolower( unsigned int ch )
1916{
1917 dprintf(("CRTDLL: _mbctolower not implemented.\n"));
1918 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1919 return FALSE;
1920}
1921
1922
1923/*********************************************************************
1924 * _mbctombb (CRTDLL.191)
1925 */
1926unsigned int CDECL CRTDLL__mbctombb( unsigned int ch )
1927{
1928 dprintf(("CRTDLL: _mbctombb not implemented.\n"));
1929 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1930 return FALSE;
1931}
1932
1933
1934/*********************************************************************
1935 * _mbctoupper (CRTDLL.192)
1936 */
1937unsigned int CDECL CRTDLL__mbctoupper( unsigned int ch )
1938{
1939 dprintf(("CRTDLL: _mbctoupper not implemented.\n"));
1940 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1941 return FALSE;
1942}
1943
1944
1945/*********************************************************************
1946 * _mbsbtype (CRTDLL.194)
1947 */
1948int CDECL CRTDLL__mbsbtype( const unsigned char *s1, int ch )
1949{
1950 dprintf(("CRTDLL: _mbsbtype not implemented.\n"));
1951 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1952 return FALSE;
1953}
1954
1955
1956/*********************************************************************
1957 * _mbscat (CRTDLL.195)
1958 */
1959unsigned char * CDECL CRTDLL__mbscat( unsigned char *s1, const unsigned char *s2 )
1960{
1961 dprintf(("CRTDLL: _mbscat not implemented.\n"));
1962 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1963 return FALSE;
1964}
1965
1966
1967/*********************************************************************
1968 * _mbschr (CRTDLL.196)
1969 */
1970unsigned char * CDECL CRTDLL__mbschr( const unsigned char *s, unsigned int ch )
1971{
1972 dprintf(("CRTDLL: _mbschr not implemented.\n"));
1973 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1974 return FALSE;
1975}
1976
1977
1978/*********************************************************************
1979 * _mbscmp (CRTDLL.197)
1980 */
1981int CDECL CRTDLL__mbscmp( const unsigned char *s1, const unsigned char *s2 )
1982{
1983 dprintf(("CRTDLL: _mbscmp not implemented.\n"));
1984 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1985 return FALSE;
1986}
1987
1988
1989/*********************************************************************
1990 * _mbscpy (CRTDLL.198)
1991 */
1992unsigned char * CDECL CRTDLL__mbscpy( unsigned char *s1, const unsigned char *s2 )
1993{
1994 dprintf(("CRTDLL: _mbscpy not implemented.\n"));
1995 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1996 return FALSE;
1997}
1998
1999
2000/*********************************************************************
2001 * _mbscspn (CRTDLL.199)
2002 */
2003size_t CDECL CRTDLL__mbscspn( const unsigned char *s, const unsigned char *charset )
2004{
2005 dprintf(("CRTDLL: _mbscspn not implemented.\n"));
2006 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2007 return FALSE;
2008}
2009
2010
2011/*********************************************************************
2012 * CRTDLL__mbsdec (CRTDLL.200)
2013 */
2014unsigned char * CDECL CRTDLL__mbsdec( const unsigned char *s, const unsigned char *ch )
2015{
2016 dprintf(("CRTDLL: _mbsdec not implemented.\n"));
2017 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2018 return FALSE;
2019}
2020
2021
2022/*********************************************************************
2023 * CRTDLL__mbsdec (CRTDLL.201)
2024 */
2025unsigned char * CDECL CRTDLL__mbsdup( unsigned char *src )
2026{
2027 dprintf(("CRTDLL: _mbsdup not implemented.\n"));
2028 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2029 return FALSE;
2030}
2031
2032
2033/*********************************************************************
2034 * CRTDLL__mbsicmp (CRTDLL.202)
2035 */
2036int CDECL CRTDLL__mbsicmp( const unsigned char *x, const unsigned char *y )
2037{
2038 dprintf(("CRTDLL: _mbsicmp\n"));
2039 do {
2040 if (!*x)
2041 return !!*y;
2042 if (!*y)
2043 return !!*x;
2044 /* FIXME: MBCS handling... */
2045 if (*x!=*y)
2046 return 1;
2047 x++;
2048 y++;
2049 } while (1);
2050}
2051
2052
2053/*********************************************************************
2054 * CRTDLL__mbsinc (CRTDLL.203)
2055 */
2056LPSTR CDECL CRTDLL__mbsinc( LPCSTR str )
2057{
2058 dprintf(("CRTDLL: _mbsinc\n"));
2059 int len = mblen( str, MB_LEN_MAX );
2060 if (len < 1) len = 1;
2061 return (LPSTR)(str + len);
2062}
2063
2064
2065/*********************************************************************
2066 * CRTDLL__mbslen (CRTDLL.204)
2067 */
2068INT CDECL CRTDLL__mbslen( LPCSTR str )
2069{
2070 dprintf(("CRTDLL: _mbslen\n"));
2071 INT len, total = 0;
2072 while ((len = mblen( str, MB_LEN_MAX )) > 0)
2073 {
2074 str += len;
2075 total++;
2076 }
2077 return total;
2078}
2079
2080
2081/*********************************************************************
2082 * CRTDLL__mbslwr (CRTDLL.205)
2083 */
2084unsigned char * CDECL CRTDLL__mbslwr( unsigned char *s )
2085{
2086 dprintf(("CRTDLL: _mbslwr not implemented.\n"));
2087 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2088 return FALSE;
2089}
2090
2091
2092/*********************************************************************
2093 * CRTDLL__mbsnbcat (CRTDLL.206)
2094 */
2095unsigned char * CDECL CRTDLL__mbsnbcat( unsigned char *s1, const unsigned char *s2, size_t n )
2096{
2097 dprintf(("CRTDLL: _mbsnbcat not implemented.\n"));
2098 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2099 return FALSE;
2100}
2101
2102
2103/*********************************************************************
2104 * CRTDLL__mbsnbcmp (CRTDLL.207)
2105 */
2106int CDECL CRTDLL__mbsnbcmp( const unsigned char *s1, const unsigned char *s2, size_t n )
2107{
2108 dprintf(("CRTDLL: _mbsnbcmp not implemented.\n"));
2109 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2110 return FALSE;
2111}
2112
2113
2114/*********************************************************************
2115 * CRTDLL__mbsnbcnt (CRTDLL.208)
2116 */
2117size_t CDECL CRTDLL__mbsnbcnt( const unsigned char *s, size_t n )
2118{
2119 dprintf(("CRTDLL: _mbsnbcnt not implemented.\n"));
2120 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2121 return FALSE;
2122}
2123
2124
2125/*********************************************************************
2126 * CRTDLL__mbsnbcpy (CRTDLL.209)
2127 */
2128unsigned char * CDECL CRTDLL__mbsnbcpy( unsigned char *s1, const unsigned char *s2, size_t n )
2129{
2130 dprintf(("CRTDLL: _mbsnbcpy not implemented.\n"));
2131 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2132 return FALSE;
2133}
2134
2135
2136/*********************************************************************
2137 * CRTDLL__mbsnbicmp (CRTDLL.210)
2138 */
2139int CDECL CRTDLL__mbsnbicmp( const unsigned char *s1, const unsigned char *s2, size_t n )
2140{
2141 dprintf(("CRTDLL: _mbsnbicmp not implemented.\n"));
2142 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2143 return FALSE;
2144}
2145
2146
2147/*********************************************************************
2148 * CRTDLL__mbsnbset (CRTDLL.211)
2149 */
2150unsigned char * CDECL CRTDLL__mbsnbset( unsigned char *s, unsigned int ch, size_t n )
2151{
2152 dprintf(("CRTDLL: _mbsnbset not implemented.\n"));
2153 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2154 return FALSE;
2155}
2156
2157
2158/*********************************************************************
2159 * CRTDLL__mbsncat (CRTDLL.212)
2160 */
2161unsigned char * CDECL CRTDLL__mbsncat( unsigned char *s1, const unsigned char *s2, size_t n )
2162{
2163 dprintf(("CRTDLL: _mbsncat not implemented.\n"));
2164 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2165 return FALSE;
2166}
2167
2168
2169/*********************************************************************
2170 * CRTDLL__mbsnccnt (CRTDLL.213)
2171 */
2172size_t CDECL CRTDLL__mbsnccnt( const unsigned char *s, size_t n )
2173{
2174 dprintf(("CRTDLL: _mbsnccnt not implemented.\n"));
2175 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2176 return FALSE;
2177}
2178
2179
2180/*********************************************************************
2181 * CRTDLL__mbsncmp (CRTDLL.214)
2182 */
2183int CDECL CRTDLL__mbsncmp( const unsigned char *s1, const unsigned char *s2, size_t n )
2184{
2185 dprintf(("CRTDLL: _mbsncmp not implemented.\n"));
2186 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2187 return FALSE;
2188}
2189
2190
2191/*********************************************************************
2192 * CRTDLL__mbsncpy (CRTDLL.215)
2193 */
2194unsigned char * CDECL CRTDLL__mbsncpy( unsigned char *s1, const unsigned char *s2, size_t n )
2195{
2196 dprintf(("CRTDLL: _mbsncpy not implemented.\n"));
2197 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2198 return FALSE;
2199}
2200
2201
2202/*********************************************************************
2203 * CRTDLL__mbsnextc (CRTDLL.216)
2204 */
2205unsigned int CDECL CRTDLL__mbsnextc( const unsigned char *s )
2206{
2207 dprintf(("CRTDLL: _mbsnextc not implemented.\n"));
2208 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2209 return FALSE;
2210}
2211
2212
2213/*********************************************************************
2214 * CRTDLL__mbsnicmp (CRTDLL.217)
2215 */
2216int CDECL CRTDLL__mbsnicmp( const unsigned char *s1, const unsigned char *s2, size_t n )
2217{
2218 dprintf(("CRTDLL: _mbsnicmp not implemented.\n"));
2219 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2220 return FALSE;
2221}
2222
2223
2224/*********************************************************************
2225 * CRTDLL__mbsninc (CRTDLL.218)
2226 */
2227unsigned char * CDECL CRTDLL__mbsninc( const unsigned char *s, size_t count )
2228{
2229 dprintf(("CRTDLL: _mbsninc not implemented.\n"));
2230 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2231 return FALSE;
2232}
2233
2234
2235/*********************************************************************
2236 * CRTDLL__mbsnset (CRTDLL.219)
2237 */
2238unsigned char * CDECL CRTDLL__mbsnset( unsigned char *s, unsigned int ch, size_t n )
2239{
2240 dprintf(("CRTDLL: _mbsnset not implemented.\n"));
2241 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2242 return FALSE;
2243}
2244
2245
2246/*********************************************************************
2247 * CRTDLL__mbspbrk (CRTDLL.220)
2248 */
2249unsigned char * CDECL CRTDLL__mbspbrk( const unsigned char *s, const unsigned char *charset )
2250{
2251 dprintf(("CRTDLL: _mbspbrk not implemented.\n"));
2252 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2253 return FALSE;
2254}
2255
2256
2257/*********************************************************************
2258 * CRTDLL__mbsrchr (CRTDLL.221)
2259 */
2260LPSTR CDECL CRTDLL__mbsrchr(LPSTR s,CHAR x)
2261{
2262 dprintf(("CRTDLL: _mbsrchr\n"));
2263 /* FIXME: handle multibyte strings */
2264 return strrchr(s,x);
2265}
2266
2267
2268/*********************************************************************
2269 * CRTDLL__mbsrev (CRTDLL.222)
2270 */
2271unsigned char * CDECL CRTDLL__mbsrev( unsigned char *s )
2272{
2273 dprintf(("CRTDLL: _mbsrev not implemented.\n"));
2274 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2275 return FALSE;
2276}
2277
2278
2279/*********************************************************************
2280 * CRTDLL__mbsset (CRTDLL.223)
2281 */
2282unsigned char * CDECL CRTDLL__mbsset( unsigned char *s, unsigned int ch )
2283{
2284 dprintf(("CRTDLL: _mbsset not implemented.\n"));
2285 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2286 return FALSE;
2287}
2288
2289
2290/*********************************************************************
2291 * CRTDLL__mbsspn (CRTDLL.224)
2292 */
2293size_t CDECL CRTDLL__mbsspn( const unsigned char *s, const unsigned char *charset )
2294{
2295 dprintf(("CRTDLL: _mbsspn not implemented.\n"));
2296 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2297 return FALSE;
2298}
2299
2300
2301/*********************************************************************
2302 * CRTDLL__mbsspnp (CRTDLL.225)
2303 */
2304unsigned char * CDECL CRTDLL__mbsspnp( const unsigned char *s, const unsigned char *charset )
2305{
2306 dprintf(("CRTDLL: _mbsspnp not implemented.\n"));
2307 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2308 return FALSE;
2309}
2310
2311
2312/*********************************************************************
2313 * CRTDLL__mbsstr (CRTDLL.226)
2314 */
2315unsigned char * CDECL CRTDLL__mbsstr( const unsigned char *s1, const unsigned char *s2 )
2316{
2317 dprintf(("CRTDLL: _mbsstr not implemented.\n"));
2318 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2319 return FALSE;
2320}
2321
2322
2323/*********************************************************************
2324 * CRTDLL__mbstok (CRTDLL.227)
2325 */
2326unsigned char * CDECL CRTDLL__mbstok( unsigned char *s, const unsigned char *delim )
2327{
2328 dprintf(("CRTDLL: _mbstok not implemented.\n"));
2329 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2330 return FALSE;
2331}
2332
2333
2334/*********************************************************************
2335 * CRTDLL__mbstrlen (CRTDLL.228)
2336 */
2337size_t CDECL CRTDLL__mbstrlen(const char *s)
2338{
2339 dprintf(("CRTDLL: _mbstrlen not implemented.\n"));
2340 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2341 return FALSE;
2342}
2343
2344
2345/*********************************************************************
2346 * CRTDLL__mbsupr (CRTDLL.229)
2347 */
2348unsigned char * CDECL CRTDLL__mbsupr( unsigned char *s )
2349{
2350 dprintf(("CRTDLL: _mbsupr not implemented.\n"));
2351 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2352 return FALSE;
2353}
2354
2355
2356/*********************************************************************
2357 * CRTDLL__memccpy (CRTDLL.230)
2358 */
2359void * CDECL CRTDLL__memccpy(void *v1, const void *v2, int i, size_t s)
2360{
2361 dprintf(("CRTDLL: _memccpy not implemented.\n"));
2362 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2363 return FALSE;
2364}
2365
2366
2367/*********************************************************************
2368 * _mkdir (CRTDLL.232)
2369 */
2370INT CDECL CRTDLL__mkdir(LPCSTR newdir)
2371{
2372 dprintf(("CRTDLL: mkdir\n"));
2373 if (!CreateDirectoryA(newdir,NULL))
2374 return -1;
2375 return 0;
2376}
2377
2378
2379/*********************************************************************
2380 * _mktemp (CRTDLL.233)
2381 */
2382char * CDECL CRTDLL__mktemp( char * templt )
2383{
2384 dprintf(("CRTDLL: _mktemp not implemented.\n"));
2385 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2386 return FALSE;
2387}
2388
2389
2390/*********************************************************************
2391 * _msize (CRTDLL.234)
2392 */
2393size_t CDECL CRTDLL__msize( void *ptr )
2394{
2395 dprintf(("CRTDLL: _msize\n"));
2396 return (_msize(ptr));
2397}
2398
2399
2400/*********************************************************************
2401 * _nextafter (CRTDLL.235)
2402 */
2403double CDECL CRTDLL__nextafter( double x, double y )
2404{
2405 dprintf(("CRTDLL: _nextafter not implemented.\n"));
2406 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2407 return FALSE;
2408}
2409
2410
2411/*********************************************************************
2412 * _onexit (CRTDLL.236)
2413 */
2414onexit_t CDECL CRTDLL__onexit(onexit_t t)
2415{
2416 dprintf(("CRTDLL: _onexit\n"));
2417 return (_onexit(t));
2418}
2419
2420
2421/*********************************************************************
2422 * _open (CRTDLL.237)
2423 */
2424HFILE CDECL CRTDLL__open(LPCSTR path,INT flags)
2425{
2426 dprintf(("CRTDLL: _open\n"));
2427 DWORD access = 0, creation = 0;
2428 HFILE ret;
2429
2430 switch(flags & 3)
2431 {
2432 case O_RDONLY: access |= GENERIC_READ; break;
2433 case O_WRONLY: access |= GENERIC_WRITE; break;
2434 case O_RDWR: access |= GENERIC_WRITE | GENERIC_READ; break;
2435 }
2436
2437 if (flags & 0x0100) /* O_CREAT */
2438 {
2439 if (flags & 0x0400) /* O_EXCL */
2440 creation = CREATE_NEW;
2441 else if (flags & 0x0200) /* O_TRUNC */
2442 creation = CREATE_ALWAYS;
2443 else
2444 creation = OPEN_ALWAYS;
2445 }
2446 else /* no O_CREAT */
2447 {
2448 if (flags & 0x0200) /* O_TRUNC */
2449 creation = TRUNCATE_EXISTING;
2450 else
2451 creation = OPEN_EXISTING;
2452 }
2453 if (flags & 0x0008) /* O_APPEND */
2454 dprintf(("O_APPEND not supported\n" ));
2455 if (flags & 0xf0f4)
2456 dprintf(("CRTDLL_open file unsupported flags 0x%04x\n",flags));
2457 /* End Fixme */
2458
2459 ret = CreateFileA( path, access, FILE_SHARE_READ | FILE_SHARE_WRITE,
2460 NULL, creation, FILE_ATTRIBUTE_NORMAL, -1 );
2461 dprintf(("CRTDLL_open file %s mode 0x%04x got handle %d\n", path,flags,ret));
2462 return ret;
2463}
2464
2465
2466/*********************************************************************
2467 * _open_osfhandle (CRTDLL.238)
2468 */
2469INT CDECL CRTDLL__open_osfhandle( long osfhandle, int flags )
2470{
2471 dprintf(("CRTDLL: _open_osfhandle\n"));
2472HFILE handle;
2473
2474 switch (osfhandle) {
2475 case STD_INPUT_HANDLE :
2476 case 0 :
2477 handle=0;
2478 break;
2479 case STD_OUTPUT_HANDLE:
2480 case 1:
2481 handle=1;
2482 break;
2483 case STD_ERROR_HANDLE:
2484 case 2:
2485 handle=2;
2486 break;
2487 default:
2488 return (-1);
2489 }
2490 dprintf(("(handle %08lx,flags %d) return %d\n",
2491 osfhandle,flags,handle));
2492 return handle;
2493}
2494
2495
2496/*********************************************************************
2497 * _pclose (CRTDLL.244)
2498 */
2499INT CDECL CRTDLL__pclose( FILE *fp )
2500{
2501 dprintf(("CRTDLL: _pclose not implemented.\n"));
2502 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2503 return FALSE;
2504}
2505
2506
2507/*********************************************************************
2508 * _pctype_dll (CRTDLL.245)
2509 * FIXME - Could not find anything about it
2510 */
2511INT CDECL CRTDLL__pctype_dll(DWORD ret)
2512{
2513 dprintf(("CRTDLL: _pctype_dll not implemented.\n"));
2514 return 0;
2515}
2516
2517
2518/*********************************************************************
2519 * _pipe (CRTDLL.247)
2520 */
2521INT CDECL CRTDLL__pipe( int *phandles, unsigned psize, int textmode )
2522{
2523 dprintf(("CRTDLL: _pipe not implemented.\n"));
2524 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2525 return FALSE;
2526}
2527
2528
2529/*********************************************************************
2530 * _popen (CRTDLL.248)
2531 */
2532FILE * CDECL CRTDLL__popen( const char *command, const char *mode )
2533{
2534 dprintf(("CRTDLL: _popen not implemented.\n"));
2535 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2536 return FALSE;
2537}
2538
2539
2540/*********************************************************************
2541 * _putch (CRTDLL.250)
2542 */
2543INT CDECL CRTDLL__putch( int i )
2544{
2545 dprintf(("CRTDLL: _putch\n"));
2546 return (_putch(i));
2547}
2548
2549
2550/*********************************************************************
2551 * _putenv (CRTDLL.251)
2552 */
2553INT CDECL CRTDLL__putenv(const char *s)
2554{
2555 dprintf(("CRTDLL: _putenv\n"));
2556 return (_putenv(s));
2557}
2558
2559
2560/*********************************************************************
2561 * _putw (CRTDLL.252)
2562 */
2563INT CDECL CRTDLL__putw( int binint, FILE *fp )
2564{
2565 dprintf(("CRTDLL: _putw not implemented.\n"));
2566 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2567 return FALSE;
2568}
2569
2570
2571/*********************************************************************
2572 * _read (CRTDLL.254)
2573 */
2574INT CDECL CRTDLL__read(INT fd, LPVOID buf, UINT count)
2575{
2576 dprintf(("CRTDLL: _read not implemented.\n"));
2577 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2578 return FALSE;
2579}
2580
2581
2582/*********************************************************************
2583 * _rmdir (CRTDLL.255)
2584 */
2585INT CDECL CRTDLL__rmdir(const char *s1)
2586{
2587 dprintf(("CRTDLL: _rmdir\n"));
2588 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2589 return FALSE;
2590// return (_rmdir(s1));
2591}
2592
2593
2594/*********************************************************************
2595 * _rmtmp (CRTDLL.256)
2596 */
2597INT CDECL CRTDLL__rmtmp(void)
2598{
2599 dprintf(("CRTDLL: _rmtmp\n"));
2600 return(_rmtmp());
2601}
2602
2603
2604/*********************************************************************
2605 * CRTDLL__rotl (CRTDLL.257)
2606 */
2607unsigned int CDECL CRTDLL__rotl( unsigned int value, unsigned int shift )
2608{
2609 dprintf(("CRTDLL: _rotl\n"));
2610 return (_rotl(value, shift));
2611}
2612
2613
2614/*********************************************************************
2615 * CRTDLL__rotr (CRTDLL.258)
2616 */
2617unsigned int CDECL CRTDLL__rotr( unsigned int value, unsigned int shift )
2618{
2619 dprintf(("CRTDLL: _rotr\n"));
2620 return (_rotr(value, shift));
2621}
2622
2623
2624/*********************************************************************
2625 * CRTDLL__scalb (CRTDLL.259)
2626 */
2627double CDECL CRTDLL__scalb( double x, long exp )
2628{
2629 dprintf(("CRTDLL: _scalb not implemented.\n"));
2630 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2631 return FALSE;
2632}
2633
2634
2635/*********************************************************************
2636 * CRTDLL__searchenv (CRTDLL.260)
2637 */
2638void CDECL CRTDLL__searchenv( const char *name, const char *env_var, char *buf )
2639{
2640 dprintf(("CRTDLL: _searchenv not implemented.\n"));
2641 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2642}
2643
2644
2645/*********************************************************************
2646 * CRTDLL__seterrormode (CRTDLL.261)
2647 */
2648void CDECL CRTDLL__seterrormode(int i)
2649{
2650 dprintf(("CRTDLL: _seterrormode not implemented.\n"));
2651 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2652}
2653
2654
2655/*********************************************************************
2656 * CRTDLL__setjmp (CRTDLL.262)
2657 */
2658int CDECL CRTDLL__setjmp( jmp_buf env )
2659{
2660 dprintf(("CRTDLL: _setjmp -> setjmp\n"));
2661 return(setjmp( env));
2662}
2663
2664
2665/*********************************************************************
2666 * _setmode (CRTDLL.263)
2667 */
2668INT CDECL CRTDLL__setmode( INT fh,INT mode)
2669{
2670 dprintf(("CRTDLL: _setmode\n"));
2671 return (_setmode(fh, mode));
2672}
2673
2674
2675/*********************************************************************
2676 * _sleep (CRTDLL.265)
2677 */
2678VOID CDECL CRTDLL__sleep(unsigned long timeout)
2679{
2680 dprintf(("CRTDLL__sleep for %ld milliseconds\n",timeout));
2681 Sleep((timeout)?timeout:1);
2682}
2683
2684
2685/*********************************************************************
2686 * CRTDLL__sopen (CRTDLL.268)
2687 */
2688int CDECL CRTDLL__sopen( const char *s, int i1, int i2, ... )
2689{
2690 dprintf(("CRTDLL: _sopen not implemented.\n"));
2691 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2692 return FALSE;
2693}
2694
2695
2696/*********************************************************************
2697 * CRTDLL__spawnl (CRTDLL.269)
2698 */
2699int CDECL CRTDLL__spawnl( int i, char *s1, char *s2, ... )
2700{
2701 dprintf(("CRTDLL: _spawnl not implemented.\n"));
2702 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2703 return FALSE;
2704}
2705
2706
2707/*********************************************************************
2708 * CRTDLL__spawnle (CRTDLL.270)
2709 */
2710int CDECL CRTDLL__spawnle( int i, char *s1, char *s2, ... )
2711{
2712 dprintf(("CRTDLL: _spawnle not implemented.\n"));
2713 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2714 return FALSE;
2715}
2716
2717
2718/*********************************************************************
2719 * CRTDLL__spawnlp (CRTDLL.271)
2720 */
2721int CDECL CRTDLL__spawnlp( int i, char *s1, char *s2, ... )
2722{
2723 dprintf(("CRTDLL: _spawnlp not implemented.\n"));
2724 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2725 return FALSE;
2726}
2727
2728
2729/*********************************************************************
2730 * CRTDLL__spawnlpe (CRTDLL.272)
2731 */
2732int CDECL CRTDLL__spawnlpe( int i, char *s1, char *s2, ... )
2733{
2734 dprintf(("CRTDLL: _spawnlpe not implemented.\n"));
2735 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2736 return FALSE;
2737}
2738
2739
2740/*********************************************************************
2741 * CRTDLL__spawnv (CRTDLL.273)
2742 */
2743int CDECL CRTDLL__spawnv( int i, char *s1, char ** s2 )
2744{
2745 dprintf(("CRTDLL: _spawnv\n"));
2746 return (_spawnv(i, s1, s2));
2747}
2748
2749
2750/*********************************************************************
2751 * CRTDLL__spawnve (CRTDLL.274)
2752 */
2753int CDECL CRTDLL__spawnve( int i, char *s1, char ** s2, char ** s3 )
2754{
2755 dprintf(("CRTDLL: _spawnve\n"));
2756 return (_spawnve(i, s1, s2, s3));
2757}
2758
2759
2760/*********************************************************************
2761 * CRTDLL__spawnvp (CRTDLL.275)
2762 */
2763int CDECL CRTDLL__spawnvp( int i, char *s1, char ** s2 )
2764{
2765 dprintf(("CRTDLL: _spawnvp\n"));
2766 return (_spawnvp(i, s1, s2));
2767}
2768
2769/*********************************************************************
2770 * CRTDLL__spawnv (CRTDLL.276)
2771 */
2772int CDECL CRTDLL__spawnvpe( int i, char *s1, char ** s2, char ** s3 )
2773{
2774 dprintf(("CRTDLL: _spawnvpe\n"));
2775 return (_spawnvpe(i, s1, s2, s3));
2776}
2777
2778
2779/*********************************************************************
2780 * CRTDLL__stat (CRTDLL.278)
2781 */
2782int CDECL CRTDLL__stat( const char *s1, struct stat * n )
2783{
2784 dprintf(("CRTDLL: _stat\n"));
2785 return(_stat(s1, n));
2786}
2787
2788
2789/*********************************************************************
2790 * CRTDLL__statusfp (CRTDLL.279)
2791 */
2792unsigned int CDECL CRTDLL__statusfp( void )
2793{
2794 dprintf(("CRTDLL: _statusfp\n"));
2795 return (_status87());
2796}
2797
2798
2799/*********************************************************************
2800 * CRTDLL__strdate (CRTDLL.281)
2801 */
2802char * CDECL CRTDLL__strdate( char *buf )
2803{
2804 dprintf(("CRTDLL: _strdate\n"));
2805 return(_strdate(buf));
2806}
2807
2808
2809/*********************************************************************
2810 * CRTDLL__strdec (CRTDLL.282)
2811 */
2812char * CDECL CRTDLL__strdec( const char *, const char *p )
2813{
2814 dprintf(("CRTDLL: _strdec\n"));
2815 return( (char *)(p-1) );
2816}
2817
2818
2819/*********************************************************************
2820 * CRTDLL__strdup (CRTDLL.283)
2821 */
2822LPSTR CDECL CRTDLL__strdup(LPCSTR ptr)
2823{
2824 dprintf(("CRTDLL: _strdup\n"));
2825 return HEAP_strdupA(GetProcessHeap(),0,ptr);
2826}
2827
2828
2829/*********************************************************************
2830 * CRTDLL__strerror (CRTDLL.284)
2831 */
2832char * CDECL CRTDLL__strerror(const char *s)
2833{
2834 dprintf(("CRTDLL: _strerror not implemented\n"));
2835 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2836 return FALSE;
2837// return (_strerror(s));
2838}
2839
2840
2841/*********************************************************************
2842 * CRTDLL__stricoll (CRTDLL.286)
2843 */
2844int CDECL CRTDLL__stricoll( const char *s1, const char *s2 )
2845{
2846 dprintf(("CRTDLL: _stricoll not implemented.\n"));
2847 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2848 return FALSE;
2849}
2850
2851
2852/*********************************************************************
2853 * CRTDLL__strinc (CRTDLL.287)
2854 */
2855char * CDECL CRTDLL__strinc( const char *p )
2856{
2857 dprintf(("CRTDLL: _strinc\n"));
2858 return( (char *)(p+1) );
2859}
2860
2861
2862/*********************************************************************
2863 * CRTDLL__strncnt (CRTDLL.289)
2864 */
2865size_t CDECL CRTDLL__strncnt( const char *p, size_t l )
2866{
2867 dprintf(("CRTDLL: _strncnt\n"));
2868 size_t i;
2869 i = strlen(p);
2870 return( (i>l) ? l : i );
2871}
2872
2873/*********************************************************************
2874 * CRTDLL__strnextc (CRTDLL.290)
2875 */
2876unsigned int CDECL CRTDLL__strnextc( const char *p )
2877{
2878 dprintf(("CRTDLL: _strnextc\n"));
2879 return( (unsigned int)*p );
2880}
2881
2882
2883/*********************************************************************
2884 * CRTDLL__strninc (CRTDLL.292)
2885 */
2886char * CDECL CRTDLL__strninc( const char *p, size_t l )
2887{
2888 dprintf(("CRTDLL: _strninc\n"));
2889 return( (char *)(p+l) );
2890}
2891
2892
2893/*********************************************************************
2894 * CRTDLL__strnset (CRTDLL.293)
2895 */
2896char * CDECL CRTDLL__strnset( char *string, int c, size_t len )
2897{
2898 dprintf(("CRTDLL: _strnset not implemented.\n"));
2899 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2900 return FALSE;
2901}
2902
2903
2904/*********************************************************************
2905 * CRTDLL__strrev (CRTDLL.294)
2906 */
2907char * CDECL CRTDLL__strrev( char *string )
2908{
2909 dprintf(("CRTDLL: _strrev not implemented.\n"));
2910 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2911 return FALSE;
2912}
2913
2914
2915/*********************************************************************
2916 * CRTDLL__strset (CRTDLL.295)
2917 */
2918char * CDECL CRTDLL__strset( char *string, int c )
2919{
2920 dprintf(("CRTDLL: _strset not implemented.\n"));
2921 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
2922 return FALSE;
2923}
2924
2925
2926/*********************************************************************
2927 * CRTDLL__strspnp (CRTDLL.296)
2928 */
2929char * CDECL CRTDLL__strspnp( const char *p1, const char *p2 )
2930{
2931 dprintf(("CRTDLL: _strspnp\n"));
2932 return( (*(p1 += strspn(p1,p2))!='\0') ? (char*)p1 : NULL );
2933}
2934
2935
2936/*********************************************************************
2937 * CRTDLL__strtime (CRTDLL.297)
2938 */
2939char * CDECL CRTDLL__strtime( char *buf )
2940{
2941 dprintf(("CRTDLL: _strtime\n"));
2942 return (_strtime(buf));
2943}
2944
2945
2946/*********************************************************************
2947 * CRTDLL__swab (CRTDLL.299)
2948 */
2949void CDECL CRTDLL__swab(char *s1, char *s2, int i)
2950{
2951 dprintf(("CRTDLL: _swab\n"));
2952 _swab(s1, s2, i);
2953}
2954
2955
2956/*********************************************************************
2957 * CRTDLL__tell (CRTDLL.302)
2958 */
2959long CDECL CRTDLL__tell( int i )
2960{
2961 dprintf(("CRTDLL: _tell\n"));
2962 return (_tell(i));
2963}
2964
2965
2966/*********************************************************************
2967 * CRTDLL__tempnam (CRTDLL.303)
2968 */
2969char * CDECL CRTDLL__tempnam( char *dir, char *prefix )
2970{
2971 dprintf(("CRTDLL: _tempnam\n"));
2972 return (_tempnam(dir, prefix));
2973}
2974
2975
2976/*********************************************************************
2977 * CRTDLL__tolower (CRTDLL.305)
2978 */
2979int CDECL CRTDLL__tolower(int n)
2980{
2981 dprintf(("CRTDLL: _tolower\n"));
2982 return (_tolower(n));
2983}
2984
2985
2986/*********************************************************************
2987 * CRTDLL__toupper (CRTDLL.306)
2988 */
2989int CDECL CRTDLL__toupper(int n)
2990{
2991 dprintf(("CRTDLL: _toupper\n"));
2992 return (_toupper(n));
2993}
2994
2995
2996/*********************************************************************
2997 * CRTDLL__tzset (CRTDLL.308)
2998 */
2999void CDECL CRTDLL__tzset( void )
3000{
3001 dprintf(("CRTDLL: _tzset not implemented.\n"));
3002 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3003}
3004
3005
3006/*********************************************************************
3007 * CRTDLL__umask (CRTDLL.310)
3008 */
3009int CDECL CRTDLL__umask( int i )
3010{
3011 dprintf(("CRTDLL: _umask\n"));
3012 return (_umask(i));
3013}
3014
3015
3016/*********************************************************************
3017 * CRTDLL__ungetch (CRTDLL.311)
3018 */
3019int CDECL CRTDLL__ungetch( int i )
3020{
3021 dprintf(("CRTDLL: _ungetch\n"));
3022 return (_ungetch(i));
3023}
3024
3025
3026/*********************************************************************
3027 * _unlink (CRTDLL.312)
3028 */
3029INT CDECL CRTDLL__unlink(LPCSTR pathname)
3030{
3031 dprintf(("CRTDLL: _unlink\n"));
3032 int ret=0;
3033 DOS_FULL_NAME full_name;
3034
3035 if (!DOSFS_GetFullName( pathname, FALSE, (CHAR*)&full_name )) {
3036 dprintf(("CRTDLL_unlink file %s bad name\n",pathname));
3037 return EOF;
3038 }
3039
3040 ret=unlink(full_name.long_name);
3041 dprintf(("(%s unix %s)\n",
3042 pathname,full_name.long_name));
3043 if(ret)
3044 dprintf((" Failed!\n"));
3045
3046 return ret;
3047}
3048
3049
3050/*********************************************************************
3051 * CRTDLL__utime (CRTDLL.314)
3052 */
3053int CDECL CRTDLL__utime( char *path, struct utimbuf * times )
3054{
3055 dprintf(("CRTDLL: _utime\n"));
3056 return (_utime(path, times));
3057}
3058
3059
3060/*********************************************************************
3061 * CRTDLL__vsnwprintf (CRTDLL.316)
3062 */
3063int CDECL CRTDLL__vsnwprintf( wchar_t *s1, size_t n, const wchar_t *s2, va_list arg )
3064{
3065 dprintf(("CRTDLL: _vsnwprintf not implemented.\n"));
3066 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3067 return FALSE;
3068}
3069
3070
3071/*********************************************************************
3072 * CRTDLL__wcsdup (CRTDLL.317)
3073 */
3074LPWSTR CDECL CRTDLL__wcsdup( LPCWSTR str )
3075{
3076 dprintf(("CRTDLL: _wcsdup\n"));
3077 LPWSTR ret = NULL;
3078 if (str)
3079 {
3080 int size = (wcslen((const wchar_t*)str) + 1) * sizeof(WCHAR);
3081// FIXME ret = CRTDLL_malloc( size );
3082 if (ret) memcpy( ret, str, size );
3083 }
3084 return ret;
3085}
3086
3087
3088/*********************************************************************
3089 * CRTDLL__wcsicoll (CRTDLL.319)
3090 */
3091int CDECL CRTDLL__wcsicoll( LPCWSTR str1, LPCWSTR str2 )
3092{
3093 dprintf(("CRTDLL: _wcsicoll\n"));
3094 return NTDLL__wcsicmp( str1, str2 );
3095}
3096
3097
3098/*********************************************************************
3099 * CRTDLL__wcsnset (CRTDLL.322)
3100 */
3101LPWSTR CDECL CRTDLL__wcsnset( LPWSTR str, WCHAR c, INT n )
3102{
3103 dprintf(("CRTDLL: _wcsnset\n"));
3104 LPWSTR ret = str;
3105 while ((n-- > 0) && *str) *str++ = c;
3106 return ret;
3107}
3108
3109
3110/*********************************************************************
3111 * CRTDLL__wcsrev (CRTDLL.323)
3112 */
3113LPWSTR CDECL CRTDLL__wcsrev( LPWSTR str )
3114{
3115 dprintf(("CRTDLL: _wcsrev\n"));
3116 LPWSTR ret = str;
3117 LPWSTR end = str + wcslen((const wchar_t*)str) - 1;
3118 while (end > str)
3119 {
3120 WCHAR t = *end;
3121 *end-- = *str;
3122 *str++ = t;
3123 }
3124 return ret;
3125}
3126
3127
3128/*********************************************************************
3129 * CRTDLL__wcsset (CRTDLL.324)
3130 */
3131LPWSTR CDECL CRTDLL__wcsset( LPWSTR str, WCHAR c )
3132{
3133 dprintf(("CRTDLL: _wcsset\n"));
3134 LPWSTR ret = str;
3135 while (*str) *str++ = c;
3136 return ret;
3137}
3138
3139
3140/*********************************************************************
3141 * _write (CRTDLL.329)
3142 */
3143INT CDECL CRTDLL__write(INT fd,LPCVOID buf,UINT count)
3144{
3145 dprintf(("CRTDLL: _write\n"));
3146 INT len=0;
3147
3148 if (fd == -1)
3149 len = -1;
3150 else if (fd<=2)
3151 len = (UINT)write(fd,buf,(LONG)count);
3152 else
3153 len = _lwrite(fd,(LPCSTR)buf,count);
3154 dprintf(("%d/%d byte to dfh %d from %p,\n",
3155 len,count,fd,buf));
3156 return len;
3157}
3158
3159
3160/*********************************************************************
3161 * _y0 (CRTDLL.332)
3162 */
3163double CDECL CRTDLL__y0(double x)
3164{
3165 dprintf(("CRTDLL: _y0\n"));
3166 return (_y0(x));
3167}
3168
3169
3170/*********************************************************************
3171 * _y1 (CRTDLL.333)
3172 */
3173double CDECL CRTDLL__y1(double x)
3174{
3175 dprintf(("CRTDLL: _y1\n"));
3176 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3177 return (_y1(x));
3178}
3179
3180
3181/*********************************************************************
3182 * _yn (CRTDLL.334)
3183 */
3184double CDECL CRTDLL__yn(int i, double x)
3185{
3186 dprintf(("CRTDLL: _yn\n"));
3187 return (_yn(i, x));
3188}
3189
3190
3191/*********************************************************************
3192 * isleadbyte (CRTDLL.335)
3193 */
3194void CDECL CRTDLL_abort( void )
3195{
3196 dprintf(("CRTDLL: abort\n"));
3197 abort();
3198}
3199
3200
3201/*********************************************************************
3202 * acos (CRTDLL.336)
3203 */
3204double CDECL CRTDLL_acos( double x )
3205{
3206 dprintf(("CRTDLL: acos\n"));
3207 return (acos(x));
3208}
3209
3210
3211/*********************************************************************
3212 * asctime (CRTDLL.338)
3213 */
3214char * CDECL CRTDLL_asctime( const struct tm *timeptr )
3215{
3216 dprintf(("CRTDLL: asctime\n"));
3217 return (asctime(timeptr));
3218}
3219
3220
3221/*********************************************************************
3222 * asin (CRTDLL.339)
3223 */
3224double CDECL CRTDLL_asin( double x )
3225{
3226 dprintf(("CRTDLL: asin\n"));
3227 return (asin(x));
3228}
3229
3230
3231/*********************************************************************
3232 * atan2 (CRTDLL.341)
3233 */
3234double CDECL CRTDLL_atan2( double y, double x )
3235{
3236 dprintf(("CRTDLL: atan2\n"));
3237 return (atan2(y, x));
3238}
3239
3240
3241/*********************************************************************
3242 * atexit (CRTDLL.342)
3243 */
3244int CDECL CRTDLL_atexit( register void ( *func )( void ) )
3245{
3246 dprintf(("CRTDLL: atexit not implemented.\n"));
3247 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3248 return FALSE;
3249}
3250
3251
3252/*********************************************************************
3253 * atof (CRTDLL.343)
3254 */
3255double CDECL CRTDLL_atof( const char *nptr )
3256{
3257 dprintf(("CRTDLL: atof\n"));
3258 return (atof(nptr));
3259}
3260
3261
3262/*********************************************************************
3263 * bsearch (CRTDLL.346)
3264 */
3265void * CDECL CRTDLL_bsearch( const void *key, const void *base, size_t nmemb,
3266 size_t size, int (*compar)(const void *pkey, const void *pbase) )
3267{
3268 dprintf(("CRTDLL: bsearch not implemented.\n"));
3269 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3270 return FALSE;
3271}
3272
3273
3274/*********************************************************************
3275 * calloc (CRTDLL.347)
3276 */
3277void * CDECL CRTDLL_calloc( size_t n, size_t size )
3278{
3279 dprintf(("CRTDLL: calloc\n"));
3280 return (calloc(n, size));
3281}
3282
3283
3284/*********************************************************************
3285 * clearerr (CRTDLL.349)
3286 */
3287void CDECL CRTDLL_clearerr( FILE *fp )
3288{
3289 dprintf(("CRTDLL: clearerr\n"));
3290 clearerr(fp);
3291}
3292
3293
3294/*********************************************************************
3295 * clock (CRTDLL.350)
3296 */
3297clock_t CDECL CRTDLL_clock( void )
3298{
3299 dprintf(("CRTDLL: clock\n"));
3300 return (clock());
3301}
3302
3303
3304/*********************************************************************
3305 * cosh (CRTDLL.352)
3306 */
3307double CDECL CRTDLL_cosh( double x )
3308{
3309 dprintf(("CRTDLL: cosh\n"));
3310 return (cosh(x));
3311}
3312
3313
3314/*********************************************************************
3315 * ctime (CRTDLL.353)
3316 */
3317char * CDECL CRTDLL_ctime( const time_t *timer )
3318{
3319 dprintf(("CRTDLL: ctime\n"));
3320 return (ctime(timer));
3321}
3322
3323
3324/*********************************************************************
3325 * difftime (CRTDLL.354)
3326 */
3327double CDECL CRTDLL_difftime( time_t t1, time_t t0 )
3328{
3329 dprintf(("CRTDLL: difftime\n"));
3330 return (difftime(t1, t0));
3331}
3332
3333
3334/*********************************************************************
3335 * div (CRTDLL.355)
3336 */
3337div_t CDECL CRTDLL_div( int numer, int denom )
3338{
3339 dprintf(("CRTDLL: div\n"));
3340 return (div(numer, denom));
3341}
3342
3343
3344/*********************************************************************
3345 * exit (CRTDLL.356)
3346 */
3347void CDECL CRTDLL_exit(DWORD ret)
3348{
3349 dprintf(("CRTDLL: exit\n"));
3350 ExitProcess(ret);
3351}
3352
3353
3354/*********************************************************************
3355 * exp (CRTDLL.357)
3356 */
3357double CDECL CRTDLL_exp( double x )
3358{
3359 dprintf(("CRTDLL: exp\n"));
3360 return (exp(x));
3361}
3362
3363
3364/*********************************************************************
3365 * fclose (CRTDLL.359)
3366 */
3367int CDECL CRTDLL_fclose( FILE *fp )
3368{
3369 dprintf(("CRTDLL: fclose\n"));
3370 return (fclose(fp));
3371}
3372
3373
3374/*********************************************************************
3375 * feof (CRTDLL.360)
3376 */
3377int CDECL CRTDLL_feof( FILE *fp )
3378{
3379 dprintf(("CRTDLL: feof\n"));
3380 return (feof(fp));
3381}
3382
3383
3384/*********************************************************************
3385 * ferror (CRTDLL.361)
3386 */
3387int CDECL CRTDLL_ferror( FILE *fp )
3388{
3389 dprintf(("CRTDLL: ferror\n"));
3390 return (ferror(fp));
3391}
3392
3393
3394/*********************************************************************
3395 * fflush (CRTDLL.362)
3396 */
3397int CDECL CRTDLL_fflush( FILE *fp )
3398{
3399 dprintf(("CRTDLL: fflush\n"));
3400 return (fflush(fp));
3401}
3402
3403
3404/*********************************************************************
3405 * fgetc (CRTDLL.363)
3406 */
3407int CDECL CRTDLL_fgetc( FILE *fp )
3408{
3409 dprintf(("CRTDLL: fgetc\n"));
3410 return (fgetc(fp));
3411}
3412
3413
3414/*********************************************************************
3415 * fgetpos (CRTDLL.364)
3416 */
3417int CDECL CRTDLL_fgetpos( FILE *fp, fpos_t *pos )
3418{
3419 dprintf(("CRTDLL: fgetpos\n"));
3420 return (fgetpos(fp, pos));
3421}
3422
3423
3424/*********************************************************************
3425 * fgets (CRTDLL.365)
3426 */
3427char * CDECL CRTDLL_fgets( char *s, int n, FILE *fp )
3428{
3429 dprintf(("CRTDLL: fgets\n"));
3430 return (fgets(s, n, fp));
3431}
3432
3433
3434/*********************************************************************
3435 * fgetwc (CRTDLL.366)
3436 */
3437wint_t CDECL CRTDLL_fgetwc( FILE *f )
3438{
3439 dprintf(("CRTDLL: fgetwc\n"));
3440 return (fgetwc(f));
3441}
3442
3443
3444/*********************************************************************
3445 * fmod (CRTDLL.368)
3446 */
3447double CDECL CRTDLL_fmod(double x, double y )
3448{
3449 dprintf(("CRTDLL: fmod\n"));
3450 return (fmod(x,y));
3451}
3452
3453
3454/*********************************************************************
3455 * fopen (CRTDLL.369)
3456 */
3457FILE * CDECL CRTDLL_fopen( const char *filename, const char *mode )
3458{
3459 dprintf(("CRTDLL: fopen\n"));
3460 return (fopen( filename, mode));
3461}
3462
3463
3464/*********************************************************************
3465 * fprintf (CRTDLL.370)
3466 */
3467INT CDECL CRTDLL_fprintf( CRTDLL_FILE *file, LPSTR format, ... )
3468{
3469 dprintf(("CRTDLL: fprintf\n"));
3470 va_list valist;
3471 INT res;
3472
3473 va_start( valist, format );
3474 res = CRTDLL_vfprintf( file, format, valist );
3475 va_end( valist );
3476 return res;
3477}
3478
3479
3480/*********************************************************************
3481 * fputc (CRTDLL.371)
3482 */
3483int CDECL CRTDLL_fputc( int c, FILE *fp )
3484{
3485 dprintf(("CRTDLL: fputc\n"));
3486 return (fputc(c, fp));
3487}
3488
3489
3490/*********************************************************************
3491 * fputs (CRTDLL.372)
3492 */
3493int CDECL CRTDLL_fputs( const char *s, FILE *fp )
3494{
3495 dprintf(("CRTDLL: fputs\n"));
3496 return (fputs(s, fp));
3497}
3498
3499
3500/*********************************************************************
3501 * fputwc (CRTDLL.373)
3502 */
3503wint_t CDECL CRTDLL_fputwc( wint_t wc, FILE *strm )
3504{
3505 dprintf(("CRTDLL: fputwc\n"));
3506 return (fputwc(wc, strm));
3507}
3508
3509
3510/*********************************************************************
3511 * fread (CRTDLL.374)
3512 */
3513size_t CDECL CRTDLL_fread( void *ptr, size_t size, size_t n, FILE *fp )
3514{
3515 dprintf(("CRTDLL: fread\n"));
3516 return (fread(ptr, size, n, fp));
3517}
3518
3519
3520/*********************************************************************
3521 * free (CRTDLL.375)
3522 */
3523VOID CDECL CRTDLL_free(LPVOID ptr)
3524{
3525 dprintf(("CRTDLL: free\n"));
3526 HeapFree(GetProcessHeap(),0,ptr);
3527}
3528
3529
3530/*********************************************************************
3531 * freopen (CRTDLL.376)
3532 */
3533FILE * CDECL CRTDLL_freopen( const char *filename, const char *mode, FILE *fp )
3534{
3535 dprintf(("CRTDLL: freopen\n"));
3536 return (freopen(filename, mode, fp));
3537}
3538
3539
3540/*********************************************************************
3541 * frexp (CRTDLL.377)
3542 */
3543double CDECL CRTDLL_frexp( double value, int *exp )
3544{
3545 dprintf(("CRTDLL: frexp\n"));
3546 return (frexp(value, exp));
3547}
3548
3549
3550/*********************************************************************
3551 * fscanf (CRTDLL.378)
3552 */
3553int CDECL CRTDLL_fscanf( FILE*fp, const char *format, ... )
3554{
3555 dprintf(("CRTDLL: fscanf\n"));
3556#if 0
3557 va_list valist;
3558 INT res;
3559
3560 va_start( valist, format );
3561#ifdef HAVE_VFSCANF
3562 res = vfscanf( xlat_file_ptr(stream), format, valist );
3563#endif
3564 va_end( valist );
3565 return res;
3566#endif
3567 dprintf(("broken\n"));
3568 return 0;
3569}
3570
3571
3572/*********************************************************************
3573 * fseek (CRTDLL.379)
3574 */
3575int CDECL CRTDLL_fseek( FILE *file, long int offset, int whence )
3576{
3577 dprintf(("CRTDLL: fseek\n"));
3578 dprintf(("file %p to 0x%08lx pos %s\n",
3579 file,offset,(whence==SEEK_SET)?"SEEK_SET":
3580 (whence==SEEK_CUR)?"SEEK_CUR":
3581 (whence==SEEK_END)?"SEEK_END":"UNKNOWN"));
3582// FIXME if (SetFilePointer( file->handle, offset, NULL, whence ) != 0xffffffff)
3583// FIXME return 0;
3584 dprintf((" failed!\n"));
3585 return -1;
3586}
3587
3588
3589/*********************************************************************
3590 * fsetpos (CRTDLL.380)
3591 */
3592int CDECL CRTDLL_fsetpos( FILE *fp, const fpos_t *pos )
3593{
3594 dprintf(("CRTDLL: fsetpos\n"));
3595 return (fsetpos(fp, pos));
3596}
3597
3598
3599/*********************************************************************
3600 * ftell (CRTDLL.381)
3601 */
3602long int CDECL CRTDLL_ftell( FILE *fp )
3603{
3604 dprintf(("CRTDLL: ftell\n"));
3605 return (ftell(fp));
3606}
3607
3608
3609/*********************************************************************
3610 * fwprintf (CRTDLL.382)
3611 */
3612int CDECL CRTDLL_fwprintf( FILE *strm, const wchar_t *format, ... )
3613{
3614 dprintf(("CRTDLL: fwprintf not implemented.\n"));
3615 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3616 return FALSE;
3617}
3618
3619
3620/*********************************************************************
3621 * fwrite (CRTDLL.383)
3622 */
3623DWORD CDECL CRTDLL_fwrite( LPVOID ptr, INT size, INT nmemb, CRTDLL_FILE *file )
3624{
3625 DWORD ret;
3626
3627 dprintf(("CRTDLL: fwrite\n"));
3628 if (!WriteFile( file->handle, ptr, size * nmemb, &ret, NULL ))
3629 dprintf((" failed!\n"));
3630
3631 return ret / size;
3632}
3633
3634
3635/*********************************************************************
3636 * fwscanf (CRTDLL.384)
3637 */
3638int CDECL CRTDLL_fwscanf( FILE *strm, const wchar_t *format, ... )
3639{
3640 dprintf(("CRTDLL: fwscanf not implemented.\n"));
3641 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3642 return FALSE;
3643}
3644
3645
3646/*********************************************************************
3647 * getc (CRTDLL.385)
3648 */
3649int CDECL CRTDLL_getc( FILE *fp )
3650{
3651 dprintf(("CRTDLL: getc\n"));
3652 return (getc(fp));
3653}
3654
3655
3656/*********************************************************************
3657 * getchar (CRTDLL.386)
3658 */
3659int CDECL CRTDLL_getchar( void )
3660{
3661 dprintf(("CRTDLL: getchar\n"));
3662 return (getchar());
3663}
3664
3665
3666/*********************************************************************
3667 * getenv (CRTDLL.387)
3668 */
3669char * CDECL CRTDLL_getenv( const char *name )
3670{
3671 dprintf(("CRTDLL: getenv\n"));
3672 return (getenv(name));
3673}
3674
3675
3676/*********************************************************************
3677 * gets (CRTDLL.388)
3678 */
3679char * CDECL CRTDLL_gets( char *s )
3680{
3681 dprintf(("CRTDLL: gets\n"));
3682 return (gets(s));
3683}
3684
3685
3686/*********************************************************************
3687 * gmtime (CRTDLL.389)
3688 */
3689struct tm * CDECL CRTDLL_gmtime( const time_t *timer )
3690{
3691 dprintf(("CRTDLL: gmtime\n"));
3692 return (gmtime(timer));
3693}
3694
3695
3696/*********************************************************************
3697 * is_wctype (CRTDLL.390)
3698 * FIXME - Could not find anything about it
3699 */
3700INT CDECL CRTDLL_is_wctype(DWORD ret)
3701{
3702 dprintf(("CRTDLL: is_wctype\n"));
3703 return 0;
3704}
3705
3706
3707/*********************************************************************
3708 * isalnum (CRTDLL.391)
3709 */
3710int CDECL CRTDLL_isalnum(int i)
3711{
3712 dprintf(("CRTDLL: isalnum(%08xh)\n", i));
3713 return (isalnum(i));
3714}
3715
3716
3717/*********************************************************************
3718 * iscntrl (CRTDLL.393)
3719 */
3720int CDECL CRTDLL_iscntrl(int i)
3721{
3722 dprintf(("CRTDLL: iscntrl(%08xh)\n", i));
3723 return (iscntrl(i));
3724}
3725
3726
3727/*********************************************************************
3728 * isgraph (CRTDLL.395)
3729 */
3730int CDECL CRTDLL_isgraph(int i)
3731{
3732 dprintf(("CRTDLL: isgraph(%08xh)\n", i));
3733 return (isgraph(i));
3734}
3735
3736
3737/*********************************************************************
3738 * isleadbyte (CRTDLL.396)
3739 */
3740int CDECL CRTDLL_isleadbyte(int i)
3741{
3742 dprintf(("CRTDLL: isleadbyte(%08xh) not implemented.\n", i));
3743 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3744 return FALSE;
3745}
3746
3747
3748/*********************************************************************
3749 * ispunct (CRTDLL.399)
3750 */
3751int CDECL CRTDLL_ispunct(int i)
3752{
3753 dprintf(("CRTDLL: ispunct(%08xh)\n", i));
3754 return (ispunct(i));
3755}
3756
3757
3758/*********************************************************************
3759 * iswalnum (CRTDLL.402)
3760 */
3761int CDECL CRTDLL_iswalnum(wint_t i)
3762{
3763 dprintf(("CRTDLL: iswalnum(%08xh)\n", i));
3764 return (iswalnum(i));
3765}
3766
3767
3768/*********************************************************************
3769 * iswascii (CRTDLL.404)
3770 */
3771int CDECL CRTDLL_iswascii(wint_t i)
3772{
3773 dprintf(("CRTDLL: iswascii(%08xh) not implemented.\n", i));
3774 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3775 return FALSE;
3776}
3777
3778
3779/*********************************************************************
3780 * iswcntrl (CRTDLL.405)
3781 */
3782int CDECL CRTDLL_iswcntrl(wint_t i)
3783{
3784 dprintf(("CRTDLL: iswcntrl(%08xh)\n", i));
3785 return (iswcntrl(i));
3786}
3787
3788
3789/*********************************************************************
3790 * iswdigit (CRTDLL.407)
3791 */
3792int CDECL CRTDLL_iswdigit(wint_t i)
3793{
3794 dprintf(("CRTDLL: iswdigit(%08xh)\n", i));
3795 return (iswdigit(i));
3796}
3797
3798
3799/*********************************************************************
3800 * iswgraph (CRTDLL.408)
3801 */
3802int CDECL CRTDLL_iswgraph(wint_t i)
3803{
3804 dprintf(("CRTDLL: iswgraph(%08xh)\n", i));
3805 return (iswgraph(i));
3806}
3807
3808
3809/*********************************************************************
3810 * iswlower (CRTDLL.409)
3811 */
3812int CDECL CRTDLL_iswlower(wint_t i)
3813{
3814 dprintf(("CRTDLL: iswlower(%08xh)\n", i));
3815 return (iswlower(i));
3816}
3817
3818
3819/*********************************************************************
3820 * iswprint (CRTDLL.410)
3821 */
3822int CDECL CRTDLL_iswprint(wint_t i)
3823{
3824 dprintf(("CRTDLL: iswprint(%08xh)\n", i));
3825 return (iswprint(i));
3826}
3827
3828
3829/*********************************************************************
3830 * iswpunct (CRTDLL.411)
3831 */
3832int CDECL CRTDLL_iswpunct(wint_t i)
3833{
3834 dprintf(("CRTDLL: iswpunct(%08xh)\n", i));
3835 return (iswpunct(i));
3836}
3837
3838
3839/*********************************************************************
3840 * iswspace (CRTDLL.412)
3841 */
3842int CDECL CRTDLL_iswspace(wint_t i)
3843{
3844 dprintf(("CRTDLL: iswspace(%08xh)\n", i));
3845 return (iswspace(i));
3846}
3847
3848
3849/*********************************************************************
3850 * iswupper (CRTDLL.413)
3851 */
3852int CDECL CRTDLL_iswupper(wint_t i)
3853{
3854 dprintf(("CRTDLL: iswupper(%08xh)\n", i));
3855 return (iswupper(i));
3856}
3857
3858
3859/*********************************************************************
3860 * iswxdigit (CRTDLL.414)
3861 */
3862int CDECL CRTDLL_iswxdigit(wint_t i)
3863{
3864 dprintf(("CRTDLL: iswxdigit(%08xh)\n", i));
3865 return (iswxdigit(i));
3866}
3867
3868
3869/*********************************************************************
3870 * ldexp (CRTDLL.417)
3871 */
3872double CDECL CRTDLL_ldexp( double x, int exp )
3873{
3874 dprintf(("CRTDLL: ldexp\n"));
3875 return (ldexp(x, exp));
3876}
3877
3878
3879/*********************************************************************
3880 * ldiv (CRTDLL.418)
3881 */
3882ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom )
3883{
3884 dprintf(("CRTDLL: ldiv\n"));
3885 return (ldiv(numer, denom));
3886}
3887
3888
3889/*********************************************************************
3890 * localeconv (CRTDLL.419)
3891 */
3892struct lconv * CDECL CRTDLL_localeconv(void)
3893{
3894 dprintf(("CRTDLL: localeconv\n"));
3895 return (localeconv());
3896}
3897
3898
3899/*********************************************************************
3900 * localtime (CRTDLL.420)
3901 */
3902struct tm * CDECL CRTDLL_localtime( const time_t *timer )
3903{
3904 dprintf(("CRTDLL: localtime\n"));
3905 return (localtime(timer));
3906}
3907
3908
3909/*********************************************************************
3910 * log10 (CRTDLL.422)
3911 */
3912double CDECL CRTDLL_log10( double x )
3913{
3914 dprintf(("CRTDLL: log10\n"));
3915 return (log10(x));
3916}
3917
3918
3919/*********************************************************************
3920 * longjmp (CRTDLL.423)
3921 */
3922VOID CDECL CRTDLL_longjmp(jmp_buf env, int val)
3923{
3924 dprintf(("CRTDLL: longjmp\n"));
3925 longjmp(env, val);
3926}
3927
3928
3929/*********************************************************************
3930 * malloc (CRTDLL.424)
3931 */
3932VOID* CDECL CRTDLL_malloc(DWORD size)
3933{
3934 dprintf(("CRTDLL: malloc\n"));
3935 return HeapAlloc(GetProcessHeap(),0,size);
3936}
3937
3938
3939/*********************************************************************
3940 * mblen (CRTDLL.425)
3941 */
3942INT CDECL CRTDLL_mblen( const char *s, size_t n )
3943{
3944 dprintf(("CRTDLL: mblen\n"));
3945 return (mblen(s, n));
3946}
3947
3948
3949/*********************************************************************
3950 * CRTDLL_mbtowc (CRTDLL.427)
3951 */
3952INT CDECL CRTDLL_mbtowc( WCHAR *dst, LPCSTR str, INT n )
3953{
3954 dprintf(("CRTDLL: _mbtowc\n"));
3955 wchar_t res;
3956 int ret = mbtowc( &res, str, n );
3957 if (dst) *dst = (WCHAR)res;
3958 return ret;
3959}
3960
3961
3962/*********************************************************************
3963 * mktime (CRTDLL.433)
3964 */
3965time_t CDECL CRTDLL_mktime( struct tm *timeptr )
3966{
3967 dprintf(("CRTDLL: mktime\n"));
3968 return mktime( timeptr );
3969}
3970
3971
3972/*********************************************************************
3973 * modf (CRTDLL.434)
3974 */
3975double CDECL CRTDLL_modf( double value, double *iptr )
3976{
3977 dprintf(("CRTDLL: modf\n"));
3978 return modf( value, iptr );
3979}
3980
3981
3982/*********************************************************************
3983 * perror (CRTDLL.435)
3984 */
3985void CDECL CRTDLL_perror( const char *s )
3986{
3987 dprintf(("CRTDLL: perror\n"));
3988 perror( s );
3989}
3990
3991
3992/*********************************************************************
3993 * printf (CRTDLL.437)
3994 */
3995int CDECL CRTDLL_printf( const char *format, ... )
3996{
3997 dprintf(("CRTDLL: printf not implemented.\n"));
3998 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
3999 return FALSE;
4000}
4001
4002
4003/*********************************************************************
4004 * putc (CRTDLL.438)
4005 */
4006int CDECL CRTDLL_putc( int c, FILE *fp )
4007{
4008 dprintf(("CRTDLL: putc\n"));
4009 return putc( c, fp );
4010}
4011
4012
4013/*********************************************************************
4014 * putchar (CRTDLL.439)
4015 */
4016int CDECL CRTDLL_putchar( int c )
4017{
4018 dprintf(("CRTDLL: putchar\n"));
4019 return putchar( c );
4020}
4021
4022
4023/*********************************************************************
4024 * puts (CRTDLL.440)
4025 */
4026int CDECL CRTDLL_puts( const char *s )
4027{
4028 dprintf(("CRTDLL: puts\n"));
4029 return puts( s );
4030}
4031
4032
4033/*********************************************************************
4034 * raise (CRTDLL.442)
4035 */
4036int CDECL CRTDLL_raise( int sig )
4037{
4038 dprintf(("CRTDLL: raise\n"));
4039 return raise( sig );
4040}
4041
4042
4043/*********************************************************************
4044 * rand (CRTDLL.443)
4045 */
4046int CDECL CRTDLL_rand( void )
4047{
4048 dprintf(("CRTDLL: rand\n"));
4049 return (rand());
4050}
4051
4052
4053/*********************************************************************
4054 * realloc (CRTDLL.444)
4055 */
4056void * CDECL CRTDLL_realloc( void *ptr, size_t size )
4057{
4058 dprintf(("CRTDLL: realloc\n"));
4059 return HeapReAlloc( GetProcessHeap(), 0, ptr, size );
4060}
4061
4062
4063/*********************************************************************
4064 * remove (CRTDLL.445)
4065 */
4066INT CDECL CRTDLL_remove(LPCSTR file)
4067{
4068 dprintf(("CRTDLL: remove\n"));
4069 if (!DeleteFileA(file))
4070 return -1;
4071 return 0;
4072}
4073
4074
4075/*********************************************************************
4076 * rename (CRTDLL.446)
4077 */
4078int CDECL CRTDLL_rename (const char *old, const char *new2)
4079{
4080 dprintf(("CRTDLL: rename\n"));
4081 return (rename(old, new2));
4082}
4083
4084
4085/*********************************************************************
4086 * rewind (CRTDLL.447)
4087 */
4088void CDECL CRTDLL_rewind( FILE *fp )
4089{
4090 dprintf(("CRTDLL: rewind\n"));
4091 rewind(fp);
4092}
4093
4094
4095/*********************************************************************
4096 * scanf (CRTDLL.448)
4097 */
4098int CDECL CRTDLL_scanf( const char *format, ... )
4099{
4100 dprintf(("CRTDLL: scanf not implemented.\n"));
4101 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4102 return FALSE;
4103}
4104
4105
4106/*********************************************************************
4107 * setbuf (CRTDLL.449)
4108 */
4109void CDECL CRTDLL_setbuf( FILE *fp, char *buf )
4110{
4111 dprintf(("CRTDLL: setbuf\n"));
4112 setbuf(fp, buf);
4113}
4114
4115
4116/*********************************************************************
4117 * setlocale (CRTDLL.450)
4118 */
4119char * CDECL CRTDLL_setlocale(int category,const char *locale)
4120{
4121 dprintf(("CRTDLL: setlocale\n"));
4122 return (setlocale(category, locale));
4123}
4124
4125
4126/*********************************************************************
4127 * setvbuf (CRTDLL.451)
4128 */
4129int CDECL CRTDLL_setvbuf( FILE *fp, char *buf, int mode, size_t size )
4130{
4131 dprintf(("CRTDLL: setvbuf\n"));
4132 return (setvbuf(fp, buf, mode, size));
4133}
4134
4135
4136/*********************************************************************
4137 * signal (CRTDLL.452)
4138 */
4139void CDECL CRTDLL_signal( int sig, void (*func)(int))
4140{
4141 dprintf(("CRTDLL: signal not implemented.\n"));
4142 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4143}
4144
4145
4146/*********************************************************************
4147 * sinh (CRTDLL.454)
4148 */
4149double CDECL CRTDLL_sinh( double x )
4150{
4151 dprintf(("CRTDLL: sinh\n"));
4152 return (sinh(x));
4153}
4154
4155
4156/*********************************************************************
4157 * srand (CRTDLL.457)
4158 */
4159void CDECL CRTDLL_srand( unsigned int seed )
4160{
4161 dprintf(("CRTDLL: srand\n"));
4162 srand(seed);
4163}
4164
4165
4166/*********************************************************************
4167 * strcoll (CRTDLL.462)
4168 */
4169int CDECL CRTDLL_strcoll( const char *s1, const char *s2 )
4170{
4171 dprintf(("CRTDLL: strcoll\n"));
4172 return strcoll(s1, s2);
4173}
4174
4175
4176/*********************************************************************
4177 * strerror (CRTDLL.465)
4178 */
4179char * CDECL CRTDLL_strerror( int errnum )
4180{
4181 dprintf(("CRTDLL: strerror\n"));
4182 return strerror(errnum);
4183}
4184
4185
4186/*********************************************************************
4187 * strftime (CRTDLL.466)
4188 */
4189size_t CDECL CRTDLL_strftime( char *s, size_t maxsiz, const char *fmt, const struct tm *tp )
4190{
4191 dprintf(("CRTDLL: strftime\n"));
4192 return strftime(s, maxsiz, fmt, tp);
4193}
4194
4195
4196/*********************************************************************
4197 * strtod (CRTDLL.475)
4198 */
4199double CDECL CRTDLL_strtod( const char *nptr, char **endptr )
4200{
4201 dprintf(("CRTDLL: strtod\n"));
4202 return strtod(nptr, endptr);
4203}
4204
4205
4206/*********************************************************************
4207 * strtok (CRTDLL.476)
4208 */
4209char * CDECL CRTDLL_strtok( char *s1, const char *s2 )
4210{
4211 dprintf(("CRTDLL: strtok\n"));
4212 return strtok(s1, s2);
4213}
4214
4215
4216/*********************************************************************
4217 * strtol (CRTDLL.477)
4218 */
4219long int CDECL CRTDLL_strtol( const char *nptr, char **endptr, int base )
4220{
4221 dprintf(("CRTDLL: strtol\n"));
4222 return strtol(nptr, endptr, base);
4223}
4224
4225
4226/*********************************************************************
4227 * strtoul (CRTDLL.478)
4228 */
4229unsigned long CDECL CRTDLL_strtoul( const char *nptr, char **endptr, int base )
4230{
4231 dprintf(("CRTDLL: strtoul\n"));
4232 return strtoul(nptr, endptr, base);
4233}
4234
4235
4236/*********************************************************************
4237 * strxfrm (CRTDLL.479)
4238 */
4239size_t CDECL CRTDLL_strxfrm( char *s1, const char *s2, size_t n )
4240{
4241 dprintf(("CRTDLL: strxfrm\n"));
4242 return strxfrm(s1, s2, n);
4243}
4244
4245
4246/*********************************************************************
4247 * swscanf (CRTDLL.481)
4248 */
4249int CDECL CRTDLL_swscanf( const wchar_t *s1, const wchar_t *s2, ... )
4250{
4251 dprintf(("CRTDLL: swscanf not implemented.\n"));
4252 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4253 return FALSE;
4254}
4255
4256
4257/*********************************************************************
4258 * system (CRTDLL.482)
4259 */
4260int CDECL CRTDLL_system( const char *string )
4261{
4262 dprintf(("CRTDLL: system\n"));
4263 return system(string);
4264}
4265
4266
4267/*********************************************************************
4268 * tanh (CRTDLL.485)
4269 */
4270double CDECL CRTDLL_tanh( double x )
4271{
4272 dprintf(("CRTDLL: tanh\n"));
4273 return tanh(x);
4274}
4275
4276
4277/*********************************************************************
4278 * time (CRTDLL.485)
4279 */
4280time_t CDECL CRTDLL_time( time_t *timer )
4281{
4282 dprintf(("CRTDLL: time\n"));
4283
4284 return time(timer);
4285}
4286
4287
4288/*********************************************************************
4289 * tmpfile (CRTDLL.486)
4290 */
4291FILE * CDECL CRTDLL_tmpfile( void )
4292{
4293 dprintf(("CRTDLL: tmpfile\n"));
4294 return (tmpfile());
4295}
4296
4297
4298/*********************************************************************
4299 * tmpnam (CRTDLL.487)
4300 */
4301char * CDECL CRTDLL_tmpnam( char *s )
4302{
4303 dprintf(("CRTDLL: tmpnam\n"));
4304 return (tmpnam(s));
4305}
4306
4307
4308/*********************************************************************
4309 * ungetc (CRTDLL.492)
4310 */
4311INT CDECL CRTDLL_ungetc(int c)
4312{
4313 dprintf(("CRTDLL: ungetc not implemented.\n"));
4314 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4315 return FALSE;
4316}
4317
4318
4319/*********************************************************************
4320 * ungetwc (CRTDLL.493)
4321 */
4322wint_t CDECL CRTDLL_ungetwc( wint_t wc, FILE *strm )
4323{
4324 dprintf(("CRTDLL: ungetwc\n"));
4325 return (ungetwc(wc, strm));
4326}
4327
4328
4329/*********************************************************************
4330 * vfprintf (CRTDLL.494)
4331 */
4332INT CDECL CRTDLL_vfprintf( CRTDLL_FILE *file, LPSTR format, va_list args )
4333{
4334 dprintf(("CRTDLL: vprintf\n"));
4335 char buffer[2048]; /* FIXME... */
4336 vsprintf( buffer, format, args );
4337 return CRTDLL_fwrite( buffer, 1, strlen(buffer), file );
4338}
4339
4340
4341/*********************************************************************
4342 * vfwprintf (CRTDLL.495)
4343 */
4344int CDECL CRTDLL_vfwprintf( FILE *F, const wchar_t *s, va_list arg )
4345{
4346 dprintf(("CRTDLL: vfwprintf not implemented.\n"));
4347 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4348 return FALSE;
4349}
4350
4351
4352/*********************************************************************
4353 * vprintf (CRTDLL.496)
4354 */
4355int CDECL CRTDLL_vprintf( const char *format, __va_list arg )
4356{
4357 dprintf(("CRTDLL: vprintf\n"));
4358 return (vprintf(format, arg));
4359}
4360
4361
4362/*********************************************************************
4363 * vswprintf (CRTDLL.498)
4364 */
4365int CDECL CRTDLL_vswprintf( wchar_t *s , size_t t, const wchar_t *format, va_list arg )
4366{
4367 dprintf(("CRTDLL: vswprintf\n"));
4368 return (vswprintf(s, t, format, arg));
4369}
4370
4371
4372/*********************************************************************
4373 * vwprintf (CRTDLL.499)
4374 */
4375int CDECL CRTDLL_vwprintf( const wchar_t *s, va_list arg)
4376{
4377 dprintf(("CRTDLL: vwprintf not implemented.\n"));
4378 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4379 return FALSE;
4380}
4381
4382
4383/*********************************************************************
4384 * wcscoll (CRTDLL.503)
4385 */
4386int CDECL CRTDLL_wcscoll(const wchar_t *s1, const wchar_t *s2)
4387{
4388 dprintf(("CRTDLL: wcscoll\n"));
4389 return (wcscoll(s1, s2));
4390}
4391
4392
4393/*********************************************************************
4394 * wcsftime (CRTDLL.506)
4395 */
4396size_t CDECL CRTDLL_wcsftime( wchar_t *s, size_t maxsize,
4397 const wchar_t *format, const struct tm *timeptr )
4398{
4399 dprintf(("CRTDLL: wcsftime\n"));
4400 return (wcsftime(s, maxsize, format, timeptr));
4401}
4402
4403
4404/*********************************************************************
4405 * wcstod (CRTDLL.515)
4406 */
4407double CDECL CRTDLL_wcstod( const wchar_t *nptr, wchar_t **endptr )
4408{
4409 dprintf(("CRTDLL: wcstod\n"));
4410 return (wcstod(nptr, endptr));
4411}
4412
4413
4414/*********************************************************************
4415 * wcsxfrm (CRTDLL.520)
4416 */
4417size_t CDECL CRTDLL_wcsxfrm( wchar_t *s1, const wchar_t *s2, size_t n )
4418{
4419 dprintf(("CRTDLL: wcsxfrm\n"));
4420 return (wcsxfrm(s1, s2, n));
4421}
4422
4423
4424/*********************************************************************
4425 * wcstomb (CRTDLL.521)
4426 */
4427int CDECL CRTDLL_wctomb( char *s, wchar_t wchar )
4428{
4429 dprintf(("CRTDLL: wctomb\n"));
4430 return (wctomb(s,wchar));
4431}
4432
4433
4434/*********************************************************************
4435 * wprintf (CRTDLL.522)
4436 */
4437int CDECL CRTDLL_wprintf( const wchar_t *s, ... )
4438{
4439 dprintf(("CRTDLL: wprintf not implemented.\n"));
4440 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4441 return FALSE;
4442}
4443
4444
4445/*********************************************************************
4446 * wscanf (CRTDLL.523)
4447 */
4448int CDECL CRTDLL_wscanf( const wchar_t *s, ... )
4449{
4450 dprintf(("CRTDLL: wscanf not implemented.\n"));
4451 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
4452 return FALSE;
4453}
Note: See TracBrowser for help on using the repository browser.