1 | /*
|
---|
2 | * The C RunTime DLL
|
---|
3 | *
|
---|
4 | * Implements C run-time functionality as known from UNIX.
|
---|
5 | *
|
---|
6 | * TODO:
|
---|
7 | * - Check setjmp(3)
|
---|
8 | * - fix *ALL* functions for the FS: wrapper problem
|
---|
9 | *
|
---|
10 | * Partialy based on Wine
|
---|
11 | *
|
---|
12 | * Copyright 1996,1998 Marcus Meissner
|
---|
13 | * Copyright 1996 Jukka Iivonen
|
---|
14 | * Copyright 1997 Uwe Bonnes
|
---|
15 | * Copyright 1999-2000 Jens Wiessner
|
---|
16 | * Copyright 2000 Przemyslaw Dobrowolski
|
---|
17 | */
|
---|
18 |
|
---|
19 |
|
---|
20 | #include <odin.h>
|
---|
21 | #include <odinwrap.h>
|
---|
22 | #include <os2sel.h>
|
---|
23 |
|
---|
24 |
|
---|
25 |
|
---|
26 | #include <os2win.h>
|
---|
27 | #include <stdio.h>
|
---|
28 | #include <stdlib.h>
|
---|
29 | #include <string.h>
|
---|
30 | #include <misc.h>
|
---|
31 | #include <unicode.h>
|
---|
32 | #include <heapstring.h>
|
---|
33 | #include <ctype.h>
|
---|
34 | #include <setjmp.h>
|
---|
35 | #include <ntddk.h>
|
---|
36 | #include <debugtools.h>
|
---|
37 |
|
---|
38 | #include <math.h>
|
---|
39 | #include <libc\locale.h>
|
---|
40 | #include <signal.h>
|
---|
41 | #include <io.h>
|
---|
42 | #include <assert.h>
|
---|
43 | #include <process.h>
|
---|
44 | #include <float.h>
|
---|
45 | #include <conio.h>
|
---|
46 | #include <direct.h>
|
---|
47 | #include <malloc.h>
|
---|
48 | #include <drive.h>
|
---|
49 | #include <fcntl.h>
|
---|
50 | #include <search.h>
|
---|
51 | #include <heap.h>
|
---|
52 | #include <errno.h>
|
---|
53 | #include <sys\utime.h>
|
---|
54 | #include <sys\timeb.h>
|
---|
55 | #include <sys\stat.h>
|
---|
56 | #include "signal.h"
|
---|
57 | #include <time.h>
|
---|
58 |
|
---|
59 | #include <crtdll.h>
|
---|
60 | // #include <ieee.h>
|
---|
61 | #include <asmhlp.h>
|
---|
62 | #include "crtinc.h"
|
---|
63 |
|
---|
64 |
|
---|
65 | ODINDEBUGCHANNEL(CRTDLL)
|
---|
66 |
|
---|
67 | #undef dprintf2
|
---|
68 | #define dprintf2 dprintf
|
---|
69 |
|
---|
70 |
|
---|
71 | //
|
---|
72 | // Definitions for internal functions
|
---|
73 | //
|
---|
74 | void qsort1 (char*, char*, size_t,
|
---|
75 | int (* CDECL)(const void*, const void*));
|
---|
76 |
|
---|
77 |
|
---|
78 |
|
---|
79 | /*********************************************************************
|
---|
80 | * _CIacos (CRTDLL.004)
|
---|
81 | */
|
---|
82 | double CDECL CRTDLL__CIacos()
|
---|
83 | {
|
---|
84 | double x;
|
---|
85 | dprintf2(("CRTDLL: _CIacos\n"));
|
---|
86 | POP_FPU(x);
|
---|
87 | return acos(x);
|
---|
88 | }
|
---|
89 |
|
---|
90 |
|
---|
91 | /*********************************************************************
|
---|
92 | * _CIasin (CRTDLL.005)
|
---|
93 | */
|
---|
94 | double CDECL CRTDLL__CIasin()
|
---|
95 | {
|
---|
96 | double x;
|
---|
97 | dprintf2(("CRTDLL: _CIasin\n"));
|
---|
98 | POP_FPU(x);
|
---|
99 | return asin(x);
|
---|
100 | }
|
---|
101 |
|
---|
102 |
|
---|
103 | /*********************************************************************
|
---|
104 | * _CIatan (CRTDLL.006)
|
---|
105 | */
|
---|
106 | double CDECL CRTDLL__CIatan()
|
---|
107 | {
|
---|
108 | double x;
|
---|
109 | dprintf2(("CRTDLL: _CIatan\n"));
|
---|
110 | POP_FPU(x);
|
---|
111 | return atan(x);
|
---|
112 | }
|
---|
113 |
|
---|
114 |
|
---|
115 | /*********************************************************************
|
---|
116 | * _CIatan2 (CRTDLL.007)
|
---|
117 | */
|
---|
118 | double CDECL CRTDLL__CIatan2()
|
---|
119 | {
|
---|
120 | double x, y;
|
---|
121 | dprintf2(("CRTDLL: _CIatan2\n"));
|
---|
122 | POP_FPU(y);
|
---|
123 | POP_FPU(x);
|
---|
124 | return atan2(x,y);
|
---|
125 | }
|
---|
126 |
|
---|
127 |
|
---|
128 | /*********************************************************************
|
---|
129 | * _CIcos (CRTDLL.008)
|
---|
130 | */
|
---|
131 | double CDECL CRTDLL__CIcos()
|
---|
132 | {
|
---|
133 | double x;
|
---|
134 | dprintf2(("CRTDLL: _CIcos\n"));
|
---|
135 | POP_FPU(x);
|
---|
136 | return cos(x);
|
---|
137 | }
|
---|
138 |
|
---|
139 |
|
---|
140 | /*********************************************************************
|
---|
141 | * _CIcosh (CRTDLL.009)
|
---|
142 | */
|
---|
143 | double CDECL CRTDLL__CIcosh()
|
---|
144 | {
|
---|
145 | double x;
|
---|
146 | dprintf2(("CRTDLL: _CIcosh\n"));
|
---|
147 | POP_FPU(x);
|
---|
148 | return cosh(x);
|
---|
149 | }
|
---|
150 |
|
---|
151 |
|
---|
152 | /*********************************************************************
|
---|
153 | * _CIexp (CRTDLL.010)
|
---|
154 | */
|
---|
155 | double CDECL CRTDLL__CIexp()
|
---|
156 | {
|
---|
157 | double x;
|
---|
158 | dprintf2(("CRTDLL: _CIexp\n"));
|
---|
159 | POP_FPU(x);
|
---|
160 | return exp(x);
|
---|
161 | }
|
---|
162 |
|
---|
163 |
|
---|
164 | /*********************************************************************
|
---|
165 | * _CIfmod (CRTDLL.011)
|
---|
166 | */
|
---|
167 | double CDECL CRTDLL__CIfmod( )
|
---|
168 | {
|
---|
169 | double x, y;
|
---|
170 | dprintf2(("CRTDLL: _CIfmod\n"));
|
---|
171 | POP_FPU(y);
|
---|
172 | POP_FPU(x);
|
---|
173 | return fmod(x,y);
|
---|
174 | }
|
---|
175 |
|
---|
176 |
|
---|
177 | /*********************************************************************
|
---|
178 | * _CIlog (CRTDLL.012)
|
---|
179 | */
|
---|
180 | double CDECL CRTDLL__CIlog()
|
---|
181 | {
|
---|
182 | double x;
|
---|
183 | dprintf2(("CRTDLL: _CIlog\n"));
|
---|
184 | POP_FPU(x);
|
---|
185 | return log(x);
|
---|
186 | }
|
---|
187 |
|
---|
188 |
|
---|
189 | /*********************************************************************
|
---|
190 | * _CIlog10 (CRTDLL.013)
|
---|
191 | */
|
---|
192 | double CDECL CRTDLL__CIlog10()
|
---|
193 | {
|
---|
194 | double x;
|
---|
195 | dprintf2(("CRTDLL: _CIlog10\n"));
|
---|
196 | POP_FPU(x);
|
---|
197 | return log10(x);
|
---|
198 | }
|
---|
199 |
|
---|
200 |
|
---|
201 | /*********************************************************************
|
---|
202 | * _CIpow (CRTDLL.014)
|
---|
203 | */
|
---|
204 | LONG CDECL CRTDLL__CIpow()
|
---|
205 | {
|
---|
206 | double x,y;
|
---|
207 | dprintf2(("CRTDLL: _CIpow\n"));
|
---|
208 | POP_FPU(y);
|
---|
209 | POP_FPU(x);
|
---|
210 | return pow(x,y);
|
---|
211 | }
|
---|
212 |
|
---|
213 |
|
---|
214 |
|
---|
215 |
|
---|
216 | /*********************************************************************
|
---|
217 | * _CIsin (CRTDLL.015)
|
---|
218 | */
|
---|
219 | double CDECL CRTDLL__CIsin()
|
---|
220 | {
|
---|
221 | double x;
|
---|
222 | dprintf2(("CRTDLL: _CIsin\n"));
|
---|
223 | POP_FPU(x);
|
---|
224 | return sin(x);
|
---|
225 | }
|
---|
226 |
|
---|
227 |
|
---|
228 | /*********************************************************************
|
---|
229 | * _CIsinh (CRTDLL.016)
|
---|
230 | */
|
---|
231 | double CDECL CRTDLL__CIsinh()
|
---|
232 | {
|
---|
233 | double x;
|
---|
234 | dprintf2(("CRTDLL: _CIsinh\n"));
|
---|
235 | POP_FPU(x);
|
---|
236 | return sinh(x);
|
---|
237 | }
|
---|
238 |
|
---|
239 |
|
---|
240 | /*********************************************************************
|
---|
241 | * _CIsqrt (CRTDLL.017)
|
---|
242 | */
|
---|
243 | double CDECL CRTDLL__CIsqrt()
|
---|
244 | {
|
---|
245 | double x;
|
---|
246 | dprintf2(("CRTDLL: _CIsqrt\n"));
|
---|
247 | POP_FPU(x);
|
---|
248 | return sqrt(x);
|
---|
249 | }
|
---|
250 |
|
---|
251 |
|
---|
252 | /*********************************************************************
|
---|
253 | * _CItan (CRTDLL.018)
|
---|
254 | */
|
---|
255 | double CDECL CRTDLL__CItan()
|
---|
256 | {
|
---|
257 | double x;
|
---|
258 | dprintf2(("CRTDLL: _CItan\n"));
|
---|
259 | POP_FPU(x);
|
---|
260 | return tan(x);
|
---|
261 | }
|
---|
262 |
|
---|
263 |
|
---|
264 | /*********************************************************************
|
---|
265 | * _CItanh (CRTDLL.019)
|
---|
266 | */
|
---|
267 | double CDECL CRTDLL__CItanh()
|
---|
268 | {
|
---|
269 | double x;
|
---|
270 | dprintf2(("CRTDLL: _CItanh\n"));
|
---|
271 | POP_FPU(x);
|
---|
272 | return tanh(x);
|
---|
273 | }
|
---|
274 |
|
---|
275 |
|
---|
276 | /*********************************************************************
|
---|
277 | * _XcptFilter (CRTDLL.21)
|
---|
278 | */
|
---|
279 | INT CDECL CRTDLL__XcptFilter(DWORD ret, struct _EXCEPTION_POINTERS * ExceptionInfo )
|
---|
280 | {
|
---|
281 | dprintf2(("CRTDLL: _XcptFilter\n"));
|
---|
282 | return UnhandledExceptionFilter(ExceptionInfo);
|
---|
283 | }
|
---|
284 |
|
---|
285 |
|
---|
286 | /*********************************************************************
|
---|
287 | * CRTDLL___threadhandle (CRTDLL.33)
|
---|
288 | */
|
---|
289 | unsigned long CDECL CRTDLL___threadhandle( void )
|
---|
290 | {
|
---|
291 | dprintf2(("CRTDLL: __threadhandle\n"));
|
---|
292 | return GetCurrentThread();
|
---|
293 | }
|
---|
294 |
|
---|
295 |
|
---|
296 | /*********************************************************************
|
---|
297 | * CRTDLL___threadid (CRTDLL.34)
|
---|
298 | */
|
---|
299 | unsigned long CDECL CRTDLL___threadid(void)
|
---|
300 | {
|
---|
301 | dprintf2(("CRTDLL: __threadid\n"));
|
---|
302 | return GetCurrentThreadId();
|
---|
303 | }
|
---|
304 |
|
---|
305 |
|
---|
306 | /*********************************************************************
|
---|
307 | * _beginthread (CRTDLL.46)
|
---|
308 | */
|
---|
309 | int CDECL CRTDLL__beginthread (void (*start)(void *arg), void *stack, unsigned stack_size,
|
---|
310 | void *arg_list)
|
---|
311 | {
|
---|
312 | dprintf(("CRTDLL: _beginthread\n"));
|
---|
313 | /*
|
---|
314 | ULONG rc;
|
---|
315 | TID tid;
|
---|
316 | struct _thread *tp;
|
---|
317 | tp = __alloc_thread ();
|
---|
318 | if (tp == NULL)
|
---|
319 | {
|
---|
320 | errno = ENOMEM;
|
---|
321 | return -1;
|
---|
322 | }
|
---|
323 | tp->_th_start = start;
|
---|
324 | tp->_th_arg = arg_list;
|
---|
325 | rc = DosCreateThread (&tid, (PFNTHREAD)start_thread, (ULONG)tp,
|
---|
326 | 3, stack_size);
|
---|
327 | if (rc != 0)
|
---|
328 | {
|
---|
329 | if (rc == ERROR_NOT_ENOUGH_MEMORY)
|
---|
330 | errno = ENOMEM;
|
---|
331 | else if (rc == ERROR_MAX_THRDS_REACHED)
|
---|
332 | errno = EAGAIN;
|
---|
333 | else
|
---|
334 | errno = EINVAL;
|
---|
335 | DosFreeMem (tp);
|
---|
336 | return -1;
|
---|
337 | }
|
---|
338 | if (tid > MAX_THREADS)
|
---|
339 | {
|
---|
340 | DosKillThread (tid);
|
---|
341 | errno = EAGAIN;
|
---|
342 | DosFreeMem (tp);
|
---|
343 | return -1;
|
---|
344 | }
|
---|
345 | if (__newthread (tid) != 0)
|
---|
346 | {
|
---|
347 | DosKillThread (tid);
|
---|
348 | DosFreeMem (tp);
|
---|
349 | return -1;
|
---|
350 | }
|
---|
351 | _thread_tab[tid] = tp;
|
---|
352 | rc = DosResumeThread (tid);
|
---|
353 | if (rc != 0)
|
---|
354 | {
|
---|
355 | errno = ESRCH;
|
---|
356 | DosFreeMem (tp);
|
---|
357 | return -1;
|
---|
358 | }
|
---|
359 | return tid;
|
---|
360 | */
|
---|
361 | return 0;
|
---|
362 | }
|
---|
363 |
|
---|
364 |
|
---|
365 | /*********************************************************************
|
---|
366 | * CRTDLL__cgets (CRTDLL.50)
|
---|
367 | */
|
---|
368 | char * CDECL CRTDLL__cgets( char *s )
|
---|
369 | {
|
---|
370 | dprintf2(("CRTDLL: _cgets\n"));
|
---|
371 | return (_cgets(s));
|
---|
372 | }
|
---|
373 |
|
---|
374 |
|
---|
375 | /*********************************************************************
|
---|
376 | * CRTDLL__chmod (CRTDLL.54)
|
---|
377 | */
|
---|
378 | int CDECL CRTDLL__chmod( const char *s, int i)
|
---|
379 | {
|
---|
380 | dprintf2(("CRTDLL: _chmod\n"));
|
---|
381 | return (_chmod(s, i));
|
---|
382 | }
|
---|
383 |
|
---|
384 |
|
---|
385 | /*********************************************************************
|
---|
386 | * CRTDLL__chsize (CRTDLL.55)
|
---|
387 | */
|
---|
388 | int CDECL CRTDLL__chsize( int i, long l )
|
---|
389 | {
|
---|
390 | dprintf2(("CRTDLL: _chsize\n"));
|
---|
391 | return (_chsize(i, l));
|
---|
392 | }
|
---|
393 |
|
---|
394 |
|
---|
395 | /*********************************************************************
|
---|
396 | * CRTDLL__clearfp (CRTDLL.56)
|
---|
397 | */
|
---|
398 | unsigned int CDECL CRTDLL__clearfp( void )
|
---|
399 | {
|
---|
400 | dprintf2(("CRTDLL: _clearfp\n"));
|
---|
401 | return (_clear87());
|
---|
402 | }
|
---|
403 |
|
---|
404 |
|
---|
405 | /*********************************************************************
|
---|
406 | * CRTDLL__control87 (CRTDLL.60)
|
---|
407 | */
|
---|
408 | unsigned CDECL CRTDLL__control87(unsigned i1,unsigned i2)
|
---|
409 | {
|
---|
410 | dprintf2(("CRTDLL: _control87\n"));
|
---|
411 | return (_control87(i1, i2));
|
---|
412 | }
|
---|
413 |
|
---|
414 |
|
---|
415 | /*********************************************************************
|
---|
416 | * CRTDLL__controlfp (CRTDLL.61)
|
---|
417 | */
|
---|
418 | unsigned CDECL CRTDLL__controlfp(unsigned i1,unsigned i2)
|
---|
419 | {
|
---|
420 | dprintf2(("CRTDLL: _controlfp\n"));
|
---|
421 | return (_control87(i1, i2));
|
---|
422 | }
|
---|
423 |
|
---|
424 |
|
---|
425 | /*********************************************************************
|
---|
426 | * _cprintf (CRTDLL.63)
|
---|
427 | */
|
---|
428 | INT CDECL CRTDLL__cprintf( char *fmt, va_list arg )
|
---|
429 | {
|
---|
430 | dprintf2(("CRTDLL: _cprintf.\n"));
|
---|
431 | return (_cprintf(fmt, arg));
|
---|
432 | }
|
---|
433 |
|
---|
434 |
|
---|
435 | /*********************************************************************
|
---|
436 | * CRTDLL__cputs (CRTDLL.65)
|
---|
437 | */
|
---|
438 | INT CDECL CRTDLL__cputs( char * s )
|
---|
439 | {
|
---|
440 | dprintf2(("CRTDLL: _cputs\n"));
|
---|
441 | return (_cputs(s));
|
---|
442 | }
|
---|
443 |
|
---|
444 |
|
---|
445 | /*********************************************************************
|
---|
446 | * _cscanf (CRTDLL.67)
|
---|
447 | */
|
---|
448 | INT CDECL CRTDLL__cscanf( char *s, va_list arg )
|
---|
449 | {
|
---|
450 | dprintf(("CRTDLL: _cscanf\n"));
|
---|
451 | return (_cscanf(s, arg));
|
---|
452 | }
|
---|
453 |
|
---|
454 |
|
---|
455 | /*********************************************************************
|
---|
456 | * CRTDLL__cwait (CRTDLL.69)
|
---|
457 | */
|
---|
458 | int CDECL CRTDLL__cwait( int *status, int process_id, int action_code )
|
---|
459 | {
|
---|
460 | dprintf2(("CRTDLL: _cwait\n"));
|
---|
461 | return (_cwait(status, process_id, action_code));
|
---|
462 | }
|
---|
463 |
|
---|
464 |
|
---|
465 | /*********************************************************************
|
---|
466 | * CRTDLL__dup (CRTDLL.71)
|
---|
467 | */
|
---|
468 | int CDECL CRTDLL__dup(int handle)
|
---|
469 | {
|
---|
470 | dprintf2(("CRTDLL: _dup\n"));
|
---|
471 | return (_dup(handle));
|
---|
472 | }
|
---|
473 |
|
---|
474 |
|
---|
475 | /*********************************************************************
|
---|
476 | * CRTDLL__dup2 (CRTDLL.72)
|
---|
477 | */
|
---|
478 | int CDECL CRTDLL__dup2(int handle1,int handle2)
|
---|
479 | {
|
---|
480 | dprintf2(("CRTDLL: _dup2\n"));
|
---|
481 | return (_dup2(handle1, handle2));
|
---|
482 | }
|
---|
483 |
|
---|
484 |
|
---|
485 | /*********************************************************************
|
---|
486 | * CRTDLL__ecvt (CRTDLL.73)
|
---|
487 | */
|
---|
488 | char * CDECL CRTDLL__ecvt( double val, int ndig, int *dec, int *sign )
|
---|
489 | {
|
---|
490 | dprintf2(("CRTDLL: _ecvt\n"));
|
---|
491 | return (_ecvt(val, ndig, dec, sign));
|
---|
492 | }
|
---|
493 |
|
---|
494 |
|
---|
495 | /*********************************************************************
|
---|
496 | * CRTDLL__endthread (CRTDLL.74)
|
---|
497 | */
|
---|
498 | void CDECL CRTDLL__endthread(void)
|
---|
499 | {
|
---|
500 | dprintf2(("CRTDLL: _endthread\n"));
|
---|
501 | _endthread ();
|
---|
502 | }
|
---|
503 |
|
---|
504 |
|
---|
505 | /*********************************************************************
|
---|
506 | * _execl (CRTDLL.79)
|
---|
507 | */
|
---|
508 | int CDECL CRTDLL__execl(char* szPath, char* szArgv0, va_list arg)
|
---|
509 | {
|
---|
510 | dprintf2(("CRTDLL: _execl\n"));
|
---|
511 | return (_execl(szPath, szArgv0, arg));
|
---|
512 | }
|
---|
513 |
|
---|
514 |
|
---|
515 | /*********************************************************************
|
---|
516 | * _execle (CRTDLL.80)
|
---|
517 | */
|
---|
518 | int CDECL CRTDLL__execle(char *path, char *szArgv0, va_list arg)
|
---|
519 | {
|
---|
520 | dprintf2(("CRTDLL: _execle\n"));
|
---|
521 | return (_execle(path, szArgv0, arg));
|
---|
522 | }
|
---|
523 |
|
---|
524 |
|
---|
525 | /*********************************************************************
|
---|
526 | * CRTDLL__execlp (CRTDLL.81)
|
---|
527 | */
|
---|
528 | int CDECL CRTDLL__execlp( char *szPath, char *szArgv0, va_list arg)
|
---|
529 | {
|
---|
530 | dprintf2(("CRTDLL: _execlp\n"));
|
---|
531 | return (_execlp(szPath, szArgv0, arg));
|
---|
532 | }
|
---|
533 |
|
---|
534 |
|
---|
535 | /*********************************************************************
|
---|
536 | * CRTDLL__execlpe (CRTDLL.82)
|
---|
537 | */
|
---|
538 | int CDECL CRTDLL__execlpe( char *path, char *szArgv0, va_list arg)
|
---|
539 | {
|
---|
540 | dprintf2(("CRTDLL: _execlpe\n"));
|
---|
541 | return (_execlpe(path, szArgv0, arg));
|
---|
542 | }
|
---|
543 |
|
---|
544 |
|
---|
545 | /*********************************************************************
|
---|
546 | * CRTDLL__execv (CRTDLL.83)
|
---|
547 | */
|
---|
548 | int CDECL CRTDLL__execv( char *s1, char **s2)
|
---|
549 | {
|
---|
550 | dprintf2(("CRTDLL: _execv\n"));
|
---|
551 | return (_execv(s1, s2));
|
---|
552 | }
|
---|
553 |
|
---|
554 |
|
---|
555 | /*********************************************************************
|
---|
556 | * CRTDLL__execve (CRTDLL.84)
|
---|
557 | */
|
---|
558 | int CDECL CRTDLL__execve( char *s1, char **s2, char **s3)
|
---|
559 | {
|
---|
560 | dprintf2(("CRTDLL: _execve\n"));
|
---|
561 | return (_execve(s1, s2, s3));
|
---|
562 | }
|
---|
563 |
|
---|
564 |
|
---|
565 | /*********************************************************************
|
---|
566 | * CRTDLL__execvp (CRTDLL.85)
|
---|
567 | */
|
---|
568 | int CDECL CRTDLL__execvp( char *s1, char **s2)
|
---|
569 | {
|
---|
570 | dprintf2(("CRTDLL: _execvp\n"));
|
---|
571 | return (_execvp(s1, s2));
|
---|
572 | }
|
---|
573 |
|
---|
574 |
|
---|
575 | /*********************************************************************
|
---|
576 | * CRTDLL__execvpe (CRTDLL.86)
|
---|
577 | */
|
---|
578 | int CDECL CRTDLL__execvpe( char *s1, char **s2, char **s3)
|
---|
579 | {
|
---|
580 | dprintf2(("CRTDLL: _execvpe\n"));
|
---|
581 | return (_execvpe(s1, s2, s3));
|
---|
582 | }
|
---|
583 |
|
---|
584 |
|
---|
585 | /*********************************************************************
|
---|
586 | * _fcvt (CRTDLL.90)
|
---|
587 | */
|
---|
588 | char * CDECL CRTDLL__fcvt( double val, int ndig, int *dec, int *sign )
|
---|
589 | {
|
---|
590 | dprintf2(("CRTDLL: _fcvt\n"));
|
---|
591 | return (_fcvt(val, ndig, dec, sign));
|
---|
592 | }
|
---|
593 |
|
---|
594 |
|
---|
595 | /*********************************************************************
|
---|
596 | * CRTDLL__filelength (CRTDLL.96)
|
---|
597 | */
|
---|
598 | long CDECL CRTDLL__filelength( int i )
|
---|
599 | {
|
---|
600 | dprintf2(("CRTDLL: _filelength\n"));
|
---|
601 | return (_filelength(i));
|
---|
602 | }
|
---|
603 |
|
---|
604 |
|
---|
605 | /*********************************************************************
|
---|
606 | * _ftime (CRTDLL.112)
|
---|
607 | */
|
---|
608 | void CDECL CRTDLL__ftime( struct timeb *timebuf )
|
---|
609 | {
|
---|
610 | dprintf(("CRTDLL: _ftime\n"));
|
---|
611 | _ftime(timebuf);
|
---|
612 | }
|
---|
613 |
|
---|
614 |
|
---|
615 | /*********************************************************************
|
---|
616 | * _ftol (CRTDLL.113)
|
---|
617 | */
|
---|
618 | LONG CDECL CRTDLL__ftol(void)
|
---|
619 | {
|
---|
620 | /* don't just do DO_FPU("fistp",retval), because the rounding
|
---|
621 | * mode must also be set to "round towards zero"... */
|
---|
622 | double fl;
|
---|
623 | POP_FPU(fl);
|
---|
624 | return (LONG)fl;
|
---|
625 | }
|
---|
626 |
|
---|
627 |
|
---|
628 | /*********************************************************************
|
---|
629 | * _gcvt (CRTDLL.116)
|
---|
630 | */
|
---|
631 | char * CDECL CRTDLL__gcvt( double val, int ndig, char *buf )
|
---|
632 | {
|
---|
633 | dprintf2(("CRTDLL: _gcvt\n"));
|
---|
634 | return (_gcvt(val, ndig, buf));
|
---|
635 | }
|
---|
636 |
|
---|
637 |
|
---|
638 | /*********************************************************************
|
---|
639 | * _getch (CRTDLL.118)
|
---|
640 | */
|
---|
641 | int CDECL CRTDLL__getch(void)
|
---|
642 | {
|
---|
643 | dprintf2(("CRTDLL: _getch\n"));
|
---|
644 | return (_getch());
|
---|
645 | }
|
---|
646 |
|
---|
647 |
|
---|
648 | /*********************************************************************
|
---|
649 | * _getche (CRTDLL.119)
|
---|
650 | */
|
---|
651 | int CDECL CRTDLL__getche(void)
|
---|
652 | {
|
---|
653 | dprintf2(("CRTDLL: _getche\n"));
|
---|
654 | return (_getche());
|
---|
655 | }
|
---|
656 |
|
---|
657 |
|
---|
658 | /*********************************************************************
|
---|
659 | * _getdrives (CRTDLL.125)
|
---|
660 | */
|
---|
661 | unsigned long CDECL CRTDLL__getdrives(void)
|
---|
662 | {
|
---|
663 | dprintf2(("CRTDLL: _getdrives\n"));
|
---|
664 | return GetLogicalDrives();
|
---|
665 | }
|
---|
666 |
|
---|
667 |
|
---|
668 | /*********************************************************************
|
---|
669 | * _getpid (CRTDLL.126)
|
---|
670 | */
|
---|
671 | int CDECL CRTDLL__getpid( void )
|
---|
672 | {
|
---|
673 | dprintf2(("CRTDLL: _getpid\n"));
|
---|
674 | return (_getpid());
|
---|
675 | }
|
---|
676 |
|
---|
677 |
|
---|
678 | /*********************************************************************
|
---|
679 | * _getsystime (CRTDLL.127)
|
---|
680 | */
|
---|
681 | unsigned int CDECL CRTDLL__getsystime(struct tm *tp)
|
---|
682 | {
|
---|
683 | SYSTEMTIME systemtime;
|
---|
684 |
|
---|
685 | GetLocalTime(&systemtime);
|
---|
686 |
|
---|
687 | tp->tm_isdst = -1; // FIXME: I don't know is there a correct value
|
---|
688 | tp->tm_sec = systemtime.wSecond;
|
---|
689 | tp->tm_min = systemtime.wMinute;
|
---|
690 | tp->tm_hour = systemtime.wHour;
|
---|
691 | tp->tm_mday = systemtime.wDay;
|
---|
692 | tp->tm_mon = systemtime.wMonth - 1;
|
---|
693 | // struct tm has time from 1900 -> 2000 = 100
|
---|
694 | tp->tm_year = systemtime.wYear - 1900;
|
---|
695 | tp->tm_wday = systemtime.wDayOfWeek;
|
---|
696 |
|
---|
697 | mktime(tp);
|
---|
698 |
|
---|
699 | return (0); // FIXME: What Can we return??
|
---|
700 | }
|
---|
701 |
|
---|
702 |
|
---|
703 | /*********************************************************************
|
---|
704 | * _getw (CRTDLL.128)
|
---|
705 | */
|
---|
706 | int CDECL CRTDLL__getw( FILE *stream )
|
---|
707 | {
|
---|
708 | dprintf2(("CRTDLL: _getw\n"));
|
---|
709 | int x;
|
---|
710 | return (fread (&x, sizeof (x), 1, stream) == 1 ? x : EOF);
|
---|
711 | }
|
---|
712 |
|
---|
713 |
|
---|
714 | /*********************************************************************
|
---|
715 | * _hypot (CRTDLL.134)
|
---|
716 | */
|
---|
717 | double CDECL CRTDLL__hypot(double x1, double x2)
|
---|
718 | {
|
---|
719 | dprintf2(("CRTDLL: _hypot\n"));
|
---|
720 | return (_hypot(x1, x2));
|
---|
721 | }
|
---|
722 |
|
---|
723 |
|
---|
724 | /*********************************************************************
|
---|
725 | * _itoa (CRTDLL.165)
|
---|
726 | */
|
---|
727 | char * CDECL CRTDLL__itoa(int i, char *s, int r)
|
---|
728 | {
|
---|
729 | dprintf2(("CRTDLL: _itoa(%08xh, %08xh, %08xh)\n",
|
---|
730 | i,
|
---|
731 | s,
|
---|
732 | r));
|
---|
733 |
|
---|
734 | return (itoa(i,s,r));
|
---|
735 | }
|
---|
736 |
|
---|
737 | /*********************************************************************
|
---|
738 | * _j0 (CRTDLL.166)
|
---|
739 | */
|
---|
740 | double CDECL CRTDLL__j0(double x)
|
---|
741 | {
|
---|
742 | dprintf2(("CRTDLL: _j0\n"));
|
---|
743 | return (_j0(x));
|
---|
744 | }
|
---|
745 |
|
---|
746 |
|
---|
747 | /*********************************************************************
|
---|
748 | * _j1 (CRTDLL.167)
|
---|
749 | */
|
---|
750 | double CDECL CRTDLL__j1(double x)
|
---|
751 | {
|
---|
752 | dprintf2(("CRTDLL: _j1\n"));
|
---|
753 | return (_j1(x));}
|
---|
754 |
|
---|
755 |
|
---|
756 | /*********************************************************************
|
---|
757 | * _jn (CRTDLL.168)
|
---|
758 | */
|
---|
759 | double CDECL CRTDLL__jn(int i, double x)
|
---|
760 | {
|
---|
761 | dprintf2(("CRTDLL: _jn\n"));
|
---|
762 | return (_jn(i, x));
|
---|
763 | }
|
---|
764 |
|
---|
765 |
|
---|
766 | /*********************************************************************
|
---|
767 | * _kbhit (CRTDLL.169)
|
---|
768 | */
|
---|
769 | int CDECL CRTDLL__kbhit( void )
|
---|
770 | {
|
---|
771 | dprintf2(("CRTDLL: _kbhit\n"));
|
---|
772 | return (_kbhit());
|
---|
773 | }
|
---|
774 |
|
---|
775 |
|
---|
776 | /*********************************************************************
|
---|
777 | * _ltoa (CRTDLL.179)
|
---|
778 | */
|
---|
779 | LPSTR CDECL CRTDLL__ltoa(long x,LPSTR buf,INT radix)
|
---|
780 | {
|
---|
781 | return ltoa(x,buf,radix);
|
---|
782 | }
|
---|
783 |
|
---|
784 |
|
---|
785 | /*********************************************************************
|
---|
786 | * _matherr (CRTDLL.181)
|
---|
787 | */
|
---|
788 | double CDECL CRTDLL__matherr( struct exception * excep )
|
---|
789 | {
|
---|
790 | dprintf2(("CRTDLL: _matherr\n"));
|
---|
791 | return (_matherr(excep));
|
---|
792 | }
|
---|
793 |
|
---|
794 |
|
---|
795 | /*********************************************************************
|
---|
796 | * _mktemp (CRTDLL.233)
|
---|
797 | */
|
---|
798 | char * CDECL CRTDLL__mktemp( char *string )
|
---|
799 | {
|
---|
800 | dprintf2(("CRTDLL: _mktemp\n"));
|
---|
801 | int pid, n, saved_errno;
|
---|
802 | char *s;
|
---|
803 |
|
---|
804 | pid = _getpid ();
|
---|
805 | s = strchr (string, 0);
|
---|
806 | n = 0;
|
---|
807 | while (s != string && s[-1] == 'X')
|
---|
808 | {
|
---|
809 | --s; ++n;
|
---|
810 | *s = (char)(pid % 10) + '0';
|
---|
811 | pid /= 10;
|
---|
812 | }
|
---|
813 | if (n < 2)
|
---|
814 | return NULL;
|
---|
815 | *s = 'a'; saved_errno = errno;
|
---|
816 | for (;;)
|
---|
817 | {
|
---|
818 | errno = 0;
|
---|
819 | if (_access (string, 0) != 0 && errno == ENOENT)
|
---|
820 | {
|
---|
821 | errno = saved_errno;
|
---|
822 | return string;
|
---|
823 | }
|
---|
824 | if (*s == 'z')
|
---|
825 | {
|
---|
826 | errno = saved_errno;
|
---|
827 | return NULL;
|
---|
828 | }
|
---|
829 | ++*s;
|
---|
830 | }
|
---|
831 | }
|
---|
832 |
|
---|
833 |
|
---|
834 | /*********************************************************************
|
---|
835 | * _purecall (CRTDLL.249)
|
---|
836 | */
|
---|
837 | void CDECL CRTDLL__purecall(void)
|
---|
838 | {
|
---|
839 | dprintf2(("CRTDLL: _purecall\n"));
|
---|
840 | }
|
---|
841 |
|
---|
842 | /*********************************************************************
|
---|
843 | * _putch (CRTDLL.250)
|
---|
844 | */
|
---|
845 | INT CDECL CRTDLL__putch( int i )
|
---|
846 | {
|
---|
847 | dprintf2(("CRTDLL: _putch\n"));
|
---|
848 | return (_putch(i));
|
---|
849 | }
|
---|
850 |
|
---|
851 |
|
---|
852 | /*********************************************************************
|
---|
853 | * _putenv (CRTDLL.251)
|
---|
854 | */
|
---|
855 | INT CDECL CRTDLL__putenv(const char *s)
|
---|
856 | {
|
---|
857 | dprintf2(("CRTDLL: _putenv\n"));
|
---|
858 | return (_putenv(s));
|
---|
859 | }
|
---|
860 |
|
---|
861 |
|
---|
862 | /*********************************************************************
|
---|
863 | * _putw (CRTDLL.252)
|
---|
864 | */
|
---|
865 | INT CDECL CRTDLL__putw( int x, FILE *stream )
|
---|
866 | {
|
---|
867 | dprintf2(("CRTDLL: _putw\n"));
|
---|
868 | return (fwrite (&x, sizeof (x), 1, stream) == 1 ? x : EOF);
|
---|
869 | }
|
---|
870 |
|
---|
871 |
|
---|
872 | /*********************************************************************
|
---|
873 | * _rmtmp (CRTDLL.256)
|
---|
874 | */
|
---|
875 | INT CDECL CRTDLL__rmtmp(void)
|
---|
876 | {
|
---|
877 | dprintf2(("CRTDLL: _rmtmp\n"));
|
---|
878 | return(_rmtmp());
|
---|
879 | }
|
---|
880 |
|
---|
881 |
|
---|
882 | /*********************************************************************
|
---|
883 | * CRTDLL__searchenv (CRTDLL.260)
|
---|
884 | */
|
---|
885 | void CDECL CRTDLL__searchenv(char *file, char *var,char *path )
|
---|
886 | {
|
---|
887 | dprintf2(("CRTDLL: _searchenv\n"));
|
---|
888 | _searchenv(file, var, path);
|
---|
889 | }
|
---|
890 |
|
---|
891 |
|
---|
892 | /*********************************************************************
|
---|
893 | * CRTDLL__seterrormode (CRTDLL.261)
|
---|
894 | */
|
---|
895 | void CDECL CRTDLL__seterrormode(int uMode)
|
---|
896 | {
|
---|
897 | dprintf2(("CRTDLL: _seterrormode\n"));
|
---|
898 | SetErrorMode(uMode);
|
---|
899 | return;
|
---|
900 | }
|
---|
901 |
|
---|
902 |
|
---|
903 | /*********************************************************************
|
---|
904 | * CRTDLL__setjmp (CRTDLL.262)
|
---|
905 | */
|
---|
906 | int CDECL CRTDLL__setjmp( jmp_buf env )
|
---|
907 | {
|
---|
908 | //TODO:
|
---|
909 | dprintf2(("CRTDLL: _setjmp -> setjmp (NOT IDENTICAL!!!)\n"));
|
---|
910 | return(setjmp( env));
|
---|
911 | }
|
---|
912 |
|
---|
913 |
|
---|
914 | /*********************************************************************
|
---|
915 | * _setsystime (CRTDLL.264)
|
---|
916 | */
|
---|
917 | unsigned int CDECL CRTDLL__setsystime(struct tm *tp, unsigned int ms)
|
---|
918 | {
|
---|
919 | SYSTEMTIME systemtime;
|
---|
920 |
|
---|
921 | mktime(tp);
|
---|
922 |
|
---|
923 | systemtime.wMilliseconds = ms;
|
---|
924 | systemtime.wSecond = tp->tm_sec;
|
---|
925 | systemtime.wMinute = tp->tm_min;
|
---|
926 | systemtime.wHour = tp->tm_hour;
|
---|
927 | systemtime.wDay = tp->tm_mday;
|
---|
928 | systemtime.wMonth = tp->tm_mon + 1;
|
---|
929 | // struct tm has time from 1900 -> 2000 = 100
|
---|
930 | systemtime.wYear = tp->tm_year + 1900;
|
---|
931 |
|
---|
932 | if (SetLocalTime(&systemtime) != 0) return GetLastError();
|
---|
933 |
|
---|
934 | return (0);
|
---|
935 | }
|
---|
936 |
|
---|
937 |
|
---|
938 | /*********************************************************************
|
---|
939 | * _sopen (CRTDLL.268)
|
---|
940 | */
|
---|
941 | int CDECL CRTDLL__sopen( const char *s, int i1, int i2, va_list arg )
|
---|
942 | {
|
---|
943 | dprintf(("CRTDLL: _sopen\n"));
|
---|
944 | return (_sopen(s, i1, i2, arg));
|
---|
945 | }
|
---|
946 |
|
---|
947 |
|
---|
948 | /*********************************************************************
|
---|
949 | * CRTDLL__spawnl (CRTDLL.269)
|
---|
950 | */
|
---|
951 | int CDECL CRTDLL__spawnl(int nMode, char* szPath, char* szArgv0, va_list arg)
|
---|
952 | {
|
---|
953 | dprintf2(("CRTDLL: _spawnl\n"));
|
---|
954 | return (_spawnl(nMode, szPath, szArgv0, arg));
|
---|
955 | }
|
---|
956 |
|
---|
957 |
|
---|
958 | /*********************************************************************
|
---|
959 | * CRTDLL__spawnle (CRTDLL.270)
|
---|
960 | */
|
---|
961 | int CDECL CRTDLL__spawnle( int mode, char *path, char **szArgv0, va_list arg )
|
---|
962 | {
|
---|
963 | dprintf2(("CRTDLL: _spawnle\n"));
|
---|
964 | return (_spawnle(mode, path, (char*)szArgv0, arg));
|
---|
965 | }
|
---|
966 |
|
---|
967 |
|
---|
968 | /*********************************************************************
|
---|
969 | * CRTDLL__spawnlp (CRTDLL.271)
|
---|
970 | */
|
---|
971 | int CDECL CRTDLL__spawnlp(int nMode, char* szPath, char* szArgv0, va_list arg)
|
---|
972 | {
|
---|
973 | dprintf2(("CRTDLL: _spawnlp\n"));
|
---|
974 | return (_spawnlp(nMode, szPath, szArgv0, arg));
|
---|
975 | }
|
---|
976 |
|
---|
977 |
|
---|
978 | /*********************************************************************
|
---|
979 | * CRTDLL__spawnlpe (CRTDLL.272)
|
---|
980 | */
|
---|
981 | int CDECL CRTDLL__spawnlpe( int mode, char *path, char *szArgv0, va_list arg )
|
---|
982 | {
|
---|
983 | dprintf2(("CRTDLL: _spawnlpe\n"));
|
---|
984 | return (_spawnlpe(mode, path, szArgv0, arg));
|
---|
985 | }
|
---|
986 |
|
---|
987 |
|
---|
988 | /*********************************************************************
|
---|
989 | * CRTDLL__spawnv (CRTDLL.273)
|
---|
990 | */
|
---|
991 | int CDECL CRTDLL__spawnv( int i, char *s1, char ** s2 )
|
---|
992 | {
|
---|
993 | dprintf2(("CRTDLL: _spawnv\n"));
|
---|
994 | return (_spawnv(i, s1, s2));
|
---|
995 | }
|
---|
996 |
|
---|
997 |
|
---|
998 | /*********************************************************************
|
---|
999 | * CRTDLL__spawnvp (CRTDLL.275)
|
---|
1000 | */
|
---|
1001 | int CDECL CRTDLL__spawnvp( int i, char *s1, char ** s2 )
|
---|
1002 | {
|
---|
1003 | dprintf2(("CRTDLL: _spawnvp\n"));
|
---|
1004 | return (_spawnvp(i, s1, s2));
|
---|
1005 | }
|
---|
1006 |
|
---|
1007 | /*********************************************************************
|
---|
1008 | * CRTDLL__spawnv (CRTDLL.276)
|
---|
1009 | */
|
---|
1010 | int CDECL CRTDLL__spawnvpe( int i, char *s1, char ** s2, char ** s3 )
|
---|
1011 | {
|
---|
1012 | dprintf2(("CRTDLL: _spawnvpe\n"));
|
---|
1013 | return (_spawnvpe(i, s1, s2, s3));
|
---|
1014 | }
|
---|
1015 |
|
---|
1016 |
|
---|
1017 | /*********************************************************************
|
---|
1018 | * CRTDLL__statusfp (CRTDLL.279)
|
---|
1019 | */
|
---|
1020 | unsigned int CDECL CRTDLL__statusfp( void )
|
---|
1021 | {
|
---|
1022 | dprintf2(("CRTDLL: _statusfp\n"));
|
---|
1023 | return (_status87());
|
---|
1024 | }
|
---|
1025 |
|
---|
1026 |
|
---|
1027 | /*********************************************************************
|
---|
1028 | * _ultoa (CRTDLL.309)
|
---|
1029 | */
|
---|
1030 | LPSTR CDECL CRTDLL__ultoa(long x,LPSTR buf,INT radix)
|
---|
1031 | {
|
---|
1032 | dprintf2(("CRTDLL: _ultoa\n"));
|
---|
1033 | return _ultoa(x,buf,radix);
|
---|
1034 | }
|
---|
1035 |
|
---|
1036 |
|
---|
1037 | /*********************************************************************
|
---|
1038 | * CRTDLL__ungetch (CRTDLL.311)
|
---|
1039 | */
|
---|
1040 | int CDECL CRTDLL__ungetch( int i )
|
---|
1041 | {
|
---|
1042 | dprintf2(("CRTDLL: _ungetch\n"));
|
---|
1043 | return (_ungetch(i));
|
---|
1044 | }
|
---|
1045 |
|
---|
1046 |
|
---|
1047 | /*********************************************************************
|
---|
1048 | * _utime (CRTDLL.314)
|
---|
1049 | */
|
---|
1050 | int CDECL CRTDLL__utime( char *path, struct utimbuf * times )
|
---|
1051 | {
|
---|
1052 | dprintf2(("CRTDLL: _utime\n"));
|
---|
1053 | return (_utime(path, times));
|
---|
1054 | }
|
---|
1055 |
|
---|
1056 |
|
---|
1057 | /*********************************************************************
|
---|
1058 | * _vsnprintf (CRTDLL.315)
|
---|
1059 | */
|
---|
1060 | int CDECL CRTDLL__vsnprintf( char *s, size_t bufsize, const char *format, va_list arg )
|
---|
1061 | {
|
---|
1062 | dprintf2(("CRTDLL: _vsnprintf(%08xh, %08xh, %08xh)\n",
|
---|
1063 | s,
|
---|
1064 | bufsize,
|
---|
1065 | format));
|
---|
1066 |
|
---|
1067 | return wvsnprintfA(s, bufsize, format, arg);
|
---|
1068 | }
|
---|
1069 |
|
---|
1070 |
|
---|
1071 | /*********************************************************************
|
---|
1072 | * _y0 (CRTDLL.332)
|
---|
1073 | */
|
---|
1074 | double CDECL CRTDLL__y0(double x)
|
---|
1075 | {
|
---|
1076 | dprintf2(("CRTDLL: _y0\n"));
|
---|
1077 | return (_y0(x));
|
---|
1078 | }
|
---|
1079 |
|
---|
1080 |
|
---|
1081 | /*********************************************************************
|
---|
1082 | * _y1 (CRTDLL.333)
|
---|
1083 | */
|
---|
1084 | double CDECL CRTDLL__y1(double x)
|
---|
1085 | {
|
---|
1086 | dprintf2(("CRTDLL: _y1\n"));
|
---|
1087 | return (_y1(x));
|
---|
1088 | }
|
---|
1089 |
|
---|
1090 |
|
---|
1091 | /*********************************************************************
|
---|
1092 | * _yn (CRTDLL.334)
|
---|
1093 | */
|
---|
1094 | double CDECL CRTDLL__yn(int i, double x)
|
---|
1095 | {
|
---|
1096 | dprintf2(("CRTDLL: _yn\n"));
|
---|
1097 | return (_yn(i, x));
|
---|
1098 | }
|
---|
1099 |
|
---|
1100 |
|
---|
1101 | /*********************************************************************
|
---|
1102 | * abs (CRTDLL.336)
|
---|
1103 | */
|
---|
1104 | double CDECL CRTDLL_abs(double d)
|
---|
1105 | {
|
---|
1106 | dprintf2(("CRTDLL: abs(%f)\n",
|
---|
1107 | d));
|
---|
1108 |
|
---|
1109 | return (abs(d));
|
---|
1110 | }
|
---|
1111 |
|
---|
1112 |
|
---|
1113 | /*********************************************************************
|
---|
1114 | * acos (CRTDLL.337)
|
---|
1115 | */
|
---|
1116 | double CDECL CRTDLL_acos( double x )
|
---|
1117 | {
|
---|
1118 | dprintf2(("CRTDLL: acos\n"));
|
---|
1119 | return (acos(x));
|
---|
1120 | }
|
---|
1121 |
|
---|
1122 |
|
---|
1123 | /*********************************************************************
|
---|
1124 | * asctime (CRTDLL.338)
|
---|
1125 | */
|
---|
1126 | char * CDECL CRTDLL_asctime( const struct tm *timeptr )
|
---|
1127 | {
|
---|
1128 | dprintf2(("CRTDLL: asctime\n"));
|
---|
1129 | return (asctime(timeptr));
|
---|
1130 | }
|
---|
1131 |
|
---|
1132 |
|
---|
1133 | /*********************************************************************
|
---|
1134 | * asin (CRTDLL.339)
|
---|
1135 | */
|
---|
1136 | double CDECL CRTDLL_asin( double x )
|
---|
1137 | {
|
---|
1138 | dprintf2(("CRTDLL: asin\n"));
|
---|
1139 | return (asin(x));
|
---|
1140 | }
|
---|
1141 |
|
---|
1142 |
|
---|
1143 | /*********************************************************************
|
---|
1144 | * atan (CRTDLL.340)
|
---|
1145 | */
|
---|
1146 | double CDECL CRTDLL_atan(double d)
|
---|
1147 | {
|
---|
1148 | dprintf2(("CRTDLL: atan(%f)\n",
|
---|
1149 | d));
|
---|
1150 |
|
---|
1151 | return (atan(d));
|
---|
1152 | }
|
---|
1153 |
|
---|
1154 |
|
---|
1155 | /*********************************************************************
|
---|
1156 | * atan2 (CRTDLL.341)
|
---|
1157 | */
|
---|
1158 | double CDECL CRTDLL_atan2( double y, double x )
|
---|
1159 | {
|
---|
1160 | dprintf2(("CRTDLL: atan2\n"));
|
---|
1161 | return (atan2(y, x));
|
---|
1162 | }
|
---|
1163 |
|
---|
1164 |
|
---|
1165 | /*********************************************************************
|
---|
1166 | * atof (CRTDLL.343)
|
---|
1167 | */
|
---|
1168 | double CDECL CRTDLL_atof( const char *nptr )
|
---|
1169 | {
|
---|
1170 | dprintf2(("CRTDLL: atof\n"));
|
---|
1171 | return (atof(nptr));
|
---|
1172 | }
|
---|
1173 |
|
---|
1174 |
|
---|
1175 | /*********************************************************************
|
---|
1176 | * atoi (CRTDLL.344)
|
---|
1177 | */
|
---|
1178 | int CDECL CRTDLL_atoi(LPSTR str)
|
---|
1179 | {
|
---|
1180 | dprintf2(("CRTDLL: atoi(%s)\n",
|
---|
1181 | str));
|
---|
1182 |
|
---|
1183 | return (atoi(str));
|
---|
1184 | }
|
---|
1185 |
|
---|
1186 |
|
---|
1187 | /*********************************************************************
|
---|
1188 | * atol (CRTDLL.345)
|
---|
1189 | */
|
---|
1190 | long CDECL CRTDLL_atol(LPSTR str)
|
---|
1191 | {
|
---|
1192 | dprintf2(("CRTDLL: atol(%s)\n",
|
---|
1193 | str));
|
---|
1194 |
|
---|
1195 | return (atol(str));
|
---|
1196 | }
|
---|
1197 |
|
---|
1198 |
|
---|
1199 | /*********************************************************************
|
---|
1200 | * bsearch (CRTDLL.346)
|
---|
1201 | */
|
---|
1202 | void *CDECL CRTDLL_bsearch (const void *key, const void *base, size_t num, size_t width,
|
---|
1203 | int (* CDECL compare)(const void *key, const void *element))
|
---|
1204 | {
|
---|
1205 | int left, right, median, sign;
|
---|
1206 | const void *element;
|
---|
1207 |
|
---|
1208 | if (width == 0)
|
---|
1209 | return 0;
|
---|
1210 | left = 1; right = num;
|
---|
1211 | while (left <= right)
|
---|
1212 | {
|
---|
1213 | median = (left + right) / 2;
|
---|
1214 | element = (void *)((char *)base + (median-1)*width);
|
---|
1215 | sign = compare (key, element);
|
---|
1216 | if (sign == 0)
|
---|
1217 | return (void *)element;
|
---|
1218 | if (sign > 0)
|
---|
1219 | left = median + 1;
|
---|
1220 | else
|
---|
1221 | right = median - 1;
|
---|
1222 | }
|
---|
1223 | return 0;
|
---|
1224 | }
|
---|
1225 |
|
---|
1226 |
|
---|
1227 | /*********************************************************************
|
---|
1228 | * ceil (CRTDLL.348)
|
---|
1229 | */
|
---|
1230 | double CDECL CRTDLL_ceil(double d)
|
---|
1231 | {
|
---|
1232 | dprintf2(("CRTDLL: ceil(%f)\n",
|
---|
1233 | d));
|
---|
1234 | return (ceil(d));
|
---|
1235 | }
|
---|
1236 |
|
---|
1237 |
|
---|
1238 | /*********************************************************************
|
---|
1239 | * clock (CRTDLL.350)
|
---|
1240 | */
|
---|
1241 | clock_t CDECL CRTDLL_clock( void )
|
---|
1242 | {
|
---|
1243 | dprintf2(("CRTDLL: clock\n"));
|
---|
1244 | return (clock());
|
---|
1245 | }
|
---|
1246 |
|
---|
1247 |
|
---|
1248 | /*********************************************************************
|
---|
1249 | * cos (CRTDLL.351)
|
---|
1250 | */
|
---|
1251 | double CDECL CRTDLL_cos(double d)
|
---|
1252 | {
|
---|
1253 | dprintf2(("CRTDLL: cos(%f)\n",
|
---|
1254 | d));
|
---|
1255 |
|
---|
1256 | return (cos(d));
|
---|
1257 | }
|
---|
1258 |
|
---|
1259 |
|
---|
1260 | /*********************************************************************
|
---|
1261 | * cosh (CRTDLL.352)
|
---|
1262 | */
|
---|
1263 | double CDECL CRTDLL_cosh( double x )
|
---|
1264 | {
|
---|
1265 | dprintf2(("CRTDLL: cosh\n"));
|
---|
1266 | return (cosh(x));
|
---|
1267 | }
|
---|
1268 |
|
---|
1269 |
|
---|
1270 | /*********************************************************************
|
---|
1271 | * ctime (CRTDLL.353)
|
---|
1272 | */
|
---|
1273 | char * CDECL CRTDLL_ctime( const time_t *timer )
|
---|
1274 | {
|
---|
1275 | dprintf2(("CRTDLL: ctime\n"));
|
---|
1276 | return (ctime(timer));
|
---|
1277 | }
|
---|
1278 |
|
---|
1279 |
|
---|
1280 | /*********************************************************************
|
---|
1281 | * difftime (CRTDLL.354)
|
---|
1282 | */
|
---|
1283 | double CDECL CRTDLL_difftime( time_t t1, time_t t0 )
|
---|
1284 | {
|
---|
1285 | dprintf2(("CRTDLL: difftime\n"));
|
---|
1286 | return (difftime(t1, t0));
|
---|
1287 | }
|
---|
1288 |
|
---|
1289 |
|
---|
1290 | /*********************************************************************
|
---|
1291 | * div (CRTDLL.355)
|
---|
1292 | */
|
---|
1293 | ULONG CDECL CRTDLL_div( int number, int denom )
|
---|
1294 | {
|
---|
1295 | div_t divt;
|
---|
1296 |
|
---|
1297 | dprintf2(("CRTDLL: div\n"));
|
---|
1298 | divt = (div(number, denom));
|
---|
1299 | SetEDX(divt.rem); //NOTE: make sure the compiler doesn't overwrite edx!
|
---|
1300 | return divt.quot;
|
---|
1301 | }
|
---|
1302 |
|
---|
1303 |
|
---|
1304 | /*********************************************************************
|
---|
1305 | * exp (CRTDLL.357)
|
---|
1306 | */
|
---|
1307 | double CDECL CRTDLL_exp( double x )
|
---|
1308 | {
|
---|
1309 | dprintf2(("CRTDLL: exp\n"));
|
---|
1310 | return (exp(x));
|
---|
1311 | }
|
---|
1312 |
|
---|
1313 |
|
---|
1314 | /*********************************************************************
|
---|
1315 | * fabs (CRTDLL.358)
|
---|
1316 | */
|
---|
1317 | double CDECL CRTDLL_fabs(double d)
|
---|
1318 | {
|
---|
1319 | dprintf2(("CRTDLL: fabs(%f)\n",
|
---|
1320 | d));
|
---|
1321 |
|
---|
1322 | return (fabs(d));
|
---|
1323 | }
|
---|
1324 |
|
---|
1325 |
|
---|
1326 | /*********************************************************************
|
---|
1327 | * floor (CRTDLL.367)
|
---|
1328 | */
|
---|
1329 | double CDECL CRTDLL_floor(double d)
|
---|
1330 | {
|
---|
1331 | dprintf2(("CRTDLL: floor(%f)\n",
|
---|
1332 | d));
|
---|
1333 |
|
---|
1334 | return (floor(d));
|
---|
1335 | }
|
---|
1336 |
|
---|
1337 |
|
---|
1338 | /*********************************************************************
|
---|
1339 | * fmod (CRTDLL.368)
|
---|
1340 | */
|
---|
1341 | double CDECL CRTDLL_fmod(double x, double y )
|
---|
1342 | {
|
---|
1343 | dprintf2(("CRTDLL: fmod\n"));
|
---|
1344 | return (fmod(x,y));
|
---|
1345 | }
|
---|
1346 |
|
---|
1347 |
|
---|
1348 | /*********************************************************************
|
---|
1349 | * frexp (CRTDLL.377)
|
---|
1350 | */
|
---|
1351 | double CDECL CRTDLL_frexp( double value, int *exp )
|
---|
1352 | {
|
---|
1353 | dprintf2(("CRTDLL: frexp\n"));
|
---|
1354 | return (frexp(value, exp));
|
---|
1355 | }
|
---|
1356 |
|
---|
1357 |
|
---|
1358 | /*********************************************************************
|
---|
1359 | * gmtime (CRTDLL.389)
|
---|
1360 | */
|
---|
1361 | struct tm * CDECL CRTDLL_gmtime( const time_t *timer )
|
---|
1362 | {
|
---|
1363 | dprintf2(("CRTDLL: gmtime\n"));
|
---|
1364 | return (gmtime(timer));
|
---|
1365 | }
|
---|
1366 |
|
---|
1367 |
|
---|
1368 | /*********************************************************************
|
---|
1369 | * isalnum (CRTDLL.391)
|
---|
1370 | */
|
---|
1371 | int CDECL CRTDLL_isalnum(int i)
|
---|
1372 | {
|
---|
1373 | dprintf2(("CRTDLL: isalnum(%08xh)\n", i));
|
---|
1374 | return (isalnum(i));
|
---|
1375 | }
|
---|
1376 |
|
---|
1377 |
|
---|
1378 | /*********************************************************************
|
---|
1379 | * isalpha (CRTDLL.392)
|
---|
1380 | */
|
---|
1381 | int CDECL CRTDLL_isalpha(int i)
|
---|
1382 | {
|
---|
1383 | dprintf2(("CRTDLL: isalpha(%08xh)\n",
|
---|
1384 | i));
|
---|
1385 |
|
---|
1386 | return (isalpha(i));
|
---|
1387 | }
|
---|
1388 |
|
---|
1389 |
|
---|
1390 | /*********************************************************************
|
---|
1391 | * iscntrl (CRTDLL.393)
|
---|
1392 | */
|
---|
1393 | int CDECL CRTDLL_iscntrl(int i)
|
---|
1394 | {
|
---|
1395 | dprintf2(("CRTDLL: iscntrl(%08xh)\n", i));
|
---|
1396 | return (iscntrl(i));
|
---|
1397 | }
|
---|
1398 |
|
---|
1399 |
|
---|
1400 | /*********************************************************************
|
---|
1401 | * isdigit (CRTDLL.394)
|
---|
1402 | */
|
---|
1403 | int CDECL CRTDLL_isdigit(int i)
|
---|
1404 | {
|
---|
1405 | dprintf2(("CRTDLL: isdigit(%08xh)\n",
|
---|
1406 | i));
|
---|
1407 |
|
---|
1408 | return (isdigit(i));
|
---|
1409 | }
|
---|
1410 |
|
---|
1411 |
|
---|
1412 | /*********************************************************************
|
---|
1413 | * isgraph (CRTDLL.395)
|
---|
1414 | */
|
---|
1415 | int CDECL CRTDLL_isgraph(int i)
|
---|
1416 | {
|
---|
1417 | dprintf2(("CRTDLL: isgraph(%08xh)\n", i));
|
---|
1418 | return (isgraph(i));
|
---|
1419 | }
|
---|
1420 |
|
---|
1421 |
|
---|
1422 | /*********************************************************************
|
---|
1423 | * islower (CRTDLL.397)
|
---|
1424 | */
|
---|
1425 | int CDECL CRTDLL_islower(int i)
|
---|
1426 | {
|
---|
1427 | dprintf2(("CRTDLL: islower(%08xh)\n",
|
---|
1428 | i));
|
---|
1429 |
|
---|
1430 | return (islower(i));
|
---|
1431 | }
|
---|
1432 |
|
---|
1433 |
|
---|
1434 | /*********************************************************************
|
---|
1435 | * isprint (CRTDLL.398)
|
---|
1436 | */
|
---|
1437 | int CDECL CRTDLL_isprint(int i)
|
---|
1438 | {
|
---|
1439 | dprintf2(("CRTDLL: isprint(%08xh)\n",
|
---|
1440 | i));
|
---|
1441 |
|
---|
1442 | return (isprint(i));
|
---|
1443 | }
|
---|
1444 |
|
---|
1445 |
|
---|
1446 | /*********************************************************************
|
---|
1447 | * ispunct (CRTDLL.399)
|
---|
1448 | */
|
---|
1449 | int CDECL CRTDLL_ispunct(int i)
|
---|
1450 | {
|
---|
1451 | dprintf2(("CRTDLL: ispunct(%08xh)\n", i));
|
---|
1452 | return (ispunct(i));
|
---|
1453 | }
|
---|
1454 |
|
---|
1455 |
|
---|
1456 | /*********************************************************************
|
---|
1457 | * isspace (CRTDLL.400)
|
---|
1458 | */
|
---|
1459 | int CDECL CRTDLL_isspace(int i)
|
---|
1460 | {
|
---|
1461 | dprintf2(("CRTDLL: isspace(%08xh)\n",
|
---|
1462 | i));
|
---|
1463 |
|
---|
1464 | return (isspace(i));
|
---|
1465 | }
|
---|
1466 |
|
---|
1467 |
|
---|
1468 | /*********************************************************************
|
---|
1469 | * isupper (CRTDLL.401)
|
---|
1470 | */
|
---|
1471 | int CDECL CRTDLL_isupper(int i)
|
---|
1472 | {
|
---|
1473 | dprintf2(("CRTDLL: isupper(%08xh)\n",
|
---|
1474 | i));
|
---|
1475 |
|
---|
1476 | return (isupper(i));
|
---|
1477 | }
|
---|
1478 |
|
---|
1479 |
|
---|
1480 | /*********************************************************************
|
---|
1481 | * isxdigit (CRTDLL.415)
|
---|
1482 | */
|
---|
1483 | int CDECL CRTDLL_isxdigit(int i)
|
---|
1484 | {
|
---|
1485 | dprintf2(("CRTDLL: isxdigit(%08xh)\n", i));
|
---|
1486 | return (isxdigit(i));
|
---|
1487 | }
|
---|
1488 |
|
---|
1489 |
|
---|
1490 | /*********************************************************************
|
---|
1491 | * labs (CRTDLL.416)
|
---|
1492 | */
|
---|
1493 | long int CDECL CRTDLL_labs( long int j )
|
---|
1494 | {
|
---|
1495 | dprintf2(("CRTDLL: labs(%08xh)\n", j));
|
---|
1496 | return (labs(j));
|
---|
1497 | }
|
---|
1498 |
|
---|
1499 |
|
---|
1500 | /*********************************************************************
|
---|
1501 | * ldexp (CRTDLL.417)
|
---|
1502 | */
|
---|
1503 | double CDECL CRTDLL_ldexp( double x, int exp )
|
---|
1504 | {
|
---|
1505 | dprintf2(("CRTDLL: ldexp\n"));
|
---|
1506 | return (ldexp(x, exp));
|
---|
1507 | }
|
---|
1508 |
|
---|
1509 |
|
---|
1510 | /*********************************************************************
|
---|
1511 | * ldiv (CRTDLL.418)
|
---|
1512 | */
|
---|
1513 | ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom )
|
---|
1514 | {
|
---|
1515 | dprintf2(("CRTDLL: ldiv\n"));
|
---|
1516 | return (ldiv(numer, denom));
|
---|
1517 | }
|
---|
1518 |
|
---|
1519 |
|
---|
1520 | /*********************************************************************
|
---|
1521 | * localeconv (CRTDLL.419)
|
---|
1522 | */
|
---|
1523 | struct lconv * CDECL CRTDLL_localeconv(void)
|
---|
1524 | {
|
---|
1525 | dprintf2(("CRTDLL: localeconv\n"));
|
---|
1526 | return (localeconv());
|
---|
1527 | }
|
---|
1528 |
|
---|
1529 |
|
---|
1530 | /*********************************************************************
|
---|
1531 | * localtime (CRTDLL.420)
|
---|
1532 | */
|
---|
1533 | struct tm * CDECL CRTDLL_localtime( const time_t *timer )
|
---|
1534 | {
|
---|
1535 | dprintf2(("CRTDLL: localtime\n"));
|
---|
1536 | return (localtime(timer));
|
---|
1537 | }
|
---|
1538 |
|
---|
1539 |
|
---|
1540 | /*********************************************************************
|
---|
1541 | * log (CRTDLL.421)
|
---|
1542 | */
|
---|
1543 | double CDECL CRTDLL_log( double x )
|
---|
1544 | {
|
---|
1545 | dprintf2(("CRTDLL: log(%08xh)\n", x));
|
---|
1546 | return (log(x));
|
---|
1547 | }
|
---|
1548 |
|
---|
1549 |
|
---|
1550 | /*********************************************************************
|
---|
1551 | * log10 (CRTDLL.422)
|
---|
1552 | */
|
---|
1553 | double CDECL CRTDLL_log10( double x )
|
---|
1554 | {
|
---|
1555 | dprintf2(("CRTDLL: log10\n"));
|
---|
1556 | return (log10(x));
|
---|
1557 | }
|
---|
1558 |
|
---|
1559 |
|
---|
1560 | /*********************************************************************
|
---|
1561 | * mktime (CRTDLL.433)
|
---|
1562 | */
|
---|
1563 | time_t CDECL CRTDLL_mktime( struct tm *timeptr )
|
---|
1564 | {
|
---|
1565 | dprintf2(("CRTDLL: mktime\n"));
|
---|
1566 | return mktime( timeptr );
|
---|
1567 | }
|
---|
1568 |
|
---|
1569 |
|
---|
1570 | /*********************************************************************
|
---|
1571 | * modf (CRTDLL.434)
|
---|
1572 | */
|
---|
1573 | double CDECL CRTDLL_modf( double value, double *iptr )
|
---|
1574 | {
|
---|
1575 | dprintf2(("CRTDLL: modf\n"));
|
---|
1576 | return modf( value, iptr );
|
---|
1577 | }
|
---|
1578 |
|
---|
1579 |
|
---|
1580 | /*********************************************************************
|
---|
1581 | * pow (CRTDLL.436)
|
---|
1582 | */
|
---|
1583 | double CDECL CRTDLL_pow( double x, double y )
|
---|
1584 | {
|
---|
1585 | dprintf2(("CRTDLL: pow(%08xh, %08xh)\n",x, y));
|
---|
1586 | return pow( x, y );
|
---|
1587 | }
|
---|
1588 |
|
---|
1589 |
|
---|
1590 | /*********************************************************************
|
---|
1591 | * printf (CRTDLL.437)
|
---|
1592 | */
|
---|
1593 | int CDECL CRTDLL_printf( const char *format, va_list arg )
|
---|
1594 | {
|
---|
1595 | dprintf2(("CRTDLL: printf\n"));
|
---|
1596 | return (printf(format, arg));
|
---|
1597 | }
|
---|
1598 |
|
---|
1599 |
|
---|
1600 | /*********************************************************************
|
---|
1601 | * qsort (CRTDLL.441)
|
---|
1602 | */
|
---|
1603 | void CDECL CRTDLL_qsort (void *base, size_t num, size_t width,
|
---|
1604 | int (*CDECL compare)(const void *x1, const void *x2))
|
---|
1605 | {
|
---|
1606 | dprintf2(("CRTDLL: qsort\n"));
|
---|
1607 | if (width > 0 && num > 1 && base != 0)
|
---|
1608 | qsort1 ((char *)base, (char *)base+(num-1)*width, width, compare);
|
---|
1609 | }
|
---|
1610 |
|
---|
1611 |
|
---|
1612 | /*********************************************************************
|
---|
1613 | * raise (CRTDLL.442)
|
---|
1614 | */
|
---|
1615 | int CDECL CRTDLL_raise( int sig )
|
---|
1616 | {
|
---|
1617 | dprintf2(("CRTDLL: raise\n"));
|
---|
1618 | return raise( sig );
|
---|
1619 | }
|
---|
1620 |
|
---|
1621 |
|
---|
1622 | /*********************************************************************
|
---|
1623 | * scanf (CRTDLL.448)
|
---|
1624 | */
|
---|
1625 | int CDECL CRTDLL_scanf( const char *format, va_list arg )
|
---|
1626 | {
|
---|
1627 | dprintf(("CRTDLL: scanf\n"));
|
---|
1628 | return (scanf(format, arg));
|
---|
1629 | }
|
---|
1630 |
|
---|
1631 |
|
---|
1632 | /*********************************************************************
|
---|
1633 | * setvbuf (CRTDLL.451)
|
---|
1634 | */
|
---|
1635 | int CDECL CRTDLL_setvbuf( FILE *fp, char *buf, int mode, size_t size )
|
---|
1636 | {
|
---|
1637 | dprintf2(("CRTDLL: setvbuf\n"));
|
---|
1638 | return (setvbuf(fp, buf, mode, size));
|
---|
1639 | }
|
---|
1640 |
|
---|
1641 |
|
---|
1642 | /*********************************************************************
|
---|
1643 | * sin (CRTDLL.453)
|
---|
1644 | */
|
---|
1645 | double CDECL CRTDLL_sin( double x )
|
---|
1646 | {
|
---|
1647 | dprintf2(("CRTDLL: sin(%08xh)\n", x));
|
---|
1648 | return (sin(x));
|
---|
1649 | }
|
---|
1650 |
|
---|
1651 |
|
---|
1652 | /*********************************************************************
|
---|
1653 | * sinh (CRTDLL.454)
|
---|
1654 | */
|
---|
1655 | double CDECL CRTDLL_sinh( double x )
|
---|
1656 | {
|
---|
1657 | dprintf2(("CRTDLL: sinh\n"));
|
---|
1658 | return (sinh(x));
|
---|
1659 | }
|
---|
1660 |
|
---|
1661 |
|
---|
1662 | /*********************************************************************
|
---|
1663 | * sprintf (CRTDLL.455)
|
---|
1664 | */
|
---|
1665 | LPSTR CDECL CRTDLL_sprintf(LPSTR lpstrBuffer,
|
---|
1666 | LPSTR lpstrFormat,
|
---|
1667 | ...)
|
---|
1668 | {
|
---|
1669 | va_list argptr; /* -> variable argument list */
|
---|
1670 |
|
---|
1671 | dprintf2(("CRTDLL: sprintf(%08xh,%s)\n",
|
---|
1672 | lpstrBuffer,
|
---|
1673 | lpstrFormat));
|
---|
1674 |
|
---|
1675 | va_start(argptr,
|
---|
1676 | lpstrFormat); /* get pointer to argument list */
|
---|
1677 | vsprintf(lpstrBuffer,
|
---|
1678 | lpstrFormat,
|
---|
1679 | argptr);
|
---|
1680 | va_end(argptr); /* done with variable arguments */
|
---|
1681 |
|
---|
1682 | return (lpstrBuffer);
|
---|
1683 | }
|
---|
1684 |
|
---|
1685 |
|
---|
1686 | /*********************************************************************
|
---|
1687 | * sqrt (CRTDLL.456)
|
---|
1688 | */
|
---|
1689 | double CDECL CRTDLL_sqrt( double x )
|
---|
1690 | {
|
---|
1691 | dprintf2(("CRTDLL: sqrt(%08xh)\n", x));
|
---|
1692 | return (sqrt(x));
|
---|
1693 | }
|
---|
1694 |
|
---|
1695 |
|
---|
1696 | /*********************************************************************
|
---|
1697 | * srand (CRTDLL.457)
|
---|
1698 | */
|
---|
1699 | void CDECL CRTDLL_srand( unsigned int seed )
|
---|
1700 | {
|
---|
1701 | dprintf2(("CRTDLL: srand\n"));
|
---|
1702 | srand(seed);
|
---|
1703 | }
|
---|
1704 |
|
---|
1705 |
|
---|
1706 | /*********************************************************************
|
---|
1707 | * sscanf (CRTDLL.458)
|
---|
1708 | */
|
---|
1709 | int CDECL CRTDLL_sscanf( const char *s, const char *format, va_list arg )
|
---|
1710 | {
|
---|
1711 | dprintf(("CRTDLL: sscanf\n"));
|
---|
1712 | return (sscanf(s, format, arg));
|
---|
1713 | }
|
---|
1714 |
|
---|
1715 |
|
---|
1716 | /*********************************************************************
|
---|
1717 | * tan (CRTDLL.483)
|
---|
1718 | */
|
---|
1719 | double CDECL CRTDLL_tan(double d)
|
---|
1720 | {
|
---|
1721 | dprintf2(("CRTDLL: tan(%f)\n",
|
---|
1722 | d));
|
---|
1723 |
|
---|
1724 | return (tan(d));
|
---|
1725 | }
|
---|
1726 |
|
---|
1727 |
|
---|
1728 | /*********************************************************************
|
---|
1729 | * tanh (CRTDLL.484)
|
---|
1730 | */
|
---|
1731 | double CDECL CRTDLL_tanh( double x )
|
---|
1732 | {
|
---|
1733 | dprintf2(("CRTDLL: tanh\n"));
|
---|
1734 | return tanh(x);
|
---|
1735 | }
|
---|
1736 |
|
---|
1737 |
|
---|
1738 | /*********************************************************************
|
---|
1739 | * time (CRTDLL.485)
|
---|
1740 | */
|
---|
1741 | time_t CDECL CRTDLL_time( time_t *timer )
|
---|
1742 | {
|
---|
1743 | dprintf2(("CRTDLL: time\n"));
|
---|
1744 |
|
---|
1745 | return time(timer);
|
---|
1746 | }
|
---|
1747 |
|
---|
1748 |
|
---|
1749 | /*********************************************************************
|
---|
1750 | * tmpfile (CRTDLL.486)
|
---|
1751 | */
|
---|
1752 | FILE * CDECL CRTDLL_tmpfile( void )
|
---|
1753 | {
|
---|
1754 | dprintf2(("CRTDLL: tmpfile\n"));
|
---|
1755 | return (tmpfile());
|
---|
1756 | }
|
---|
1757 |
|
---|
1758 |
|
---|
1759 | /*********************************************************************
|
---|
1760 | * tolower (CRTDLL.488)
|
---|
1761 | */
|
---|
1762 | int CDECL CRTDLL_tolower(int c)
|
---|
1763 | {
|
---|
1764 | dprintf2(("CRTDLL: tolower(%c)\n",
|
---|
1765 | c));
|
---|
1766 |
|
---|
1767 | return (tolower(c));
|
---|
1768 | }
|
---|
1769 |
|
---|
1770 |
|
---|
1771 | /*********************************************************************
|
---|
1772 | * toupper (CRTDLL.489)
|
---|
1773 | */
|
---|
1774 | int CDECL CRTDLL_toupper(int c)
|
---|
1775 | {
|
---|
1776 | dprintf2(("CRTDLL: toupper(%c)\n",
|
---|
1777 | c));
|
---|
1778 |
|
---|
1779 | return (toupper(c));
|
---|
1780 | }
|
---|
1781 |
|
---|
1782 |
|
---|
1783 | /*********************************************************************
|
---|
1784 | * ungetc (CRTDLL.492)
|
---|
1785 | */
|
---|
1786 | INT CDECL CRTDLL_ungetc(int c, FILE *f)
|
---|
1787 | {
|
---|
1788 | dprintf(("CRTDLL: ungetc\n"));
|
---|
1789 | return (ungetc(c, f));
|
---|
1790 | }
|
---|
1791 |
|
---|
1792 |
|
---|
1793 | /*********************************************************************
|
---|
1794 | * vprintf (CRTDLL.496)
|
---|
1795 | */
|
---|
1796 | int CDECL CRTDLL_vprintf( const char *format, __va_list arg )
|
---|
1797 | {
|
---|
1798 | dprintf2(("CRTDLL: vprintf\n"));
|
---|
1799 | return (vprintf(format, arg));
|
---|
1800 | }
|
---|
1801 |
|
---|
1802 |
|
---|
1803 | /*********************************************************************
|
---|
1804 | * vsprintf (CRTDLL.497)
|
---|
1805 | */
|
---|
1806 | int CDECL CRTDLL_vsprintf( char *s, const char *format, va_list arg )
|
---|
1807 | {
|
---|
1808 | dprintf2(("CRTDLL: vsprintf(%08xh, %08xh)\n", s, format));
|
---|
1809 | return (vsprintf(s, format, arg));
|
---|
1810 | }
|
---|
1811 |
|
---|
1812 |
|
---|
1813 | /*********************************************************************
|
---|
1814 | * CRTDLL__setjmp3 (CRTDLL.600)
|
---|
1815 | */
|
---|
1816 | int CDECL CRTDLL__setjmp3( jmp_buf env )
|
---|
1817 | {
|
---|
1818 | //TODO:
|
---|
1819 | dprintf2(("CRTDLL: _setjmp3 -> setjmp (NOT IDENTICAL!!!)\n"));
|
---|
1820 | return(setjmp( env));
|
---|
1821 | }
|
---|