diff options
author | Oskar <[email protected]> | 2024-04-04 20:32:33 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-04-04 20:32:33 +0200 |
commit | d64a70597d4d5af00d8b372bebf271ad068eadb4 (patch) | |
tree | fdeefdfa8c488473c5d8cd91775619223d5f9307 /input.c | |
parent | 1f0fea8d157876d8a89d0b530608fa473b1331f2 (diff) |
Bugfixes. Still some things i gotta iron out. This is getting more and
more complicated each day. Not sure if i like it. Although at least its
not as complicated as it would have been if i would have kept the old
validate_L and validate_N code. That would have been a bigger nightmare.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -8,8 +8,10 @@ #include "i_validation.h" #include <stdint.h> +int clfstdin_doubleprint; // variable accessed via extern int in startmode so that it does not print '?' 2 times in a row + int check_length_fix_stdin(char *smode_buf) { - + int sbl = 0; for ( ; sbl < SMODE_MAX_INPUT_SIZE ; sbl++) { if(smode_buf[sbl] == '\0' || smode_buf[sbl] == '\n') { @@ -19,7 +21,9 @@ int check_length_fix_stdin(char *smode_buf) { if (sbl >= SMODE_MAX_INPUT_SIZE) { char c; while ((c = getchar()) != '\n'); - //fprintf (stderr, "sbl > SMODE_MAX_SIZE\n"); + fprintf (stdout, "?\n"); + clfstdin_doubleprint = 0; + //fprintf (stderr, "sbl > SMODE_MAX_SIZE\n"); // debug code return _FAIL; } |