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

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

Jens Weissner's changes (all functions included)

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