X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fxmalloc.c;h=cc5fe3edc49759f5c7b521f2c041c7480f5e449f;hb=2c8ec8c2d1dd7dd698e406ff99e1b7b439c4fa9b;hp=fb76a537ff841391cd336b2d5acda64ab062cc1e;hpb=b440dce0831a72bebe4f4821ab7771cc05e8facb;p=yaz-moved-to-github.git diff --git a/util/xmalloc.c b/util/xmalloc.c index fb76a53..cc5fe3e 100644 --- a/util/xmalloc.c +++ b/util/xmalloc.c @@ -1,10 +1,26 @@ /* - * Copyright (C) 1994-1999, Index Data + * Copyright (C) 1994-2000, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: xmalloc.c,v $ - * Revision 1.8 1999-08-27 09:40:32 adam + * Revision 1.13 2001-09-30 20:10:28 adam + * TRACE_MALLOC=1. + * + * Revision 1.12 2001/09/24 21:51:56 adam + * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid + * and yaz_z3950oid_to_str. + * + * Revision 1.11 2000/02/29 13:44:55 adam + * Check for config.h (currently not generated). + * + * Revision 1.10 1999/11/30 13:47:12 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.9 1999/09/10 08:58:32 adam + * Set TRACE_XMALLOC to 1. + * + * Revision 1.8 1999/08/27 09:40:32 adam * Renamed logf function to yaz_log. Removed VC++ project files. * * Revision 1.7 1999/07/13 13:24:53 adam @@ -50,14 +66,18 @@ * */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include -#include -#include +#include +#include -#define TRACE_XMALLOC 2 +#define TRACE_XMALLOC 1 #if TRACE_XMALLOC > 1 @@ -226,7 +246,7 @@ void xmalloc_trav_d(const char *file, int line) while (dinfo) { yaz_log (LOG_LOG, " %20s:%d p=%p size=%d", dinfo->file, dinfo->line, - dinfo+sizeof(*dinfo)+4*sizeof(char), dinfo->len); + ((char*) dinfo)+sizeof(*dinfo)+4*sizeof(char), dinfo->len); size += dinfo->len; dinfo = dinfo->next; }