diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2017-06-05 23:20:36 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2017-06-05 23:20:36 (GMT) |
commit | f8223fa81718da26562fff851b4a56d18b58a62a (patch) | |
tree | 2c47bdd025eab065e5f559ade49795a3acaf938e /libtommath/bn_fast_s_mp_mul_digs.c | |
parent | e9d31a334b4cbd18716b3c1eacf7f516cbc7286d (diff) | |
parent | 0b178367ba3b9a10d44f89025c89292a4ea49b20 (diff) | |
download | tcl-dkf_expose_ptrgetvar.zip tcl-dkf_expose_ptrgetvar.tar.gz tcl-dkf_expose_ptrgetvar.tar.bz2 |
merge trunkdkf_expose_ptrgetvar
Diffstat (limited to 'libtommath/bn_fast_s_mp_mul_digs.c')
-rw-r--r-- | libtommath/bn_fast_s_mp_mul_digs.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libtommath/bn_fast_s_mp_mul_digs.c b/libtommath/bn_fast_s_mp_mul_digs.c index ab157b9..acd13b4 100644 --- a/libtommath/bn_fast_s_mp_mul_digs.c +++ b/libtommath/bn_fast_s_mp_mul_digs.c @@ -1,4 +1,4 @@ -#include <tommath.h> +#include <tommath_private.h> #ifdef BN_FAST_S_MP_MUL_DIGS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -12,7 +12,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com + * Tom St Denis, tstdenis82@gmail.com, http://libtom.org */ /* Fast (comba) multiplier @@ -35,7 +35,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) { int olduse, res, pa, ix, iz; mp_digit W[MP_WARRAY]; - register mp_word _W; + mp_word _W; /* grow the destination as required */ if (c->alloc < digs) { @@ -78,16 +78,16 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) /* make next carry */ _W = _W >> ((mp_word)DIGIT_BIT); - } + } /* setup dest */ olduse = c->used; c->used = pa; { - register mp_digit *tmpc; + mp_digit *tmpc; tmpc = c->dp; - for (ix = 0; ix < pa+1; ix++) { + for (ix = 0; ix < (pa + 1); ix++) { /* now extract the previous digit [below the carry] */ *tmpc++ = W[ix]; } @@ -101,3 +101,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) return MP_OKAY; } #endif + +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ |