/* -*-c-*-
*
- * $Id: mpint.h,v 1.1 1999/11/25 11:38:31 mdw Exp $
+ * $Id: mpint.h,v 1.3 2000/06/17 11:45:09 mdw Exp $
*
* Conversion between MPs and standard C integers
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mpint.h,v $
+ * Revision 1.3 2000/06/17 11:45:09 mdw
+ * Major memory management overhaul. Added arena support. Use the secure
+ * arena for secret integers. Replace and improve the MP management macros
+ * (e.g., replace MP_MODIFY by MP_DEST).
+ *
+ * Revision 1.2 1999/12/10 23:22:53 mdw
+ * Support for uint32.
+ *
* Revision 1.1 1999/11/25 11:38:31 mdw
* Support for conversions between MPs and C integers.
*
*/
-#ifndef MPINT_H
-#define MPINT_H
+#ifndef CATACOMB_MPINT_H
+#define CATACOMB_MPINT_H
#ifdef __cplusplus
extern "C" {
#include <limits.h>
-#ifndef MP_H
+#ifndef CATACOMB_MP_H
# include "mp.h"
#endif
mp *_d = (d); \
size_t _sz = 4; \
\
- MP_MODIFY(_d, _sz); \
+ MP_DEST(_d, _sz, 0); \
_d->f &= ~(MP_NEG | MP_UNDEF); \
\
/* --- Set the sign on the MP --- * \
mp_fromINT(ushort, unsigned short);
mp_fromINT(int, int);
mp_fromINT(uint, unsigned);
+mp_fromINT(uint32, uint32);
mp_fromINT(long, long);
mp_fromINT(ulong, unsigned long);
mp_toINT(ushort, unsigned short);
mp_toINT(int, int);
mp_toINT(uint, unsigned);
+mp_toINT(uint32, uint32);
mp_toINT(long, long);
mp_toINT(ulong, unsigned long);