annotate lwar/util.h @ 171:d610b8aef91b

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