From dfd43435b872bc086bb58c43430da41cbff3a275 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 14 Jan 2010 16:21:47 +0000 Subject: [PATCH] hivex: Move STR* macros into C file. Don't pollute the public header file with these macros. --- hivex/hivex.c | 10 ++++++++++ hivex/hivex.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hivex/hivex.c b/hivex/hivex.c index e47dd23..13c3f86 100644 --- a/hivex/hivex.c +++ b/hivex/hivex.c @@ -37,6 +37,16 @@ #include #endif +#define STREQ(a,b) (strcmp((a),(b)) == 0) +#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) +//#define STRNEQ(a,b) (strcmp((a),(b)) != 0) +//#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0) +#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0) +//#define STRCASEEQLEN(a,b,n) (strncasecmp((a),(b),(n)) == 0) +//#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0) +//#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0) +//#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0) + #if __BYTE_ORDER == __LITTLE_ENDIAN #ifndef be32toh #define be32toh(x) __bswap_32 (x) diff --git a/hivex/hivex.h b/hivex/hivex.h index be7feee..14bdcc5 100644 --- a/hivex/hivex.h +++ b/hivex/hivex.h @@ -73,16 +73,6 @@ typedef enum hive_type hive_type; #define HIVEX_OPEN_DEBUG 2 #define HIVEX_OPEN_MSGLVL_MASK 3 -#define STREQ(a,b) (strcmp((a),(b)) == 0) -#define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) -#define STRNEQ(a,b) (strcmp((a),(b)) != 0) -#define STRCASENEQ(a,b) (strcasecmp((a),(b)) != 0) -#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0) -#define STRCASEEQLEN(a,b,n) (strncasecmp((a),(b),(n)) == 0) -#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0) -#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0) -#define STRPREFIX(a,b) (strncmp((a),(b),strlen((b))) == 0) - extern hive_h *hivex_open (const char *filename, int flags); extern int hivex_close (hive_h *h); extern hive_node_h hivex_root (hive_h *h); -- 1.8.3.1