1 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
2 /* All Rights Reserved */
3
4
5 /*
6 * Copyright (c) 1980 Regents of the University of California.
7 * All rights reserved. The Berkeley software License Agreement
8 * specifies the terms and conditions for redistribution.
9 */
10 /* Portions Copyright(c) 1996, Sun Microsystems Inc. */
11 /* All Rights Reserved */
12
13 /*
14 * Copyright (c) 1997, by Sun Microsystems, Inc.
15 * All rights reserved.
16 */
17
18 /* fix for bugid 1240660 redefine old libmp interfaces to go to the new */
19 /* mp_*() interfaces */
20
21 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
22
23 /* LINTLIBRARY */
24
25 #include <mp.h>
26 #include <sys/types.h>
27 #include "libmp.h"
28
gcd(MINT * a,MINT * b,MINT * c)29 void gcd(MINT *a, MINT *b, MINT *c) { mp_gcd(a, b, c); }
30
madd(MINT * a,MINT * b,MINT * c)31 void madd(MINT *a, MINT *b, MINT *c) { mp_madd(a, b, c); }
32
msub(MINT * a,MINT * b,MINT * c)33 void msub(MINT *a, MINT *b, MINT *c) { mp_msub(a, b, c); }
34
mdiv(MINT * a,MINT * b,MINT * q,MINT * r)35 void mdiv(MINT *a, MINT *b, MINT *q, MINT *r) { mp_mdiv(a, b, q, r); }
36
sdiv(MINT * a,short n,MINT * q,short * r)37 void sdiv(MINT *a, short n, MINT *q, short *r) { mp_sdiv(a, n, q, r); }
38
min(MINT * a)39 int min(MINT *a) { return (mp_min(a)); }
40
mout(MINT * a)41 void mout(MINT *a) { mp_mout(a); }
42
msqrt(MINT * a,MINT * b,MINT * r)43 int msqrt(MINT *a, MINT *b, MINT *r) { return (mp_msqrt(a, b, r)); }
44
mult(MINT * a,MINT * b,MINT * c)45 void mult(MINT *a, MINT *b, MINT *c) { mp_mult(a, b, c); }
46
pow(MINT * a,MINT * b,MINT * c,MINT * d)47 void pow(MINT *a, MINT *b, MINT *c, MINT *d) { mp_pow(a, b, c, d); }
48
rpow(MINT * a,short n,MINT * b)49 void rpow(MINT *a, short n, MINT *b) { mp_rpow(a, n, b); }
50
itom(short n)51 MINT *itom(short n) { return (mp_itom(n)); }
52
mcmp(MINT * a,MINT * b)53 int mcmp(MINT *a, MINT *b) { return (mp_mcmp(a, b)); }
54
xtom(char * key)55 MINT *xtom(char *key) { return (mp_xtom(key)); }
56
mtox(MINT * key)57 char *mtox(MINT *key) { return (mp_mtox(key)); }
58
mfree(MINT * a)59 void mfree(MINT *a) { mp_mfree(a); }
60
61 /* VARARGS */
xalloc(int nint,char * s)62 short *xalloc(int nint, char *s) { return (_mp_xalloc(nint, s)); }
63
xfree(MINT * c)64 void xfree(MINT *c) { _mp_xfree(c); }
65