diff options
Diffstat (limited to 'generic/tclTomMath.decls')
| -rw-r--r-- | generic/tclTomMath.decls | 316 |
1 files changed, 126 insertions, 190 deletions
diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index 27c4f98..ab39e83 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -1,13 +1,14 @@ # tclTomMath.decls -- # -# This file contains the declarations for the functions in 'libtommath' -# that are contained within the Tcl library. This file is used to -# generate the 'tclTomMathDecls.h' and 'tclStubInit.c' files. +# This file contains the declarations for the functions in +# 'libtommath' that are contained within the Tcl library. +# This file is used to generate the 'tclTomMathDecls.h' and +# 'tclStubInit.c' files. # # If you edit this file, advance the revision number (and the epoch # if the new stubs are not backward compatible) in tclTomMathDecls.h # -# Copyright © 2005 Kevin B. Kenny. All rights reserved. +# Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -17,270 +18,205 @@ library tcl # Define the unsupported generic interfaces. interface tclTomMath -scspec EXTERN +# hooks {tclTomMathInt} # Declare each of the functions in the Tcl tommath interface -declare 0 { - int MP_WUR TclBN_epoch(void) +declare 0 generic { + int TclBN_epoch(void) } -declare 1 { - int MP_WUR TclBN_revision(void) +declare 1 generic { + int TclBN_revision(void) } -declare 2 { - mp_err MP_WUR TclBN_mp_add(const mp_int *a, const mp_int *b, mp_int *c) +declare 2 generic { + int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c) } -declare 3 { - mp_err MP_WUR TclBN_mp_add_d(const mp_int *a, unsigned int b, mp_int *c) +declare 3 generic { + int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c) } -declare 4 { - mp_err MP_WUR TclBN_mp_and(const mp_int *a, const mp_int *b, mp_int *c) +declare 4 generic { + int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c) } -declare 5 { +declare 5 generic { void TclBN_mp_clamp(mp_int *a) } -declare 6 { +declare 6 generic { void TclBN_mp_clear(mp_int *a) } -declare 7 { +declare 7 generic { void TclBN_mp_clear_multi(mp_int *a, ...) } -declare 8 { - mp_ord MP_WUR TclBN_mp_cmp(const mp_int *a, const mp_int *b) +declare 8 generic { + int TclBN_mp_cmp(mp_int *a, mp_int *b) } -declare 9 { - mp_ord MP_WUR TclBN_mp_cmp_d(const mp_int *a, unsigned int b) +declare 9 generic { + int TclBN_mp_cmp_d(mp_int *a, mp_digit b) } -declare 10 { - mp_ord MP_WUR TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b) +declare 10 generic { + int TclBN_mp_cmp_mag(mp_int *a, mp_int *b) } -declare 11 { - mp_err MP_WUR TclBN_mp_copy(const mp_int *a, mp_int *b) +declare 11 generic { + int TclBN_mp_copy(mp_int *a, mp_int *b) } -declare 12 { - int MP_WUR TclBN_mp_count_bits(const mp_int *a) +declare 12 generic { + int TclBN_mp_count_bits(mp_int *a) } -declare 13 { - mp_err MP_WUR TclBN_mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r) +declare 13 generic { + int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, mp_int *r) } -declare 14 { - mp_err MP_WUR TclBN_mp_div_d(const mp_int *a, unsigned int b, mp_int *q, unsigned int *r) +declare 14 generic { + int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q, mp_digit *r) } -declare 15 { - mp_err MP_WUR TclBN_mp_div_2(const mp_int *a, mp_int *q) +declare 15 generic { + int TclBN_mp_div_2(mp_int *a, mp_int *q) } -declare 16 { - mp_err MP_WUR TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q, mp_int *r) +declare 16 generic { + int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, mp_int *r) } -declare 17 {deprecated {is private function in libtommath}} { - mp_err TclBN_mp_div_3(const mp_int *a, mp_int *q, unsigned int *r) +declare 17 generic { + int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r) } -declare 18 { +declare 18 generic { void TclBN_mp_exch(mp_int *a, mp_int *b) } -declare 19 { - mp_err MP_WUR TclBN_mp_expt_u32(const mp_int *a, unsigned int b, mp_int *c) +declare 19 generic { + int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c) } -declare 20 { - mp_err MP_WUR TclBN_mp_grow(mp_int *a, int size) +declare 20 generic { + int TclBN_mp_grow(mp_int *a, int size) } -declare 21 { - mp_err MP_WUR TclBN_mp_init(mp_int *a) +declare 21 generic { + int TclBN_mp_init(mp_int *a) } -declare 22 { - mp_err MP_WUR TclBN_mp_init_copy(mp_int *a, const mp_int *b) +declare 22 generic { + int TclBN_mp_init_copy(mp_int *a, mp_int *b) } -declare 23 { - mp_err MP_WUR TclBN_mp_init_multi(mp_int *a, ...) +declare 23 generic { + int TclBN_mp_init_multi(mp_int *a, ...) } -declare 24 { - mp_err MP_WUR TclBN_mp_init_set(mp_int *a, unsigned int b) +declare 24 generic { + int TclBN_mp_init_set(mp_int *a, mp_digit b) } -declare 25 { - mp_err MP_WUR TclBN_mp_init_size(mp_int *a, int size) +declare 25 generic { + int TclBN_mp_init_size(mp_int *a, int size) } -declare 26 { - mp_err MP_WUR TclBN_mp_lshd(mp_int *a, int shift) +declare 26 generic { + int TclBN_mp_lshd(mp_int *a, int shift) } -declare 27 { - mp_err MP_WUR TclBN_mp_mod(const mp_int *a, const mp_int *b, mp_int *r) +declare 27 generic { + int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r) } -declare 28 { - mp_err MP_WUR TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r) +declare 28 generic { + int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r) } -declare 29 { - mp_err MP_WUR TclBN_mp_mul(const mp_int *a, const mp_int *b, mp_int *p) +declare 29 generic { + int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p) } -declare 30 { - mp_err MP_WUR TclBN_mp_mul_d(const mp_int *a, unsigned int b, mp_int *p) +declare 30 generic { + int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p) } -declare 31 { - mp_err MP_WUR TclBN_mp_mul_2(const mp_int *a, mp_int *p) +declare 31 generic { + int TclBN_mp_mul_2(mp_int *a, mp_int *p) } -declare 32 { - mp_err MP_WUR TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p) +declare 32 generic { + int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p) } -declare 33 { - mp_err MP_WUR TclBN_mp_neg(const mp_int *a, mp_int *b) +declare 33 generic { + int TclBN_mp_neg(mp_int *a, mp_int *b) } -declare 34 { - mp_err MP_WUR TclBN_mp_or(const mp_int *a, const mp_int *b, mp_int *c) +declare 34 generic { + int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c) } -declare 35 { - mp_err MP_WUR TclBN_mp_radix_size(const mp_int *a, int radix, int *size) +declare 35 generic { + int TclBN_mp_radix_size(mp_int *a, int radix, int *size) } -declare 36 { - mp_err MP_WUR TclBN_mp_read_radix(mp_int *a, const char *str, int radix) +declare 36 generic { + int TclBN_mp_read_radix(mp_int *a, const char *str, int radix) } -declare 37 { +declare 37 generic { void TclBN_mp_rshd(mp_int *a, int shift) } -declare 38 { - mp_err MP_WUR TclBN_mp_shrink(mp_int *a) +declare 38 generic { + int TclBN_mp_shrink(mp_int *a) } -declare 39 {deprecated {macro calling mp_set_u64}} { - void TclBN_mp_set(mp_int *a, unsigned int b) +declare 39 generic { + void TclBN_mp_set(mp_int *a, mp_digit b) } -declare 40 {nostub {is private function in libtommath}} { - mp_err TclBN_mp_sqr(const mp_int *a, mp_int *b) +declare 40 generic { + int TclBN_mp_sqr(mp_int *a, mp_int *b) } -declare 41 { - mp_err MP_WUR TclBN_mp_sqrt(const mp_int *a, mp_int *b) +declare 41 generic { + int TclBN_mp_sqrt(mp_int *a, mp_int *b) } -declare 42 { - mp_err MP_WUR TclBN_mp_sub(const mp_int *a, const mp_int *b, mp_int *c) +declare 42 generic { + int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c) } -declare 43 { - mp_err MP_WUR TclBN_mp_sub_d(const mp_int *a, unsigned int b, mp_int *c) +declare 43 generic { + int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c) } -declare 44 {deprecated {Use mp_to_ubin}} { - mp_err TclBN_mp_to_unsigned_bin(const mp_int *a, unsigned char *b) +declare 44 generic { + int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b) } -declare 45 {deprecated {Use mp_to_ubin}} { - mp_err TclBN_mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b, +declare 45 generic { + int TclBN_mp_to_unsigned_bin_n(mp_int *a, unsigned char *b, unsigned long *outlen) } -declare 46 {deprecated {Use mp_to_radix}} { - mp_err TclBN_mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen) +declare 46 generic { + int TclBN_mp_toradix_n(mp_int *a, char *str, int radix, int maxlen) } -declare 47 { - size_t TclBN_mp_ubin_size(const mp_int *a) +declare 47 generic { + int TclBN_mp_unsigned_bin_size(mp_int *a) } -declare 48 { - mp_err MP_WUR TclBN_mp_xor(const mp_int *a, const mp_int *b, mp_int *c) +declare 48 generic { + int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c) } -declare 49 { +declare 49 generic { void TclBN_mp_zero(mp_int *a) } # internal routines to libtommath - should not be called but must be # exported to accommodate the "tommath" extension -declare 50 {deprecated {is private function in libtommath}} { +declare 50 generic { void TclBN_reverse(unsigned char *s, int len) } -declare 51 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_mul_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int digs) +declare 51 generic { + int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs) } -declare 52 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_sqr_fast(const mp_int *a, mp_int *b) +declare 52 generic { + int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b) } -declare 53 {deprecated {is private function in libtommath}} { - mp_err TclBN_mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c) +declare 53 generic { + int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b, mp_int *c) } -declare 54 {deprecated {is private function in libtommath}} { - mp_err TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b) +declare 54 generic { + int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b) } -declare 55 {deprecated {is private function in libtommath}} { - mp_err TclBN_mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c) +declare 55 generic { + int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) } -declare 56 {deprecated {is private function in libtommath}} { - mp_err TclBN_mp_toom_sqr(const mp_int *a, mp_int *b) +declare 56 generic { + int TclBN_mp_toom_sqr(mp_int *a, mp_int *b) } -declare 57 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_add(const mp_int *a, const mp_int *b, mp_int *c) +declare 57 generic { + int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c) } -declare 58 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) +declare 58 generic { + int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs) } -declare 59 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_sqr(const mp_int *a, mp_int *b) +declare 59 generic { + int TclBN_s_mp_sqr(mp_int *a, mp_int *b) } -declare 60 {deprecated {is private function in libtommath}} { - mp_err TclBN_s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c) +declare 60 generic { + int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c) } -declare 61 {deprecated {macro calling mp_init_u64}} { - mp_err TclBN_mp_init_ul(mp_int *a, unsigned long i) +declare 61 { + int TclBN_mp_init_set_int(mp_int *a, unsigned long i) } -declare 62 {deprecated {macro calling mp_set_u64}} { - void TclBN_mp_set_ul(mp_int *a, unsigned long i) +declare 62 { + int TclBN_mp_set_int(mp_int *a, unsigned long i) } declare 63 { - int MP_WUR TclBN_mp_cnt_lsb(const mp_int *a) + int TclBN_mp_cnt_lsb(mp_int *a) } -declare 64 {deprecated {macro calling mp_init_i64}} { - int TclBN_mp_init_l(mp_int *bignum, long initVal) -} -declare 65 { - int MP_WUR TclBN_mp_init_i64(mp_int *bignum, int64_t initVal) -} -declare 66 { - int MP_WUR TclBN_mp_init_u64(mp_int *bignum, uint64_t initVal) -} - -# Added in libtommath 1.0 -declare 67 {deprecated {Use mp_expt_u32}} { - mp_err TclBN_mp_expt_d_ex(const mp_int *a, unsigned int b, mp_int *c, int fast) -} -# Added in libtommath 1.0.1 -declare 68 { - void TclBN_mp_set_u64(mp_int *a, uint64_t i) -} -declare 69 { - uint64_t MP_WUR TclBN_mp_get_mag_u64(const mp_int *a) -} -declare 70 { - void TclBN_mp_set_i64(mp_int *a, int64_t i) -} -declare 71 { - mp_err MP_WUR TclBN_mp_unpack(mp_int *rop, size_t count, mp_order order, size_t size, - mp_endian endian, size_t nails, const void *op) -} -declare 72 { - mp_err MP_WUR TclBN_mp_pack(void *rop, size_t maxcount, size_t *written, mp_order order, - size_t size, mp_endian endian, size_t nails, const mp_int *op) -} - -# Added in libtommath 1.1.0 -declare 73 {deprecated {merged with mp_and}} { - mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c) -} -declare 74 {deprecated {merged with mp_or}} { - mp_err TclBN_mp_tc_or(const mp_int *a, const mp_int *b, mp_int *c) -} -declare 75 {deprecated {merged with mp_xor}} { - mp_err TclBN_mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c) -} -declare 76 { - mp_err MP_WUR TclBN_mp_signed_rsh(const mp_int *a, int b, mp_int *c) -} -declare 77 { - size_t MP_WUR TclBN_mp_pack_count(const mp_int *a, size_t nails, size_t size) -} - -# Added in libtommath 1.2.0 -declare 78 { - int MP_WUR TclBN_mp_to_ubin(const mp_int *a, unsigned char *buf, size_t maxlen, size_t *written) -} -declare 79 { - mp_err MP_WUR TclBN_mp_div_ld(const mp_int *a, uint64_t b, mp_int *q, uint64_t *r) -} -declare 80 { - int MP_WUR TclBN_mp_to_radix(const mp_int *a, char *str, size_t maxlen, size_t *written, int radix) -} - - -# Local Variables: -# mode: tcl -# End: |
