DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
Loading...
Searching...
No Matches
nocase.h File Reference
#include <m-string.h>
#include <strings.h>
+ Include dependency graph for nocase.h:
+ This graph shows which files directly or indirectly include this file:

Macros

#define M_CSTR_NOCASE_HASH(s)   (m_core_cstr_nocase_hash(s))
 
#define M_CSTR_NOCASE_EQUAL(a, b)   (strcasecmp((a), (b)) == 0)
 Case-insensitive equality comparison.
 
#define M_CSTR_NOCASE_OPLIST    M_OPEXTEND(M_CSTR_OPLIST, HASH(M_CSTR_NOCASE_HASH), EQUAL(M_CSTR_NOCASE_EQUAL), CMP(strcasecmp))
 M*LIB OPLIST for case-insensitive C-string values.
 
#define M_STRING_NOCASE_OPLIST   M_OPEXTEND(M_STRING_OPLIST, EQUAL(m_string_nocase_eq), CMP(m_string_nocase_cmp))
 M*LIB OPLIST for case-insensitive M-STRING values.
 

Functions

static size_t m_core_cstr_nocase_hash (const char str[])
 
static int m_string_nocase_cmp (const m_string_t v1, const m_string_t v2)
 Case-insensitive comparison.
 
static int m_string_nocase_eq (const m_string_t v1, const m_string_t v2)
 Case-insensitive equality comparison.
 

Macro Definition Documentation

◆ M_CSTR_NOCASE_EQUAL

#define M_CSTR_NOCASE_EQUAL (   a,
 
)    (strcasecmp((a), (b)) == 0)

Case-insensitive equality comparison.

◆ M_CSTR_NOCASE_HASH

#define M_CSTR_NOCASE_HASH (   s)    (m_core_cstr_nocase_hash(s))

◆ M_CSTR_NOCASE_OPLIST

#define M_CSTR_NOCASE_OPLIST    M_OPEXTEND(M_CSTR_OPLIST, HASH(M_CSTR_NOCASE_HASH), EQUAL(M_CSTR_NOCASE_EQUAL), CMP(strcasecmp))

M*LIB OPLIST for case-insensitive C-string values.

This is intended to be used as dict/tree keys of type "const char *" with external memory management.

◆ M_STRING_NOCASE_OPLIST

#define M_STRING_NOCASE_OPLIST   M_OPEXTEND(M_STRING_OPLIST, EQUAL(m_string_nocase_eq), CMP(m_string_nocase_cmp))

M*LIB OPLIST for case-insensitive M-STRING values.

This is intended to be used as dict/tree keys of type "m_string_t" with external memory management.

Function Documentation

◆ m_core_cstr_nocase_hash()

static size_t m_core_cstr_nocase_hash ( const char  str[])
inlinestatic

◆ m_string_nocase_cmp()

static int m_string_nocase_cmp ( const m_string_t  v1,
const m_string_t  v2 
)
inlinestatic

Case-insensitive comparison.

◆ m_string_nocase_eq()

static int m_string_nocase_eq ( const m_string_t  v1,
const m_string_t  v2 
)
inlinestatic

Case-insensitive equality comparison.