aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-12-03 14:26:36 +0100
committerFederico Angelilli <code@fedang.net>2024-12-03 14:26:36 +0100
commit12cdd6eeb3206a2d7d63d943f82a2e900adefd88 (patch)
treee01d70ee46719a6e60747eec16869ededd82010a /src/config.h
parentf139b5f479e2bb04dbd41d97906b2fd48a608f8b (diff)
Implement config constraints
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h9
1 files changed, 8 insertions, 1 deletions
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;