annotate src/util.h @ 149:3706ede361ea

Fixed help message for --format
author lost
date Fri, 30 Jan 2009 01:51:41 +0000
parents 610710a7859f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
1 /*
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
2 expr.h
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
3 Copyright © 2008 William Astle
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
4
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
5 This file is part of LWASM.
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
6
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
7 LWASM is free software: you can redistribute it and/or modify it under the
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
8 terms of the GNU General Public License as published by the Free Software
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
9 Foundation, either version 3 of the License, or (at your option) any later
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
10 version.
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
11
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
12 This program is distributed in the hope that it will be useful, but WITHOUT
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
15 more details.
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
16
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
17 You should have received a copy of the GNU General Public License along with
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
18 this program. If not, see <http://www.gnu.org/licenses/>.
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
19 */
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
20
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
21 /*
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
22 Utility functions
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
23 */
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
24
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
25 #ifndef __util_h_seen__
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
26 #define __util_h_seen__
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
27
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
28 #ifndef __util_c_seen__
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
29 #define __util_E__ extern
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
30 #else
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
31 #define __util_E__
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
32 #endif
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
33
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
34 // allocate memory
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
35 __util_E__ void *lwasm_alloc(int size);
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
36 __util_E__ void lwasm_free(void *ptr);
20
610710a7859f added lwasm_realloc()
lost
parents: 17
diff changeset
37 __util_E__ void *lwasm_realloc(void *optr, int size);
17
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
38
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
39 // string stuff
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
40 __util_E__ char *lwasm_strdup(const char *s);
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
41
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
42 #undef __util_E__
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
43
df0c4a46af8f Started adding expression handling infrastructure
lost
parents:
diff changeset
44 #endif // __util_h_seen__