/* -*-c-*-
*
- * $Id: mptext.c,v 1.18 2004/04/08 01:36:15 mdw Exp $
+ * $Id$
*
* Textual representation of multiprecision numbers
*
r = -1;
} else if (radix < 0) {
rd = -radix;
- assert(((void)"binary radix must fit in a byte", rd < UCHAR_MAX));
+ assert(((void)"binary radix must fit in a byte", rd <= UCHAR_MAX));
r = -1;
} else if (ch != '0') {
rd = 10;
assert(i);
mp_div(&q, &m, m, pr[i]);
- if (!MP_LEN(q))
+ if (MP_ZEROP(q))
d = z;
else {
if (z > d)
if (radix > 0)
assert(((void)"ascii radix must be <= 62", radix <= 62));
else if (radix < 0)
- assert(((void)"binary radix must fit in a byte", -radix < UCHAR_MAX));
+ assert(((void)"binary radix must fit in a byte", -radix <= UCHAR_MAX));
else
assert(((void)"radix can't be zero in mp_write", 0));
/* --- If the number is negative, sort that out --- */
- if (m->f & MP_NEG) {
+ if (MP_NEGP(m)) {
if (ops->put("-", 1, p))
return (EOF);
m->f &= ~MP_NEG;