diff --git a/dlog.h b/dlog.h
index 1f10c7ab..cdd7927c 100644
--- a/dlog.h
+++ b/dlog.h
@@ -1,27 +1,13 @@
-/*=============================================================================
-
- This file is part of ARB.
-
- ARB is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- ARB is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ARB; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-=============================================================================*/
-/******************************************************************************
-
+/*
Copyright (C) 2016 Pascal Molin
-******************************************************************************/
+ This file is part of Arb.
+
+ Arb is free software: you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License (LGPL) as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version. See .
+*/
#ifndef DLOG_H
#define DLOG_H
diff --git a/dlog/precomp_clear.c b/dlog/precomp_clear.c
index a80e1f84..e13071f5 100644
--- a/dlog/precomp_clear.c
+++ b/dlog/precomp_clear.c
@@ -37,7 +37,7 @@ dlog_precomp_clear(dlog_precomp_t pre)
dlog_order23_clear(pre->t.order23);
break;
default:
- printf("THE TYPE IS %d\n", pre->type);
+ flint_printf("dlog_precomp_clear: unknown type %d\n", pre->type);
abort();
break;
}
diff --git a/dlog/precomp_modpe_init.c b/dlog/precomp_modpe_init.c
index 615ec966..a41fd221 100644
--- a/dlog/precomp_modpe_init.c
+++ b/dlog/precomp_modpe_init.c
@@ -15,12 +15,13 @@
void
dlog_precomp_modpe_init(dlog_precomp_t pre, ulong a, ulong p, ulong e, ulong pe, ulong num)
{
- if ( pe < DLOG_TABLE_MODPE_LIM )
+ if (pe < DLOG_TABLE_MODPE_LIM)
{
dlog_precomp_small_init(pre, a, pe, pe - pe / p, num);
return;
}
- else {
+ else
+ {
if (e > 1)
{
pre->type = DLOG_MODPE;
diff --git a/dlog/precomp_n_init.c b/dlog/precomp_n_init.c
index b50faae8..1f46d025 100644
--- a/dlog/precomp_n_init.c
+++ b/dlog/precomp_n_init.c
@@ -18,7 +18,8 @@ dlog_precomp_n_init(dlog_precomp_t pre, ulong a, ulong mod, ulong n, ulong num)
{
if (n % 2 && n_is_probabprime(n))
dlog_precomp_p_init(pre, a, mod, n, num);
- else {
+ else
+ {
if (n < DLOG_TABLE_N_LIM)
{
dlog_precomp_small_init(pre, a, mod, n, num);
diff --git a/dlog/precomp_p_init.c b/dlog/precomp_p_init.c
index 6ed3344d..d277b87b 100644
--- a/dlog/precomp_p_init.c
+++ b/dlog/precomp_p_init.c
@@ -10,13 +10,12 @@
*/
#include "dlog.h"
-#include "math.h"
/* we known the order is prime */
void
dlog_precomp_p_init(dlog_precomp_t pre, ulong a, ulong mod, ulong p, ulong num)
{
- if ( p < DLOG_TABLE_P_LIM )
+ if (p < DLOG_TABLE_P_LIM)
{
dlog_precomp_small_init(pre, a, mod, p, num);
}
diff --git a/dlog/precomp_pe_init.c b/dlog/precomp_pe_init.c
index d4820f04..563eaa58 100644
--- a/dlog/precomp_pe_init.c
+++ b/dlog/precomp_pe_init.c
@@ -14,13 +14,13 @@
void
dlog_precomp_pe_init(dlog_precomp_t pre, ulong a, ulong mod, ulong p, ulong e, ulong pe, ulong num)
{
- if ( pe < DLOG_TABLE_PE_LIM )
+ if (pe < DLOG_TABLE_PE_LIM)
{
dlog_precomp_small_init(pre, a, mod, pe, num);
}
else
{
- if ( e == 1)
+ if (e == 1)
{
dlog_precomp_p_init(pre, a, mod, p, num);
}
diff --git a/dlog/precomp_small_init.c b/dlog/precomp_small_init.c
index dc9ddfca..3c2c2bf5 100644
--- a/dlog/precomp_small_init.c
+++ b/dlog/precomp_small_init.c
@@ -21,7 +21,7 @@ dlog_precomp_small_init(dlog_precomp_t pre, ulong a, ulong mod, ulong n, ulong n
}
else
{
- if ( mod < DLOG_TABLE_LIM )
+ if (mod < DLOG_TABLE_LIM)
{
pre->type = DLOG_TABLE;
pre->cost = dlog_table_init(pre->t.table, a, mod);
diff --git a/dlog/rho_init.c b/dlog/rho_init.c
index 745dea4f..529f5104 100644
--- a/dlog/rho_init.c
+++ b/dlog/rho_init.c
@@ -10,7 +10,6 @@
*/
#include "dlog.h"
-#include
void
dlog_rho_init(dlog_rho_t t, ulong a, ulong mod, ulong n)
diff --git a/dlog/vec_loop.c b/dlog/vec_loop.c
index 70714db4..c7e8815e 100644
--- a/dlog/vec_loop.c
+++ b/dlog/vec_loop.c
@@ -26,6 +26,6 @@ dlog_vec_loop(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod
vx = nmod_add(vx, va, order);
}
while (x != 1);
- for(x = mod.n + 1; x < nv; x++)
+ for (x = mod.n + 1; x < nv; x++)
v[x] = v[x - mod.n];
}