1 /* $NetBSD: llib-lstdc,v 1.3 1995/07/03 21:39:28 cgd Exp $ */
4 * Copyright (c) 1994, 1995 Jochen Pohl
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Jochen Pohl for
19 * 4. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 void (__assert)(const char *expression, int line, const char *file);
60 void (assert)(int expression);
76 int (isxdigit)(int c);
88 char *(setlocale)(int category, const char *locale);
89 struct lconv *(localeconv)(void);
94 double (acos)(double x);
95 double (asin)(double x);
96 double (atan)(double x);
97 double (atan2)(double y, double x);
98 double (cos)(double x);
99 double (sin)(double x);
100 double (tan)(double x);
101 double (cosh)(double x);
102 double (sinh)(double x);
103 double (tanh)(double x);
104 double (exp)(double x);
105 double (frexp)(double value, int *exp);
106 double (ldexp)(double x, int exp);
107 double (log)(double x);
108 double (log10)(double x);
109 double (modf)(double value, double *iptr);
110 double (pow)(double x, double y);
111 double (sqrt)(double x);
112 double (ceil)(double x);
113 double (fabs)(double x);
114 double (floor)(double x);
115 double (fmod)(double x, double y);
120 int (setjmp)(jmp_buf env);
121 void (longjmp)(jmp_buf env, int val);
126 void (*(signal)(int sig, void (*func)(int)))(int);
127 int (raise)(int sig);
132 int (remove)(const char *filename);
133 int (rename)(const char *old, const char *new);
134 FILE *(tmpfile)(void);
135 char *(tmpnam)(char *s);
136 int (fclose)(FILE *stream);
137 int (fflush)(FILE *stream);
138 FILE *(fopen)(const char *filename, const char *mode);
139 FILE *(freopen)(const char *filename, const char *mode, FILE *stream);
140 void (setbuf)(FILE *stream, char *buf);
141 int (setvbuf)(FILE *stream, char *buf, int mode, size_t size);
143 int (fprintf)(FILE *stream, const char *format, ...);
145 int (fscanf)(FILE *stream, const char *format, ...);
147 int (printf)(const char *format, ...);
149 int (scanf)(const char *format, ...);
151 int (sprintf)(char *s, const char *format, ...);
153 int (sscanf)(const char *s, const char *format, ...);
154 int (vfprintf)(FILE *stream, const char *format, va_list arg);
155 int (vprintf)(const char *format, va_list arg);
156 int (vsprintf)(char *s, const char *format, va_list arg);
157 int (fgetc)(FILE *stream);
158 char *(fgets)(char *s, int n, FILE *stream);
159 int (fputc)(int c, FILE *stream);
160 int (fputs)(const char *s, FILE *stream);
161 int (getc)(FILE *stream);
163 char *(gets)(char *s);
164 int (putc)(int c, FILE *stream);
165 int (putchar)(int c);
166 int (puts)(const char *s);
167 int (ungetc)(int c, FILE *stream);
168 size_t (fread)(void *ptr, size_t size, size_t nmemb, FILE *stream);
169 size_t (fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *stream);
170 int (fgetpos)(FILE *stream, fpos_t *pos);
171 int (fseek)(FILE *stream, long offset, int whence);
172 int (fsetpos)(FILE *stream, const fpos_t *pos);
173 long (ftell)(FILE *stream);
174 void (rewind)(FILE *stream);
175 void (clearerr)(FILE *stream);
176 int (feof)(FILE *stream);
177 int (ferror)(FILE *stream);
178 void (perror)(const char *s);
183 double (atof)(const char *nptr);
184 int (atoi)(const char *nptr);
185 long (atol)(const char *nptr);
186 double (strtod)(const char *nptr, char **endptr);
187 long (strtol)(const char *nptr, char **endptr, int base);
188 unsigned long (strtoul)(const char *nptr, char **endptr, int base);
190 void (srand)(unsigned seed);
191 void *(calloc)(size_t nmemb, size_t size);
192 void (free)(void *ptr);
193 void *(malloc)(size_t size);
194 void *(realloc)(void *ptr, size_t size);
196 int (atexit)(void (*func)(void));
197 void (exit)(int status);
198 char *(getenv)(const char *name);
199 int (system)(const char *string);
200 void *(bsearch)(const void *key, const void *base, size_t nmemb,
201 size_t size, int (*compar)(const void *, const void *));
202 void (qsort)(void *base, size_t nmemb, size_t size,
203 int (*compar)(const void *, const void *));
205 div_t (div)(int numer, int denom);
207 ldiv_t (ldiv)(long numer, long denom);
208 int (mblen)(const char *s, size_t n);
209 int (mbtowc)(wchar_t *PWC, const char *s, size_t n);
210 int (wctomb)(char *s, wchar_t wchar);
211 size_t (mbstowcs)(wchar_t *pwcs, const char *s, size_t n);
212 size_t (wcstombs)(char *s, const wchar_t *pwcs, size_t n);
217 void *(memcpy)(void *s1, const void *s2, size_t n);
218 void *(memmove)(void *s1, const void *s2, size_t n);
219 char *(strcpy)(char *s1, const char *s2);
220 char *(strncpy)(char *s1, const char *s2, size_t n);
221 char *(strcat)(char *s1, const char *s2);
222 char *(strncat)(char *s1, const char *s2, size_t n);
223 int (memcmp)(const void *s1, const void *s2, size_t n);
224 int (strcmp)(const char *s1, const char *s2);
225 int (strcoll)(const char *s1, const char *s2);
226 int (strncmp)(const char *s1, const char *s2, size_t n);
227 size_t (strxfrm)(char *s1, const char *s2, size_t n);
228 void *(memchr)(const void *s, int c, size_t n);
229 char *(strchr)(const char *s, int c);
230 size_t (strcspn)(const char *s1, const char *s2);
231 char *(strpbrk)(const char *s1, const char *s2);
232 char *(strrchr)(const char *s1, int c);
233 size_t (strspn)(const char *s1, const char *s2);
234 char *(strstr)(const char *s1, const char *s2);
235 char *(strtok)(char *s1, const char *s2);
236 void *(memset)(void *s, int c, size_t n);
237 char *(strerror)(int errnom);
238 size_t (strlen)(const char *s);
243 clock_t (clock)(void);
244 double (difftime)(time_t time1, time_t time2);
245 time_t (mktime)(struct tm *timeptr);
246 time_t (time)(time_t *timer);
247 char *(asctime)(const struct tm *timeptr);
248 char *(ctime)(const time_t *timer);
249 struct tm *(gmtime)(const time_t *timer);
250 struct tm *(localtime)(const time_t *timer);
251 size_t (strftime)(char *s, size_t maxsize, const char *format,
252 const struct tm *timeptr);