#include <stdio.h>
#include <stdlib.h>
+#include <mLib/macros.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
}
ulmax = mp_fromulong(MP_NEW, ULONG_MAX);
p = argv[optind];
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
xx = mp_readstring(MP_NEW, argv[optind], &p, 0);
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
- if (!xx || *p || MP_CMP(xx, >, ulmax))
+ if (!xx || *p || MP_CMP(xx, <, MP_ZERO) || MP_CMP(xx, >, ulmax))
die(EXIT_FAILURE, "bad integer `%s'", argv[optind]);
x = mp_toulong(xx);
mp_drop(xx);