summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-21 10:01:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-21 10:01:35 (GMT)
commitb03d00e30749162d899d9cb2fa4443ed1995d57b (patch)
treee2cacc6f8b51de5592d0bcf13bab3f8a0439ac5a /libtommath
parent12c8a0c839bb180c7a5ae3c49479534591a0d9c9 (diff)
downloadtcl-b03d00e30749162d899d9cb2fa4443ed1995d57b.zip
tcl-b03d00e30749162d899d9cb2fa4443ed1995d57b.tar.gz
tcl-b03d00e30749162d899d9cb2fa4443ed1995d57b.tar.bz2
Update libtommath to v1.2.0-rc3
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/bn_mp_error_to_string.c2
-rw-r--r--libtommath/bn_mp_prime_next_prime.c7
-rw-r--r--libtommath/bn_s_mp_toom_mul.c3
-rw-r--r--libtommath/bn_s_mp_toom_sqr.c3
-rw-r--r--libtommath/changes.txt2
-rw-r--r--libtommath/makefile6
-rw-r--r--libtommath/makefile_include.mk2
-rw-r--r--libtommath/tommath.h2
8 files changed, 17 insertions, 10 deletions
diff --git a/libtommath/bn_mp_error_to_string.c b/libtommath/bn_mp_error_to_string.c
index e936ec1..2e2adb0 100644
--- a/libtommath/bn_mp_error_to_string.c
+++ b/libtommath/bn_mp_error_to_string.c
@@ -17,6 +17,8 @@ const char *mp_error_to_string(mp_err code)
return "Value out of range";
case MP_ITER:
return "Max. iterations reached";
+ case MP_BUF:
+ return "Buffer overflow";
default:
return "Invalid error code";
}
diff --git a/libtommath/bn_mp_prime_next_prime.c b/libtommath/bn_mp_prime_next_prime.c
index 1e971fa..d656565 100644
--- a/libtommath/bn_mp_prime_next_prime.c
+++ b/libtommath/bn_mp_prime_next_prime.c
@@ -10,9 +10,10 @@
*/
mp_err mp_prime_next_prime(mp_int *a, int t, int bbs_style)
{
- int x, y, cmp;
- mp_err err;
- mp_bool res = MP_NO;
+ int x, y;
+ mp_ord cmp;
+ mp_err err;
+ mp_bool res = MP_NO;
mp_digit res_tab[PRIVATE_MP_PRIME_TAB_SIZE], step, kstep;
mp_int b;
diff --git a/libtommath/bn_s_mp_toom_mul.c b/libtommath/bn_s_mp_toom_mul.c
index 8efd803..86901b0 100644
--- a/libtommath/bn_s_mp_toom_mul.c
+++ b/libtommath/bn_s_mp_toom_mul.c
@@ -32,7 +32,8 @@
mp_err s_mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c)
{
mp_int S1, S2, T1, a0, a1, a2, b0, b1, b2;
- int err, B, count;
+ int B, count;
+ mp_err err;
/* init temps */
if ((err = mp_init_multi(&S1, &S2, &T1, NULL)) != MP_OKAY) {
diff --git a/libtommath/bn_s_mp_toom_sqr.c b/libtommath/bn_s_mp_toom_sqr.c
index 9eaa9d0..f2ffb30 100644
--- a/libtommath/bn_s_mp_toom_sqr.c
+++ b/libtommath/bn_s_mp_toom_sqr.c
@@ -22,7 +22,8 @@ mp_err s_mp_toom_sqr(const mp_int *a, mp_int *b)
{
mp_int S0, a0, a1, a2;
mp_digit *tmpa, *tmpc;
- mp_err err, B, count;
+ int B, count;
+ mp_err err;
/* init temps */
diff --git a/libtommath/changes.txt b/libtommath/changes.txt
index 6f44409..ebf7382 100644
--- a/libtommath/changes.txt
+++ b/libtommath/changes.txt
@@ -27,10 +27,12 @@ v1.2.0
-- The custom allocators which were formerly known as XMALLOC(), XFREE() etc. are now available
as MP_MALLOC(), MP_REALLOC(), MP_CALLOC() and MP_FREE(). MP_REALLOC() and MP_FREE() now also
provide the allocated size to ease the usage of simple allocators without tracking.
+ -- Building is now also possible with MSVC 2015, 2017 and 2019 (use makefile.msvc)
-- Added mp_decr() and mp_incr()
-- Added mp_log_u32()
-- Improved prime-checking
-- Improved Toom-Cook multiplication
+ -- Removed the LTM book (`make docs` now builds the user manual)
Jan 28th, 2019
diff --git a/libtommath/makefile b/libtommath/makefile
index df296de..be9fac6 100644
--- a/libtommath/makefile
+++ b/libtommath/makefile
@@ -123,7 +123,7 @@ tune: $(LIBNAME)
coveralls: lcov
coveralls-lcov
-docdvi poster docs mandvi manual:
+docs manual:
$(MAKE) -C doc/ $@ V=$(V)
.PHONY: pre_gen
@@ -133,7 +133,7 @@ pre_gen:
sed -e 's/[[:blank:]]*$$//' mpi.c > pre_gen/mpi.c
rm mpi.c
-zipup: clean astyle new_file manual poster
+zipup: clean astyle new_file docs
@# Update the index, so diff-index won't fail in case the pdf has been created.
@# As the pdf creation modifies the tex files, git sometimes detects the
@# modified files, but misses that it's put back to its original version.
@@ -145,7 +145,7 @@ zipup: clean astyle new_file manual poster
@echo 'fixme check'
-@(find libtommath-$(VERSION)/ -type f | xargs grep 'FIXM[E]') && echo '############## BEWARE: the "fixme" marker was found !!! ##############' || true
mkdir -p libtommath-$(VERSION)/doc
- cp doc/bn.pdf doc/poster.pdf libtommath-$(VERSION)/doc/
+ cp doc/bn.pdf libtommath-$(VERSION)/doc/
$(MAKE) -C libtommath-$(VERSION)/ pre_gen
tar -c libtommath-$(VERSION)/ | xz -6e -c - > ltm-$(VERSION).tar.xz
zip -9rq ltm-$(VERSION).zip libtommath-$(VERSION)
diff --git a/libtommath/makefile_include.mk b/libtommath/makefile_include.mk
index 00ae204..70f448f 100644
--- a/libtommath/makefile_include.mk
+++ b/libtommath/makefile_include.mk
@@ -3,7 +3,7 @@
#
#version of library
-VERSION=1.2.0-rc2
+VERSION=1.2.0-rc3
VERSION_PC=1.2.0
VERSION_SO=3:0:2
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index 8dd3bb3..e87bb08 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -135,7 +135,7 @@ typedef enum {
MP_MEM = -2, /* out of mem */
MP_VAL = -3, /* invalid input */
MP_ITER = -4, /* maximum iterations reached */
- MP_BUF = -5, /* buffer overflow, supplied buffer too small */
+ MP_BUF = -5 /* buffer overflow, supplied buffer too small */
} mp_err;
typedef enum {
MP_LSB_FIRST = -1,