diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-01-04 11:47:43 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-01-04 11:47:43 -0500 |
commit | e5ae7f10f3e144f4a08ee7a66b4105a5aa86e6e7 (patch) | |
tree | ae084444f0ea8c91f9b29683f26e09699f11d3f3 /src/stdlib.c | |
parent | 058c283919424ef8b4425cdf74739535dd1d8072 (diff) |
initrd, lcd, file cleanup
Diffstat (limited to 'src/stdlib.c')
-rw-r--r-- | src/stdlib.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 <stdint.h> + +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; +} |