3 |
- |
1 |
|
|
|
2 |
/* /usr/include/stdlib.h */
|
|
|
3 |
|
|
|
4 |
size_t __ctype_get_mb_cur_max(void);
|
|
|
5 |
|
|
|
6 |
int atoi(char *nptr);
|
|
|
7 |
long atol(char *nptr);
|
|
|
8 |
long atoll(char *nptr);
|
|
|
9 |
long strtol(char *nptr, void *endptr, int base);
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
/* we dont do big numbers so far...
|
|
|
13 |
|
|
|
14 |
double atof(char *nptr);
|
|
|
15 |
double strtod(char *nptr, void *endptr);
|
|
|
16 |
float strtof(char *nptr, void *endptr);
|
|
|
17 |
long double strtold(char *nptr, void *endptr);
|
|
|
18 |
u_long strtoul(char *nptr, void *endptr, int base);
|
|
|
19 |
long long int strtoq(char *nptr, void *endptr, int base);
|
|
|
20 |
unsigned long long int strtouq(char *nptr, void *endptr, int base);
|
|
|
21 |
long long int strtoll(char *nptr, void *endptr, int base);
|
|
|
22 |
unsigned long long int strtoull(char *nptr, void *endptr, int base);
|
|
|
23 |
long strtol_l(char *nptr, void *endptr, int base, locale_t loc);
|
|
|
24 |
unsigned long int strtoul_l(char *nptr, void *endptr, int base, locale_t loc);
|
|
|
25 |
long long int strtoll_l(char *nptr, void *endptr, int base, locale_t loc);
|
|
|
26 |
unsigned long long int strtoull_l(char *nptr, void *endptr, int base, locale_t loc);
|
|
|
27 |
double strtod_l(char *nptr, void *endptr, locale_t loc);
|
|
|
28 |
float strtof_l(char *nptr, void *endptr, locale_t loc);
|
|
|
29 |
long double strtold_l(char *nptr, void *endptr, locale_t loc);
|
|
|
30 |
|
|
|
31 |
*/
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
char* l64a(long n);
|
|
|
35 |
long a64l(char *s);
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
long random(void);
|
|
|
39 |
void srandom(u_int seed);
|
|
|
40 |
char* initstate(u_int seed, char* statebuf, size_t statelen);
|
|
|
41 |
char* setstate(char *statebuf);
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
struct random_data
|
|
|
45 |
{
|
|
|
46 |
int32_t *fptr;
|
|
|
47 |
int32_t *rptr;
|
|
|
48 |
int32_t *state;
|
|
|
49 |
int rand_type;
|
|
|
50 |
int rand_deg;
|
|
|
51 |
int rand_sep;
|
|
|
52 |
int32_t *end_ptr;
|
|
|
53 |
};
|
|
|
54 |
|
|
|
55 |
int random_r(struct random_data *buf, int32_t *result);
|
|
|
56 |
int srandom_r(u_int seed, struct random_data *buf);
|
|
|
57 |
int initstate_r(u_int seed, char *statebuf, size_t statelen, struct random_data *buf);
|
|
|
58 |
int setstate_r(char *statebuf, struct random_data *buf);
|
|
|
59 |
int rand(void);
|
|
|
60 |
void srand(u_int seed);
|
|
|
61 |
int rand_r(u_int *seed);
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
/* we dont do big numbers so far...
|
|
|
65 |
|
|
|
66 |
double drand48(void);
|
|
|
67 |
double erand48(void *ptr);
|
|
|
68 |
|
|
|
69 |
*/
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
long lrand48(void);
|
|
|
73 |
long nrand48(void *xsubi);
|
|
|
74 |
|
|
|
75 |
long mrand48(void);
|
|
|
76 |
long jrand48(void *xsubi);
|
|
|
77 |
|
|
|
78 |
void srand48(long seedval);
|
|
|
79 |
u_int* seed48 (void *seed16v);
|
|
|
80 |
|
|
|
81 |
void lcong48(void *param);
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
/* no struct arrays so far...
|
|
|
85 |
|
|
|
86 |
struct drand48_data
|
|
|
87 |
{
|
|
|
88 |
unsigned short int x[3];
|
|
|
89 |
unsigned short int old_x[3];
|
|
|
90 |
unsigned short int c;
|
|
|
91 |
unsigned short int init;
|
|
|
92 |
unsigned long long int a;
|
|
|
93 |
};
|
|
|
94 |
|
|
|
95 |
int drand48_r(struct drand48_data *restrict buffer, double *result);
|
|
|
96 |
int erand48_r(unsigned short int xsubi[3], struct drand48_data *restrict buffer, double *result);
|
|
|
97 |
int lrand48_r(struct drand48_data *restrict buffer, long int *restrict result);
|
|
|
98 |
int nrand48_r(unsigned short int xsubi[3], struct drand48_data *restrict buffer, long int *restrict result);
|
|
|
99 |
int mrand48_r(struct drand48_data *restrict buffer, long int *restrict result);
|
|
|
100 |
int jrand48_r(unsigned short int xsubi[3], struct drand48_data *restrict buffer, long int *restrict result);
|
|
|
101 |
int srand48_r(long int seedval, struct drand48_data *buffer);
|
|
|
102 |
int seed48_r(unsigned short int seed16v[3], struct drand48_data *buffer);
|
|
|
103 |
int lcong48_r(unsigned short int param[7], struct drand48_data *buffer);
|
|
|
104 |
|
|
|
105 |
*/
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
void* malloc(size_t size);
|
|
|
109 |
void* calloc(size_t nmemb, size_t size);
|
|
|
110 |
void* realloc(void *ptr, size_t size);
|
|
|
111 |
void free(void *ptr);
|
|
|
112 |
void cfree(void *ptr);
|
|
|
113 |
void* valloc(size_t size);
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
int posix_memalign(void *memptr, size_t alignment, size_t size);
|
|
|
117 |
void abort(void);
|
|
|
118 |
int atexit(void *func);
|
|
|
119 |
int on_exit(void *func, void *arg);
|
|
|
120 |
void exit(int status);
|
|
|
121 |
void _Exit(int status);
|
|
|
122 |
char* getenv(char *name);
|
|
|
123 |
char* secure_getenv (char *name);
|
|
|
124 |
int putenv(char *string);
|
|
|
125 |
int setenv(char *name, char *value, int replace);
|
|
|
126 |
int unsetenv(char *name);
|
|
|
127 |
int clearenv(void);
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
char* mktemp(char *template);
|
|
|
131 |
int mkstemp(char *template);
|
|
|
132 |
int mkstemp64(char *template);
|
|
|
133 |
char* mkdtemp(char *template);
|
|
|
134 |
int mkostemp(char *template, int flags);
|
|
|
135 |
int mkostemp64(char *template, int flags);
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
int system(char *command);
|
|
|
139 |
char* canonicalize_file_name(char *name);
|
|
|
140 |
char* realpath(char *name, char *resolved);
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
void* bsearch(void *key, void *base, size_t nmemb, size_t size, void *compar);
|
|
|
144 |
void qsort(void *base, size_t nmemb, size_t size, void *compar);
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
int abs(int x);
|
|
|
148 |
long labs(long x);
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
struct div_t
|
|
|
152 |
{
|
|
|
153 |
int quot;
|
|
|
154 |
int rem;
|
|
|
155 |
};
|
|
|
156 |
|
|
|
157 |
struct ldiv_t
|
|
|
158 |
{
|
|
|
159 |
long quot;
|
|
|
160 |
long rem;
|
|
|
161 |
};
|
|
|
162 |
|
|
|
163 |
struct div_t div(int numer, int denom);
|
|
|
164 |
struct ldiv_t ldiv(long numer, long denom);
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
/* we dont do big numbers so far...
|
|
|
168 |
|
|
|
169 |
long long int llabs (long long int x);
|
|
|
170 |
|
|
|
171 |
struct lldiv_t {
|
|
|
172 |
long long int quot;
|
|
|
173 |
long long int rem;
|
|
|
174 |
};
|
|
|
175 |
|
|
|
176 |
lldiv_t lldiv(long long int numer, long long int denom);
|
|
|
177 |
char* ecvt(double value, int ndigit, int *decpt, int *sign);
|
|
|
178 |
char* fcvt(double value, int ndigit, int *decpt, int *sign);
|
|
|
179 |
char* gcvt(double value, int ndigit, char *buf);
|
|
|
180 |
char* qecvt(long double value, int ndigit, int *decpt, int *sign);
|
|
|
181 |
char* qfcvt(long double value, int ndigit, int *decpt, int *sign);
|
|
|
182 |
char* qgcvt(long double value, int ndigit, char *buf);
|
|
|
183 |
int ecvt_r(double value, int ndigit, int *decpt, int *sign, char *buf, size_t len);
|
|
|
184 |
int fcvt_r(double value, int ndigit, int *decpt, int *sign, char *buf, size_t len);
|
|
|
185 |
int qecvt_r(long double value, int ndigit, int *decpt, int *sign, char *buf, size_t len);
|
|
|
186 |
int qfcvt_r(long double value, int ndigit, int *decpt, int *sign, char *buf, size_t len);
|
|
|
187 |
|
|
|
188 |
*/
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
typedef char wchar_t;
|
|
|
192 |
|
|
|
193 |
int mblen(char *s, size_t n);
|
|
|
194 |
int mbtowc(wchar_t *pwc, char *s, size_t n);
|
|
|
195 |
int wctomb(char *s, wchar_t wchar);
|
|
|
196 |
size_t mbstowcs(wchar_t *pwcs, char *s, size_t n);
|
|
|
197 |
size_t wcstombs(char *s, wchar_t *pwcs, size_t n);
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
int rpmatch(char *response);
|
|
|
201 |
int getsubopt(void *optionp, void *tokens, void *valuep);
|
|
|
202 |
void setkey(char *key);
|
|
|
203 |
int posix_openpt(int oflag);
|
|
|
204 |
int grantpt(int fd);
|
|
|
205 |
int unlockpt(int fd);
|
|
|
206 |
char* ptsname(int fd);
|
|
|
207 |
int ptsname_r(int fd, char *buf, size_t buflen);
|
|
|
208 |
int getpt(void);
|
|
|
209 |
int getloadavg(void *ptr, int nelem);
|
|
|
210 |
void __cxa_finalize(void *ptr);
|