From c5dca2c782547799f563310f90d888230b8f4453 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Mon, 2 May 2022 18:01:12 +0200 Subject: [PATCH] changed SKIP_CHECK to variable & created getter and setter --- include/flags.h | 10 ++++++++-- src/flags.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/flags.c diff --git a/include/flags.h b/include/flags.h index c998b95..32a4971 100644 --- a/include/flags.h +++ b/include/flags.h @@ -1,16 +1,22 @@ #ifndef WHY2_FLAGS_H #define WHY2_FLAGS_H +//CONSTS #define KEY_LENGTH 50 #define ENCRYPTION_SEPARATOR '.' #define ENCRYPTION_SEPARATOR_STRING "." #define INVALID_KEY 1 -#define VERSION "v3.0" +#define VERSION "v2.2" #define VERSIONS_URL "https://raw.githubusercontent.com/ENGO150/WHY2/master/versions.json" #define VERSIONS_NAME "versions.json" -#define SKIP_CHECK 1 +//VARIABLES +static int skipCheck = 0; + +//FUNCTIONS +int getSkipCheck(); +void setSkipCheck(int skipCheckNew); #endif diff --git a/src/flags.c b/src/flags.c new file mode 100644 index 0000000..6d43a2d --- /dev/null +++ b/src/flags.c @@ -0,0 +1,11 @@ +#include + +int getSkipCheck() +{ + return skipCheck; +} + +void setSkipCheck(int skipCheckNew) +{ + skipCheck = skipCheckNew; +} \ No newline at end of file