From e5ae7f10f3e144f4a08ee7a66b4105a5aa86e6e7 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 4 Jan 2018 11:47:43 -0500 Subject: initrd, lcd, file cleanup --- src/stdlib.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/stdlib.c (limited to 'src/stdlib.c') diff --git a/src/stdlib.c b/src/stdlib.c new file mode 100644 index 0000000..e7bf622 --- /dev/null +++ b/src/stdlib.c @@ -0,0 +1,17 @@ +#include + +void _exit(int code) +{ + (void)code; + for (;;); +} + +char *itoa(int n, int base) +{ + static char buf[16]; + char *p = buf + 15; + *p = '\0'; + do *--p = "0123456789ABCDEF"[n % base]; + while (n /= base); + return p; +} -- cgit v1.2.3