1 | /* stdlib.h,v 1.24 2004/09/14 22:27:36 bird Exp */
|
---|
2 | /** @file
|
---|
3 | * FreeBSD 5.3
|
---|
4 | * @changed bird: EMXifications and OS2ifications.
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*-
|
---|
8 | * Copyright (c) 1990, 1993
|
---|
9 | * The Regents of the University of California. All rights reserved.
|
---|
10 | *
|
---|
11 | * Redistribution and use in source and binary forms, with or without
|
---|
12 | * modification, are permitted provided that the following conditions
|
---|
13 | * are met:
|
---|
14 | * 1. Redistributions of source code must retain the above copyright
|
---|
15 | * notice, this list of conditions and the following disclaimer.
|
---|
16 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
17 | * notice, this list of conditions and the following disclaimer in the
|
---|
18 | * documentation and/or other materials provided with the distribution.
|
---|
19 | * 3. All advertising materials mentioning features or use of this software
|
---|
20 | * must display the following acknowledgement:
|
---|
21 | * This product includes software developed by the University of
|
---|
22 | * California, Berkeley and its contributors.
|
---|
23 | * 4. Neither the name of the University nor the names of its contributors
|
---|
24 | * may be used to endorse or promote products derived from this software
|
---|
25 | * without specific prior written permission.
|
---|
26 | *
|
---|
27 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
---|
28 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
29 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
30 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
31 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
32 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
33 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
34 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
35 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
36 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
37 | * SUCH DAMAGE.
|
---|
38 | *
|
---|
39 | * @(#)stdlib.h 8.5 (Berkeley) 5/19/95
|
---|
40 | * $FreeBSD: src/include/stdlib.h,v 1.56 2004/02/23 03:16:58 ache Exp $
|
---|
41 | */
|
---|
42 |
|
---|
43 | #ifndef _STDLIB_H_
|
---|
44 | #define _STDLIB_H_
|
---|
45 |
|
---|
46 | #include <sys/cdefs.h>
|
---|
47 | #include <sys/_null.h>
|
---|
48 | #include <sys/_types.h>
|
---|
49 |
|
---|
50 | #if __BSD_VISIBLE
|
---|
51 | #ifndef _RUNE_T_DECLARED
|
---|
52 | typedef __rune_t rune_t;
|
---|
53 | #define _RUNE_T_DECLARED
|
---|
54 | #endif
|
---|
55 | #endif
|
---|
56 |
|
---|
57 | #if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
|
---|
58 | typedef __size_t size_t;
|
---|
59 | #define _SIZE_T_DECLARED
|
---|
60 | #define _SIZE_T /* bird: emx */
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | #ifndef __cplusplus
|
---|
64 | #if !defined(_WCHAR_T_DECLARED) && !defined(_WCHAR_T) /* bird: emx */
|
---|
65 | typedef __wchar_t wchar_t;
|
---|
66 | #define _WCHAR_T_DECLARED
|
---|
67 | #define _WCHAR_T /* bird: emx */
|
---|
68 | #endif
|
---|
69 | #endif
|
---|
70 |
|
---|
71 | typedef struct _div_t { /* bird: emx (tag) */
|
---|
72 | int quot; /* quotient */
|
---|
73 | int rem; /* remainder */
|
---|
74 | } div_t;
|
---|
75 |
|
---|
76 | typedef struct _ldiv_t { /* bird: emx (tag) */
|
---|
77 | long quot;
|
---|
78 | long rem;
|
---|
79 | } ldiv_t;
|
---|
80 |
|
---|
81 | #define EXIT_FAILURE 1
|
---|
82 | #define EXIT_SUCCESS 0
|
---|
83 |
|
---|
84 | #define RAND_MAX 0x7fffffff
|
---|
85 |
|
---|
86 | extern int __mb_cur_max;
|
---|
87 | #define MB_CUR_MAX __mb_cur_max
|
---|
88 |
|
---|
89 | __BEGIN_DECLS
|
---|
90 | void abort(void) __dead2;
|
---|
91 | int abs(int) __pure2;
|
---|
92 | int atexit(void (*)(void));
|
---|
93 | double atof(const char *);
|
---|
94 | int atoi(const char *);
|
---|
95 | long atol(const char *);
|
---|
96 | void *bsearch(const void *, const void *, size_t,
|
---|
97 | size_t, int (*)(const void *, const void *));
|
---|
98 | void *calloc(size_t, size_t);
|
---|
99 | div_t div(int, int) __pure2;
|
---|
100 | void exit(int) __dead2;
|
---|
101 | void free(void *);
|
---|
102 | char *getenv(const char *);
|
---|
103 | long labs(long) __pure2;
|
---|
104 | ldiv_t ldiv(long, long) __pure2;
|
---|
105 | void *malloc(size_t);
|
---|
106 | int mblen(const char *, size_t);
|
---|
107 | size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
|
---|
108 | int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
|
---|
109 | void qsort(void *, size_t, size_t,
|
---|
110 | int (*)(const void *, const void *));
|
---|
111 | int rand(void);
|
---|
112 | void *realloc(void *, size_t);
|
---|
113 | void srand(unsigned);
|
---|
114 | double strtod(const char * __restrict, char ** __restrict);
|
---|
115 | float strtof(const char * __restrict, char ** __restrict);
|
---|
116 | long strtol(const char * __restrict, char ** __restrict, int);
|
---|
117 | long double
|
---|
118 | strtold(const char * __restrict, char ** __restrict);
|
---|
119 | unsigned long
|
---|
120 | strtoul(const char * __restrict, char ** __restrict, int);
|
---|
121 | int system(const char *);
|
---|
122 | int wctomb(char *, wchar_t);
|
---|
123 | size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
|
---|
124 |
|
---|
125 | /*
|
---|
126 | * Functions added in C99 which we make conditionally available in the
|
---|
127 | * BSD^C89 namespace if the compiler supports `long long'.
|
---|
128 | * The #if test is more complicated than it ought to be because
|
---|
129 | * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
|
---|
130 | * is not supported in the compilation environment (which therefore means
|
---|
131 | * that it can't really be ISO C99).
|
---|
132 | *
|
---|
133 | * (The only other extension made by C99 in thie header is _Exit().)
|
---|
134 | */
|
---|
135 | #if __ISO_C_VISIBLE >= 1999
|
---|
136 | #ifdef __LONG_LONG_SUPPORTED
|
---|
137 | /* LONGLONG */
|
---|
138 | typedef struct _lldiv_t { /* bird: emx (tag) */
|
---|
139 | long long quot;
|
---|
140 | long long rem;
|
---|
141 | } lldiv_t;
|
---|
142 |
|
---|
143 | /* LONGLONG */
|
---|
144 | long long
|
---|
145 | atoll(const char *);
|
---|
146 | /* LONGLONG */
|
---|
147 | long long
|
---|
148 | llabs(long long) __pure2;
|
---|
149 | /* LONGLONG */
|
---|
150 | lldiv_t lldiv(long long, long long) __pure2;
|
---|
151 | /* LONGLONG */
|
---|
152 | long long
|
---|
153 | strtoll(const char * __restrict, char ** __restrict, int);
|
---|
154 | /* LONGLONG */
|
---|
155 | unsigned long long
|
---|
156 | strtoull(const char * __restrict, char ** __restrict, int);
|
---|
157 | #endif /* __LONG_LONG_SUPPORTED */
|
---|
158 |
|
---|
159 | void _Exit(int) __dead2;
|
---|
160 | #endif /* __ISO_C_VISIBLE >= 1999 */
|
---|
161 |
|
---|
162 | /*
|
---|
163 | * Extensions made by POSIX relative to C. We don't know yet which edition
|
---|
164 | * of POSIX made these extensions, so assume they've always been there until
|
---|
165 | * research can be done.
|
---|
166 | */
|
---|
167 | #if __POSIX_VISIBLE /* >= ??? */
|
---|
168 | int posix_memalign(void **, size_t, size_t); /* bird: we implement this. */
|
---|
169 | int rand_r(unsigned *); /* (TSF) */
|
---|
170 | int setenv(const char *, const char *, int);
|
---|
171 | int unsetenv(const char *); /* bird: standard saith shall return int. */
|
---|
172 | #endif
|
---|
173 |
|
---|
174 | /*
|
---|
175 | * The only changes to the XSI namespace in revision 6 were the deletion
|
---|
176 | * of the ttyslot() and valloc() functions, which FreeBSD never declared
|
---|
177 | * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which
|
---|
178 | * FreeBSD also does not have, and mktemp(), are to be deleted.
|
---|
179 | */
|
---|
180 | #if __XSI_VISIBLE
|
---|
181 | /* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */
|
---|
182 | /* long a64l(const char *); */
|
---|
183 | double drand48(void);
|
---|
184 | /* char *ecvt(double, int, int * __restrict, int * __restrict); */
|
---|
185 | double erand48(unsigned short[3]);
|
---|
186 | /* char *fcvt(double, int, int * __restrict, int * __restrict); */
|
---|
187 | /* char *gcvt(double, int, int * __restrict, int * __restrict); */
|
---|
188 | int getsubopt(char **, char *const *, char **);
|
---|
189 | /** @todo int grantpt(int); */
|
---|
190 | char *initstate(unsigned long /* XSI requires u_int */, char *, long);
|
---|
191 | long jrand48(unsigned short[3]);
|
---|
192 | /* char *l64a(long); */
|
---|
193 | void lcong48(unsigned short[7]);
|
---|
194 | long lrand48(void);
|
---|
195 | #ifndef _MKSTEMP_DECLARED
|
---|
196 | int mkstemp(char *);
|
---|
197 | #define _MKSTEMP_DECLARED
|
---|
198 | #endif
|
---|
199 | #ifndef _MKTEMP_DECLARED
|
---|
200 | char *mktemp(char *);
|
---|
201 | #define _MKTEMP_DECLARED
|
---|
202 | #endif
|
---|
203 | long mrand48(void);
|
---|
204 | long nrand48(unsigned short[3]);
|
---|
205 | /** @todo int posix_openpt(int); */
|
---|
206 | /** @todo char *ptsname(int); */
|
---|
207 | int putenv(const char *);
|
---|
208 | long random(void);
|
---|
209 | char *realpath(const char *, char resolved_path[]);
|
---|
210 | unsigned short
|
---|
211 | *seed48(unsigned short[3]);
|
---|
212 | #ifndef _SETKEY_DECLARED
|
---|
213 | /** @todo int setkey(const char *); */
|
---|
214 | #define _SETKEY_DECLARED
|
---|
215 | #endif
|
---|
216 | char *setstate(/* const */ char *);
|
---|
217 | void srand48(long);
|
---|
218 | void srandom(unsigned long);
|
---|
219 | /** @todo int unlockpt(int); */
|
---|
220 | #endif /* __XSI_VISIBLE */
|
---|
221 |
|
---|
222 | #if __BSD_VISIBLE
|
---|
223 | extern const char *_malloc_options;
|
---|
224 | extern void (*_malloc_message)(const char *, const char *, const char *,
|
---|
225 | const char *);
|
---|
226 |
|
---|
227 | /*
|
---|
228 | * The alloca() function can't be implemented in C, and on some
|
---|
229 | * platforms it can't be implemented at all as a callable function.
|
---|
230 | * The GNU C compiler provides a built-in alloca() which we can use;
|
---|
231 | * in all other cases, provide a prototype, mainly to pacify various
|
---|
232 | * incarnations of lint. On platforms where alloca() is not in libc,
|
---|
233 | * programs which use it will fail to link when compiled with non-GNU
|
---|
234 | * compilers.
|
---|
235 | */
|
---|
236 | #if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
|
---|
237 | #undef alloca /* some GNU bits try to get cute and define this on their own */
|
---|
238 | #define alloca(sz) __builtin_alloca(sz)
|
---|
239 | #elif defined(lint)
|
---|
240 | void *alloca(size_t);
|
---|
241 | #endif
|
---|
242 |
|
---|
243 | __uint32_t
|
---|
244 | arc4random(void);
|
---|
245 | void arc4random_addrandom(unsigned char *dat, int datlen);
|
---|
246 | void arc4random_stir(void);
|
---|
247 | char *getbsize(int *, long *);
|
---|
248 | /* getcap(3) functions */
|
---|
249 | /** @todo char *cgetcap(char *, const char *, int); */
|
---|
250 | /** @todo int cgetclose(void); */
|
---|
251 | /** @todo int cgetent(char **, char **, const char *); */
|
---|
252 | /** @todo int cgetfirst(char **, char **); */
|
---|
253 | /** @todo int cgetmatch(const char *, const char *); */
|
---|
254 | /** @todo int cgetnext(char **, char **); */
|
---|
255 | /** @todo int cgetnum(char *, const char *, long *); */
|
---|
256 | /** @todo int cgetset(const char *); */
|
---|
257 | /** @todo int cgetstr(char *, const char *, char **); */
|
---|
258 | /** @todo int cgetustr(char *, const char *, char **); */
|
---|
259 |
|
---|
260 | /** @todo int daemon(int, int); */
|
---|
261 | /** @todo char *devname(int, int); */
|
---|
262 | /** @todo char *devname_r(int, int, char *, int); */
|
---|
263 | int getloadavg(double [], int);
|
---|
264 | __const char *
|
---|
265 | getprogname(void);
|
---|
266 |
|
---|
267 | int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
|
---|
268 | int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
|
---|
269 | void qsort_r(void *, size_t, size_t, void *,
|
---|
270 | int (*)(void *, const void *, const void *));
|
---|
271 | int radixsort(const unsigned char **, int, const unsigned char *,
|
---|
272 | unsigned);
|
---|
273 | void *reallocf(void *, size_t);
|
---|
274 | void setprogname(const char *);
|
---|
275 | int sradixsort(const unsigned char **, int, const unsigned char *,
|
---|
276 | unsigned);
|
---|
277 | void sranddev(void);
|
---|
278 | void srandomdev(void);
|
---|
279 |
|
---|
280 | /* Deprecated interfaces, to be removed in FreeBSD 6.0. */
|
---|
281 | /** @todo __int64_t
|
---|
282 | strtoq(const char *, char **, int); */
|
---|
283 | /** @todo __uint64_t
|
---|
284 | strtouq(const char *, char **, int); */
|
---|
285 |
|
---|
286 | extern char *suboptarg; /* getsubopt(3) external variable */
|
---|
287 | #endif /* __BSD_VISIBLE */
|
---|
288 |
|
---|
289 |
|
---|
290 |
|
---|
291 | /* bird: LIBC stuff - start */
|
---|
292 | #ifdef __BSD_VISIBLE
|
---|
293 | char *_getcwdux(char *, size_t);
|
---|
294 | char *_realrealpath(const char *, char *, size_t);
|
---|
295 | int _getenv_longlong(const char *, long long *);
|
---|
296 | int _getenv_long(const char *, long *);
|
---|
297 | int _getenv_int(const char *, int *);
|
---|
298 | #endif
|
---|
299 | #ifdef __USE_GNU
|
---|
300 | char *canonicalize_file_name(const char *);
|
---|
301 | void *valloc(size_t);
|
---|
302 | #endif
|
---|
303 | int on_exit(void (*)(int, void *), void *);
|
---|
304 | /* bird: LIBC stuff - end */
|
---|
305 |
|
---|
306 |
|
---|
307 | /* bird: EMX/PC stuff - start */
|
---|
308 |
|
---|
309 | #include <malloc.h>
|
---|
310 |
|
---|
311 | #if !defined (_MAX_PATH)
|
---|
312 | #define _MAX_PATH 260
|
---|
313 | #define _MAX_DRIVE 3
|
---|
314 | #define _MAX_DIR 256
|
---|
315 | #define _MAX_FNAME 256
|
---|
316 | #define _MAX_EXT 256
|
---|
317 | #endif
|
---|
318 |
|
---|
319 | #if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) || defined(__USE_EMX)
|
---|
320 |
|
---|
321 | #if !defined (OS2_MODE)
|
---|
322 | #define DOS_MODE 0
|
---|
323 | #define OS2_MODE 1
|
---|
324 | #endif
|
---|
325 |
|
---|
326 | #ifndef _INTPTR_T_DECLARED
|
---|
327 | typedef __intptr_t intptr_t;
|
---|
328 | typedef __uintptr_t uintptr_t;
|
---|
329 | #define _INTPTR_T_DECLARED
|
---|
330 | #endif
|
---|
331 |
|
---|
332 | #if !defined(_MODE_T_DECLARED) && !defined(_MODE_T) /* bird: emx */
|
---|
333 | typedef __mode_t mode_t;
|
---|
334 | #define _MODE_T_DECLARED
|
---|
335 | #define _MODE_T /* bird: emx */
|
---|
336 | #endif
|
---|
337 |
|
---|
338 | /* declare _errno to be compatible with MS/VAC/WATCOM */
|
---|
339 | #if !defined (_ERRNO)
|
---|
340 | #define _ERRNO
|
---|
341 | extern int * _errno(void);
|
---|
342 | #define errno (* _errno())
|
---|
343 | #endif /* bird: emx */
|
---|
344 |
|
---|
345 | #if !defined (_ULDIV_T)
|
---|
346 | #define _ULDIV_T
|
---|
347 | typedef struct
|
---|
348 | {
|
---|
349 | unsigned long quot;
|
---|
350 | unsigned long rem;
|
---|
351 | } _uldiv_t;
|
---|
352 |
|
---|
353 | #if __ISO_C_VISIBLE >= 1999 && defined(__LONG_LONG_SUPPORTED)
|
---|
354 | typedef struct _lldiv_t _lldiv_t;
|
---|
355 | #else
|
---|
356 | typedef struct
|
---|
357 | {
|
---|
358 | long long quot;
|
---|
359 | long long rem;
|
---|
360 | } _lldiv_t;
|
---|
361 | #endif
|
---|
362 | typedef struct
|
---|
363 | {
|
---|
364 | unsigned long long quot;
|
---|
365 | unsigned long long rem;
|
---|
366 | } _ulldiv_t;
|
---|
367 | #endif
|
---|
368 |
|
---|
369 | extern char **environ;
|
---|
370 |
|
---|
371 | extern const unsigned char _osminor;
|
---|
372 | extern const unsigned char _osmajor;
|
---|
373 |
|
---|
374 | /* No DOS support ... */
|
---|
375 | #define _osmode OS2_MODE
|
---|
376 |
|
---|
377 | unsigned alarm (unsigned);
|
---|
378 | int brk(const void *);
|
---|
379 | int chdir (const char *);
|
---|
380 | char *gcvt (double, int, char *); /* this is rubbish standardwise */
|
---|
381 | char *getcwd (char *, size_t);
|
---|
382 | int getpagesize (void);
|
---|
383 | char *getwd (char *);
|
---|
384 | int mkdir(const char *, mode_t);
|
---|
385 | void perror (const char *);
|
---|
386 | int rmdir (const char *);
|
---|
387 | void *sbrk(intptr_t);
|
---|
388 | unsigned sleep (unsigned);
|
---|
389 | long ulimit (int, ...);
|
---|
390 |
|
---|
391 | char *itoa (int, char *, int);
|
---|
392 | char *ltoa (long, char *, int);
|
---|
393 | char *ultoa (unsigned long, char *, int);
|
---|
394 | char *lltoa (long long, char *, int);
|
---|
395 | char *ulltoa (unsigned long long, char *, int);
|
---|
396 |
|
---|
397 | #endif
|
---|
398 |
|
---|
399 |
|
---|
400 | #if (!defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE)) || defined (_WITH_UNDERSCORE) || defined(__USE_EMX)
|
---|
401 |
|
---|
402 | extern char **_environ;
|
---|
403 | extern const char * const _sys_errlist[];
|
---|
404 | extern const int _sys_nerr;
|
---|
405 |
|
---|
406 | unsigned _alarm (unsigned);
|
---|
407 | int _brk(const void *);
|
---|
408 | int _chdir (const char *);
|
---|
409 | char *_gcvt (double, int, char *);
|
---|
410 | char *_getcwd (char *, size_t);
|
---|
411 | int _getpagesize (void);
|
---|
412 | char *_getwd (char *);
|
---|
413 | int _mkdir (const char *, long);
|
---|
414 | int _putenv (const char *);
|
---|
415 | int _rmdir (const char *);
|
---|
416 | void *_sbrk(intptr_t);
|
---|
417 | unsigned _sleep (unsigned);
|
---|
418 | void _swab (const void *, void *, size_t);
|
---|
419 | long _ulimit (int, ...);
|
---|
420 |
|
---|
421 | int _abspath (char *, const char *, int);
|
---|
422 | long long _atoll (const char *);
|
---|
423 | long double _atofl (const char *);
|
---|
424 | int _chdir2 (const char *);
|
---|
425 | int _chdir_os2 (const char *);
|
---|
426 | int _chdrive (int);
|
---|
427 | int _core (int);
|
---|
428 | void _defext (char *, const char *);
|
---|
429 | void _envargs (int *, char ***, const char *);
|
---|
430 | int _execname (char *, size_t);
|
---|
431 | void _exit (int) __attribute__ ((__noreturn__));
|
---|
432 | int _filesys (const char *, char *, size_t);
|
---|
433 | char **_fnexplode (const char *);
|
---|
434 | void _fnexplodefree (char **);
|
---|
435 | char _fngetdrive (const char *);
|
---|
436 | int _fnisabs (const char *);
|
---|
437 | int _fnisrel (const char *);
|
---|
438 | void _fnlwr (char *);
|
---|
439 | void _fnlwr2 (char *, const char *);
|
---|
440 | char *_fnslashify (char *);
|
---|
441 | int _fullpath (char *, const char *, int);
|
---|
442 | int _getcwd1 (char *, char);
|
---|
443 | char *_getcwd2 (char *, int);
|
---|
444 | int _getdrive (void);
|
---|
445 | char *_getext (const char *);
|
---|
446 | char *_getext2 (const char *);
|
---|
447 | char *_getname (const char *);
|
---|
448 | int _getsockhandle (int);
|
---|
449 | int _gettid (void);
|
---|
450 | char *_getvol (char);
|
---|
451 | char *_itoa (int, char *, int);
|
---|
452 | _lldiv_t _lldiv (long long, long long);
|
---|
453 | char *_lltoa (long long, char *, int);
|
---|
454 | _uldiv_t _uldiv (unsigned long, unsigned long);
|
---|
455 | _ulldiv_t _ulldiv (unsigned long long, unsigned long long);
|
---|
456 | char *_itoa (int, char *, int);
|
---|
457 | char *_ltoa (long, char *, int);
|
---|
458 | char *_ultoa (unsigned long, char *, int);
|
---|
459 | char *_lltoa (long long, char *, int);
|
---|
460 | char *_ulltoa (unsigned long long, char *, int);
|
---|
461 | void _makepath (char *, const char *, const char *,
|
---|
462 | const char *, const char *);
|
---|
463 | int _path (char *, const char *);
|
---|
464 | int _path2(const char *pszName, const char *pszSuffixes, char *pszDst, size_t cbDst);
|
---|
465 | int _read_kbd (int, int, int);
|
---|
466 | void _remext (char *);
|
---|
467 | void _rfnlwr (void);
|
---|
468 | void _response (int *, char ***);
|
---|
469 | void _scrsize (int *);
|
---|
470 | void _searchenv (const char *, const char *, char *);
|
---|
471 | int _searchenv2(const char *pszEnvVar, const char *pszName, unsigned fFlags, const char *pszSuffixes,
|
---|
472 | char *pszDst, size_t cbDst);
|
---|
473 | int _searchenv2_value(const char *pszSearchPath, const char *pszName, unsigned fFlags, const char *pszSuffixes,
|
---|
474 | char *pszDst, size_t cbDst);
|
---|
475 | int _searchenv2_has_suffix(const char *pszName, size_t cchName, const char *pszSuffixes);
|
---|
476 | int _searchenv2_one_file(char *pszDst, size_t cbDst, size_t cchName, unsigned fFlags, const char *pszSuffixes);
|
---|
477 | /** @name _SEARCHENV2_F_XXX - Flags for _searchenv2(), _searchenv2_value()
|
---|
478 | * and _searchenv2_one_file().
|
---|
479 | * @{ */
|
---|
480 | /** Indicates that we're searching for an executable file. */
|
---|
481 | #define _SEARCHENV2_F_EXEC_FILE 1
|
---|
482 | /** Indicates that we shouldn't explicitly check the current directory before
|
---|
483 | * searching the search path. */
|
---|
484 | #define _SEARCHENV2_F_SKIP_CURDIR 2
|
---|
485 | /** @} */
|
---|
486 |
|
---|
487 | void _sfnlwr (const char *);
|
---|
488 | unsigned _sleep2 (unsigned);
|
---|
489 | char ** _splitargs (char *, int *);
|
---|
490 | void _splitpath (const char *, char *, char *, char *, char *);
|
---|
491 | float _strtof (const char *, char **);
|
---|
492 | long double _strtold (const char *, char **);
|
---|
493 | long long _strtoll (const char *, char **, int);
|
---|
494 | unsigned long long _strtoull (const char *, char **, int);
|
---|
495 | char _swchar (void);
|
---|
496 | void _wildcard (int *, char ***);
|
---|
497 |
|
---|
498 | int _beginthread (void (*)(void *), void *, unsigned, void *);
|
---|
499 | void _endthread (void);
|
---|
500 | void **_threadstore (void);
|
---|
501 |
|
---|
502 | int _setenv(const char *envname, const char *envval, int overwrite);
|
---|
503 | int _unsetenv(const char *name);
|
---|
504 |
|
---|
505 | #endif
|
---|
506 |
|
---|
507 | __END_DECLS
|
---|
508 |
|
---|
509 | /* bird: EMX/PC stuff - end */
|
---|
510 |
|
---|
511 | #endif /* !_STDLIB_H_ */
|
---|
512 |
|
---|