diff --git a/src/misc/defines.h b/src/misc/defines.h index b76ffde..fc5942b 100644 --- a/src/misc/defines.h +++ b/src/misc/defines.h @@ -108,13 +108,21 @@ #define COMMAND_QUERY_EVENTS "events" #define ARGUMENT_COMMON_VAL_ON "on" +#define ARGUMENT_COMMON_VAL_NOT_OFF "!off" #define ARGUMENT_COMMON_VAL_TRUE "true" +#define ARGUMENT_COMMON_VAL_NOT_FALSE "!false" #define ARGUMENT_COMMON_VAL_ONE "1" +#define ARGUMENT_COMMON_VAL_NOT_ZERO "!0" #define ARGUMENT_COMMON_VAL_YES "yes" +#define ARGUMENT_COMMON_VAL_NOT_NO "!no" #define ARGUMENT_COMMON_VAL_OFF "off" +#define ARGUMENT_COMMON_VAL_NOT_ON "!on" #define ARGUMENT_COMMON_VAL_FALSE "false" +#define ARGUMENT_COMMON_VAL_NOT_TRUE "!true" #define ARGUMENT_COMMON_VAL_ZERO "0" +#define ARGUMENT_COMMON_VAL_NOT_ONE "!1" #define ARGUMENT_COMMON_VAL_NO "no" +#define ARGUMENT_COMMON_VAL_NOT_YES "!yes" #define ARGUMENT_COMMON_VAL_TOGGLE "toggle" #define ARGUMENT_COMMON_VAL_BEFORE "before" #define ARGUMENT_COMMON_VAL_AFTER "after" diff --git a/src/misc/helpers.h b/src/misc/helpers.h index 907a807..b9fb268 100644 --- a/src/misc/helpers.h +++ b/src/misc/helpers.h @@ -308,7 +308,11 @@ static inline bool evaluate_boolean_state(struct token state, bool previous_stat if (token_equals(state, ARGUMENT_COMMON_VAL_ON) || token_equals(state, ARGUMENT_COMMON_VAL_YES) || token_equals(state, ARGUMENT_COMMON_VAL_TRUE) - || token_equals(state, ARGUMENT_COMMON_VAL_ONE) ) + || token_equals(state, ARGUMENT_COMMON_VAL_ONE) + || token_equals(state, ARGUMENT_COMMON_VAL_NOT_OFF) + || token_equals(state, ARGUMENT_COMMON_VAL_NOT_NO) + || token_equals(state, ARGUMENT_COMMON_VAL_NOT_FALSE) + || token_equals(state, ARGUMENT_COMMON_VAL_NOT_ZERO) ) return true; else if (token_equals(state, ARGUMENT_COMMON_VAL_TOGGLE)) return !previous_state;