exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
build/vs2010/exipConfig.h
Go to the documentation of this file.
1 /*==================================================================*\
2 | EXIP - Embeddable EXI Processor in C |
3 |--------------------------------------------------------------------|
4 | This work is licensed under BSD 3-Clause License |
5 | The full license terms and conditions are located in LICENSE.txt |
6 \===================================================================*/
7 
16 #ifndef EXIPCONFIG_H_
17 #define EXIPCONFIG_H_
18 
19 #define ON 1
20 #define OFF 0
21 
22 # define EXIP_DEBUG ON
23 # define EXIP_DEBUG_LEVEL INFO
24 
25 # define DEBUG_STREAM_IO ON
26 # define DEBUG_COMMON ON
27 # define DEBUG_CONTENT_IO ON
28 # define DEBUG_GRAMMAR ON
29 # define DEBUG_GRAMMAR_GEN ON
30 # define DEBUG_STRING_TBLS ON
31 
35 #ifdef USE_DBG_MALLOC
36 # include "dbgMalloc.h"
37 # define EXIP_MALLOC(p) dbgMalloc((size_t)(p))
38 # define EXIP_REALLOC(p1, p2) dbgRealloc((p1), (size_t)(p2))
39 # define EXIP_MFREE dbgFree //TODO: document this macro #DOCUMENT#
40 #else
41 # include <stdlib.h>
42 # define EXIP_MALLOC(p) malloc((size_t)(p))
43 # define EXIP_REALLOC(p1, p2) realloc((p1), (size_t)(p2))
44 # define EXIP_MFREE free
45 #endif
46 
47 # define MAX_HASH_TABLE_SIZE 16000
48 # define HASH_TABLE_USE ON
49 # define INITIAL_HASH_TABLE_SIZE 6151
50 # define DYN_ARRAY_USE ON
51 
52 // Some types in procTypes.h
53 # include <stdint.h>
54 #define EXIP_UNSIGNED_INTEGER int64_t
55 #define EXIP_INTEGER int64_t
56 
57 #define EXIP_STRTOLL _strtoi64
58 
59 #define EXIP_INDEX uint16_t
60 #define EXIP_INDEX_MAX UINT16_MAX
61 
62 #define EXIP_SMALL_INDEX uint8_t
63 #define EXIP_SMALL_INDEX_MAX UINT8_MAX
64 
65 struct ThinFloat
66 {
69 };
70 
71 #define EXIP_FLOAT struct ThinFloat
72 
73 // NOTE: The GR_VOID_NON_TERMINAL should be set to the maximum 24 bit unsigned value in case the
74 // SMALL_INDEX_MAX is 32 bits or bigger
75 #define GR_VOID_NON_TERMINAL 0xFFFFFF
76 
90 #define EXI_PROFILE_DEFAULT OFF
91 
92 #if EXI_PROFILE_DEFAULT
93 # define VALUE_CROSSTABLE_USE OFF
94 # define BUILD_IN_GRAMMARS_USE OFF
95 #else
96 // Configure here which of the EXI features/components to be included in the compilation:
97 
98 /* Whether to implement the local value string table.
99  * NOTE: EXI streams that are not encoded using this option cannot be decoded correctly
100  * and will return an error. The opposite is true however - a stream encoded with no
101  * local value tables is valid EXI stream can be decoded with full-fledged EXI processor.
102  * Disabling the local values indexing is used in EXI Profile
103  * and can possibly found use in other application profiles of the EXI spec. */
104 #define VALUE_CROSSTABLE_USE ON
105 
106 /* Whether to enable the use of build-in grammars.
107  * NOTE: Only useful for schema STRICT mode processing without schema extension points
108  * or so called wildcard elements and attributes. */
109 #define BUILD_IN_GRAMMARS_USE ON
110 #endif
111 
112 #endif /* EXIPCONFIG_H_ */