annotate inlinedefs.h @ 135:eaae8014a94a

Don't assert and leak memory if failing during argument collection. Once you have a -D option or a -include foo option, you need to clean up the arrays those are accumulated in if you die before they're collected and handled.
author David A. Holland
date Tue, 09 Jul 2013 13:35:40 -0400
parents 0921c47b4f22
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
1 /*
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
2 * Copyright (c) 2009 David A. Holland.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
3 * All rights reserved.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
4 *
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
5 * Redistribution and use in source and binary forms, with or without
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
6 * modification, are permitted provided that the following conditions
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
7 * are met:
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
8 * 1. Redistributions of source code must retain the above copyright
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
9 * notice, this list of conditions and the following disclaimer.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
12 * documentation and/or other materials provided with the distribution.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
13 * 3. Neither the name of the Author nor the names of any contributors
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
14 * may be used to endorse or promote products derived from this software
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
15 * without specific prior written permission.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
16 *
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
27 * SUCH DAMAGE.
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
28 */
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
29
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
30 #if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
31 /* gcc's non-C99 inline semantics */
108
0921c47b4f22 C99INLINE, not __c99inline
David A. Holland
parents: 31
diff changeset
32 #define C99INLINE extern inline
1
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
33 #elif defined(__STDC__) && __STDC_VERSION__ >= 199901L
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
34 /* C99 */
108
0921c47b4f22 C99INLINE, not __c99inline
David A. Holland
parents: 31
diff changeset
35 #define C99INLINE inline
1
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
36 #else
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
37 /* something else; static inline is safest */
108
0921c47b4f22 C99INLINE, not __c99inline
David A. Holland
parents: 31
diff changeset
38 #define C99INLINE static inline
1
411b28d78483 standard arrays (nearly)
David A. Holland
parents:
diff changeset
39 #endif