summaryrefslogtreecommitdiff
blob: d7b213f9bbf7a10f6ad92e7f8c778bdbdb502be4 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _ZoO_PERVASIVE_H_
#define _ZoO_PERVASIVE_H_

#include <string.h>

#define ZoO_SERVER_VERSION    1
#define ZoO_PROTOCOL_VERSION  1

//#define ZoO_RUNNING_FRAMA_C   1

#define ZoO_DEBUG_ALL 1

#ifndef ZoO_DEBUG_ALL
   #define ZoO_DEBUG_ALL 0
#endif

#define ZoO_DEBUG_KNOWLEDGE (0 | ZoO_DEBUG_ALL)
#define ZoO_DEBUG_KNOWLEDGE_LEARN_SEQUENCE \
   (ZoO_DEBUG_KNOWLEDGE & (0 | ZoO_DEBUG_ALL))
#define ZoO_DEBUG_KNOWLEDGE_LEARN_WORD \
   (ZoO_DEBUG_KNOWLEDGE & (0 | ZoO_DEBUG_ALL))

#define ZoO_DEBUG_SEQUENCE (0 | ZoO_DEBUG_ALL)
#define ZoO_DEBUG_SEQUENCE_FROM_STRING \
   (ZoO_DEBUG_SEQUENCE & (0 | ZoO_DEBUG_ALL))

#define ZoO_DEBUG_SEQUENCE_CREATION \
   (ZoO_DEBUG_SEQUENCE & (0 | ZoO_DEBUG_ALL))

#define ZoO_DEBUG_SEQUENCE_CREATION_INIT \
   (ZoO_DEBUG_SEQUENCE_CREATION & (0 | ZoO_DEBUG_ALL))

#define ZoO_DEBUG_CORE (0 | ZoO_DEBUG_ALL)

#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