aboutsummaryrefslogtreecommitdiff
path: root/src/exhaustive
diff options
context:
space:
mode:
authorJ08nY2017-10-19 00:31:24 +0200
committerJ08nY2017-10-19 00:31:24 +0200
commitd01ac5799cf7283de1b26cac07578ca039bd5047 (patch)
treec8305dbfbeaa0a8379712a87aaf129d3ca59a10d /src/exhaustive
parentb09586f3cca80ec3409c4e34a2fae22974c43d56 (diff)
downloadecgen-d01ac5799cf7283de1b26cac07578ca039bd5047.tar.gz
ecgen-d01ac5799cf7283de1b26cac07578ca039bd5047.tar.zst
ecgen-d01ac5799cf7283de1b26cac07578ca039bd5047.zip
Cleanup the CLI options parsing and enums a bit.
Diffstat (limited to 'src/exhaustive')
-rw-r--r--src/exhaustive/exhaustive.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exhaustive/exhaustive.c b/src/exhaustive/exhaustive.c
index 3bc9167..0122a59 100644
--- a/src/exhaustive/exhaustive.c
+++ b/src/exhaustive/exhaustive.c
@@ -67,7 +67,7 @@ static void exhaustive_ginit(gen_f *generators) {
// setup normal generators
generators[OFFSET_SEED] = &gen_skip;
- if (cfg->anomalous) {
+ if (cfg->method == METHOD_ANOMALOUS) {
generators[OFFSET_A] = &gen_skip;
generators[OFFSET_B] = &anomalous_gen_equation;
} else if (cfg->random) {
@@ -96,7 +96,7 @@ static void exhaustive_ginit(gen_f *generators) {
generators[OFFSET_ORDER] = &order_gen_prime;
} else if (cfg->cofactor) {
generators[OFFSET_ORDER] = &order_gen_smallfact;
- } else if (cfg->anomalous) {
+ } else if (cfg->method == METHOD_ANOMALOUS) {
generators[OFFSET_ORDER] = &anomalous_gen_order;
} else {
generators[OFFSET_ORDER] = &order_gen_any;
@@ -111,7 +111,7 @@ static void exhaustive_ginit(gen_f *generators) {
generators[OFFSET_GENERATORS] = &gens_gen_any;
}
- if (cfg->anomalous) {
+ if (cfg->method == METHOD_ANOMALOUS) {
generators[OFFSET_FIELD] = &anomalous_gen_field;
} else if (cfg->random) {
generators[OFFSET_FIELD] = &field_gen_random;
@@ -148,7 +148,7 @@ static void exhaustive_cinit(check_t **validators) {
}
static void exhaustive_ainit(arg_t **argss) {
- if (cfg->anomalous) {
+ if (cfg->method == METHOD_ANOMALOUS) {
arg_t *field_arg = arg_new();
arg_t *eq_arg = arg_new();
size_t *i = try_calloc(sizeof(size_t));