annotate include/ini.h @ 12:dd427b7cc459 default tip

json: replace with nxjson library more lightweight, reduces the binary size by about 40 kb
author Paper <paper@paper.us.eu.org>
date Fri, 15 Mar 2024 20:46:18 -0400
parents e6a594f16403
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
1 /* inih -- simple .INI file parser
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3 SPDX-License-Identifier: BSD-3-Clause
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5 Copyright (C) 2009-2020, Ben Hoyt
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
6
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
7 inih is released under the New BSD license (see LICENSE.txt). Go to the project
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 home page for more info:
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
10 https://github.com/benhoyt/inih
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
11
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
12 */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
13
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
14 #ifndef INI_H
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
15 #define INI_H
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
16
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
17 /* Make this header file easier to include in C++ code */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
18 #ifdef __cplusplus
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
19 extern "C" {
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
20 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
21
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
22 #include <stdio.h>
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
23
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
24 /* Nonzero if ini_handler callback should accept lineno parameter. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
25 #ifndef INI_HANDLER_LINENO
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
26 #define INI_HANDLER_LINENO 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
27 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
28
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
29 /* Visibility symbols, required for Windows DLLs */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
30 #ifndef INI_API
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
31 #if defined _WIN32 || defined __CYGWIN__
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
32 # ifdef INI_SHARED_LIB
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
33 # ifdef INI_SHARED_LIB_BUILDING
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
34 # define INI_API __declspec(dllexport)
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
35 # else
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
36 # define INI_API __declspec(dllimport)
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
37 # endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
38 # else
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
39 # define INI_API
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
40 # endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
41 #else
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
42 # if defined(__GNUC__) && __GNUC__ >= 4
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
43 # define INI_API __attribute__ ((visibility ("default")))
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
44 # else
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
45 # define INI_API
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
46 # endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
47 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
48 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
49
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
50 /* Typedef for prototype of handler function. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
51 #if INI_HANDLER_LINENO
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
52 typedef int (*ini_handler)(void* user, const char* section,
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
53 const char* name, const char* value,
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
54 int lineno);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
55 #else
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
56 typedef int (*ini_handler)(void* user, const char* section,
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
57 const char* name, const char* value);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
58 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
59
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
60 /* Typedef for prototype of fgets-style reader function. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
61 typedef char* (*ini_reader)(char* str, int num, void* stream);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
62
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
63 /* Parse given INI-style file. May have [section]s, name=value pairs
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
64 (whitespace stripped), and comments starting with ';' (semicolon). Section
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
65 is "" if name=value pair parsed before any section heading. name:value
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
66 pairs are also supported as a concession to Python's configparser.
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
67
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
68 For each name=value pair parsed, call handler function with given user
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
69 pointer as well as section, name, and value (data only valid for duration
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
70 of handler call). Handler should return nonzero on success, zero on error.
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
71
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
72 Returns 0 on success, line number of first error on parse error (doesn't
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
73 stop on first error), -1 on file open error, or -2 on memory allocation
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
74 error (only when INI_USE_STACK is zero).
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
75 */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
76 INI_API int ini_parse(const char* filename, ini_handler handler, void* user);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
77
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
78 /* Same as ini_parse(), but takes a FILE* instead of filename. This doesn't
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
79 close the file when it's finished -- the caller must do that. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
80 INI_API int ini_parse_file(FILE* file, ini_handler handler, void* user);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
81
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
82 /* Same as ini_parse(), but takes an ini_reader function pointer instead of
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
83 filename. Used for implementing custom or string-based I/O (see also
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
84 ini_parse_string). */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
85 INI_API int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
86 void* user);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
87
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
88 /* Same as ini_parse(), but takes a zero-terminated string with the INI data
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
89 instead of a file. Useful for parsing INI data from a network socket or
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
90 already in memory. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
91 INI_API int ini_parse_string(const char* string, ini_handler handler, void* user);
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
92
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
93 /* Nonzero to allow multi-line value parsing, in the style of Python's
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
94 configparser. If allowed, ini_parse() will call the handler with the same
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
95 name for each subsequent line parsed. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
96 #ifndef INI_ALLOW_MULTILINE
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
97 #define INI_ALLOW_MULTILINE 1
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
98 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
99
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
100 /* Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
101 the file. See https://github.com/benhoyt/inih/issues/21 */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
102 #ifndef INI_ALLOW_BOM
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
103 #define INI_ALLOW_BOM 1
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
104 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
105
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
106 /* Chars that begin a start-of-line comment. Per Python configparser, allow
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
107 both ; and # comments at the start of a line by default. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
108 #ifndef INI_START_COMMENT_PREFIXES
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
109 #define INI_START_COMMENT_PREFIXES ";#"
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
110 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
111
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
112 /* Nonzero to allow inline comments (with valid inline comment characters
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
113 specified by INI_INLINE_COMMENT_PREFIXES). Set to 0 to turn off and match
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
114 Python 3.2+ configparser behaviour. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
115 #ifndef INI_ALLOW_INLINE_COMMENTS
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
116 #define INI_ALLOW_INLINE_COMMENTS 1
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
117 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
118 #ifndef INI_INLINE_COMMENT_PREFIXES
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
119 #define INI_INLINE_COMMENT_PREFIXES ";"
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
120 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
121
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
122 /* Nonzero to use stack for line buffer, zero to use heap (malloc/free). */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
123 #ifndef INI_USE_STACK
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
124 #define INI_USE_STACK 1
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
125 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
126
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
127 /* Maximum line length for any line in INI file (stack or heap). Note that
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
128 this must be 3 more than the longest line (due to '\r', '\n', and '\0'). */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
129 #ifndef INI_MAX_LINE
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
130 #define INI_MAX_LINE 200
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
131 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
132
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
133 /* Nonzero to allow heap line buffer to grow via realloc(), zero for a
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
134 fixed-size buffer of INI_MAX_LINE bytes. Only applies if INI_USE_STACK is
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
135 zero. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
136 #ifndef INI_ALLOW_REALLOC
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
137 #define INI_ALLOW_REALLOC 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
138 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
139
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
140 /* Initial size in bytes for heap line buffer. Only applies if INI_USE_STACK
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
141 is zero. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
142 #ifndef INI_INITIAL_ALLOC
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
143 #define INI_INITIAL_ALLOC 200
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
144 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
145
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
146 /* Stop parsing on first error (default is to keep parsing). */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
147 #ifndef INI_STOP_ON_FIRST_ERROR
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
148 #define INI_STOP_ON_FIRST_ERROR 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
149 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
150
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
151 /* Nonzero to call the handler at the start of each new section (with
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
152 name and value NULL). Default is to only call the handler on
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
153 each name=value pair. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
154 #ifndef INI_CALL_HANDLER_ON_NEW_SECTION
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
155 #define INI_CALL_HANDLER_ON_NEW_SECTION 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
156 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
157
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
158 /* Nonzero to allow a name without a value (no '=' or ':' on the line) and
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
159 call the handler with value NULL in this case. Default is to treat
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
160 no-value lines as an error. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
161 #ifndef INI_ALLOW_NO_VALUE
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
162 #define INI_ALLOW_NO_VALUE 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
163 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
164
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
165 /* Nonzero to use custom ini_malloc, ini_free, and ini_realloc memory
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
166 allocation functions (INI_USE_STACK must also be 0). These functions must
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
167 have the same signatures as malloc/free/realloc and behave in a similar
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
168 way. ini_realloc is only needed if INI_ALLOW_REALLOC is set. */
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
169 #ifndef INI_CUSTOM_ALLOCATOR
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
170 #define INI_CUSTOM_ALLOCATOR 0
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
171 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
172
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
173
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
174 #ifdef __cplusplus
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
175 }
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
176 #endif
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
177
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents:
diff changeset
178 #endif /* INI_H */