pull/38/head
E. Almqvist 3 years ago
parent 903ec10e6c
commit 08d1f09e4c
  1. 2
      lib/conv.c
  2. 1
      lib/conv.h
  3. 15
      lib/strf.c
  4. 1
      lib/strf.h

@ -0,0 +1,2 @@
#include "conv.h"

@ -0,0 +1 @@
void int_to_str(int i, char* buf);

@ -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);
}
}

@ -1 +0,0 @@
char* int_to_str(int i, char* strbuf);
Loading…
Cancel
Save