commit 35545c34c18ca8a20fd573ce379d720f9d8190c9
parent 5fa8cbe0981d7e93bee6da2d6962e4b4fda862cf
Author: olikru <olikru@tkruger.se>
Date: Mon, 15 Apr 2024 18:07:15 +0200
chachachanges
Diffstat:
5 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/fmpzio.h b/fmpzio.h
@@ -3,7 +3,20 @@
#include <fmpz.h>
+/**
+ * Read next fmpz from stdin (in base 10).
+ *
+ * @param res the fmpz_t to write result to.
+ * @returns 0 if string could be read, -1 otherwise.
+ */
int read_next_fmpz(fmpz_t res);
+
+/**
+ * Read the next fmpz in hexadecimal from stdin.
+ *
+ * @param res the fmpz_t to write result to.
+ * @returns 0 if string could be read, -1 otherwise.
+ */
int read_next_hex_fmpz(fmpz_t res);
#endif
diff --git a/precomputers/primorial16bit.c b/precomputers/primorial16bit.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
int
-main()
+main(void)
{
fmpz_t primorial;
fmpz_init(primorial);
diff --git a/test_angrepp.c b/test_angrepp.c
@@ -14,7 +14,7 @@ test_f(uint64_t x)
}
static void
-test_cyclefind_floyd()
+test_cyclefind_floyd(void)
{
uint64_t lambda, mu;
lambda = cyclefind_floyd(&mu, 4, &test_f);
@@ -24,7 +24,7 @@ test_cyclefind_floyd()
}
static void
-test_cyclefind_brent()
+test_cyclefind_brent(void)
{
uint64_t lambda, mu;
lambda = cyclefind_brent(&mu, 4, &test_f);
@@ -34,7 +34,7 @@ test_cyclefind_brent()
}
static void
-test_pierre_factor()
+test_pierre_factor(void)
{
fmpz_t n, r;
fmpz_init(n);
@@ -51,7 +51,7 @@ test_pierre_factor()
}
int
-main()
+main(void)
{
test_cyclefind_floyd();
test_cyclefind_brent();
diff --git a/tools/pierre.c b/tools/pierre.c
@@ -9,7 +9,7 @@
#define DEFAULT_LIMIT 100000000
int
-main()
+main(void)
{
fmpz_t read, factor;
fmpz_init(factor);
diff --git a/tools/varmkorv.c b/tools/varmkorv.c
@@ -7,7 +7,7 @@
#include "wiener.h"
int
-main()
+main(void)
{
fmpz_t e, N, res;
fmpz_init(e);