/* -*-c-*-
*
- * $Id: mpint.h,v 1.3 2000/06/17 11:45:09 mdw Exp $
+ * $Id: mpint.h,v 1.5 2002/01/13 19:23:16 mdw Exp $
*
* Conversion between MPs and standard C integers
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mpint.h,v $
+ * Revision 1.5 2002/01/13 19:23:16 mdw
+ * Fix division-by-zero bug translating @MPW_MAX@ to an @mp@.
+ *
+ * Revision 1.4 2000/10/08 12:04:01 mdw
+ * Remove spurious semicolon.
+ *
* 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
* up all of my negative arithmetic. So do an explicit test here. \
*/ \
\
- if (_i > -MPW_MAX) \
+ if (_i >= -MPW_MAX) \
break; \
else \
_i /= (type)MPW_MAX + 1; \
*/
#define mp_toINT(name, type) \
- extern type mp_to##name(const mp */*m*/);
+ extern type mp_to##name(const mp */*m*/)
mp_toINT(short, short);
mp_toINT(ushort, unsigned short);