diff options
| author | J08nY | 2017-04-05 12:09:33 +0200 |
|---|---|---|
| committer | J08nY | 2017-04-05 12:09:33 +0200 |
| commit | f25a2b7bfed27160173ae62e8552f27e8c59ee58 (patch) | |
| tree | d168a6384b4d03720202d72cd6a52e969c0e7be0 | |
| parent | 0ee212016a154eeba262931ac91a29fc05c8dcf2 (diff) | |
| download | ecgen-f25a2b7bfed27160173ae62e8552f27e8c59ee58.tar.gz ecgen-f25a2b7bfed27160173ae62e8552f27e8c59ee58.tar.zst ecgen-f25a2b7bfed27160173ae62e8552f27e8c59ee58.zip | |
| -rw-r--r-- | src/exhaustive/exhaustive.c | 6 | ||||
| -rw-r--r-- | src/exhaustive/seed.c | 2 | ||||
| -rw-r--r-- | src/invalid/invalid.c | 8 | ||||
| -rw-r--r-- | src/io/input.c | 2 | ||||
| -rw-r--r-- | src/io/output.c | 2 | ||||
| -rw-r--r-- | src/math/curve.c | 4 | ||||
| -rw-r--r-- | src/math/field.c | 4 | ||||
| -rw-r--r-- | src/math/gens.c | 2 | ||||
| -rw-r--r-- | src/math/poly.c | 2 |
9 files changed, 16 insertions, 16 deletions
diff --git a/src/exhaustive/exhaustive.c b/src/exhaustive/exhaustive.c index 42c174f..03d37ca 100644 --- a/src/exhaustive/exhaustive.c +++ b/src/exhaustive/exhaustive.c @@ -13,7 +13,7 @@ #include "math/point.h" #include "seed.h" -void exhaustive_ginit(gen_t *generators, config_t *cfg) { +static void exhaustive_ginit(gen_t *generators, config_t *cfg) { if (cfg->from_seed) { if (cfg->seed) { generators[OFFSET_SEED] = &seed_argument; @@ -81,7 +81,7 @@ void exhaustive_ginit(gen_t *generators, config_t *cfg) { } } -void exhaustive_ainit(arg_t **argss, config_t *cfg) { +static void exhaustive_ainit(arg_t **argss, config_t *cfg) { for (size_t i = 0; i < OFFSET_END; ++i) { argss[i] = NULL; } @@ -161,7 +161,7 @@ int exhaustive_gen(curve_t *curve, config_t *cfg, gen_t generators[], end_offset, 0); } -void exhaustive_quit(arg_t *argss[]) { +static void exhaustive_quit(arg_t *argss[]) { equation_quit(); for (size_t i = 0; i < OFFSET_END; ++i) { if (argss[i]) { diff --git a/src/exhaustive/seed.c b/src/exhaustive/seed.c index e7e0738..0286fcf 100644 --- a/src/exhaustive/seed.c +++ b/src/exhaustive/seed.c @@ -27,7 +27,7 @@ void seed_free(seed_t **seed) { } } -GEN seed_stoi(const char *cstr) { +static GEN seed_stoi(const char *cstr) { pari_sp ltop = avma; GEN seed = gen_0; diff --git a/src/invalid/invalid.c b/src/invalid/invalid.c index c882b79..9c46df6 100644 --- a/src/invalid/invalid.c +++ b/src/invalid/invalid.c @@ -12,7 +12,7 @@ #include "math/order.h" #include "math/point.h" -void invalid_ginit(gen_t *generators, config_t *cfg) { +static void invalid_ginit(gen_t *generators, config_t *cfg) { generators[OFFSET_SEED] = &gen_skip; if (cfg->random) { generators[OFFSET_FIELD] = &field_random; @@ -28,7 +28,7 @@ void invalid_ginit(gen_t *generators, config_t *cfg) { generators[OFFSET_ORDER] = &order_any; } -size_t invalid_primes(GEN order, pari_ulong **primes) { +static size_t invalid_primes(GEN order, pari_ulong **primes) { pari_sp ltop = avma; GEN bound = sqri(order); @@ -70,8 +70,8 @@ size_t invalid_primes(GEN order, pari_ulong **primes) { return nprimes; } -size_t invalid_curves(curve_t *curve, config_t *cfg, pari_ulong *primes, - size_t nprimes, curve_t ***curves) { +static size_t invalid_curves(curve_t *curve, config_t *cfg, pari_ulong *primes, + size_t nprimes, curve_t ***curves) { gen_t invalid_gen[OFFSET_END]; invalid_gen[OFFSET_FIELD] = &gen_skip; invalid_gen[OFFSET_A] = &gen_skip; diff --git a/src/io/input.c b/src/io/input.c index 348302d..db81450 100644 --- a/src/io/input.c +++ b/src/io/input.c @@ -10,7 +10,7 @@ FILE *in; int delim; -GEN input_i(const char *prompt, long bits) { +static GEN input_i(const char *prompt, long bits) { if (prompt && in == stdin) { fprintf(out, "%s ", prompt); } diff --git a/src/io/output.c b/src/io/output.c index cb718fa..023bc0f 100644 --- a/src/io/output.c +++ b/src/io/output.c @@ -56,7 +56,7 @@ void output_fcsv(FILE *out, curve_t *curve, config_t *cfg) { void output_csv(curve_t *curve, config_t *cfg) { output_fcsv(out, curve, cfg); } -JSON_Value *output_jjson(curve_t *curve, config_t *cfg) { +static JSON_Value *output_jjson(curve_t *curve, config_t *cfg) { pari_sp ltop = avma; // root object/value is curve JSON_Value *root_value = json_value_init_object(); diff --git a/src/math/curve.c b/src/math/curve.c index d4b7c00..6b0742c 100644 --- a/src/math/curve.c +++ b/src/math/curve.c @@ -81,12 +81,12 @@ int curve_nonzero(curve_t *curve, config_t *cfg, arg_t *args) { } } -int curve_seed_fp(curve_t *curve, config_t *cfg, arg_t *args) { +static int curve_seed_fp(curve_t *curve, config_t *cfg, arg_t *args) { // TODO implement return INT_MIN; } -int curve_seed_f2m(curve_t *curve, config_t *cfg, arg_t *args) { +static int curve_seed_f2m(curve_t *curve, config_t *cfg, arg_t *args) { // TODO implement return INT_MIN; } diff --git a/src/math/field.c b/src/math/field.c index 08172bf..3774040 100644 --- a/src/math/field.c +++ b/src/math/field.c @@ -7,9 +7,9 @@ #include "poly.h" #include "random.h" -GEN field_primer(long bits) { return random_prime(bits); } +static GEN field_primer(long bits) { return random_prime(bits); } -GEN field_binaryr(long bits) { +static GEN field_binaryr(long bits) { if (poly_exists(bits)) { return poly_find_gen(bits); } else { diff --git a/src/math/gens.c b/src/math/gens.c index e535c62..7b0f678 100644 --- a/src/math/gens.c +++ b/src/math/gens.c @@ -5,7 +5,7 @@ #include "gens.h" #include "point.h" -int gens_put(curve_t *curve, GEN generators, long len) { +static int gens_put(curve_t *curve, GEN generators, long len) { points_free_deep(&curve->generators, curve->ngens); curve->generators = points_new((size_t)len); diff --git a/src/math/poly.c b/src/math/poly.c index 6a89061..5398d76 100644 --- a/src/math/poly.c +++ b/src/math/poly.c @@ -2706,7 +2706,7 @@ static polynomial_t ansi_pentanomials[] = { {1995, 1, 2, 37}, {1997, 1, 2, 835}, {1998, 1, 3, 1290}, {2000, 1, 2, 981}}; -int compare_poly(const void *a, const void *b) { +static int compare_poly(const void *a, const void *b) { const polynomial_t *one = a; const polynomial_t *other = b; return (one->m - other->m); |
