|
15 | 15 | * |
16 | 16 | * Copy @c mpack-config.h.sample to @c mpack-config.h somewhere in your |
17 | 17 | * project's include tree and, optionally, edit it to suit your setup. |
18 | | - * |
19 | 18 | * In almost all cases you can leave this file with the default config. |
20 | 19 | * |
21 | 20 | * You can also override the default configuration by pre-defining options |
|
109 | 108 | /** |
110 | 109 | * @def MPACK_MALLOC |
111 | 110 | * |
112 | | - * Defines the memory allocation function used by mpack. This is used by |
| 111 | + * Defines the memory allocation function used by MPack. This is used by |
113 | 112 | * helpers for automatically allocating data the correct size, and for |
114 | 113 | * debugging functions. If this macro is undefined, the allocation helpers |
115 | 114 | * will not be compiled. |
116 | 115 | * |
117 | | - * The default is malloc() if MPACK_STDLIB is enabled. |
| 116 | + * The default is malloc() if @ref MPACK_STDLIB is enabled. |
118 | 117 | */ |
119 | 118 | /** |
120 | 119 | * @def MPACK_FREE |
121 | 120 | * |
122 | | - * Defines the memory free function used by mpack. This is used by helpers |
| 121 | + * Defines the memory free function used by MPack. This is used by helpers |
123 | 122 | * for automatically allocating data the correct size. If this macro is |
124 | 123 | * undefined, the allocation helpers will not be compiled. |
125 | 124 | * |
126 | | - * The default is free() if MPACK_MALLOC has not been customized and |
127 | | - * MPACK_STDLIB is enabled. |
| 125 | + * The default is free() if @ref MPACK_MALLOC has not been customized and |
| 126 | + * @ref MPACK_STDLIB is enabled. |
128 | 127 | */ |
129 | 128 | /** |
130 | 129 | * @def MPACK_REALLOC |
131 | 130 | * |
132 | | - * Defines the realloc function used by mpack. It is used by growable |
| 131 | + * Defines the realloc function used by MPack. It is used by growable |
133 | 132 | * buffers to resize more efficiently. |
134 | 133 | * |
135 | | - * The default is realloc() if MPACK_MALLOC has not been customized and |
136 | | - * MPACK_STDLIB is enabled. |
| 134 | + * The default is realloc() if @ref MPACK_MALLOC has not been customized and |
| 135 | + * @ref MPACK_STDLIB is enabled. |
137 | 136 | * |
138 | | - * This is optional, even when MPACK_MALLOC is used. If MPACK_MALLOC is |
139 | | - * set and MPACK_REALLOC is not, MPACK_MALLOC is used with a simple copy |
| 137 | + * This is optional, even when @ref MPACK_MALLOC is used. If @ref MPACK_MALLOC is |
| 138 | + * set and @ref MPACK_REALLOC is not, @ref MPACK_MALLOC is used with a simple copy |
140 | 139 | * to grow buffers. |
141 | 140 | */ |
142 | 141 | #if defined(MPACK_STDLIB) && !defined(MPACK_MALLOC) |
|
158 | 157 | * @def MPACK_DEBUG |
159 | 158 | * |
160 | 159 | * Enables debug features. You may want to wrap this around your |
161 | | - * own debug preprocs. By default, they are enabled if DEBUG or _DEBUG |
| 160 | + * own debug preprocs. By default, this is enabled if @c DEBUG or @c _DEBUG |
162 | 161 | * are defined. |
163 | 162 | * |
164 | | - * Note that MPACK_DEBUG cannot be defined differently for different |
| 163 | + * Note that @ref MPACK_DEBUG cannot be defined differently for different |
165 | 164 | * source files because it affects layout of structs defined in header |
166 | 165 | * files. Your entire project must be compiled with the same value of |
167 | | - * MPACK_DEBUG. (This is why NDEBUG is not used.) |
| 166 | + * @ref MPACK_DEBUG. (This is why @c NDEBUG is not used.) |
168 | 167 | */ |
169 | 168 | #if !defined(MPACK_DEBUG) && (defined(DEBUG) || defined(_DEBUG)) |
170 | 169 | #define MPACK_DEBUG 1 |
|
179 | 178 | * on embedded devices. If this is disabled, string functions such as |
180 | 179 | * mpack_error_to_string() and mpack_type_to_string() return an empty string. |
181 | 180 | * |
182 | | - * This is on by default if MPACK_STRINGS is not defined. |
| 181 | + * This is on by default if it is not defined. |
183 | 182 | */ |
184 | 183 | #if !defined(MPACK_STRINGS) |
185 | 184 | #define MPACK_STRINGS 1 |
|
189 | 188 | * Set this to 1 to implement a custom mpack_assert_fail() function. This |
190 | 189 | * function must not return, and must have the following signature: |
191 | 190 | * |
192 | | - * void mpack_assert_fail(const char* message) |
| 191 | + * @code{.c} |
| 192 | + * void mpack_assert_fail(const char* message) |
| 193 | + * @endcode |
193 | 194 | * |
194 | | - * Asserts are only used when MPACK_DEBUG is enabled, and can be triggered |
195 | | - * by bugs in mpack or bugs due to incorrect usage of mpack. |
| 195 | + * Asserts are only used when @ref MPACK_DEBUG is enabled, and can be triggered |
| 196 | + * by bugs in MPack or bugs due to incorrect usage of MPack. |
196 | 197 | */ |
197 | 198 | #ifndef MPACK_CUSTOM_ASSERT |
198 | 199 | #define MPACK_CUSTOM_ASSERT 0 |
|
223 | 224 | * Note that without write tracking enabled, it is possible for buggy code |
224 | 225 | * to emit invalid MessagePack without flagging an error by writing the wrong |
225 | 226 | * number of elements or bytes in a compound type. With tracking enabled, |
226 | | - * MPACK will catch such errors and break on the offending line of code. |
| 227 | + * MPack will catch such errors and break on the offending line of code. |
227 | 228 | * |
228 | 229 | * This is enabled by default in debug builds (provided a malloc() is |
229 | 230 | * available.) |
|
310 | 311 | #endif |
311 | 312 |
|
312 | 313 | /** |
313 | | - * The maximum depth for the node parser if MPACK_MALLOC is not available. |
| 314 | + * The maximum depth for the node parser if @ref MPACK_MALLOC is not available. |
314 | 315 | * The parsing stack is placed on the call stack. |
315 | 316 | */ |
316 | 317 | #ifndef MPACK_NODE_MAX_DEPTH_WITHOUT_MALLOC |
|
0 commit comments