lib.h: Publish a `MEMCMP' macro, like `STRCMP'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 16:22:32 +0000 (16:22 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 16:22:32 +0000 (16:22 +0000)
lib.h

diff --git a/lib.h b/lib.h
index dc8d7de..0198c34 100644 (file)
--- a/lib.h
+++ b/lib.h
@@ -43,6 +43,7 @@
 
 #define STRCMP(a, op, b) (strcmp((a), (b)) op 0)
 #define STRNCMP(a, op, b, n) (strncmp((a), (b), (n)) op 0)
+#define MEMCMP(a, op, b, n) (memcmp((a), (b), (n)) op 0)
 
 #ifdef DEBUG
 #  define D(x) x