1 | /* $Id: crt.cpp,v 1.5 1999-08-18 21:45:13 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
5 | * Win32 NT Runtime / NTDLL for OS/2
|
---|
6 | * Copyright 1999 Patrick Haller (phaller@gmx.net)
|
---|
7 | */
|
---|
8 |
|
---|
9 | /****************************************************************************
|
---|
10 | * Include *
|
---|
11 | ****************************************************************************/
|
---|
12 |
|
---|
13 | #include <odin.h>
|
---|
14 | #include <stdlib.h>
|
---|
15 | #include <stdio.h>
|
---|
16 | #include <string.h>
|
---|
17 | #include <math.h>
|
---|
18 | #include <ctype.h>
|
---|
19 | #include <wchar.h>
|
---|
20 | #include <wcstr.h>
|
---|
21 | #include <wctype.h>
|
---|
22 |
|
---|
23 | #include "ntdll.h"
|
---|
24 |
|
---|
25 | /*
|
---|
26 | NTDLL.sprintf
|
---|
27 | NTDLL._itoa
|
---|
28 | NTDLL._wcsicmp
|
---|
29 | */
|
---|
30 |
|
---|
31 |
|
---|
32 | /****************************************************************************
|
---|
33 | * Local Prototypes *
|
---|
34 | ****************************************************************************/
|
---|
35 |
|
---|
36 |
|
---|
37 | LPWSTR CDECL OS2_wcsupr(LPWSTR str);
|
---|
38 | int CDECL OS2_wcsnicmp(LPWSTR str1, LPWSTR str2, long l);
|
---|
39 |
|
---|
40 |
|
---|
41 |
|
---|
42 | /*****************************************************************************
|
---|
43 | * Name :
|
---|
44 | * Purpose :
|
---|
45 | * Parameters:
|
---|
46 | * Variables :
|
---|
47 | * Result :
|
---|
48 | * Remark : NTDLL.879
|
---|
49 | * Status :
|
---|
50 | *
|
---|
51 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
52 | *****************************************************************************/
|
---|
53 |
|
---|
54 | int CDECL OS2_wcsicmp(LPWSTR str1, LPWSTR str2)
|
---|
55 | {
|
---|
56 | dprintf(("NTDLL: _wcsicmp(%08xh,%08xh)\n",
|
---|
57 | str1,
|
---|
58 | str2));
|
---|
59 |
|
---|
60 | return (OS2_wcsnicmp(str1,
|
---|
61 | str2,
|
---|
62 | wcslen((wchar_t*) str1)));
|
---|
63 | }
|
---|
64 |
|
---|
65 |
|
---|
66 | /*****************************************************************************
|
---|
67 | * Name :
|
---|
68 | * Purpose :
|
---|
69 | * Parameters:
|
---|
70 | * Variables :
|
---|
71 | * Result :
|
---|
72 | * Remark : NTDLL.880
|
---|
73 | * Status :
|
---|
74 | *
|
---|
75 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
76 | *****************************************************************************/
|
---|
77 |
|
---|
78 | LPWSTR CDECL OS2_wcslwr(LPWSTR str)
|
---|
79 | {
|
---|
80 | DWORD dwIndex;
|
---|
81 |
|
---|
82 | dprintf(("NTDLL: _wcslwr(%08xh)\n",
|
---|
83 | str));
|
---|
84 |
|
---|
85 | for (dwIndex = wcslen((const wchar_t*)str);
|
---|
86 | dwIndex;
|
---|
87 | dwIndex--)
|
---|
88 | {
|
---|
89 | towlower(str[dwIndex]);
|
---|
90 | }
|
---|
91 |
|
---|
92 | return (str);
|
---|
93 | }
|
---|
94 |
|
---|
95 |
|
---|
96 | /*****************************************************************************
|
---|
97 | * Name :
|
---|
98 | * Purpose :
|
---|
99 | * Parameters:
|
---|
100 | * Variables :
|
---|
101 | * Result :
|
---|
102 | * Remark : NTDLL.881
|
---|
103 | * Status :
|
---|
104 | *
|
---|
105 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
106 | *****************************************************************************/
|
---|
107 |
|
---|
108 | int CDECL OS2_wcsnicmp(LPWSTR str1, LPWSTR str2, long l)
|
---|
109 | {
|
---|
110 | LPWSTR w1;
|
---|
111 | LPWSTR w2;
|
---|
112 |
|
---|
113 | dprintf(("NTDLL: _wcsnicmp(%08xh,%08xh,%08xh)\n",
|
---|
114 | str1,
|
---|
115 | str2,
|
---|
116 | l));
|
---|
117 |
|
---|
118 | w1 = HEAP_strdupW(GetProcessHeap(),0,str1);
|
---|
119 | w2 = HEAP_strdupW(GetProcessHeap(),0,str2);
|
---|
120 | OS2_wcsupr(w1);
|
---|
121 | OS2_wcsupr(w2);
|
---|
122 |
|
---|
123 | return (wcsncmp((wchar_t*)w1,
|
---|
124 | (wchar_t*)w2,
|
---|
125 | l));
|
---|
126 | }
|
---|
127 |
|
---|
128 |
|
---|
129 | /*****************************************************************************
|
---|
130 | * Name :
|
---|
131 | * Purpose :
|
---|
132 | * Parameters:
|
---|
133 | * Variables :
|
---|
134 | * Result :
|
---|
135 | * Remark : NTDLL.882
|
---|
136 | * Status :
|
---|
137 | *
|
---|
138 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
139 | *****************************************************************************/
|
---|
140 |
|
---|
141 | LPWSTR CDECL OS2_wcsupr(LPWSTR str)
|
---|
142 | {
|
---|
143 | DWORD dwIndex;
|
---|
144 |
|
---|
145 | dprintf(("NTDLL: _wcsupr(%08xh)\n",
|
---|
146 | str));
|
---|
147 |
|
---|
148 | for (dwIndex = wcslen((const wchar_t*)str);
|
---|
149 | dwIndex;
|
---|
150 | dwIndex--)
|
---|
151 | {
|
---|
152 | towupper(str[dwIndex]);
|
---|
153 | }
|
---|
154 |
|
---|
155 | return (str);
|
---|
156 | }
|
---|
157 |
|
---|
158 |
|
---|
159 |
|
---|
160 | /*****************************************************************************
|
---|
161 | * Name :
|
---|
162 | * Purpose :
|
---|
163 | * Parameters:
|
---|
164 | * Variables :
|
---|
165 | * Result :
|
---|
166 | * Remark : NTDLL.883
|
---|
167 | * Status :
|
---|
168 | *
|
---|
169 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
170 | *****************************************************************************/
|
---|
171 |
|
---|
172 | double CDECL OS2abs(double d)
|
---|
173 | {
|
---|
174 | dprintf(("NTDLL: abs(%f)\n",
|
---|
175 | d));
|
---|
176 |
|
---|
177 | return (abs(d));
|
---|
178 | }
|
---|
179 |
|
---|
180 |
|
---|
181 | /*****************************************************************************
|
---|
182 | * Name :
|
---|
183 | * Purpose :
|
---|
184 | * Parameters:
|
---|
185 | * Variables :
|
---|
186 | * Result :
|
---|
187 | * Remark : NTDLL.884
|
---|
188 | * Status :
|
---|
189 | *
|
---|
190 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
191 | *****************************************************************************/
|
---|
192 |
|
---|
193 | double CDECL OS2atan(double d)
|
---|
194 | {
|
---|
195 | dprintf(("NTDLL: atan(%f)\n",
|
---|
196 | d));
|
---|
197 |
|
---|
198 | return (atan(d));
|
---|
199 | }
|
---|
200 |
|
---|
201 |
|
---|
202 | /*****************************************************************************
|
---|
203 | * Name :
|
---|
204 | * Purpose :
|
---|
205 | * Parameters:
|
---|
206 | * Variables :
|
---|
207 | * Result :
|
---|
208 | * Remark : NTDLL.885
|
---|
209 | * Status :
|
---|
210 | *
|
---|
211 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
212 | *****************************************************************************/
|
---|
213 |
|
---|
214 | int CDECL OS2atoi(LPSTR str)
|
---|
215 | {
|
---|
216 | dprintf(("NTDLL: atoi(%s)\n",
|
---|
217 | str));
|
---|
218 |
|
---|
219 | return (atoi(str));
|
---|
220 | }
|
---|
221 |
|
---|
222 |
|
---|
223 | /*****************************************************************************
|
---|
224 | * Name :
|
---|
225 | * Purpose :
|
---|
226 | * Parameters:
|
---|
227 | * Variables :
|
---|
228 | * Result :
|
---|
229 | * Remark : NTDLL.886
|
---|
230 | * Status :
|
---|
231 | *
|
---|
232 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
233 | *****************************************************************************/
|
---|
234 |
|
---|
235 | long CDECL OS2atol(LPSTR str)
|
---|
236 | {
|
---|
237 | dprintf(("NTDLL: atol(%s)\n",
|
---|
238 | str));
|
---|
239 |
|
---|
240 | return (atol(str));
|
---|
241 | }
|
---|
242 |
|
---|
243 |
|
---|
244 | /*****************************************************************************
|
---|
245 | * Name :
|
---|
246 | * Purpose :
|
---|
247 | * Parameters:
|
---|
248 | * Variables :
|
---|
249 | * Result :
|
---|
250 | * Remark : NTDLL.887
|
---|
251 | * Status :
|
---|
252 | *
|
---|
253 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
254 | *****************************************************************************/
|
---|
255 |
|
---|
256 | double CDECL OS2ceil(double d)
|
---|
257 | {
|
---|
258 | dprintf(("NTDLL: ceil(%f)\n",
|
---|
259 | d));
|
---|
260 |
|
---|
261 | return (ceil(d));
|
---|
262 | }
|
---|
263 |
|
---|
264 |
|
---|
265 | /*****************************************************************************
|
---|
266 | * Name :
|
---|
267 | * Purpose :
|
---|
268 | * Parameters:
|
---|
269 | * Variables :
|
---|
270 | * Result :
|
---|
271 | * Remark : NTDLL.888
|
---|
272 | * Status :
|
---|
273 | *
|
---|
274 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
275 | *****************************************************************************/
|
---|
276 |
|
---|
277 | double CDECL OS2cos(double d)
|
---|
278 | {
|
---|
279 | dprintf(("NTDLL: cos(%f)\n",
|
---|
280 | d));
|
---|
281 |
|
---|
282 | return (cos(d));
|
---|
283 | }
|
---|
284 |
|
---|
285 |
|
---|
286 | /*****************************************************************************
|
---|
287 | * Name :
|
---|
288 | * Purpose :
|
---|
289 | * Parameters:
|
---|
290 | * Variables :
|
---|
291 | * Result :
|
---|
292 | * Remark : NTDLL.889
|
---|
293 | * Status :
|
---|
294 | *
|
---|
295 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
296 | *****************************************************************************/
|
---|
297 |
|
---|
298 | double CDECL OS2fabs(double d)
|
---|
299 | {
|
---|
300 | dprintf(("NTDLL: fabs(%f)\n",
|
---|
301 | d));
|
---|
302 |
|
---|
303 | return (fabs(d));
|
---|
304 | }
|
---|
305 |
|
---|
306 |
|
---|
307 | /*****************************************************************************
|
---|
308 | * Name :
|
---|
309 | * Purpose :
|
---|
310 | * Parameters:
|
---|
311 | * Variables :
|
---|
312 | * Result :
|
---|
313 | * Remark : NTDLL.890
|
---|
314 | * Status :
|
---|
315 | *
|
---|
316 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
317 | *****************************************************************************/
|
---|
318 |
|
---|
319 | double CDECL OS2floor(double d)
|
---|
320 | {
|
---|
321 | dprintf(("NTDLL: floor(%f)\n",
|
---|
322 | d));
|
---|
323 |
|
---|
324 | return (floor(d));
|
---|
325 | }
|
---|
326 |
|
---|
327 |
|
---|
328 | /*****************************************************************************
|
---|
329 | * Name :
|
---|
330 | * Purpose :
|
---|
331 | * Parameters:
|
---|
332 | * Variables :
|
---|
333 | * Result :
|
---|
334 | * Remark : NTDLL.891
|
---|
335 | * Status :
|
---|
336 | *
|
---|
337 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
338 | *****************************************************************************/
|
---|
339 |
|
---|
340 | int CDECL OS2isalpha(int i)
|
---|
341 | {
|
---|
342 | dprintf(("NTDLL: isalpha(%08xh)\n",
|
---|
343 | i));
|
---|
344 |
|
---|
345 | return (isalpha(i));
|
---|
346 | }
|
---|
347 |
|
---|
348 |
|
---|
349 | /*****************************************************************************
|
---|
350 | * Name :
|
---|
351 | * Purpose :
|
---|
352 | * Parameters:
|
---|
353 | * Variables :
|
---|
354 | * Result :
|
---|
355 | * Remark : NTDLL.892
|
---|
356 | * Status :
|
---|
357 | *
|
---|
358 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
359 | *****************************************************************************/
|
---|
360 |
|
---|
361 | int CDECL OS2isdigit(int i)
|
---|
362 | {
|
---|
363 | dprintf(("NTDLL: isdigit(%08xh)\n",
|
---|
364 | i));
|
---|
365 |
|
---|
366 | return (isdigit(i));
|
---|
367 | }
|
---|
368 |
|
---|
369 |
|
---|
370 | /*****************************************************************************
|
---|
371 | * Name :
|
---|
372 | * Purpose :
|
---|
373 | * Parameters:
|
---|
374 | * Variables :
|
---|
375 | * Result :
|
---|
376 | * Remark : NTDLL.893
|
---|
377 | * Status :
|
---|
378 | *
|
---|
379 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
380 | *****************************************************************************/
|
---|
381 |
|
---|
382 | int CDECL OS2islower(int i)
|
---|
383 | {
|
---|
384 | dprintf(("NTDLL: islower(%08xh)\n",
|
---|
385 | i));
|
---|
386 |
|
---|
387 | return (islower(i));
|
---|
388 | }
|
---|
389 |
|
---|
390 |
|
---|
391 | /*****************************************************************************
|
---|
392 | * Name :
|
---|
393 | * Purpose :
|
---|
394 | * Parameters:
|
---|
395 | * Variables :
|
---|
396 | * Result :
|
---|
397 | * Remark : NTDLL.894
|
---|
398 | * Status :
|
---|
399 | *
|
---|
400 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
401 | *****************************************************************************/
|
---|
402 |
|
---|
403 | int CDECL OS2isprint(int i)
|
---|
404 | {
|
---|
405 | dprintf(("NTDLL: isprint(%08xh)\n",
|
---|
406 | i));
|
---|
407 |
|
---|
408 | return (isprint(i));
|
---|
409 | }
|
---|
410 |
|
---|
411 |
|
---|
412 | /*****************************************************************************
|
---|
413 | * Name :
|
---|
414 | * Purpose :
|
---|
415 | * Parameters:
|
---|
416 | * Variables :
|
---|
417 | * Result :
|
---|
418 | * Remark : NTDLL.895
|
---|
419 | * Status :
|
---|
420 | *
|
---|
421 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
422 | *****************************************************************************/
|
---|
423 |
|
---|
424 | int CDECL OS2isspace(int i)
|
---|
425 | {
|
---|
426 | dprintf(("NTDLL: isspace(%08xh)\n",
|
---|
427 | i));
|
---|
428 |
|
---|
429 | return (isspace(i));
|
---|
430 | }
|
---|
431 |
|
---|
432 |
|
---|
433 | /*****************************************************************************
|
---|
434 | * Name :
|
---|
435 | * Purpose :
|
---|
436 | * Parameters:
|
---|
437 | * Variables :
|
---|
438 | * Result :
|
---|
439 | * Remark : NTDLL.896
|
---|
440 | * Status :
|
---|
441 | *
|
---|
442 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
443 | *****************************************************************************/
|
---|
444 |
|
---|
445 | int CDECL OS2isupper(int i)
|
---|
446 | {
|
---|
447 | dprintf(("NTDLL: isupper(%08xh)\n",
|
---|
448 | i));
|
---|
449 |
|
---|
450 | return (isupper(i));
|
---|
451 | }
|
---|
452 |
|
---|
453 |
|
---|
454 | /*****************************************************************************
|
---|
455 | * Name :
|
---|
456 | * Purpose :
|
---|
457 | * Parameters:
|
---|
458 | * Variables :
|
---|
459 | * Result :
|
---|
460 | * Remark : NTDLL.911
|
---|
461 | * Status :
|
---|
462 | *
|
---|
463 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
464 | *****************************************************************************/
|
---|
465 |
|
---|
466 | LPSTR CDECL OS2sprintf(LPSTR lpstrBuffer,
|
---|
467 | LPSTR lpstrFormat,
|
---|
468 | ...)
|
---|
469 | {
|
---|
470 | va_list argptr; /* -> variable argument list */
|
---|
471 |
|
---|
472 | dprintf(("NTDLL: sprintf(%08xh,%s)\n",
|
---|
473 | lpstrBuffer,
|
---|
474 | lpstrFormat));
|
---|
475 |
|
---|
476 | va_start(argptr,
|
---|
477 | lpstrFormat); /* get pointer to argument list */
|
---|
478 | vsprintf(lpstrBuffer,
|
---|
479 | lpstrFormat,
|
---|
480 | argptr);
|
---|
481 | va_end(argptr); /* done with variable arguments */
|
---|
482 |
|
---|
483 | return (lpstrBuffer);
|
---|
484 | }
|
---|
485 |
|
---|
486 |
|
---|
487 |
|
---|
488 | /*****************************************************************************
|
---|
489 | * Name :
|
---|
490 | * Purpose :
|
---|
491 | * Parameters:
|
---|
492 | * Variables :
|
---|
493 | * Result :
|
---|
494 | * Remark : NTDLL.914
|
---|
495 | * Status :
|
---|
496 | *
|
---|
497 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
498 | *****************************************************************************/
|
---|
499 |
|
---|
500 | LPSTR CDECL OS2strcat( LPSTR str1,
|
---|
501 | const LPSTR str2)
|
---|
502 | {
|
---|
503 | dprintf(("NTDLL: strcat(%s,%s)\n",
|
---|
504 | str1,
|
---|
505 | str2));
|
---|
506 |
|
---|
507 | return (strcat(str1, str2));
|
---|
508 | }
|
---|
509 |
|
---|
510 |
|
---|
511 | /*****************************************************************************
|
---|
512 | * Name :
|
---|
513 | * Purpose :
|
---|
514 | * Parameters:
|
---|
515 | * Variables :
|
---|
516 | * Result :
|
---|
517 | * Remark : NTDLL.915
|
---|
518 | * Status :
|
---|
519 | *
|
---|
520 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
521 | *****************************************************************************/
|
---|
522 |
|
---|
523 | LPSTR CDECL OS2strchr(const LPSTR str,
|
---|
524 | int i)
|
---|
525 | {
|
---|
526 | dprintf(("NTDLL: strchr(%s,%08xh)\n",
|
---|
527 | str,
|
---|
528 | i));
|
---|
529 |
|
---|
530 | return (strchr(str, i));
|
---|
531 | }
|
---|
532 |
|
---|
533 |
|
---|
534 | /*****************************************************************************
|
---|
535 | * Name :
|
---|
536 | * Purpose :
|
---|
537 | * Parameters:
|
---|
538 | * Variables :
|
---|
539 | * Result :
|
---|
540 | * Remark : NTDLL.916
|
---|
541 | * Status :
|
---|
542 | *
|
---|
543 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
544 | *****************************************************************************/
|
---|
545 |
|
---|
546 | int CDECL OS2strcmp(const LPSTR str1,
|
---|
547 | const LPSTR str2)
|
---|
548 | {
|
---|
549 | dprintf(("NTDLL: strcmp(%s,%s)\n",
|
---|
550 | str1,
|
---|
551 | str2));
|
---|
552 |
|
---|
553 | return (strcmp(str1, str2));
|
---|
554 | }
|
---|
555 |
|
---|
556 |
|
---|
557 | /*****************************************************************************
|
---|
558 | * Name :
|
---|
559 | * Purpose :
|
---|
560 | * Parameters:
|
---|
561 | * Variables :
|
---|
562 | * Result :
|
---|
563 | * Remark : NTDLL.?
|
---|
564 | * Status :
|
---|
565 | *
|
---|
566 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
567 | *****************************************************************************/
|
---|
568 |
|
---|
569 | int CDECL OS2_stricmp(const LPSTR str1,
|
---|
570 | const LPSTR str2)
|
---|
571 | {
|
---|
572 | dprintf(("NTDLL: _stricmp(%s,%s)\n",
|
---|
573 | str1,
|
---|
574 | str2));
|
---|
575 |
|
---|
576 | return (stricmp(str1, str2));
|
---|
577 | }
|
---|
578 |
|
---|
579 |
|
---|
580 | /*****************************************************************************
|
---|
581 | * Name :
|
---|
582 | * Purpose :
|
---|
583 | * Parameters:
|
---|
584 | * Variables :
|
---|
585 | * Result :
|
---|
586 | * Remark : NTDLL.917
|
---|
587 | * Status :
|
---|
588 | *
|
---|
589 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
590 | *****************************************************************************/
|
---|
591 |
|
---|
592 | LPSTR CDECL OS2strcpy( LPSTR str1,
|
---|
593 | const LPSTR str2)
|
---|
594 | {
|
---|
595 | dprintf(("NTDLL: strcpy(%s,%s)\n",
|
---|
596 | str1,
|
---|
597 | str2));
|
---|
598 |
|
---|
599 | return (strcpy(str1, str2));
|
---|
600 | }
|
---|
601 |
|
---|
602 |
|
---|
603 | /*****************************************************************************
|
---|
604 | * Name :
|
---|
605 | * Purpose :
|
---|
606 | * Parameters:
|
---|
607 | * Variables :
|
---|
608 | * Result :
|
---|
609 | * Remark : NTDLL.918
|
---|
610 | * Status :
|
---|
611 | *
|
---|
612 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
613 | *****************************************************************************/
|
---|
614 |
|
---|
615 | size_t CDECL OS2strcspn(const LPSTR str1,
|
---|
616 | LPSTR str2)
|
---|
617 | {
|
---|
618 | dprintf(("NTDLL: strcspn(%s,%s)\n",
|
---|
619 | str1,
|
---|
620 | str2));
|
---|
621 |
|
---|
622 | return (strcspn(str1, str2));
|
---|
623 | }
|
---|
624 |
|
---|
625 |
|
---|
626 | /*****************************************************************************
|
---|
627 | * Name :
|
---|
628 | * Purpose :
|
---|
629 | * Parameters:
|
---|
630 | * Variables :
|
---|
631 | * Result :
|
---|
632 | * Remark : NTDLL.919
|
---|
633 | * Status :
|
---|
634 | *
|
---|
635 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
636 | *****************************************************************************/
|
---|
637 |
|
---|
638 | size_t CDECL OS2strlen(const LPSTR str)
|
---|
639 | {
|
---|
640 | dprintf(("NTDLL: strlen(%s)\n",
|
---|
641 | str));
|
---|
642 |
|
---|
643 | return (strlen(str));
|
---|
644 | }
|
---|
645 |
|
---|
646 |
|
---|
647 | /*****************************************************************************
|
---|
648 | * Name :
|
---|
649 | * Purpose :
|
---|
650 | * Parameters:
|
---|
651 | * Variables :
|
---|
652 | * Result :
|
---|
653 | * Remark : NTDLL.920
|
---|
654 | * Status :
|
---|
655 | *
|
---|
656 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
657 | *****************************************************************************/
|
---|
658 |
|
---|
659 | LPSTR CDECL OS2strncat( LPSTR str1,
|
---|
660 | const LPSTR str2,
|
---|
661 | size_t i)
|
---|
662 | {
|
---|
663 | dprintf(("NTDLL: strncat(%s,%s,%08xh)\n",
|
---|
664 | str1,
|
---|
665 | str2,
|
---|
666 | i));
|
---|
667 |
|
---|
668 | return (strncat(str1, str2, i));
|
---|
669 | }
|
---|
670 |
|
---|
671 |
|
---|
672 | /*****************************************************************************
|
---|
673 | * Name :
|
---|
674 | * Purpose :
|
---|
675 | * Parameters:
|
---|
676 | * Variables :
|
---|
677 | * Result :
|
---|
678 | * Remark : NTDLL.921
|
---|
679 | * Status :
|
---|
680 | *
|
---|
681 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
682 | *****************************************************************************/
|
---|
683 |
|
---|
684 | int CDECL OS2strncmp(const LPSTR str1,
|
---|
685 | const LPSTR str2,
|
---|
686 | size_t i)
|
---|
687 | {
|
---|
688 | dprintf(("NTDLL: strncmp(%s,%s,%08xh)\n",
|
---|
689 | str1,
|
---|
690 | str2,
|
---|
691 | i));
|
---|
692 |
|
---|
693 | return (strncmp(str1, str2, i));
|
---|
694 | }
|
---|
695 |
|
---|
696 |
|
---|
697 | /*****************************************************************************
|
---|
698 | * Name :
|
---|
699 | * Purpose :
|
---|
700 | * Parameters:
|
---|
701 | * Variables :
|
---|
702 | * Result :
|
---|
703 | * Remark : NTDLL.922
|
---|
704 | * Status :
|
---|
705 | *
|
---|
706 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
707 | *****************************************************************************/
|
---|
708 |
|
---|
709 | LPSTR CDECL OS2strncpy(const LPSTR str1,
|
---|
710 | const LPSTR str2,
|
---|
711 | size_t i)
|
---|
712 | {
|
---|
713 | dprintf(("NTDLL: strncpy(%s,%s,%08xh)\n",
|
---|
714 | str1,
|
---|
715 | str2,
|
---|
716 | i));
|
---|
717 |
|
---|
718 | return (strncpy(str1, str2, i));
|
---|
719 | }
|
---|
720 |
|
---|
721 |
|
---|
722 | /*****************************************************************************
|
---|
723 | * Name :
|
---|
724 | * Purpose :
|
---|
725 | * Parameters:
|
---|
726 | * Variables :
|
---|
727 | * Result :
|
---|
728 | * Remark : NTDLL.923
|
---|
729 | * Status :
|
---|
730 | *
|
---|
731 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
732 | *****************************************************************************/
|
---|
733 |
|
---|
734 | LPSTR CDECL OS2strpbrk(const LPSTR str1,
|
---|
735 | const LPSTR str2)
|
---|
736 | {
|
---|
737 | dprintf(("NTDLL: strpbrk(%s,%s)\n",
|
---|
738 | str1,
|
---|
739 | str2));
|
---|
740 |
|
---|
741 | return (strpbrk(str1, str2));
|
---|
742 | }
|
---|
743 |
|
---|
744 |
|
---|
745 | /*****************************************************************************
|
---|
746 | * Name :
|
---|
747 | * Purpose :
|
---|
748 | * Parameters:
|
---|
749 | * Variables :
|
---|
750 | * Result :
|
---|
751 | * Remark : NTDLL.924
|
---|
752 | * Status :
|
---|
753 | *
|
---|
754 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
755 | *****************************************************************************/
|
---|
756 |
|
---|
757 | LPSTR CDECL OS2strrchr(const LPSTR str,
|
---|
758 | size_t i)
|
---|
759 | {
|
---|
760 | dprintf(("NTDLL: strrchr(%s,%08xh)\n",
|
---|
761 | str,
|
---|
762 | i));
|
---|
763 |
|
---|
764 | return (strrchr(str, i));
|
---|
765 | }
|
---|
766 |
|
---|
767 |
|
---|
768 | /*****************************************************************************
|
---|
769 | * Name :
|
---|
770 | * Purpose :
|
---|
771 | * Parameters:
|
---|
772 | * Variables :
|
---|
773 | * Result :
|
---|
774 | * Remark : NTDLL.925
|
---|
775 | * Status :
|
---|
776 | *
|
---|
777 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
778 | *****************************************************************************/
|
---|
779 |
|
---|
780 | size_t CDECL OS2strspn(const LPSTR str1,
|
---|
781 | const LPSTR str2)
|
---|
782 | {
|
---|
783 | dprintf(("NTDLL: strspn(%s,%s)\n",
|
---|
784 | str1,
|
---|
785 | str2));
|
---|
786 |
|
---|
787 | return (strspn(str1, str2));
|
---|
788 | }
|
---|
789 |
|
---|
790 |
|
---|
791 | /*****************************************************************************
|
---|
792 | * Name :
|
---|
793 | * Purpose :
|
---|
794 | * Parameters:
|
---|
795 | * Variables :
|
---|
796 | * Result :
|
---|
797 | * Remark : NTDLL.926
|
---|
798 | * Status :
|
---|
799 | *
|
---|
800 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
801 | *****************************************************************************/
|
---|
802 |
|
---|
803 | LPSTR CDECL OS2strstr(const LPSTR str1,
|
---|
804 | const LPSTR str2)
|
---|
805 | {
|
---|
806 | dprintf(("NTDLL: strstr(%s,%s)\n",
|
---|
807 | str1,
|
---|
808 | str2));
|
---|
809 |
|
---|
810 | return (strstr(str1, str2));
|
---|
811 | }
|
---|
812 |
|
---|
813 |
|
---|
814 |
|
---|
815 |
|
---|
816 |
|
---|
817 |
|
---|
818 |
|
---|
819 |
|
---|
820 |
|
---|
821 | /*****************************************************************************
|
---|
822 | * Name :
|
---|
823 | * Purpose :
|
---|
824 | * Parameters:
|
---|
825 | * Variables :
|
---|
826 | * Result :
|
---|
827 | * Remark : NTDLL.934
|
---|
828 | * Status :
|
---|
829 | *
|
---|
830 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
831 | *****************************************************************************/
|
---|
832 |
|
---|
833 | wchar_t* CDECL OS2wcscat( wchar_t* str1,
|
---|
834 | const wchar_t* str2)
|
---|
835 | {
|
---|
836 | dprintf(("NTDLL: wcscat(%08xh,%08xh)\n",
|
---|
837 | str1,
|
---|
838 | str2));
|
---|
839 |
|
---|
840 | return (wcscat(str1, str2));
|
---|
841 | }
|
---|
842 |
|
---|
843 |
|
---|
844 | /*****************************************************************************
|
---|
845 | * Name :
|
---|
846 | * Purpose :
|
---|
847 | * Parameters:
|
---|
848 | * Variables :
|
---|
849 | * Result :
|
---|
850 | * Remark : NTDLL.935
|
---|
851 | * Status :
|
---|
852 | *
|
---|
853 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
854 | *****************************************************************************/
|
---|
855 |
|
---|
856 | wchar_t* CDECL OS2wcschr(const wchar_t* str,
|
---|
857 | int i)
|
---|
858 | {
|
---|
859 | dprintf(("NTDLL: wcschr(%08xh,%08xh)\n",
|
---|
860 | str,
|
---|
861 | i));
|
---|
862 |
|
---|
863 | return (wcschr(str, i));
|
---|
864 | }
|
---|
865 |
|
---|
866 |
|
---|
867 | /*****************************************************************************
|
---|
868 | * Name :
|
---|
869 | * Purpose :
|
---|
870 | * Parameters:
|
---|
871 | * Variables :
|
---|
872 | * Result :
|
---|
873 | * Remark : NTDLL.936
|
---|
874 | * Status :
|
---|
875 | *
|
---|
876 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
877 | *****************************************************************************/
|
---|
878 |
|
---|
879 | int CDECL OS2wcscmp(const wchar_t* str1,
|
---|
880 | const wchar_t* str2)
|
---|
881 | {
|
---|
882 | dprintf(("NTDLL: wcscmp(%08xh,%08xh)\n",
|
---|
883 | str1,
|
---|
884 | str2));
|
---|
885 |
|
---|
886 | return (wcscmp(str1, str2));
|
---|
887 | }
|
---|
888 |
|
---|
889 |
|
---|
890 | /*****************************************************************************
|
---|
891 | * Name :
|
---|
892 | * Purpose :
|
---|
893 | * Parameters:
|
---|
894 | * Variables :
|
---|
895 | * Result :
|
---|
896 | * Remark : NTDLL.937
|
---|
897 | * Status :
|
---|
898 | *
|
---|
899 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
900 | *****************************************************************************/
|
---|
901 |
|
---|
902 | wchar_t* CDECL OS2wcscpy( wchar_t* str1,
|
---|
903 | const wchar_t* str2)
|
---|
904 | {
|
---|
905 | dprintf(("NTDLL: wcscpy(%08xh,%08xh)\n",
|
---|
906 | str1,
|
---|
907 | str2));
|
---|
908 |
|
---|
909 | return (wcscpy(str1, str2));
|
---|
910 | }
|
---|
911 |
|
---|
912 |
|
---|
913 | /*****************************************************************************
|
---|
914 | * Name :
|
---|
915 | * Purpose :
|
---|
916 | * Parameters:
|
---|
917 | * Variables :
|
---|
918 | * Result :
|
---|
919 | * Remark : NTDLL.938
|
---|
920 | * Status :
|
---|
921 | *
|
---|
922 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
923 | *****************************************************************************/
|
---|
924 |
|
---|
925 | size_t CDECL OS2wcscspn(const wchar_t* str1,
|
---|
926 | wchar_t* str2)
|
---|
927 | {
|
---|
928 | dprintf(("NTDLL: wcscspn(%08xh,%08xh)\n",
|
---|
929 | str1,
|
---|
930 | str2));
|
---|
931 |
|
---|
932 | return (wcscspn(str1, str2));
|
---|
933 | }
|
---|
934 |
|
---|
935 |
|
---|
936 | /*****************************************************************************
|
---|
937 | * Name :
|
---|
938 | * Purpose :
|
---|
939 | * Parameters:
|
---|
940 | * Variables :
|
---|
941 | * Result :
|
---|
942 | * Remark : NTDLL.939
|
---|
943 | * Status :
|
---|
944 | *
|
---|
945 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
946 | *****************************************************************************/
|
---|
947 |
|
---|
948 | size_t CDECL OS2wcslen(const wchar_t* str)
|
---|
949 | {
|
---|
950 | dprintf(("NTDLL: wcslen(%08xh)\n",
|
---|
951 | str));
|
---|
952 |
|
---|
953 | return (wcslen(str));
|
---|
954 | }
|
---|
955 |
|
---|
956 |
|
---|
957 | /*****************************************************************************
|
---|
958 | * Name :
|
---|
959 | * Purpose :
|
---|
960 | * Parameters:
|
---|
961 | * Variables :
|
---|
962 | * Result :
|
---|
963 | * Remark : NTDLL.940
|
---|
964 | * Status :
|
---|
965 | *
|
---|
966 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
967 | *****************************************************************************/
|
---|
968 |
|
---|
969 | wchar_t* CDECL OS2wcsncat( wchar_t* str1,
|
---|
970 | const wchar_t* str2,
|
---|
971 | size_t i)
|
---|
972 | {
|
---|
973 | dprintf(("NTDLL: wcsncat(%08xh,%08xh,%08xh)\n",
|
---|
974 | str1,
|
---|
975 | str2,
|
---|
976 | i));
|
---|
977 |
|
---|
978 | return (wcsncat(str1, str2, i));
|
---|
979 | }
|
---|
980 |
|
---|
981 |
|
---|
982 | /*****************************************************************************
|
---|
983 | * Name :
|
---|
984 | * Purpose :
|
---|
985 | * Parameters:
|
---|
986 | * Variables :
|
---|
987 | * Result :
|
---|
988 | * Remark : NTDLL.941
|
---|
989 | * Status :
|
---|
990 | *
|
---|
991 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
992 | *****************************************************************************/
|
---|
993 |
|
---|
994 | int CDECL OS2wcsncmp(const wchar_t* str1,
|
---|
995 | const wchar_t* str2,
|
---|
996 | size_t i)
|
---|
997 | {
|
---|
998 | dprintf(("NTDLL: wcsncmp(%08xh,%08xh,%08xh)\n",
|
---|
999 | str1,
|
---|
1000 | str2,
|
---|
1001 | i));
|
---|
1002 |
|
---|
1003 | return (wcsncmp(str1, str2, i));
|
---|
1004 | }
|
---|
1005 |
|
---|
1006 |
|
---|
1007 | /*****************************************************************************
|
---|
1008 | * Name :
|
---|
1009 | * Purpose :
|
---|
1010 | * Parameters:
|
---|
1011 | * Variables :
|
---|
1012 | * Result :
|
---|
1013 | * Remark : NTDLL.942
|
---|
1014 | * Status :
|
---|
1015 | *
|
---|
1016 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1017 | *****************************************************************************/
|
---|
1018 |
|
---|
1019 | wchar_t* CDECL OS2wcsncpy( wchar_t* str1,
|
---|
1020 | const wchar_t* str2,
|
---|
1021 | size_t i)
|
---|
1022 | {
|
---|
1023 | dprintf(("NTDLL: wcsncpy(%s,%s,%08xh)\n",
|
---|
1024 | str1,
|
---|
1025 | str2,
|
---|
1026 | i));
|
---|
1027 |
|
---|
1028 | return (wcsncpy(str1, str2, i));
|
---|
1029 | }
|
---|
1030 |
|
---|
1031 |
|
---|
1032 | /*****************************************************************************
|
---|
1033 | * Name :
|
---|
1034 | * Purpose :
|
---|
1035 | * Parameters:
|
---|
1036 | * Variables :
|
---|
1037 | * Result :
|
---|
1038 | * Remark : NTDLL.943
|
---|
1039 | * Status :
|
---|
1040 | *
|
---|
1041 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1042 | *****************************************************************************/
|
---|
1043 |
|
---|
1044 | wchar_t* CDECL OS2wcspbrk(const wchar_t* str1,
|
---|
1045 | const wchar_t* str2)
|
---|
1046 | {
|
---|
1047 | dprintf(("NTDLL: wcspbrk(%08xh,%08xh)\n",
|
---|
1048 | str1,
|
---|
1049 | str2));
|
---|
1050 |
|
---|
1051 | return (wcspbrk(str1, str2));
|
---|
1052 | }
|
---|
1053 |
|
---|
1054 |
|
---|
1055 | /*****************************************************************************
|
---|
1056 | * Name :
|
---|
1057 | * Purpose :
|
---|
1058 | * Parameters:
|
---|
1059 | * Variables :
|
---|
1060 | * Result :
|
---|
1061 | * Remark : NTDLL.944
|
---|
1062 | * Status :
|
---|
1063 | *
|
---|
1064 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1065 | *****************************************************************************/
|
---|
1066 |
|
---|
1067 | wchar_t* CDECL OS2wcsrchr(const wchar_t* str,
|
---|
1068 | size_t i)
|
---|
1069 | {
|
---|
1070 | dprintf(("NTDLL: wcsrchr(%08xh,%08xh)\n",
|
---|
1071 | str,
|
---|
1072 | i));
|
---|
1073 |
|
---|
1074 | return (wcsrchr(str, i));
|
---|
1075 | }
|
---|
1076 |
|
---|
1077 |
|
---|
1078 | /*****************************************************************************
|
---|
1079 | * Name :
|
---|
1080 | * Purpose :
|
---|
1081 | * Parameters:
|
---|
1082 | * Variables :
|
---|
1083 | * Result :
|
---|
1084 | * Remark : NTDLL.945
|
---|
1085 | * Status :
|
---|
1086 | *
|
---|
1087 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1088 | *****************************************************************************/
|
---|
1089 |
|
---|
1090 | size_t CDECL OS2wcsspn(const wchar_t* str1,
|
---|
1091 | const wchar_t* str2)
|
---|
1092 | {
|
---|
1093 | dprintf(("NTDLL: wcsspn(%08xh,%08xh)\n",
|
---|
1094 | str1,
|
---|
1095 | str2));
|
---|
1096 |
|
---|
1097 | return (wcsspn(str1, str2));
|
---|
1098 | }
|
---|
1099 |
|
---|
1100 |
|
---|
1101 | /*****************************************************************************
|
---|
1102 | * Name :
|
---|
1103 | * Purpose :
|
---|
1104 | * Parameters:
|
---|
1105 | * Variables :
|
---|
1106 | * Result :
|
---|
1107 | * Remark : NTDLL.946
|
---|
1108 | * Status :
|
---|
1109 | *
|
---|
1110 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1111 | *****************************************************************************/
|
---|
1112 |
|
---|
1113 | wchar_t* CDECL OS2wcsstr(const wchar_t* str1,
|
---|
1114 | const wchar_t* str2)
|
---|
1115 | {
|
---|
1116 | dprintf(("NTDLL: wcsstr(%s,%s)\n",
|
---|
1117 | str1,
|
---|
1118 | str2));
|
---|
1119 |
|
---|
1120 | return (wcsstr(str1, str2));
|
---|
1121 | }
|
---|
1122 |
|
---|
1123 |
|
---|
1124 | /*****************************************************************************
|
---|
1125 | * Name :
|
---|
1126 | * Purpose :
|
---|
1127 | * Parameters:
|
---|
1128 | * Variables :
|
---|
1129 | * Result :
|
---|
1130 | * Remark : NTDLL.?
|
---|
1131 | * Status :
|
---|
1132 | *
|
---|
1133 | * Author : Patrick Haller [Thu, 1999/06/22 20:44]
|
---|
1134 | *****************************************************************************/
|
---|
1135 |
|
---|
1136 | char * CDECL OS2_itoa(int i, char *s, int r)
|
---|
1137 | {
|
---|
1138 | dprintf(("NTDLL: _itoa(%08xh, %08xh, %08xh)\n",
|
---|
1139 | i,
|
---|
1140 | s,
|
---|
1141 | r));
|
---|
1142 |
|
---|
1143 | return (_itoa(i,s,r));
|
---|
1144 | }
|
---|
1145 |
|
---|