X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/e74ca64c0ec65a93d2f133c4472256e3bbb688e2..141c12847a1c2f8cc8db03d420551584e689fb87:/math/mp-arith.c diff --git a/math/mp-arith.c b/math/mp-arith.c index 470620ef..048f4c66 100644 --- a/math/mp-arith.c +++ b/math/mp-arith.c @@ -700,6 +700,8 @@ mp *mp_leastcongruent(mp *d, mp *b, mp *r, mp *m) #ifdef TEST_RIG +#include + static int verify(const char *op, mp *expect, mp *result, mp *a, mp *b) { if (!MP_EQ(expect, result)) { @@ -787,11 +789,11 @@ MPX_DOBIN(DO) mp *r = *(mp **)v[3].buf; mp *c; - if (strcmp(v[0].buf, "and") == 0) op = 1; - else if (strcmp(v[0].buf, "or") == 0) op = 7; - else if (strcmp(v[0].buf, "nand") == 0) op = 14; - else if (strcmp(v[0].buf, "nor") == 0) op = 8; - else if (strcmp(v[0].buf, "xor") == 0) op = 6; + if (STRCMP(v[0].buf, ==, "and")) op = 1; + else if (STRCMP(v[0].buf, ==, "or")) op = 7; + else if (STRCMP(v[0].buf, ==, "nand")) op = 14; + else if (STRCMP(v[0].buf, ==, "nor")) op = 8; + else if (STRCMP(v[0].buf, ==, "xor")) op = 6; else { char *p = v[0].buf; while (*p) {