diff options
Diffstat (limited to 'lib/hitomezashi_utils.c')
-rw-r--r-- | lib/hitomezashi_utils.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/hitomezashi_utils.c b/lib/hitomezashi_utils.c deleted file mode 100644 index 93ec850..0000000 --- a/lib/hitomezashi_utils.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "hitomezashi_utils.h" - -#include <stddef.h> -#include <stdlib.h> - -char *hitomezashi_ascii_binary_str_to_ints(const char *ascii_str, size_t len) { - char *res = malloc(len); - for (int i = 0; i < len; ++i) { - switch (ascii_str[i]) { - case '0':; - res[i] = 0; - break; - case '1':; - res[i] = 1; - break; - default:; - free(res); - return NULL; - } - } - return res; -} |