Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / pub / bbs-rand.c
index 58b62b1..c3ae268 100644 (file)
@@ -348,7 +348,7 @@ static const grand_ops gops = {
   "bbs",
   GRAND_CRYPTO, 0,
   gmisc, gdestroy,
-  gword, gbyte, gword, grand_range, grand_fill
+  gword, gbyte, gword, grand_defaultrange, grand_defaultfill
 };
 
 /* --- @bbs_rand@ --- *
@@ -374,6 +374,8 @@ grand *bbs_rand(mp *m, mp *x)
 
 #ifdef TEST_RIG
 
+#include <mLib/macros.h>
+
 static int verify(dstr *v)
 {
   mp *n = *(mp **)v[0].buf;
@@ -385,7 +387,7 @@ static int verify(dstr *v)
   dstr_ensure(&d, v[2].len);
   b->ops->fill(b, d.buf, v[2].len);
   d.len = v[2].len;
-  if (memcmp(d.buf, v[2].buf, v[2].len) != 0) {
+  if (MEMCMP(d.buf, !=, v[2].buf, v[2].len)) {
     fputs("\n*** bbs failure\n", stderr);
     fputs("n = ", stderr); mp_writefile(n, stderr, 10); fputc('\n', stderr);
     fputs("x = ", stderr); mp_writefile(x, stderr, 10); fputc('\n', stderr);