comparison src/util.h @ 296:14d835cf02d9

Handle input files on command line and add some memory management utility functions
author lost
date Sat, 17 Jan 2009 20:54:58 +0000
parents
children 48945dac8178
comparison
equal deleted inserted replaced
295:7a3d66e72a4c 296:14d835cf02d9
1 /*
2 util.h
3 Copyright © 2008 William Astle
4
5 This file is part of LWLINK.
6
7 LWLINK is free software: you can redistribute it and/or modify it under the
8 terms of the GNU General Public License as published by the Free Software
9 Foundation, either version 3 of the License, or (at your option) any later
10 version.
11
12 This program is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 more details.
16
17 You should have received a copy of the GNU General Public License along with
18 this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 /*
22 Utility functions
23 */
24
25 #ifndef __util_h_seen__
26 #define __util_h_seen__
27
28 #ifndef __util_c_seen__
29 #define __util_E__ extern
30 #else
31 #define __util_E__
32 #endif
33
34 // allocate memory
35 __util_E__ void *lw_malloc(int size);
36 __util_E__ void lw_free(void *ptr);
37 __util_E__ void *lw_realloc(void *optr, int size);
38
39 // string stuff
40 __util_E__ char *lw_strdup(const char *s);
41
42 #undef __util_E__
43
44 #endif // __util_h_seen__