summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_reverse.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-11-06 10:04:02 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-11-06 10:04:02 (GMT)
commit179e8f4df7568f6aca6e53525abfe0505fd2a578 (patch)
treec9328ec8e0afd8af8a96b9f3da12b152cec7c281 /libtommath/bn_reverse.c
parentc5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f (diff)
parent2798a075ee62ea5ab4aa80279d614a8634ba378a (diff)
downloadtcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.zip
tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.gz
tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.bz2
merge core-8-branch
Diffstat (limited to 'libtommath/bn_reverse.c')
-rw-r--r--libtommath/bn_reverse.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/libtommath/bn_reverse.c b/libtommath/bn_reverse.c
index 9d7fd29..5b49172 100644
--- a/libtommath/bn_reverse.c
+++ b/libtommath/bn_reverse.c
@@ -1,4 +1,4 @@
-#include <tommath.h>
+#include "tommath_private.h"
#ifdef BN_REVERSE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
@@ -11,25 +11,26 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* reverse an array, used for radix code */
-void
-bn_reverse (unsigned char *s, int len)
+void bn_reverse(unsigned char *s, int len)
{
- int ix, iy;
- unsigned char t;
+ int ix, iy;
+ unsigned char t;
- ix = 0;
- iy = len - 1;
- while (ix < iy) {
- t = s[ix];
- s[ix] = s[iy];
- s[iy] = t;
- ++ix;
- --iy;
- }
+ ix = 0;
+ iy = len - 1;
+ while (ix < iy) {
+ t = s[ix];
+ s[ix] = s[iy];
+ s[iy] = t;
+ ++ix;
+ --iy;
+ }
}
#endif
+
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */