From 6104c0ee7257ae99e5187f56593442ca9f04084b Mon Sep 17 00:00:00 2001 From: Oskar Date: Sun, 31 Mar 2024 21:30:11 +0200 Subject: Started integrating the input system. Mainly trying to integrate the 'singles' so far because they will be the easiest. --- input.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index 1f2f81e..6895573 100644 --- a/input.c +++ b/input.c @@ -112,42 +112,3 @@ int smode_input(char *single, char **multiple, uint64_t focus) { // This functio return _FAIL; } - -int main () { - - // running smode_input will do a few things: - /* - scenario 1: If you input a valid multiple then the function return multiple - and it also returns the valid string to the char pointer you provide to the function - - scenario 2: If you input an invalid string, then it will return _FAIL which is basically just '?' - nothing will be returned to multiple nor single - - scenario 3: if you input a valid single then it will return _SINGLE - and it will also return the valid single character to the char you provide to the function - - scenario 4: if you input an invalid single then it will return _FAIL which is basically just '?' - nothing will be returned to multiple nor single - this scenario is the same as scenario 3. - */ - - char *multiple; - char single; - uint64_t focus = 1; - int si_ret = smode_input(&single, &multiple, focus); - - if (si_ret == _SINGLE) { - fprintf(stdout, "single\n"); - fprintf(stdout, "%c", single); - } - if (si_ret == _MULTIPLE) { - fprintf(stdout, "multiple\n"); - fprintf(stdout, "%s", multiple); - free(multiple); - } - if (si_ret == _FAIL) { - fprintf(stdout, "?\n"); - } - - -} \ No newline at end of file -- cgit v1.2.3