From 21ec05f1b8722c2e82ce7cd274332b79a294bad5 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 28 Aug 2007 00:24:45 +0000 Subject: Add missing streq() git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@387 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/util/nstring.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/util/nstring.h') diff --git a/lib/util/nstring.h b/lib/util/nstring.h index f49c9927..de53fdac 100644 --- a/lib/util/nstring.h +++ b/lib/util/nstring.h @@ -47,6 +47,14 @@ strneq(const char * const comparand, return strncmp(comparand, comparator, size) == 0; } +static __inline__ int +memeq(const void * const comparand, + const void * const comparator, + size_t const size) { + + return memcmp(comparand, comparator, size) == 0; +} + /* The Standard C Library may not declare strcasecmp() if the including source file doesn't request BSD functions, with _BSD_SOURCE. So we don't define functions that use strcasecmp() in that case. @@ -166,10 +174,10 @@ int stripeq(const char * const comparand, const char * const comparator); -const char * -memmemN(const char * const haystack, +const void * +memmemN(const void * const haystackArg, size_t const haystacklen, - const char * const needle, + const void * const needleArg, size_t const needlelen); bool -- cgit 1.4.1