X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/eb867836b08bab8a2a8e4bca3733994cbc83eb1c..HEAD:/math/g-ec.c diff --git a/math/g-ec.c b/math/g-ec.c index 1b6c16e3..5d922ddd 100644 --- a/math/g-ec.c +++ b/math/g-ec.c @@ -29,6 +29,7 @@ #include +#include #include #define ge ec @@ -99,15 +100,15 @@ static int gread(group *gg, ec *d, const mptext_ops *ops, void *p) { int ch; ch = ops->get(p); - if (tolower(ch) == 'i') { - if (tolower(ops->get(p)) != 'n' || tolower(ops->get(p)) != 'f') + if (TOLOWER(ch) == 'i') { + if (TOLOWER(ops->get(p)) != 'n' || TOLOWER(ops->get(p)) != 'f') return (-1); EC_SETINF(d); return (0); } ops->unget(ch, p); if ((t.x = mp_read(MP_NEW, 0, ops, p)) == 0) goto done; - do ch = ops->get(p); while (ch == ',' || isspace(ch)); ops->unget(ch, p); + do ch = ops->get(p); while (ch == ',' || ISSPACE(ch)); ops->unget(ch, p); if ((t.y = mp_read(MP_NEW, 0, ops, p)) == 0) goto done; EC_IN(g->ei.c, &t, &t); if (EC_CHECK(g->ei.c, &t)) goto done;