A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/lib/strf.c

16 lines
202 B

#include "strf.h"
3 years ago
#define int_offset 48
// 0:48 - 9:57
char* int_to_str(int i) {
char* strbuf = "XXXXXX";
while( i > 0 ) {
*(strbuf + 1) = (i % 10) + int_offset;
i /= 10;
}
return strbuf;
3 years ago
}