summaryrefslogtreecommitdiff
blob: c7c53a22512649b307bfa4d265b6953400a0ba3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _ZoO_PERVASIVE_H_
#define _ZoO_PERVASIVE_H_

#include <limits.h>

#define ZoO_DEBUG_ALL 1

#ifndef ZoO_DEBUG_ALL
   #define ZoO_DEBUG_ALL 0
#endif

#ifndef ZoO_NETWORK_TIMEOUT
   #define ZoO_NETWORK_TIMEOUT            200
#endif

#ifndef ZoO_MAX_REPLY_WORDS
   #define ZoO_MAX_REPLY_WORDS            64
#endif

#define ZoO__TO_STRING(x) #x
#define ZoO_TO_STRING(x) ZoO__TO_STRING(x)
#define ZoO_ISOLATE(a) do {a} while (0)

/* strncmp stops at '\0' and strlen does not count '\0'. */
#define ZoO_IS_PREFIX(a, b) (strncmp(a, b, strlen(a)) == 0)

#define ZoO_STRING_EQUALS(a, b) (strcmp(a, b) == 0)

#endif