diff options
author | nijtmans <nijtmans@noemail.net> | 2010-05-03 14:36:39 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2010-05-03 14:36:39 (GMT) |
commit | 9155d47087f252f2a8b3e699b672dde402d2ce46 (patch) | |
tree | e5adab677558dc22434d9ee6b375a48333aea345 /generic/tclTomMathDecls.h | |
parent | c6ab5da9a05e48a6d7f8c9f8dd7e355396a1c272 (diff) | |
download | tcl-9155d47087f252f2a8b3e699b672dde402d2ce46.zip tcl-9155d47087f252f2a8b3e699b672dde402d2ce46.tar.gz tcl-9155d47087f252f2a8b3e699b672dde402d2ce46.tar.bz2 |
CONSTify various useful internal functions
(TclBignumToDouble, TclCeil, TclFloor), and
related tommath functions.
FossilOrigin-Name: 729ffb738f1c793649d95c386f783e837dcd3711
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r-- | generic/tclTomMathDecls.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index ee57f96..11555e8 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.11 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.12 2010/05/03 14:36:41 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -180,27 +180,27 @@ EXTERN void TclBN_mp_clear_multi(mp_int *a, ...); #ifndef TclBN_mp_cmp_TCL_DECLARED #define TclBN_mp_cmp_TCL_DECLARED /* 8 */ -EXTERN int TclBN_mp_cmp(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_cmp(const mp_int *a, const mp_int *b); #endif #ifndef TclBN_mp_cmp_d_TCL_DECLARED #define TclBN_mp_cmp_d_TCL_DECLARED /* 9 */ -EXTERN int TclBN_mp_cmp_d(mp_int *a, mp_digit b); +EXTERN int TclBN_mp_cmp_d(const mp_int *a, mp_digit b); #endif #ifndef TclBN_mp_cmp_mag_TCL_DECLARED #define TclBN_mp_cmp_mag_TCL_DECLARED /* 10 */ -EXTERN int TclBN_mp_cmp_mag(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b); #endif #ifndef TclBN_mp_copy_TCL_DECLARED #define TclBN_mp_copy_TCL_DECLARED /* 11 */ -EXTERN int TclBN_mp_copy(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_copy(const mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_count_bits_TCL_DECLARED #define TclBN_mp_count_bits_TCL_DECLARED /* 12 */ -EXTERN int TclBN_mp_count_bits(mp_int *a); +EXTERN int TclBN_mp_count_bits(const mp_int *a); #endif #ifndef TclBN_mp_div_TCL_DECLARED #define TclBN_mp_div_TCL_DECLARED @@ -222,7 +222,7 @@ EXTERN int TclBN_mp_div_2(mp_int *a, mp_int *q); #ifndef TclBN_mp_div_2d_TCL_DECLARED #define TclBN_mp_div_2d_TCL_DECLARED /* 16 */ -EXTERN int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, +EXTERN int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q, mp_int *r); #endif #ifndef TclBN_mp_div_3_TCL_DECLARED @@ -283,7 +283,7 @@ EXTERN int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r); #ifndef TclBN_mp_mod_2d_TCL_DECLARED #define TclBN_mp_mod_2d_TCL_DECLARED /* 28 */ -EXTERN int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r); +EXTERN int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r); #endif #ifndef TclBN_mp_mul_TCL_DECLARED #define TclBN_mp_mul_TCL_DECLARED @@ -303,12 +303,12 @@ EXTERN int TclBN_mp_mul_2(mp_int *a, mp_int *p); #ifndef TclBN_mp_mul_2d_TCL_DECLARED #define TclBN_mp_mul_2d_TCL_DECLARED /* 32 */ -EXTERN int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p); +EXTERN int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p); #endif #ifndef TclBN_mp_neg_TCL_DECLARED #define TclBN_mp_neg_TCL_DECLARED /* 33 */ -EXTERN int TclBN_mp_neg(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_neg(const mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_or_TCL_DECLARED #define TclBN_mp_or_TCL_DECLARED @@ -464,15 +464,15 @@ typedef struct TclTomMathStubs { void (*tclBN_mp_clamp) (mp_int *a); /* 5 */ void (*tclBN_mp_clear) (mp_int *a); /* 6 */ void (*tclBN_mp_clear_multi) (mp_int *a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int *a, mp_int *b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int *a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int *a, mp_int *b); /* 10 */ - int (*tclBN_mp_copy) (mp_int *a, mp_int *b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int *a); /* 12 */ + int (*tclBN_mp_cmp) (const mp_int *a, const mp_int *b); /* 8 */ + int (*tclBN_mp_cmp_d) (const mp_int *a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (const mp_int *a, const mp_int *b); /* 10 */ + int (*tclBN_mp_copy) (const mp_int *a, mp_int *b); /* 11 */ + int (*tclBN_mp_count_bits) (const mp_int *a); /* 12 */ int (*tclBN_mp_div) (mp_int *a, mp_int *b, mp_int *q, mp_int *r); /* 13 */ int (*tclBN_mp_div_d) (mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */ int (*tclBN_mp_div_2) (mp_int *a, mp_int *q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */ + int (*tclBN_mp_div_2d) (const mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */ int (*tclBN_mp_div_3) (mp_int *a, mp_int *q, mp_digit *r); /* 17 */ void (*tclBN_mp_exch) (mp_int *a, mp_int *b); /* 18 */ int (*tclBN_mp_expt_d) (mp_int *a, mp_digit b, mp_int *c); /* 19 */ @@ -484,12 +484,12 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */ int (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */ int (*tclBN_mp_mod) (mp_int *a, mp_int *b, mp_int *r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int *a, int b, mp_int *r); /* 28 */ + int (*tclBN_mp_mod_2d) (const mp_int *a, int b, mp_int *r); /* 28 */ int (*tclBN_mp_mul) (mp_int *a, mp_int *b, mp_int *p); /* 29 */ int (*tclBN_mp_mul_d) (mp_int *a, mp_digit b, mp_int *p); /* 30 */ int (*tclBN_mp_mul_2) (mp_int *a, mp_int *p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int *a, int d, mp_int *p); /* 32 */ - int (*tclBN_mp_neg) (mp_int *a, mp_int *b); /* 33 */ + int (*tclBN_mp_mul_2d) (const mp_int *a, int d, mp_int *p); /* 32 */ + int (*tclBN_mp_neg) (const mp_int *a, mp_int *b); /* 33 */ int (*tclBN_mp_or) (mp_int *a, mp_int *b, mp_int *c); /* 34 */ int (*tclBN_mp_radix_size) (mp_int *a, int radix, int *size); /* 35 */ int (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */ |