Gather up another utility.
[u/mdw/catacomb] / mpint.h
diff --git a/mpint.h b/mpint.h
index f75d5aa..13df890 100644 (file)
--- a/mpint.h
+++ b/mpint.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: mpint.h,v 1.2 1999/12/10 23:22:53 mdw Exp $
+ * $Id: mpint.h,v 1.6 2004/04/08 01:36:15 mdw Exp $
  *
  * Conversion between MPs and standard C integers
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: mpint.h,v $
- * 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 CATACOMB_MPINT_H
 #define CATACOMB_MPINT_H
 
@@ -71,7 +60,7 @@
   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 --- *                                  \
      * 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;                                         \
@@ -191,7 +180,7 @@ mp_fromINT(ulong, unsigned long);
  */
 
 #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);