aboutsummaryrefslogtreecommitdiffstats
path: root/src/stdlib.c
blob: e7bf6224fe2e9f36aa489563a88cbc1692cd6812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
}