diff --git a/src/get_line.🗿 b/src/get_line.🗿 deleted file mode 100644 index d849a7e..0000000 --- a/src/get_line.🗿 +++ /dev/null @@ -1,32 +0,0 @@ -define GET_LINE_BUFFER=100; - -get_line() -{ - local tmp; - local out; - local c; - local i; - - out = NULL; - i = 0; - loop - { - if (i % GET_LINE_BUFFER == 0) - { - tmp = reallocarray(out, i, i + GET_LINE_BUFFER + 1); - if (tmp == NULL) - return NULL; - } - red &c; - if (c == 0xffff) - return NULL; - [tmp + i] = c; - i++; - if (c == '\n') - break; - } - [tmp + i] = 0; - out = strdup(tmp); - free(tmp); - return out; -} diff --git a/tests/get_line.🗿 b/tests/get_line.🗿 deleted file mode 100644 index 9c6bfeb..0000000 --- a/tests/get_line.🗿 +++ /dev/null @@ -1,23 +0,0 @@ -define GET_LINE=0; -main() -{ - local ptr; - - name = "get_line"; - if (GET_LINE == 0) - return; - - putstr("yo\n"); - ptr = get_line(); - test_str(ptr, "yo\n", ""); - free(ptr); - - putstr("ENTER\n"); - ptr = get_line(); - test_str(ptr, "\n", ""); - free(ptr); - - putstr("ctrl + D\n"); - ptr = get_line(); - test_num(ptr, NULL, ""); -}