aboutsummaryrefslogtreecommitdiff
path: root/src/misc/config.h
diff options
context:
space:
mode:
authorJ08nY2024-11-30 00:18:22 +0100
committerJ08nY2024-11-30 00:18:22 +0100
commit8395408db3d707be8573203b07625175e005ef74 (patch)
tree70727f1940e074206c0675b8017ad13da3b9587d /src/misc/config.h
parente1af97551fde2efbd847e872fbcde9380e24fe42 (diff)
downloadecgen-8395408db3d707be8573203b07625175e005ef74.tar.gz
ecgen-8395408db3d707be8573203b07625175e005ef74.tar.zst
ecgen-8395408db3d707be8573203b07625175e005ef74.zip
Add best-effort warnings for ignored CLI options.
Diffstat (limited to '')
-rw-r--r--src/misc/config.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/misc/config.h b/src/misc/config.h
index dcdca58..0c0a5ca 100644
--- a/src/misc/config.h
+++ b/src/misc/config.h
@@ -142,4 +142,36 @@ typedef struct {
extern config_t cfg_s;
extern config_t *cfg;
+typedef struct {
+ bool field;
+ bool method;
+ bool count;
+ bool random;
+ bool prime;
+ bool cm_order;
+ bool koblitz;
+ bool koblitz_value;
+ bool smooth;
+ bool cofactor;
+ bool invalid_primes;
+ bool seed_algo;
+ bool seed;
+ bool unique;
+ bool hex_check;
+ bool points;
+ bool metadata;
+} config_names_t;
+
+extern config_names_t cfg_used_s;
+extern config_names_t *cfg_used;
+
+extern config_names_t cfg_set_s;
+extern config_names_t *cfg_set;
+
+#define GET(x) cfg_used->x = true
+#define GET_BOOL(x) ((cfg_used->x = true) && cfg->x)
+#define SET(x) cfg_set->x = true
+
+void config_report_unused();
+
#endif // ECGEN_MISC_CONFIG_H