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 29void gcd(MINT *a, MINT *b, MINT *c) { mp_gcd(a, b, c); } 30 31void madd(MINT *a, MINT *b, MINT *c) { mp_madd(a, b, c); } 32 33void msub(MINT *a, MINT *b, MINT *c) { mp_msub(a, b, c); } 34 35void mdiv(MINT *a, MINT *b, MINT *q, MINT *r) { mp_mdiv(a, b, q, r); } 36 37void sdiv(MINT *a, short n, MINT *q, short *r) { mp_sdiv(a, n, q, r); } 38 39int min(MINT *a) { return (mp_min(a)); } 40 41void mout(MINT *a) { mp_mout(a); } 42 43int msqrt(MINT *a, MINT *b, MINT *r) { return (mp_msqrt(a, b, r)); } 44 45void mult(MINT *a, MINT *b, MINT *c) { mp_mult(a, b, c); } 46 47void pow(MINT *a, MINT *b, MINT *c, MINT *d) { mp_pow(a, b, c, d); } 48 49void rpow(MINT *a, short n, MINT *b) { mp_rpow(a, n, b); } 50 51MINT *itom(short n) { return (mp_itom(n)); } 52 53int mcmp(MINT *a, MINT *b) { return (mp_mcmp(a, b)); } 54 55MINT *xtom(char *key) { return (mp_xtom(key)); } 56 57char *mtox(MINT *key) { return (mp_mtox(key)); } 58 59void mfree(MINT *a) { mp_mfree(a); } 60 61/* VARARGS */ 62short *xalloc(int nint, char *s) { return (_mp_xalloc(nint, s)); } 63 64void xfree(MINT *c) { _mp_xfree(c); } 65