Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 382 lines (311 sloc) 12.767 kB
6a23fe6 @groue v1.8.3
authored
1 // The MIT License
2 //
31100d3 @groue v1.10.0
authored
3 // Copyright (c) 2012 Gwendal Roué
6a23fe6 @groue v1.8.3
authored
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
8abbac9 @groue v1.8.2
authored
22
23
92c07e2 @groue v1.11.0
authored
24
25
26
27
8abbac9 @groue v1.8.2
authored
28 /*
29 * Set up standard GRMustache versions
30 */
7924382 @groue v5.0.0
authored
31 #define GRMUSTACHE_VERSION_5_0 5000
b63bbe1 @groue v5.1.0
authored
32 #define GRMUSTACHE_VERSION_5_1 5010
f6a5a44 @groue v5.2.0
authored
33 #define GRMUSTACHE_VERSION_5_2 5020
ed26c85 @groue v5.3.0
authored
34 #define GRMUSTACHE_VERSION_5_3 5030
7ac295f @groue v5.4.0
authored
35 #define GRMUSTACHE_VERSION_5_4 5040
92c07e2 @groue v1.11.0
authored
36
37
38
8abbac9 @groue v1.8.2
authored
39
40
41
42 /*
7ac295f @groue v5.4.0
authored
43 * If max GRMustacheVersion not specified, assume 5.4
8abbac9 @groue v1.8.2
authored
44 */
d5730e5 @groue v1.10.3
authored
45 #ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
7ac295f @groue v5.4.0
authored
46 #define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_5_4
8abbac9 @groue v1.8.2
authored
47 #endif
48
49 /*
d5730e5 @groue v1.10.3
authored
50 * if min GRMustacheVersion not specified, assume max
8abbac9 @groue v1.8.2
authored
51 */
d5730e5 @groue v1.10.3
authored
52 #ifndef GRMUSTACHE_VERSION_MIN_REQUIRED
92c07e2 @groue v1.11.0
authored
53 #define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_MAX_ALLOWED
8abbac9 @groue v1.8.2
authored
54 #endif
55
56 /*
57 * Error on bad values
58 */
59 #if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_MIN_REQUIRED
60 #error GRMUSTACHE_VERSION_MAX_ALLOWED must be >= GRMUSTACHE_VERSION_MIN_REQUIRED
61 #endif
7924382 @groue v5.0.0
authored
62 #if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_0
63 #error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_5_0
8abbac9 @groue v1.8.2
authored
64 #endif
65
66
92c07e2 @groue v1.11.0
authored
67
68
69
70
8abbac9 @groue v1.8.2
authored
71 /*
7924382 @groue v5.0.0
authored
72 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
8abbac9 @groue v1.8.2
authored
73 *
7924382 @groue v5.0.0
authored
74 * Used on declarations introduced in GRMustache 5.0
8abbac9 @groue v1.8.2
authored
75 */
7924382 @groue v5.0.0
authored
76 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
8abbac9 @groue v1.8.2
authored
77
78 /*
7924382 @groue v5.0.0
authored
79 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED
8abbac9 @groue v1.8.2
authored
80 *
7924382 @groue v5.0.0
authored
81 * Used on declarations introduced in GRMustache 5.0,
82 * and deprecated in GRMustache 5.0
8abbac9 @groue v1.8.2
authored
83 */
7924382 @groue v5.0.0
authored
84 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
8abbac9 @groue v1.8.2
authored
85
86 /*
7924382 @groue v5.0.0
authored
87 * DEPRECATED_IN_GRMUSTACHE_VERSION_5_0_AND_LATER
8abbac9 @groue v1.8.2
authored
88 *
7924382 @groue v5.0.0
authored
89 * Used on types deprecated in GRMustache 5.0
8abbac9 @groue v1.8.2
authored
90 */
7924382 @groue v5.0.0
authored
91 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_0_AND_LATER DEPRECATED_ATTRIBUTE
a3a88b4 @groue v4.3.0
authored
92
93
94
95
96
97
b63bbe1 @groue v5.1.0
authored
98 /*
99 * AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
100 *
101 * Used on declarations introduced in GRMustache 5.1
102 */
103 #if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_5_1
104 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER UNAVAILABLE_ATTRIBUTE
105 #elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_1
106 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER WEAK_IMPORT_ATTRIBUTE
107 #else
108 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
109 #endif
110
111 /*
112 * AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED
113 *
114 * Used on declarations introduced in GRMustache 5.1,
115 * and deprecated in GRMustache 5.1
116 */
117 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_1
118 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
119 #else
120 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
121 #endif
122
123 /*
124 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_1
125 *
126 * Used on declarations introduced in GRMustache 5.0,
127 * but later deprecated in GRMustache 5.1
128 */
129 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_1
130 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_1 DEPRECATED_ATTRIBUTE
131 #else
132 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_1 AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
133 #endif
134
135 /*
136 * DEPRECATED_IN_GRMUSTACHE_VERSION_5_1_AND_LATER
137 *
138 * Used on types deprecated in GRMustache 5.1
139 */
140 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_1
141 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_1_AND_LATER DEPRECATED_ATTRIBUTE
142 #else
143 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_1_AND_LATER
144 #endif
145
146
147
148
149
150
f6a5a44 @groue v5.2.0
authored
151 /*
152 * AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER
153 *
154 * Used on declarations introduced in GRMustache 5.2
155 */
156 #if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_5_2
157 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER UNAVAILABLE_ATTRIBUTE
158 #elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_2
159 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER WEAK_IMPORT_ATTRIBUTE
160 #else
161 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER
162 #endif
163
164 /*
165 * AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED
166 *
167 * Used on declarations introduced in GRMustache 5.2,
168 * and deprecated in GRMustache 5.2
169 */
170 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_2
171 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
172 #else
173 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER
174 #endif
175
176 /*
177 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2
178 *
179 * Used on declarations introduced in GRMustache 5.0,
180 * but later deprecated in GRMustache 5.2
181 */
182 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_2
183 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2 DEPRECATED_ATTRIBUTE
184 #else
185 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2 AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
186 #endif
187
188 /*
189 * AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2
190 *
191 * Used on declarations introduced in GRMustache 5.1,
192 * but later deprecated in GRMustache 5.2
193 */
194 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_2
195 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2 DEPRECATED_ATTRIBUTE
196 #else
197 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_2 AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
198 #endif
199
200 /*
201 * DEPRECATED_IN_GRMUSTACHE_VERSION_5_2_AND_LATER
202 *
203 * Used on types deprecated in GRMustache 5.2
204 */
205 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_2
206 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_2_AND_LATER DEPRECATED_ATTRIBUTE
207 #else
208 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_2_AND_LATER
209 #endif
210
211
212
213
214
215
ed26c85 @groue v5.3.0
authored
216 /*
217 * AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER
218 *
219 * Used on declarations introduced in GRMustache 5.3
220 */
221 #if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_5_3
222 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER UNAVAILABLE_ATTRIBUTE
223 #elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_3
224 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER WEAK_IMPORT_ATTRIBUTE
225 #else
226 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER
227 #endif
228
229 /*
230 * AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED
231 *
232 * Used on declarations introduced in GRMustache 5.3,
233 * and deprecated in GRMustache 5.3
234 */
235 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_3
236 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
237 #else
238 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER
239 #endif
240
241 /*
242 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3
243 *
244 * Used on declarations introduced in GRMustache 5.0,
245 * but later deprecated in GRMustache 5.3
246 */
247 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_3
248 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 DEPRECATED_ATTRIBUTE
249 #else
250 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
251 #endif
252
253 /*
254 * AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3
255 *
256 * Used on declarations introduced in GRMustache 5.1,
257 * but later deprecated in GRMustache 5.3
258 */
259 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_3
260 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 DEPRECATED_ATTRIBUTE
261 #else
262 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
263 #endif
264
265 /*
266 * AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3
267 *
268 * Used on declarations introduced in GRMustache 5.2,
269 * but later deprecated in GRMustache 5.3
270 */
271 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_3
272 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 DEPRECATED_ATTRIBUTE
273 #else
274 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_3 AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER
275 #endif
276
277 /*
278 * DEPRECATED_IN_GRMUSTACHE_VERSION_5_3_AND_LATER
279 *
280 * Used on types deprecated in GRMustache 5.3
281 */
282 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_3
283 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_3_AND_LATER DEPRECATED_ATTRIBUTE
284 #else
285 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_3_AND_LATER
286 #endif
287
288
289
290
291
292
7ac295f @groue v5.4.0
authored
293 /*
294 * AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER
295 *
296 * Used on declarations introduced in GRMustache 5.4
297 */
298 #if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_5_4
299 #define AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER UNAVAILABLE_ATTRIBUTE
300 #elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_4
301 #define AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER WEAK_IMPORT_ATTRIBUTE
302 #else
303 #define AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER
304 #endif
305
306 /*
307 * AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER_BUT_DEPRECATED
308 *
309 * Used on declarations introduced in GRMustache 5.4,
310 * and deprecated in GRMustache 5.4
311 */
312 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
313 #define AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
314 #else
315 #define AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_5_4_AND_LATER
316 #endif
317
318 /*
319 * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4
320 *
321 * Used on declarations introduced in GRMustache 5.0,
322 * but later deprecated in GRMustache 5.4
323 */
324 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
325 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 DEPRECATED_ATTRIBUTE
326 #else
327 #define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
328 #endif
329
330 /*
331 * AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4
332 *
333 * Used on declarations introduced in GRMustache 5.1,
334 * but later deprecated in GRMustache 5.4
335 */
336 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
337 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 DEPRECATED_ATTRIBUTE
338 #else
339 #define AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 AVAILABLE_GRMUSTACHE_VERSION_5_1_AND_LATER
340 #endif
341
342 /*
343 * AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4
344 *
345 * Used on declarations introduced in GRMustache 5.2,
346 * but later deprecated in GRMustache 5.4
347 */
348 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
349 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 DEPRECATED_ATTRIBUTE
350 #else
351 #define AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 AVAILABLE_GRMUSTACHE_VERSION_5_2_AND_LATER
352 #endif
353
354 /*
355 * AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4
356 *
357 * Used on declarations introduced in GRMustache 5.3,
358 * but later deprecated in GRMustache 5.4
359 */
360 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
361 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 DEPRECATED_ATTRIBUTE
362 #else
363 #define AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_5_4 AVAILABLE_GRMUSTACHE_VERSION_5_3_AND_LATER
364 #endif
365
366 /*
367 * DEPRECATED_IN_GRMUSTACHE_VERSION_5_4_AND_LATER
368 *
369 * Used on types deprecated in GRMustache 5.4
370 */
371 #if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_5_4
372 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_4_AND_LATER DEPRECATED_ATTRIBUTE
373 #else
374 #define DEPRECATED_IN_GRMUSTACHE_VERSION_5_4_AND_LATER
375 #endif
376
377
378
379
380
381
Something went wrong with that request. Please try again.