From decba31378095b56c8854968f0c9595761c68ed9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 22 Sep 2017 08:48:23 +0000 Subject: Make libtommath's "make" work in Tcl environment (for testing). Eliminate internal s_is_power_of_two(), which can better be done inline. Fix tommath.h for _MSC_VER. --- libtommath/bn_mp_div_d.c | 22 ++++++---------------- libtommath/tommath.h | 4 +++- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/libtommath/bn_mp_div_d.c b/libtommath/bn_mp_div_d.c index d0131c3..c408602 100644 --- a/libtommath/bn_mp_div_d.c +++ b/libtommath/bn_mp_div_d.c @@ -15,21 +15,6 @@ * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ -static int s_is_power_of_two(mp_digit b, int *p) -{ - int x; - - /* Gives the wrong result for b==1, but this function - * is never called for this value anyway. */ - for (x = 1; x < DIGIT_BIT; x++) { - if (b == (((mp_digit)1)<dp[0] & ((((mp_digit)1)<