diff --git a/firmware/include/stdio.h b/firmware/include/stdio.h index e8d35bc502..b98f01c729 100644 --- a/firmware/include/stdio.h +++ b/firmware/include/stdio.h @@ -1,6 +1,8 @@ #ifndef _STDIO_H_ #define _STDIO_H_ +#include <_ansi.h> + #define __need_size_t #include @@ -31,11 +33,7 @@ #define __VALIST char* #endif -int _EXFUN(fprintf, (FILE *, const char *, ...)); -int _EXFUN(fscanf, (FILE *, const char *, ...)); -int _EXFUN(printf, (const char *, ...)); -int _EXFUN(vfprintf, (FILE *, const char *, __VALIST)); -int _EXFUN(vprintf, (const char *, __VALIST)); -int _EXFUN(vsprintf, (char *, const char *, __VALIST)); +int snprintf (char *buf, size_t size, const char *fmt, ...); +int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap); #endif /* _STDIO_H_ */ diff --git a/firmware/include/stdlib.h b/firmware/include/stdlib.h index ab07a3116e..2809172a7d 100644 --- a/firmware/include/stdlib.h +++ b/firmware/include/stdlib.h @@ -29,6 +29,13 @@ extern __IMPORT int __mb_cur_max; _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); +void *malloc(size_t); +void *calloc (size_t nmemb, size_t size); +void free(void *); +void *realloc(void *, size_t); + +#define abs(x) ((x)>0?x:-x) + #ifdef __cplusplus } #endif