Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / math / mp-arith.c
index 470620e..048f4c6 100644 (file)
@@ -700,6 +700,8 @@ mp *mp_leastcongruent(mp *d, mp *b, mp *r, mp *m)
 
 #ifdef TEST_RIG
 
+#include <mLib/macros.h>
+
 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) {