From 12cdd6eeb3206a2d7d63d943f82a2e900adefd88 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Tue, 3 Dec 2024 14:26:36 +0100 Subject: Implement config constraints --- src/config.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 427ad40..c6e5433 100644 --- a/src/config.h +++ b/src/config.h @@ -28,14 +28,21 @@ typedef enum { CHECK_NONE, CHECK_POSITIVE, CHECK_IN_RANGE, + CHECK_GT_OTHER, + CHECK_EQ_OTHER, } config_check_type_t; typedef struct { config_check_type_t type; union { struct { - int min, max; + double min; + double max; } range; + struct { + size_t offset; + config_type_t type; + } compare; }; } config_check_t; -- cgit v1.2.3