diff --git a/.gitignore b/.gitignore index 374094a..75fac9d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.lof *.log *.toc +*.out test test.exe diff --git a/makefile b/makefile index 60b10fb..d2f217d 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,9 @@ ifndef PREFIX PREFIX= endif -CC?=$(PREFIX)gcc +ifeq ($(CC),cc) + CC = $(PREFIX)gcc +endif LD=$(PREFIX)ld AR=$(PREFIX)ar RANLIB=$(PREFIX)ranlib @@ -164,7 +166,7 @@ clean: rm -f `find . -type f -name "*.dyn" | xargs` rm -f `find . -type f -name "*.dpi" | xargs` rm -rf `find . -type d -name "*.libs" | xargs` - rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.toc test test.exe + rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.out tfm.toc test test.exe cd mtest; MAKE=${MAKE} ${MAKE} clean no_oops: clean diff --git a/src/numtheory/fp_isprime.c b/src/numtheory/fp_isprime.c index b135184..1aad9b2 100644 --- a/src/numtheory/fp_isprime.c +++ b/src/numtheory/fp_isprime.c @@ -1,10 +1,10 @@ /* TomsFastMath, a fast ISO C bignum library. - * + * * This project is meant to fill in where LibTomMath * falls short. That is speed ;-) * * This project is public domain and free for all purposes. - * + * * Tom St Denis, tomstdenis@gmail.com */ #include diff --git a/src/numtheory/fp_prime_random_ex.c b/src/numtheory/fp_prime_random_ex.c index 05fb49a..8bbbb48 100644 --- a/src/numtheory/fp_prime_random_ex.c +++ b/src/numtheory/fp_prime_random_ex.c @@ -1,10 +1,10 @@ /* TomsFastMath, a fast ISO C bignum library. - * + * * This project is meant to fill in where LibTomMath * falls short. That is speed ;-) * * This project is public domain and free for all purposes. - * + * * Tom St Denis, tomstdenis@gmail.com */ #include @@ -58,7 +58,7 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback err = FP_VAL; goto error; } - + /* work over the MSbyte */ tmp[0] &= maskAND; tmp[0] |= 1 << ((size - 1) & 7); @@ -78,7 +78,7 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback /* see if (a-1)/2 is prime */ fp_sub_d(a, 1, a); fp_div_2(a, a); - + /* is it prime? */ res = fp_isprime(a); }