diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-18 08:31:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-18 08:31:55 (GMT) |
commit | a187f65cfd5964971d7ed52f09e18fdbb4bf51cc (patch) | |
tree | 6b7bbde03122d1571d4543d10eccfe88610bd680 /libtommath/tommath_private.h | |
parent | 0faaca01de4e9fa2039c7fdd34f60b138f665249 (diff) | |
parent | 30f7e69b182d1267056ee2628a860891f6555aa3 (diff) | |
download | tcl-a187f65cfd5964971d7ed52f09e18fdbb4bf51cc.zip tcl-a187f65cfd5964971d7ed52f09e18fdbb4bf51cc.tar.gz tcl-a187f65cfd5964971d7ed52f09e18fdbb4bf51cc.tar.bz2 |
Merge libtommath upstream changes (astyle formatting only). No functional changes. All Tcl-specific modifications are kept.
Diffstat (limited to 'libtommath/tommath_private.h')
-rw-r--r-- | libtommath/tommath_private.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index 07607a8..7f33fab 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -19,40 +19,40 @@ #include <ctype.h> #ifndef MIN - #define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) #endif #ifndef MAX - #define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) #endif #ifdef __cplusplus extern "C" { /* C++ compilers don't like assigning void * to mp_digit * */ -#define OPT_CAST(x) (x *) +#define OPT_CAST(x) (x *) #else /* C on the other hand doesn't care */ -#define OPT_CAST(x) +#define OPT_CAST(x) #endif /* define heap macros */ #if 0 #ifndef XMALLOC - /* default to libc stuff */ - #define XMALLOC malloc - #define XFREE free - #define XREALLOC realloc - #define XCALLOC calloc +/* default to libc stuff */ +# define XMALLOC malloc +# define XFREE free +# define XREALLOC realloc +# define XCALLOC calloc #else - /* prototypes for our heap functions */ - extern void *XMALLOC(size_t n); - extern void *XREALLOC(void *p, size_t n); - extern void *XCALLOC(size_t n, size_t s); - extern void XFREE(void *p); +/* prototypes for our heap functions */ +extern void *XMALLOC(size_t n); +extern void *XREALLOC(void *p, size_t n); +extern void *XCALLOC(size_t n, size_t s); +extern void XFREE(void *p); #endif #endif @@ -71,10 +71,10 @@ int mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c); int mp_karatsuba_sqr(const mp_int *a, mp_int *b); int mp_toom_sqr(const mp_int *a, mp_int *b); int fast_mp_invmod(mp_int *a, mp_int *b, mp_int *c); -int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c); +int mp_invmod_slow(mp_int *a, mp_int *b, mp_int *c); int fast_mp_montgomery_reduce(mp_int *x, mp_int *n, mp_digit rho); int mp_exptmod_fast(mp_int *G, mp_int *X, mp_int *P, mp_int *Y, int redmode); -int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode); +int s_mp_exptmod(mp_int *G, mp_int *X, mp_int *P, mp_int *Y, int redmode); void bn_reverse(unsigned char *s, int len); extern const char *mp_s_rmap; @@ -114,7 +114,7 @@ int func_name (mp_int * a, type b) \ } #ifdef __cplusplus - } +} #endif #endif |