aboutsummaryrefslogtreecommitdiff
path: root/src/math/equation.c
diff options
context:
space:
mode:
authorJ08nY2017-03-09 13:18:15 +0100
committerJ08nY2017-03-09 13:18:15 +0100
commit8c65683537ea57a435a2f987f540bcc2ec5db678 (patch)
tree18d6e8893c885d98392d9a4cc9a9d98e67003f18 /src/math/equation.c
parent7eff89c0095da4246a7b9c5a6654dc0d7692325e (diff)
downloadecgen-8c65683537ea57a435a2f987f540bcc2ec5db678.tar.gz
ecgen-8c65683537ea57a435a2f987f540bcc2ec5db678.tar.zst
ecgen-8c65683537ea57a435a2f987f540bcc2ec5db678.zip
Diffstat (limited to 'src/math/equation.c')
-rw-r--r--src/math/equation.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/math/equation.c b/src/math/equation.c
index 45b849b..d676350 100644
--- a/src/math/equation.c
+++ b/src/math/equation.c
@@ -5,14 +5,14 @@
#include "equation.h"
#include "io/input.h"
-int a_random(curve_t *curve, config_t *config, arg_t *args) {
+int a_random(curve_t *curve, config_t *cfg, arg_t *args) {
curve->a = genrand(curve->field);
return 1;
}
-int a_input(curve_t *curve, config_t *config, arg_t *args) {
+int a_input(curve_t *curve, config_t *cfg, arg_t *args) {
pari_sp ltop = avma;
- GEN inp = input_int("a:", config->bits);
+ GEN inp = input_int("a:", cfg->bits);
if (gequalm1(inp)) {
avma = ltop;
return 0;
@@ -25,13 +25,13 @@ int a_input(curve_t *curve, config_t *config, arg_t *args) {
static GEN a = NULL;
static curve_t *curve_a = NULL;
-int a_once(curve_t *curve, config_t *config, arg_t *args) {
+int a_once(curve_t *curve, config_t *cfg, arg_t *args) {
if (a && curve_a == curve) {
curve->a = gcopy(a);
return 1;
}
- int inp = a_input(curve, config, args);
+ int inp = a_input(curve, cfg, args);
if (inp > 0) {
a = gclone(curve->a);
curve_a = curve;
@@ -41,29 +41,29 @@ int a_once(curve_t *curve, config_t *config, arg_t *args) {
}
}
-int a_zero(curve_t *curve, config_t *config, arg_t *args) {
+int a_zero(curve_t *curve, config_t *cfg, arg_t *args) {
curve->a = gen_0;
return 1;
}
-int a_one(curve_t *curve, config_t *config, arg_t *args) {
+int a_one(curve_t *curve, config_t *cfg, arg_t *args) {
curve->a = gen_1;
return 1;
}
-int a_seed(curve_t *curve, config_t *config, arg_t *args) {
+int a_seed(curve_t *curve, config_t *cfg, arg_t *args) {
// TODO implement
return INT_MIN;
}
-int b_random(curve_t *curve, config_t *config, arg_t *args) {
+int b_random(curve_t *curve, config_t *cfg, arg_t *args) {
curve->b = genrand(curve->field);
return 1;
}
-int b_input(curve_t *curve, config_t *config, arg_t *args) {
+int b_input(curve_t *curve, config_t *cfg, arg_t *args) {
pari_sp ltop = avma;
- GEN inp = input_int("b:", config->bits);
+ GEN inp = input_int("b:", cfg->bits);
if (gequalm1(inp)) {
avma = ltop;
return 0;
@@ -74,15 +74,15 @@ int b_input(curve_t *curve, config_t *config, arg_t *args) {
}
static GEN b = NULL;
-static curve_t* curve_b = NULL;
+static curve_t *curve_b = NULL;
-int b_once(curve_t *curve, config_t *config, arg_t *args) {
+int b_once(curve_t *curve, config_t *cfg, arg_t *args) {
if (b && curve_b == curve) {
curve->b = gcopy(b);
return 1;
}
- int inp = b_input(curve, config, args);
+ int inp = b_input(curve, cfg, args);
if (inp > 0) {
b = gclone(curve->b);
curve_b = curve;
@@ -92,17 +92,17 @@ int b_once(curve_t *curve, config_t *config, arg_t *args) {
}
}
-int b_zero(curve_t *curve, config_t *config, arg_t *args) {
+int b_zero(curve_t *curve, config_t *cfg, arg_t *args) {
curve->b = gen_0;
return 1;
}
-int b_one(curve_t *curve, config_t *config, arg_t *args) {
+int b_one(curve_t *curve, config_t *cfg, arg_t *args) {
curve->b = gen_1;
return 1;
}
-int b_seed(curve_t *curve, config_t *config, arg_t *args) {
+int b_seed(curve_t *curve, config_t *cfg, arg_t *args) {
// TODO implement
return INT_MIN;
}