X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/c846879ccf3e86ea293c157f4aa2ff8716fb5b4c..29de6d3989296bfe751b7518d6de4b7c4106fa72:/track.h diff --git a/track.h b/track.h index 482d759..1792f2b 100644 --- a/track.h +++ b/track.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: track.h,v 1.2 1999/05/05 18:50:31 mdw Exp $ + * $Id: track.h,v 1.6 2004/04/08 01:36:13 mdw Exp $ * * Tracing functions for debugging * @@ -22,23 +22,13 @@ * GNU Library General Public License for more details. * * You should have received a copy of the GNU Library General Public - * License along with mLib; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * License along with mLib; if not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: track.h,v $ - * Revision 1.2 1999/05/05 18:50:31 mdw - * Change licensing conditions to LGPL. - * - * Revision 1.1.1.1 1998/06/17 23:44:42 mdw - * Initial version of mLib - * - */ - -#ifndef TRACK_H -#define TRACK_H +#ifndef MLIB_TRACK_H +#define MLIB_TRACK_H #ifdef __cplusplus extern "C" { @@ -76,7 +66,7 @@ typedef struct track_ctx { /*----- Functions provided ------------------------------------------------*/ -/* --- @track_setLevel@ --- * +/* --- @track_level@ --- * * * Arguments: @unsigned int l@ = tracing level for allocation messages * @@ -85,9 +75,9 @@ typedef struct track_ctx { * Use: Sets the trace level for allocation messages. */ -extern void track_setLevel(unsigned int /*l*/); +extern void track_level(unsigned int /*l*/); -/* --- @track_pushContext@ --- * +/* --- @track_push@ --- * * * Arguments: @track_ctx *ctx@ = context holder to push * @@ -96,9 +86,9 @@ extern void track_setLevel(unsigned int /*l*/); * Use: Pushes the given context block onto the stack. */ -extern void track_pushContext(track_ctx */*ctx*/); +extern void track_push(track_ctx */*ctx*/); -/* --- @track_popContext@ --- * +/* --- @track_pop@ --- * * * Arguments: @track_ctx *ctx@ = context holder to pop * @@ -107,7 +97,7 @@ extern void track_pushContext(track_ctx */*ctx*/); * Use: Removes the given context block from the stack. */ -extern void track_popContext(track_ctx */*ctx*/); +extern void track_pop(track_ctx */*ctx*/); /* --- @track_malloc@ --- * * @@ -173,7 +163,6 @@ extern void track_list(unsigned int l); /*----- Macro wrappers ----------------------------------------------------*/ - /* --- If tracking is to be done, set it up --- */ #ifdef TRACK_ENABLE @@ -196,12 +185,12 @@ extern void track_list(unsigned int l); /* --- Handle contexts --- */ #if defined(TRACK_ENABLE) && defined(TRACK_BLAME) -# define TRACK_NCTX(name, string) track__context name = { 0, string } -# define TRACK_NPUSH(name) track_pushContext(name) -# define TRACK_NPOP(name) track_popContext(name) -# define TRACK_CTX(string) TRACK_NCTX(track__localContext, string) -# define TRACK_PUSH TRACK_NPUSH(track__localContext) -# define TRACK_POP TRACK_NPOP(track__localContext) +# define TRACK_NCTX(name, string) track_ctx name = { 0, string } +# define TRACK_NPUSH(name) track_push(name) +# define TRACK_NPOP(name) track_pop(name) +# define TRACK_CTX(string) TRACK_NCTX(__track_ctx, string) +# define TRACK_PUSH TRACK_NPUSH(__track_ctx) +# define TRACK_POP TRACK_NPOP(__track_ctx) #else # define TRACK_NCTX(name, string) # define TRACK_NPUSH(name) ((void)0)