Skip to content

Commit 414e497

Browse files
committed
Final prototype changes in source code
* Add `static' to function declarations * Add prototypes to headers
1 parent 75a891c commit 414e497

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2257
-2199
lines changed

src/ca/asin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "ca.h"
1313

14-
void
14+
static void
1515
ca_asin_special(ca_t res, const ca_t x, ca_ctx_t ctx)
1616
{
1717
if (ca_check_is_signed_inf(x, ctx) == T_TRUE)

src/ca/atan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "ca.h"
1313

14-
void
14+
static void
1515
ca_atan_special(ca_t res, const ca_t x, ca_ctx_t ctx)
1616
{
1717
if (ca_check_is_signed_inf(x, ctx) == T_TRUE)

src/ca/check_is_zero.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "ca.h"
1414
#include "ca/impl.h"
1515

16-
truth_t
16+
static truth_t
1717
_ca_check_is_zero_qqbar(const ca_t x, ca_ctx_t ctx)
1818
{
1919
qqbar_t t;
@@ -71,13 +71,13 @@ ca_is_zero_check_fast(const ca_t x, ca_ctx_t ctx)
7171
return T_UNKNOWN;
7272
}
7373

74-
int
74+
static int
7575
_ca_generic_has_nontrivial_denominator(const ca_t x, ca_ctx_t ctx)
7676
{
7777
return !fmpz_mpoly_is_fmpz(fmpz_mpoly_q_denref(CA_MPOLY_Q(x)), CA_FIELD_MCTX(CA_FIELD(x, ctx), ctx));
7878
}
7979

80-
truth_t
80+
static truth_t
8181
ca_check_is_zero_no_factoring(const ca_t x, ca_ctx_t ctx)
8282
{
8383
acb_t v;

src/ca/conj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ca_set_ext(ca_t res, ca_ext_srcptr ext, ca_ctx_t ctx)
6464
}
6565
}
6666

67-
void
67+
static void
6868
ca_conj_ext(ca_t res, ca_ext_ptr ext, ca_ctx_t ctx)
6969
{
7070
slong p;
@@ -218,7 +218,7 @@ ca_conj_ext(ca_t res, ca_ext_ptr ext, ca_ctx_t ctx)
218218
}
219219

220220
/* Complex conjugate assuming that the generator is pure imaginary. */
221-
void nf_elem_conj_imag(nf_elem_t a, const nf_elem_t b, const nf_t nf)
221+
static void nf_elem_conj_imag(nf_elem_t a, const nf_elem_t b, const nf_t nf)
222222
{
223223
nf_elem_set(a, b, nf);
224224

src/ca/exp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "ca.h"
1313

14-
int ca_as_fmpq_pi_i(fmpq_t res, const ca_t x, ca_ctx_t ctx)
14+
static int ca_as_fmpq_pi_i(fmpq_t res, const ca_t x, ca_ctx_t ctx)
1515
{
1616
ca_field_ptr K;
1717
ca_t t;
@@ -44,7 +44,7 @@ int ca_as_fmpq_pi_i(fmpq_t res, const ca_t x, ca_ctx_t ctx)
4444
return found;
4545
}
4646

47-
ca_ext_ptr
47+
static ca_ext_ptr
4848
ca_is_fmpq_times_gen_as_ext(fmpq_t c, const ca_t x, ca_ctx_t ctx)
4949
{
5050
ca_field_ptr K;

src/ca/factor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#define HAVE_MPOLY_FAC 1
1717

18-
void
18+
static void
1919
_ca_factor_fmpz(ca_factor_t res, const fmpz_t x, int inv, ulong flags, ca_ctx_t ctx)
2020
{
2121
slong i;
@@ -62,7 +62,7 @@ _ca_factor_fmpz(ca_factor_t res, const fmpz_t x, int inv, ulong flags, ca_ctx_t
6262
ca_clear(e, ctx);
6363
}
6464

65-
void
65+
static void
6666
_ca_factor_fmpq(ca_factor_t res, const fmpq_t x, ulong flags, ca_ctx_t ctx)
6767
{
6868
if (flags & (CA_FACTOR_ZZ_SMOOTH | CA_FACTOR_ZZ_FULL))

src/ca/fmpz_mpoly_evaluate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,9 @@ ca_fmpz_mpoly_evaluate_horner(ca_t A, const fmpz_mpoly_t B, ca_srcptr C, const f
372372
TMP_END;
373373
}
374374

375+
#if 0
375376
/* todo: accept fmpz exponents */
376-
void
377+
static void
377378
ca_evaluate_fmpz_mpoly_iter(ca_t res, const fmpz_mpoly_t pol, ca_srcptr x, const fmpz_mpoly_ctx_t ctx, ca_ctx_t cactx)
378379
{
379380
slong i, j, len, nvars;
@@ -432,6 +433,7 @@ ca_evaluate_fmpz_mpoly_iter(ca_t res, const fmpz_mpoly_t pol, ca_srcptr x, const
432433
ca_clear(t, cactx);
433434
ca_clear(u, cactx);
434435
}
436+
#endif
435437

436438
void
437439
ca_fmpz_mpoly_evaluate(ca_t res, const fmpz_mpoly_t f, ca_srcptr x, const fmpz_mpoly_ctx_t ctx, ca_ctx_t cactx)

src/ca/gamma.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
#include "ca.h"
1313

14-
void
14+
#if 0
15+
static void
1516
ca_gamma_inert(ca_t res, const ca_t x, ca_ctx_t ctx)
1617
{
1718
if (CA_IS_SPECIAL(x))
@@ -23,8 +24,9 @@ ca_gamma_inert(ca_t res, const ca_t x, ca_ctx_t ctx)
2324
_ca_function_fx(res, CA_Gamma, x, ctx);
2425
}
2526
}
27+
#endif
2628

27-
void
29+
static void
2830
_ca_gamma_verbatim(ca_t res, const ca_t x, ca_ctx_t ctx)
2931
{
3032
ca_t y, tmp;
@@ -39,7 +41,7 @@ _ca_gamma_verbatim(ca_t res, const ca_t x, ca_ctx_t ctx)
3941
ca_clear(tmp, ctx);
4042
}
4143

42-
truth_t
44+
static truth_t
4345
ca_re_is_positive(const ca_t x, ca_ctx_t ctx)
4446
{
4547
ca_t t, u;

src/ca/get_fexpr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "fexpr.h"
1818
#include "fexpr_builtin.h"
1919

20-
void
20+
static void
2121
_fexpr_set_fmpz_poly_decreasing(fexpr_t res, const fmpz * coeffs, slong len, const fexpr_t var)
2222
{
2323
slong i, j, num_terms;

src/ca/io.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ calcium_write_fmpz(calcium_stream_t out, const fmpz_t x)
6565
calcium_write_free(out, fmpz_get_str(NULL, 10, x));
6666
}
6767

68-
void
68+
static void
6969
qqbar_write_n(calcium_stream_t out, const qqbar_t x, slong n)
7070
{
7171
acb_t t;
@@ -81,7 +81,7 @@ qqbar_write_n(calcium_stream_t out, const qqbar_t x, slong n)
8181
acb_clear(t);
8282
}
8383

84-
void
84+
static void
8585
calcium_write_nf_elem(calcium_stream_t out,
8686
const nf_elem_t a, const char * var, const nf_t nf)
8787
{
@@ -129,7 +129,7 @@ calcium_write_nf_elem(calcium_stream_t out,
129129
}
130130
}
131131

132-
void
132+
static void
133133
fmpz_mpoly_q_write_pretty(calcium_stream_t out, const fmpz_mpoly_q_t f, const char ** x, const fmpz_mpoly_ctx_t ctx)
134134
{
135135
if (fmpz_mpoly_is_one(fmpz_mpoly_q_denref(f), ctx))
@@ -153,7 +153,7 @@ fmpz_mpoly_q_write_pretty(calcium_stream_t out, const fmpz_mpoly_q_t f, const ch
153153
}
154154
}
155155

156-
void
156+
static void
157157
_ca_field_print(calcium_stream_t out, const ca_field_t K, ca_print_info_t * info, ca_ctx_t ctx)
158158
{
159159
slong i, j, len, ideal_len;
@@ -446,7 +446,7 @@ _ca_print(calcium_stream_t out, const ca_t x, ca_print_info_t * info, ca_ctx_t c
446446

447447
/* todo: something that doesn't run in quadratic time */
448448

449-
void
449+
static void
450450
_ca_ext_insert_extension(ca_ext_ptr ** extensions, slong * length, ca_ext_t x, ca_ctx_t ctx)
451451
{
452452
slong i, j;
@@ -488,7 +488,7 @@ _ca_ext_insert_extension(ca_ext_ptr ** extensions, slong * length, ca_ext_t x, c
488488
}
489489
}
490490

491-
void
491+
static void
492492
_ca_ext_all_extensions(ca_ext_ptr ** extensions, slong * length, ca_ext_t x, ca_ctx_t ctx)
493493
{
494494
slong i;

0 commit comments

Comments
 (0)