From 817a46ef2eb88315e3bcecfe437d48e15106af84 Mon Sep 17 00:00:00 2001 From: Oskar <> Date: Tue, 26 Mar 2024 22:18:36 +0100 Subject: validate_L --- i_validation.c | 35 +++++++++++++++++++++++++++++++---- test/Makefile | 6 ++++-- test/vimmn | Bin 26904 -> 0 bytes 3 files changed, 35 insertions(+), 6 deletions(-) delete mode 100755 test/vimmn diff --git a/i_validation.c b/i_validation.c index 4ba7ff8..a83129c 100644 --- a/i_validation.c +++ b/i_validation.c @@ -151,15 +151,42 @@ int validate_L(char *smode_buf) { path 3: If there is nothing else after the L (in this case just an L) then just return an L (DONE) */ - int validate_decision = _NA; + int validate_decision = validate_check_p_m(smode_buf); + + int vcimm = FALSE_7ED; + int plus_continue = TRUE_7ED; + switch(validate_decision) { + case _PLUS_ONLY: + printf("PLUS ONLY\n"); + break; + case _PLUS_CONTINUE: + printf("PLUS CONTINUE\n"); + break; + case _INVALID: + printf("INVALID\n"); + break; + case _NA: + printf("NA\n"); + vcimm = TRUE_7ED; + plus_continue = FALSE_7ED; + break; + } + + if (vcimm == TRUE_7ED) { + + printf("vcimm false\n"); - validate_decision = validate_check_p_m(smode_buf); + } - printf("%i\n", validate_decision); // remove, its just here to make the compiler not output a bunch of warnings + if (plus_continue == FALSE_7ED) { + + printf("plus_continue true\n"); + + } // this below will become validate_imm_numbers or something - return 0; // remove, its just here to make the compiler not output a bunch of warnings + return _INVALID; // temporary invalid } diff --git a/test/Makefile b/test/Makefile index fba635a..4011915 100644 --- a/test/Makefile +++ b/test/Makefile @@ -13,9 +13,11 @@ clean: rm -f vcpm echo "rm -f vcpm" rm -f vcimm - echo "rm -f vcpm" + echo "rm -f vcimm" rm -f vpct - echo "rm -f vcpm" + echo "rm -f vpct" + rm -f vimmn + echo "rm -f vimmn" echo "Cleaned." smode: diff --git a/test/vimmn b/test/vimmn deleted file mode 100755 index 5a1ee36..0000000 Binary files a/test/vimmn and /dev/null differ -- cgit v1.2.3 From e2138af2c3005f4424832501936d7da55e60bd7d Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 27 Mar 2024 17:01:37 +0100 Subject: removed comment --- 7ed.c | 2 -- i_validation.c | 2 +- test/smode | Bin 0 -> 32296 bytes 3 files changed, 1 insertion(+), 3 deletions(-) create mode 100755 test/smode diff --git a/7ed.c b/7ed.c index 53ea8be..7ef9107 100644 --- a/7ed.c +++ b/7ed.c @@ -6,8 +6,6 @@ #include "input.h" #include -// Hej hej!! - #define VERSION 1 #define USAGE "7ed [OPTION] [FILENAME]\n" \ "\nVALID COMMAND-LINE OPTIONS:\n\n"\ diff --git a/i_validation.c b/i_validation.c index a83129c..3af5a10 100644 --- a/i_validation.c +++ b/i_validation.c @@ -172,7 +172,7 @@ int validate_L(char *smode_buf) { break; } - if (vcimm == TRUE_7ED) { + if (vcimm == TRUE_7ED) { // This is where L0 is caught printf("vcimm false\n"); diff --git a/test/smode b/test/smode new file mode 100755 index 0000000..ae7595a Binary files /dev/null and b/test/smode differ -- cgit v1.2.3 From b391c5d6a807382e282ce9c9761e8644962f8e0c Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 27 Mar 2024 17:02:20 +0100 Subject: Git push test to the new private mirror server --- test/smode | Bin 32296 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 test/smode diff --git a/test/smode b/test/smode deleted file mode 100755 index ae7595a..0000000 Binary files a/test/smode and /dev/null differ -- cgit v1.2.3