aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2018-03-20 15:10:41 +0100
committerJ08nY2018-03-20 15:10:41 +0100
commit6f3809790583a1256b53a419f3fee400e11e155a (patch)
tree496b89e9833a27a25af36001293375b7e2a0619a
parent49406044628b61f12493775e5797ac3ef441e19c (diff)
downloadecgen-6f3809790583a1256b53a419f3fee400e11e155a.tar.gz
ecgen-6f3809790583a1256b53a419f3fee400e11e155a.tar.zst
ecgen-6f3809790583a1256b53a419f3fee400e11e155a.zip
-rw-r--r--lib/Makefile16
-rw-r--r--src/Makefile14
-rw-r--r--src/exhaustive/exhaustive.c2
-rw-r--r--src/gen/order.c2
-rw-r--r--src/math/koblitz.c2
-rw-r--r--[-rwxr-xr-x]test/ecgen.sh0
6 files changed, 18 insertions, 18 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 29a4002..ff4ddd5 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -5,17 +5,17 @@ DEBUG ?= 0
TEST ?= 0
FAST ?= 0
ifeq ($(DEBUG), 1)
- CFLAGS += -DDEBUG -g -Og -Werror -pedantic
+ CFLAGS += -DDEBUG -g -Og -Werror -pedantic
else ifeq ($(TEST), 1)
- CFLAGS += -DNDEBUG --coverage -g -O0
+ CFLAGS += -DNDEBUG --coverage -g -O0
else ifeq ($(FAST), 1)
- ifeq ($(CC), gcc)
- CFLAGS += -DNDEBUG -O3 -march=native -pipe
- else
- CFLAGS += -DNDEBUG -O3
- endif
+ ifeq ($(CC), gcc)
+ CFLAGS += -DNDEBUG -O3 -march=native -pipe
+ else
+ CFLAGS += -DNDEBUG -O3
+ endif
else
- CFLAGS += -DNDEBUG -O2
+ CFLAGS += -DNDEBUG -O2
endif
export
diff --git a/src/Makefile b/src/Makefile
index 6451d3a..a3f28c4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,17 +12,17 @@ DEBUG ?= 0
TEST ?= 0
FAST ?= 0
ifeq ($(DEBUG), 1)
- CFLAGS += -DDEBUG -g -Og -Werror -pedantic
+ CFLAGS += -DDEBUG -g -Og -Werror -pedantic
else ifeq ($(TEST), 1)
CFLAGS += -DNDEBUG --coverage -g -O0
else ifeq ($(FAST), 1)
- ifeq ($(CC), gcc)
- CFLAGS += -DNDEBUG -O3 -march=native -pipe
- else
- CFLAGS += -DNDEBUG -O3
- endif
+ ifeq ($(CC), gcc)
+ CFLAGS += -DNDEBUG -O3 -march=native -pipe
+ else
+ CFLAGS += -DNDEBUG -O3
+ endif
else
- CFLAGS += -DNDEBUG -O2
+ CFLAGS += -DNDEBUG -O2
endif
LDFLAGS = -L../lib/parson -L../lib/sha1 -L../lib/pari
diff --git a/src/exhaustive/exhaustive.c b/src/exhaustive/exhaustive.c
index 58d8305..78338a6 100644
--- a/src/exhaustive/exhaustive.c
+++ b/src/exhaustive/exhaustive.c
@@ -147,7 +147,7 @@ static void exhaustive_ginit(gen_f *generators) {
generators[OFFSET_ORDER] = &order_gen_cofactor;
} else if (cfg->method == METHOD_ANOMALOUS) {
generators[OFFSET_ORDER] = &anomalous_gen_order;
- } else if (cfg->koblitz){
+ } else if (cfg->koblitz) {
generators[OFFSET_ORDER] = &order_gen_koblitz;
} else {
generators[OFFSET_ORDER] = &order_gen_any;
diff --git a/src/gen/order.c b/src/gen/order.c
index 019ba13..20040ab 100644
--- a/src/gen/order.c
+++ b/src/gen/order.c
@@ -4,8 +4,8 @@
*/
#include "order.h"
#include "exhaustive/arg.h"
-#include "math/koblitz.h"
#include "io/input.h"
+#include "math/koblitz.h"
GENERATOR(order_gen_input) {
pari_sp ltop = avma;
diff --git a/src/math/koblitz.c b/src/math/koblitz.c
index b553cf6..ca91160 100644
--- a/src/math/koblitz.c
+++ b/src/math/koblitz.c
@@ -57,7 +57,7 @@ static int compare_koblitz(const void *a, const void *b) {
}
const koblitz_t *koblitz_find(unsigned long m, unsigned long a) {
- koblitz_t searched = {(unsigned int) m, (unsigned int) a, NULL};
+ koblitz_t searched = {(unsigned int)m, (unsigned int)a, NULL};
return (koblitz_t *)bsearch(&searched, koblitz_curves,
sizeof(koblitz_curves) / sizeof(koblitz_t),
sizeof(koblitz_t), &compare_koblitz);
diff --git a/test/ecgen.sh b/test/ecgen.sh
index b86f13b..b86f13b 100755..100644
--- a/test/ecgen.sh
+++ b/test/ecgen.sh