Fixed possible buf in proto.c
[yaz-moved-to-github.git] / include / dmalloc.h
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: dmalloc.h,v $
7  * Revision 1.1  1995-03-30 09:39:40  quinn
8  * Moved .h files to include directory
9  *
10  * Revision 1.1  1995/03/27  08:35:18  quinn
11  * Created util library
12  * Added memory debugging module. Imported options-manager
13  *
14  *
15  */
16
17 #ifndef DMALLOC_H
18 #define DMALLOC_H
19
20 #ifdef DEBUG_MALLOC
21
22 #ifdef malloc
23 #undef malloc
24 #endif
25 #ifdef free
26 #undef free
27 #endif
28 #ifdef realloc
29 #undef realloc
30 #endif
31 #define malloc(n) d_malloc(__FILE__, __LINE__, (n))
32 #define free(p) d_free(__FILE__, __LINE__, (p))
33 #define realloc(p, n) d_realloc(__FILE__, __LINE__, (p), (n))
34
35 void *d_malloc(char *file, int line, int nbytes);
36 void d_free(char *file, int line, char *ptr);
37 void *d_realloc(char *file, int line, char *ptr, int nbytes);
38
39 #endif
40
41 #endif