-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibc.h
289 lines (289 loc) · 12.3 KB
/
libc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
void abort(void);
int abs(int n);
double acos(double x);
char *asctime(const struct tm *time);
char *asctime_r (const struct tm *tm, char *buf);
double asin(double x);
void assert(int expression);
double atan(double x);
double atan2(double y, double x);
double atof(const char *string);
int atoi(const char *string);
long int atol(const char *string);
wint_t btowc(int c);
void *calloc(size_t num, size_t size);
int catclose (nl_catd catd);
char *catgets(nl_catd catd, int set_id, int msg_id, const char *s);
nl_catd catopen (const char *name, int oflag);
double ceil(double x);
void clearerr(FILE *stream);
clock_t clock(void);
double cos(double x);
double cosh(double x);
char *ctime(const time_t *time);
char *ctime64(const time64_t *time);
char *ctime_r(const time_t *time, char *buf);
char *ctime64_r(const time64_t *time, char *buf);
double difftime(time_t time2, time_t time1);
double difftime64(time64_t time2, time64_t time1);
div_t div(int numerator, int denominator);
double erf(double x);
double erfc(double x);
void exit(int status);
double exp(double x);
double fabs(double x);
int fclose(FILE *stream);
FILE *fdopen(int handle, const char *type);
int feof(FILE *stream);
int ferror(FILE *stream);
int fflush(FILE *stream);
int fgetc(FILE *stream);
int fgetpos(FILE *stream, fpos_t *pos);
char *fgets(char *string, int n, FILE *stream);
wint_t fgetwc(FILE *stream);
wchar_t *fgetws(wchar_t *wcs, int n, FILE *stream);
int fileno(FILE *stream);
double floor(double x);
double fmod(double x, double y);
FILE *fopen(const char *filename, const char *mode);
int fprintf(FILE *stream, const char *format-string, ...);
int fputc(int c, FILE *stream);
int fputs(const char *string, FILE *stream);
wint_t fputwc(wchar_t wc, FILE *stream);
int fputws(const wchar_t *wcs, FILE *stream);
size_t fread(void *buffer, size_t size, size_t count, FILE *stream);
void free(void *ptr);
FILE *freopen(const char *filename, const char *mode, FILE *stream);
double frexp(double x, int *expptr);
int fscanf(FILE *stream, const char *format-string, ...);
int fseek(FILE *stream, long int offset, int origin);
int fsetpos(FILE *stream, const fpos_t *pos);
long int ftell(FILE *stream);
int fwide(FILE *stream, int mode);
int fwprintf(FILE *stream, const wchar_t *format, ...);
size_t fwrite(const void *buffer, size_t size,size_t count, FILE *stream);
int fwscanf(FILE *stream, const wchar_t *format, ...)
double gamma(double x);
int getc(FILE *stream);
int getchar(void);
char *getenv(const char *varname);
char *gets(char *buffer);
wint_t getwc(FILE *stream);
wint_t getwchar(void);
struct tm *gmtime(const time_t *time);
struct tm *gmtime64(const time64_t *time);
struct tm *gmtime_r (const time_t *time, struct tm *result);
struct tm *gmtime64_r (const time64_t *time, struct tm *result);
double hypot(double side1, double side2);
bool isalnum(char c);
bool isalpha(char c);
bool isascii(char c);
bool isblank(char c);
bool iscntrl(char c);
bool isdigit(char c);
bool isgraph(char c);
bool islower(char c);
bool isprint(char c);
bool ispunct(char c);
bool isspace(char c);
bool isupper(char c);
bool iswalnum (wint_t wc);
bool iswalpha (wint_t wc);
bool iswblank (wint_t wc);
bool iswcntrl (wint_t wc);
bool iswctype(wint_t wc, wctype_t wc_prop);
bool iswdigit (wint_t wc);
bool iswgraph (wint_t wc);
bool iswlower (wint_t wc);
bool iswprint (wint_t wc);
bool iswpunct (wint_t wc);
bool iswspace (wint_t wc);
bool iswupper (wint_t wc);
bool iswxdigit (wint_t wc);
bool isxdigit(char c);
double j0(double x);
double j1(double x);
double jn(int n, double x);
long int labs(long int n);
double ldexp(double x, int exp);
ldiv_t ldiv(long int numerator, long int denominator);
struct lconv *localeconv(void);
struct tm *localtime(const time_t *timeval);
struct tm *localtime64(const time64_t *timeval);
struct tm *localtime_r (const time_t *timeval, struct tm *result);
struct tm *localtime64_r (const time64_t *timeval, struct tm *result);
double log(double x);
double log10(double x);
void longjmp(jmp_buf env, int value);
void *malloc(size_t size);
int mblen(const char *string, size_t n);
int mbrlen (const char *s, size_t n, mbstate_t *ps);
int mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
int mbsinit (const mbstate_t *ps);
size_t mbsrtowc (wchar_t *dst, const char **src, size_t len, mbstate_t *ps);
size_t mbstowcs(wchar_t *pwc, const char *string, size_t n);
int mbtowc(wchar_t *pwc, const char *string, size_t n);
void *memchr(const void *buf, int c, size_t count);
int memcmp(const void *buf1, const void *buf2, size_t count);
void *memcpy(void *dest, const void *src, size_t count);
void *memmove(void *dest, const void *src, size_t count);
void *memset(void *dest, int c, size_t count);
time_t mktime(struct tm *time);
time64_t mktime64(struct tm *time);
double modf(double x, double *intptr);
double nextafter(double x, double y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
long double nexttowardl(long double x, long double y);
char *nl_langinfo(nl_item item);
void perror(const char *string);
double pow(double x, double y);
int printf(const char *format, ...);
int putc(char c, FILE *stream);
int putchar(char c);
int *putenv(const char *varname);
int puts(const char *string);
wint_t putwchar(wchar_t wc, FILE *stream);
wint_t putwchar(wchar_t wc);
_Decimal32 quantized32(_Decimal32 x, _Decimal32 y);
_Decimal64 quantized64(_Decimal64 x, _Decimal64 y);
_Decimal128 quantized128(_Decimal128 x, _Decimal128 y);
int quantexpd32(_Decimal32 x);
int quantexpd64(_Decimal64 x);
int quantexpd128(_Decimal128 x);
__bool__ samequantumd32(_Decimal32 x, _Decimal32 y);
__bool__ samequantumd64(_Decimal64 x, _Decimal64 y);
__bool__ samequantumd128(_Decimal128 x, _Decimal128 y);
int raise(int sig);
int rand(void);
int rand_r(void);
void *realloc(void *ptr, size_t size);
int regcomp(regex_t *preg, const char *pattern, int cflags);
size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size);
int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t *pmatch, int eflags);
void regfree(regex_t *preg);
int remove(const char *filename);
int rename(const char *oldname, const char *newname);
void rewind(FILE *stream);
int scanf(const char *format, ...);
void setbuf(FILE *stream, char *buffer);
int setjmp(jmp_buf env);
char *setlocale(int category, const char *locale);
int setvbuf(FILE *stream, char *buf, int type, size_t size);
double sin(double x);
double sinh(double x);
int snprintf(char *outbuf, size_t n, const char*, ...)
int sprintf(char *buffer, const char *format, ...);
double sqrt(double x);
void srand(unsigned int seed);
int sscanf(const char *buffer, const char *format, ...);
int srtcasecmp(const char *string1, const char *string2);
char *strcat(char *string1, const char *string2);
char *strchr(const char *string, int c);
int strcmp(const char *string1, const char *string2);
int strcoll(const char *string1, const char *string2);
char *strcpy(char *string1, const char *string2);
size_t strcspn(const char *string1, const char *string2);
char *strerror(int errnum);
int strfmon (char *s, size_t maxsize, const char *format, ...);
size_t strftime (char *dest, size_t maxsize, const char *format, const struct tm *timeptr);
size_t strlen(const char *string);
int strncasecmp(const char *string1, const char *string2, size_t count);
char *strncat(char *string1, const char *string2, size_t count);
int strncmp(const char *string1, const char *string2, size_t count);
char *strncpy(char *string1, const char *string2, size_t count);
char *strpbrk(const char *string1, const char *string2);
char *strptime (const char *buf, const char *format, struct tm *tm);
char *strrchr(const char *string, int c);
size_t strspn(const char *string1, const char *string2);
char *strstr(const char *string1, const char *string2);
double strtod(const char *nptr, char **endptr);
_Decimal32 strtod32(const char *nptr, char **endptr);
_Decimal64 strtod64(const char *nptr, char **endptr);
_Decimal128 strtod128(const char *nptr, char **endptr);
float strtof(const char *nptr, char **endptr);
char *strtok(char *string1, const char *string2);
char *strtok_r(char *string, const char *seps, char **lasts);
long int strtol(const char *nptr, char **endptr, int base);
long double strtold(const char *nptr, char **endptr);
unsigned long int strtoul(const char *string1, char **string2, int base);
size_t strxfrm(char *string1, const char *string2, size_t count);
int swprintf(wchar_t *wcsbuffer, size_t n, const wchar_t *format, ...);
int swscanf (const wchar_t *buffer, const wchar_t *format, ...)
int system(const char *string);
double tan(double x);
double tanh(double x);
time_t time(time_t *timeptr);
time64_t time64(time64_t *timeptr);
FILE *tmpfile(void);
char *tmpnam(char *string);
int toascii(int c);
int tolower(int c);
int toupper(int c);
wint_t towctrans(wint_t wc, wctrans_t desc);
wint_t towlower (wint_t wc);
wint_t towupper (wint_t wc);
int ungetc(int c, FILE *stream);
wint_t ungetwc(wint_t wc, FILE *stream);
var_type va_arg(va_list arg_ptr, var_type);
void va_copy(va_list dest, va_list src);
void va_end(va_list arg_ptr);
void va_start(va_list arg_ptr, variable_name);
int vfprintf(FILE *stream, const char *format, va_list arg_ptr);
int vfscanf(FILE *stream, const char *format, va_list arg_ptr);
int vfwprintf(FILE *stream, const wchar_t *format, va_list arg);
int vfwscanf(FILE *stream, const wchar_t *format, va_list arg_ptr);
int vprintf(const char *format, va_list arg_ptr);
int vscanf(const char *format, va_list arg_ptr);
int vsprintf(char *target, const char *format, va_list arg_ptr);
int vsnprintf(char *outbuf, size_t n, const char*, va_list);
int vsscanf(const char* buffer, const char *format, va_list arg_ptr);
int vswprintf(wchar_t *wcsbuffer, size_t n, const wchar_t *format, va_list arg);
int vswscanf(const wchar_t *buffer, const wchar_t *format, va_list arg_ptr);
int vwprintf(const wchar_t *format, va_list arg);
int vwscanf(const wchar_t *format, va_list arg_ptr);
int wcrtomb (char *s, wchar_t wchar, mbstate_t *pss);
wchar_t *wcscat(wchar_t *string1, const wchar_t *string2);
wchar_t *wcschr(const wchar_t *string, wchar_t character);
int wcscmp(const wchar_t *string1, const wchar_t *string2);
int wcscoll (const wchar_t *wcs1, const wchar_t *wcs2);
wchar_t *wcscpy(wchar_t *string1, const wchar_t *string2);
size_t wcscspn(const wchar_t *string1, const wchar_t *string2);
size_t wcsftime(wchar_t *wdest, size_t maxsize, const wchar_t *format, const struct tm *timeptr);
size_t wcslen(const wchar_t *string);
struct wcslconv *wcslocaleconv(void);
wchar_t *wcsncat(wchar_t *string1, const wchar_t *string2, size_t count);
int wcsncmp(const wchar_t *string1, const wchar_t *string2, size_t count);
wchar_t *wcsncpy(wchar_t *string1, const wchar_t *string2, size_t count);
wchar_t *wcspbrk(const wchar_t *string1, const wchar_t *string2);
wchar_t *wcsptime ( const wchar_t *buf, const wchar_t *format, struct tm *tm );
wchar_t *wcsrchr(const wchar_t *string, wchar_t character);
size_t wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
size_t wcsspn(const wchar_t *string1, const wchar_t *string2);
wchar_t *wcsstr(const wchar_t *wcs1, const wchar_t *wcs2);
double wcstod(const wchar_t *nptr, wchar_t **endptr);
_Decimal32 wcstod32(const wchar_t *nptr, wchar_t **endptr);
_Decimal64 wcstod64(const wchar_t *nptr, wchar_t **endptr);
_Decimal128 wcstod128(const wchar_t *nptr, wchar_t **endptr);
float wcstof(const wchar_t *nptr, wchar_t **endptr);
wchar_t *wcstok(wchar_t *wcs1, const wchar_t *wcs2, wchar_t **ptr)
long int wcstol(const wchar_t *nptr, wchar_t **endptr, int base);
long double wcstold(const wchar_t *nptr, wchar_t **endptr);
size_t wcstombs(char *dest, const wchar_t *string, size_t count);
unsigned long int wcstoul(const wchar_t *nptr, wchar_t **endptr, int base);
size_t wcsxfrm (wchar_t *wcs1, const wchar_t *wcs2, size_t n);
int wctob(wint_t wc);
int wctomb(char *string, wchar_t character);
wctrans_t wctrans(const char *property);
wctype_t wctype (const char *property);
int wcswidth(const wchar_t *pwcs, size_t n);
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *wmemcpy(wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);
int wprintf(const wchar_t *format, ...);
int wscanf(const wchar_t *format, ...);
double y0(double x);
double y1(double x);
double yn(int n, double x);