diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-21 14:51:28 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-21 14:51:28 +0000 |
commit | 05db4ba46ae1ca6143bb9b432d1e05e69eddd263 (patch) | |
tree | c08156b5d1750c1b56331a2ef1ba537038d771b8 /src/libbiguint/bu_divmod_internal.c | |
parent | 9eb3a42e1a2f14b49ece03b661280db53f15a546 (diff) | |
download | skalibs-05db4ba46ae1ca6143bb9b432d1e05e69eddd263.tar.xz |
Types fix, start: preparation and libbiguint
Diffstat (limited to 'src/libbiguint/bu_divmod_internal.c')
-rw-r--r-- | src/libbiguint/bu_divmod_internal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libbiguint/bu_divmod_internal.c b/src/libbiguint/bu_divmod_internal.c index 46d3335..ad0f277 100644 --- a/src/libbiguint/bu_divmod_internal.c +++ b/src/libbiguint/bu_divmod_internal.c @@ -1,6 +1,6 @@ /* ISC license. */ -#include <skalibs/uint32.h> +#include <stdint.h> #include <skalibs/biguint.h> /* @@ -9,10 +9,10 @@ Original idea: see http://research.sun.com/techrep/2001/abstract-95.html */ -void bu_divmod_internal (register uint32 *u, register uint32 *a, register uint32 const *m, unsigned int n) +void bu_divmod_internal (register uint32_t *u, register uint32_t *a, register uint32_t const *m, unsigned int n) { - uint32 bb[n] ; register uint32 *b = bb ; - uint32 vv[n] ; register uint32 *v = vv ; + uint32_t bb[n] ; register uint32_t *b = bb ; + uint32_t vv[n] ; register uint32_t *v = vv ; bu_copy_internal(b, m, n) ; bu_zero(v, n) ; @@ -28,7 +28,7 @@ void bu_divmod_internal (register uint32 *u, register uint32 *a, register uint32 if ((a[0] == 1) && (bu_len(a, n) == 1)) break ; if (bu_cmp(a, n, b, n) < 0) { - register uint32 *t = a ; a = b ; b = t ; + register uint32_t *t = a ; a = b ; b = t ; t = u ; u = v ; v = t ; } bu_add(a, n, a, n, b, n) ; |