X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fxmalloc.h;h=ac779172228cf4ac3aef8c41febb966777014769;hb=cdea632bd515af06beaa311c8569180da1e082da;hp=a8ea211eac8331822db3352969826960ffc9a668;hpb=46ed30d0d83dd1b21e58a4db365a60aefaa5aad8;p=yaz-moved-to-github.git diff --git a/include/xmalloc.h b/include/xmalloc.h index a8ea211..ac77917 100644 --- a/include/xmalloc.h +++ b/include/xmalloc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1999, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -24,7 +24,18 @@ * OF THIS SOFTWARE. * * $Log: xmalloc.h,v $ - * Revision 1.3 1997-09-01 08:49:54 adam + * Revision 1.6 1999-07-13 13:24:53 adam + * Updated memory debugging memory allocatation routines. + * + * Revision 1.5 1998/07/20 12:36:22 adam + * Minor changes. + * + * Revision 1.4 1997/10/31 12:20:08 adam + * Improved memory debugging for xmalloc/nmem.c. References to NMEM + * instead of ODR in n ESPEC-1 handling in source d1_espec.c. + * Bug fix: missing fclose in data1_read_espec1. + * + * Revision 1.3 1997/09/01 08:49:54 adam * New windows NT/95 port using MSV5.0. To export DLL functions the * YAZ_EXPORT modifier was added. Defined in yconfig.h. * @@ -75,17 +86,20 @@ extern "C" { #endif -YAZ_EXPORT void *xrealloc_f (void *o, size_t size, char *file, int line); -YAZ_EXPORT void *xmalloc_f (size_t size, char *file, int line); -YAZ_EXPORT void *xcalloc_f (size_t nmemb, size_t size, char *file, int line); -YAZ_EXPORT char *xstrdup_f (const char *, char *file, int line); -YAZ_EXPORT void xfree_f (void *p, char *file, int line); - #define xrealloc(o, x) xrealloc_f(o, x, __FILE__, __LINE__) #define xmalloc(x) xmalloc_f(x, __FILE__, __LINE__) #define xcalloc(x,y) xcalloc_f(x,y, __FILE__, __LINE__) #define xfree(x) xfree_f(x, __FILE__, __LINE__) #define xstrdup(s) xstrdup_f(s, __FILE__, __LINE__) +#define xmalloc_trav(s) xmalloc_trav_f(s, __FILE__, __LINE__) + +YAZ_EXPORT void *xrealloc_f (void *o, size_t size, const char *file, int line); +YAZ_EXPORT void *xmalloc_f (size_t size, const char *file, int line); +YAZ_EXPORT void *xcalloc_f (size_t nmemb, size_t size, + const char *file, int line); +YAZ_EXPORT char *xstrdup_f (const char *p, const char *file, int line); +YAZ_EXPORT void xfree_f (void *p, const char *file, int line); +YAZ_EXPORT void xmalloc_trav_f(const char *s, const char *file, int line); #ifdef __cplusplus }