1 | /* $Id: electric.h 909 2007-05-24 03:09:09Z bird $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * A simple electric heap implementation, wrapper header.
|
---|
5 | *
|
---|
6 | * Copyright (c) 2007 knut st. osmundsen <[email protected]>
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * This program is free software; you can redistribute it and/or modify
|
---|
10 | * it under the terms of the GNU Lesser General Public License as published
|
---|
11 | * by the Free Software Foundation; either version 2 of the License, or
|
---|
12 | * (at your option) any later version.
|
---|
13 | *
|
---|
14 | * This program is distributed in the hope that it will be useful,
|
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
17 | * GNU Lesser General Public License for more details.
|
---|
18 | *
|
---|
19 | * You should have received a copy of the GNU Lesser General Public License
|
---|
20 | * along with This program; if not, write to the Free Software
|
---|
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
22 | *
|
---|
23 | */
|
---|
24 |
|
---|
25 | #ifdef ELECTRIC_HEAP
|
---|
26 |
|
---|
27 | #include <stdlib.h>
|
---|
28 | #ifdef WINDOWS32
|
---|
29 | # include <malloc.h>
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | void xfree (void *);
|
---|
33 | void *xcalloc (size_t, size_t);
|
---|
34 | void *xmalloc (unsigned int);
|
---|
35 | void *xrealloc (void *, unsigned int);
|
---|
36 | char *xstrdup (const char *);
|
---|
37 |
|
---|
38 | #define free(a) xfree(a)
|
---|
39 | #define calloc(a,b) xcalloc((a),(b))
|
---|
40 | #define malloc(a) xmalloc(a)
|
---|
41 | #define realloc(a,b) xrealloc((a),(b))
|
---|
42 | #define strdup(a) xstrdup(a)
|
---|
43 |
|
---|
44 | #endif
|
---|
45 |
|
---|