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.c | |
parent | 9eb3a42e1a2f14b49ece03b661280db53f15a546 (diff) | |
download | skalibs-05db4ba46ae1ca6143bb9b432d1e05e69eddd263.tar.xz |
Types fix, start: preparation and libbiguint
Diffstat (limited to 'src/libbiguint/bu_divmod.c')
-rw-r--r-- | src/libbiguint/bu_divmod.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libbiguint/bu_divmod.c b/src/libbiguint/bu_divmod.c index 5d5802f..80bcb6a 100644 --- a/src/libbiguint/bu_divmod.c +++ b/src/libbiguint/bu_divmod.c @@ -1,14 +1,14 @@ /* ISC license. */ +#include <stdint.h> #include <errno.h> -#include <skalibs/uint32.h> #include <skalibs/biguint.h> /* q = y/x mod m. */ -int bu_divmod (uint32 *q, unsigned int qn, uint32 const *y, unsigned int yn, uint32 const *x, unsigned int xn, uint32 const *m, unsigned int mn) +int bu_divmod (uint32_t *q, unsigned int qn, uint32_t const *y, unsigned int yn, uint32_t const *x, unsigned int xn, uint32_t const *m, unsigned int mn) { unsigned int ylen = bu_len(y, yn) ; unsigned int xlen = bu_len(x, xn) ; @@ -18,9 +18,9 @@ int bu_divmod (uint32 *q, unsigned int qn, uint32 const *y, unsigned int yn, uin if (n < mlen) n = mlen ; if (!n) return (errno = EDOM, 0) ; { - uint32 yy[n] ; - uint32 xx[n] ; - uint32 mm[n] ; + uint32_t yy[n] ; + uint32_t xx[n] ; + uint32_t mm[n] ; bu_gcd(xx, n, x, xlen, m, mlen) ; if ((xx[0] != 1) || (bu_len(xx, n) != 1)) return (errno = EDOM, 0) ; bu_copy_internal(yy, y, ylen) ; bu_zero(yy+ylen, n-ylen) ; |