diff --git a/lib/conv.c b/lib/conv.c new file mode 100644 index 0000000..5ed3295 --- /dev/null +++ b/lib/conv.c @@ -0,0 +1,2 @@ +#include "conv.h" + diff --git a/lib/conv.h b/lib/conv.h new file mode 100644 index 0000000..0c037b9 --- /dev/null +++ b/lib/conv.h @@ -0,0 +1 @@ +void int_to_str(int i, char* buf); diff --git a/lib/strf.c b/lib/strf.c deleted file mode 100644 index 65dddc7..0000000 --- a/lib/strf.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "strf.h" - -#define int_offset 48 -// 0:48 - 9:57 - -char* int_to_str(int i, char* strbuf) { - if( i == 0 ) { - return (char*)(int_offset); - } else { - char cbuf; - cbuf = (char)((i % 10) + int_offset); - - return int_to_str(i / 10, strbuf + cbuf); - } -} diff --git a/lib/strf.h b/lib/strf.h deleted file mode 100644 index 29649bc..0000000 --- a/lib/strf.h +++ /dev/null @@ -1 +0,0 @@ -char* int_to_str(int i, char* strbuf);