annotate lwlink/util.h @ 195:383caf808674

Allow relative addressing to ignore a # before the operand
author lost
date Sun, 22 Mar 2009 17:57:39 +0000
parents 106c2fe3c9d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
114
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
1 /*
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
2 util.h
118
d450943305a7 Fixed copyright year
lost
parents: 114
diff changeset
3 Copyright © 2009 William Astle
114
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
4
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
5 This file is part of LWLINK.
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
6
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
7 LWLINK is free software: you can redistribute it and/or modify it under the
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
8 terms of the GNU General Public License as published by the Free Software
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
9 Foundation, either version 3 of the License, or (at your option) any later
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
10 version.
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
11
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
12 This program is distributed in the hope that it will be useful, but WITHOUT
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
15 more details.
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
16
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
17 You should have received a copy of the GNU General Public License along with
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
18 this program. If not, see <http://www.gnu.org/licenses/>.
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
19 */
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
20
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
21 /*
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
22 Utility functions
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
23 */
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
24
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
25 #ifndef __util_h_seen__
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
26 #define __util_h_seen__
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
27
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
28 #ifndef __util_c_seen__
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
29 #define __util_E__ extern
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
30 #else
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
31 #define __util_E__
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
32 #endif
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
33
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
34 // allocate memory
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
35 __util_E__ void *lw_malloc(int size);
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
36 __util_E__ void lw_free(void *ptr);
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
37 __util_E__ void *lw_realloc(void *optr, int size);
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
38
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
39 // string stuff
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
40 __util_E__ char *lw_strdup(const char *s);
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
41
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
42 #undef __util_E__
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
43
c65fcec346cd Handle input files on command line and add some memory management utility functions
lost
parents:
diff changeset
44 #endif // __util_h_seen__