diff options
author | Oskar <[email protected]> | 2024-03-31 21:30:11 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-03-31 21:30:11 +0200 |
commit | 6104c0ee7257ae99e5187f56593442ca9f04084b (patch) | |
tree | 437957ae25f7bd1544f6c725425213244d94e704 /input.c | |
parent | a2fe6b4251181b65da4264c179c5df39c22159de (diff) |
Started integrating the input system. Mainly trying to integrate the
'singles' so far because they will be the easiest.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 39 |
1 files changed, 0 insertions, 39 deletions
@@ -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 |