Lines Matching refs:mp
65 * and not in mp.h) have an underscore prepended to their name (this
85 #include "mp.h"
127 MINT *mp;
129 mp = malloc(sizeof(*mp));
130 if (mp == NULL)
132 mp->bn = BN_new();
133 if (mp->bn == NULL)
135 BN_ERRCHECK(msg, BN_dec2bn(&mp->bn, s));
136 return (mp);
164 MINT *mp;
170 mp = _xtom(msg, s);
172 return (mp);
257 _mfree(const char *msg __unused, MINT *mp)
260 BN_clear(mp->bn);
261 BN_free(mp->bn);
262 free(mp);
266 mp_mfree(MINT *mp)
269 _mfree("mfree", mp);
273 * Read an integer from standard input and stick the result in mp.
280 mp_min(MINT *mp)
295 _movem("min", rmp, mp);
301 * Print the value of mp to standard output in base 10. See blurb
305 mp_mout(const MINT *mp)
309 s = _mtod("mout", mp);
419 * Return a decimal representation of mp. Return value must be
423 _mtod(const char *msg, const MINT *mp)
427 s = BN_bn2dec(mp->bn);
438 * Return a hexadecimal representation of mp. Return value must be
442 _mtox(const char *msg, const MINT *mp)
447 s = BN_bn2hex(mp->bn);
470 mp_mtox(const MINT *mp)
473 return (_mtox("mtox", mp));
592 MINT *mp;
594 mp = malloc(sizeof(*mp));
595 if (mp == NULL)
597 mp->bn = BN_new();
598 if (mp->bn == NULL)
600 BN_ERRCHECK(msg, BN_hex2bn(&mp->bn, s));
601 return (mp);