From f414175e0cf08e02d65ca09028641ac2adbd0f8e Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 20 Feb 2018 22:21:46 -0500 Subject: stdlib independence, fixes for calculator --- stdlib.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 stdlib.c (limited to 'stdlib.c') diff --git a/stdlib.c b/stdlib.c new file mode 100644 index 0000000..3299d0b --- /dev/null +++ b/stdlib.c @@ -0,0 +1,21 @@ +#include + +char *snprintf(char *buf, unsigned int max, const char *format, ...) +{ + (void)max; + va_list args; + va_start(args, format); + + buf[0] = '0'; + buf[1] = '\0'; + + va_end(args); + return buf; +} + +float strtof(const char *s, char **endptr) +{ + (void)s; + (void)endptr; + return 0.0f; +} -- cgit v1.2.3