diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-15 14:44:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-15 14:44:00 (GMT) |
commit | d4e73bcab52ca3c76e007a1acc7cb76f50b8feb5 (patch) | |
tree | 4598f9d64ea232476fcf18bbef6bd413444c0c07 /libtommath/tommath_private.h | |
parent | ce32fdecb2337a3ce69b0fb71295c46478019e86 (diff) | |
download | tcl-d4e73bcab52ca3c76e007a1acc7cb76f50b8feb5.zip tcl-d4e73bcab52ca3c76e007a1acc7cb76f50b8feb5.tar.gz tcl-d4e73bcab52ca3c76e007a1acc7cb76f50b8feb5.tar.bz2 |
re-format everything through astyle. Taken from libtom/libtommath (pull request [https://github.com/libtom/libtommath/pull/85|85])
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 aeda684..ee39694 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -19,39 +19,39 @@ #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 */ #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 /* lowlevel functions, do not call! */ @@ -69,10 +69,10 @@ int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c); int mp_karatsuba_sqr(mp_int *a, mp_int *b); int mp_toom_sqr(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; @@ -112,7 +112,7 @@ int func_name (mp_int * a, type b) \ } #ifdef __cplusplus - } +} #endif #endif |