diff options
author | Oskar <[email protected]> | 2024-04-04 21:03:52 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-04-04 21:03:52 +0200 |
commit | 4021c78435ab6044ed78ef06e46bf075beb2a959 (patch) | |
tree | b297ce51bb3a8ddcc5aaee0dd4375260c8aaef17 /startmode.c | |
parent | d64a70597d4d5af00d8b372bebf271ad068eadb4 (diff) |
Did some changes to the external variable so that it resets to 1 each
time.
Diffstat (limited to 'startmode.c')
-rw-r--r-- | startmode.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/startmode.c b/startmode.c index 1711d1c..e76b991 100644 --- a/startmode.c +++ b/startmode.c @@ -9,6 +9,8 @@ #include "process_multiples.h" #include <stdint.h> +extern int clfstdin_doubleprint; + int ncat(char filename[]) { FILE *file; @@ -89,6 +91,7 @@ int call_singles(char single, uint64_t focus, char *filename) { } int startmode(char filename[]) { + // The entry to the program. Count lines and display the count. Also show which file is being edited. uint64_t Flines; int dnl = display_name_linecount(filename); @@ -135,8 +138,11 @@ int startmode(char filename[]) { free(multiple); break; case _FAIL: - extern int clfstdin_doubleprint; - if (clfstdin_doubleprint == 0) { break ;} + + if (clfstdin_doubleprint == 0) { + clfstdin_doubleprint = 1; + break; + } fprintf(stdout, "?\n"); break; case _RETURN: // if user just preses 'return' button |