File: bignum.h

package info (click to toggle)
clamav 0.101.2+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 29,464 kB
  • sloc: ansic: 158,856; sh: 8,156; cpp: 5,173; makefile: 2,077; yacc: 1,351; lex: 714; python: 120; perl: 17
file content (32 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef BIGNUM_H_
#define BIGNUM_H_

#if HAVE_SYSTEM_TOMSFASTMATH
#include <tfm.h>
#else
#define TFM_CHECK
#include "bignum_fast.h"
#endif

typedef fp_int mp_int;
#define mp_cmp fp_cmp
#define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d)
#define mp_init(a) (fp_init(a), 0)
#define mp_add fp_add

#define mp_init_multi(a,b,c,d) (mp_init(a), mp_init(b), mp_init(c), 0)

#define mp_read_unsigned_bin(a,b,c) (fp_read_unsigned_bin(a, b, c), 0)

#define mp_div fp_div
#define mp_clear_multi(...)
#define mp_copy(a,b) (fp_copy(a,b), 0)
#define mp_unsigned_bin_size fp_unsigned_bin_size
#define mp_to_unsigned_bin(a,b) (fp_to_unsigned_bin(a,b), 0)
#define mp_read_radix fp_read_radix
#define mp_exptmod fp_exptmod
#define mp_get_int(a) ((a)->used > 0 ? (a)->dp[0] : 0)
#define mp_set_int(a, b) fp_set(a, b)
#define mp_mul_2d fp_mul_2d
#define mp_clear(x)
#endif