From d64a70597d4d5af00d8b372bebf271ad068eadb4 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 4 Apr 2024 20:32:33 +0200 Subject: 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. --- input.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index 86e0d36..c94aaa3 100644 --- a/input.c +++ b/input.c @@ -8,8 +8,10 @@ #include "i_validation.h" #include +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; } -- cgit v1.2.3