/* -*-c-*-
*
- * $Id: mptext.c,v 1.6 2000/06/25 12:58:23 mdw Exp $
+ * $Id: mptext.c,v 1.7 2000/07/15 10:01:08 mdw Exp $
*
* Textual representation of multiprecision numbers
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mptext.c,v $
+ * Revision 1.7 2000/07/15 10:01:08 mdw
+ * Bug fix in binary input.
+ *
* Revision 1.6 2000/06/25 12:58:23 mdw
* Fix the derivation of `depth' commentary.
*
/* --- Handle an initial sign --- */
- if (ch == '-') {
+ if (radix >= 0 && ch == '-') {
f |= f_neg;
ch = ops->get(p);
while (isspace(ch))
for (;; ch = ops->get(p)) {
int x;
+ if (ch < 0)
+ break;
+
/* --- An underscore indicates a numbered base --- */
if (ch == '_' && r > 0 && r <= 36) {