X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/c846879ccf3e86ea293c157f4aa2ff8716fb5b4c..78b1464e4a78dc364ecc8aebcfd5ec13b3f6bb07:/track.h diff --git a/track.h b/track.h index 482d759..be9ce49 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.5 1999/12/10 23:42:04 mdw Exp $ * * Tracing functions for debugging * @@ -22,13 +22,23 @@ * 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.5 1999/12/10 23:42:04 mdw + * Change header file guard names. + * + * Revision 1.4 1999/10/22 22:40:25 mdw + * Change naming slightly. Still not documented, though. + * + * Revision 1.3 1999/05/06 19:51:36 mdw + * Reformatted the LGPL notice a little bit. + * * Revision 1.2 1999/05/05 18:50:31 mdw * Change licensing conditions to LGPL. * @@ -37,8 +47,8 @@ * */ -#ifndef TRACK_H -#define TRACK_H +#ifndef MLIB_TRACK_H +#define MLIB_TRACK_H #ifdef __cplusplus extern "C" { @@ -76,7 +86,7 @@ typedef struct track_ctx { /*----- Functions provided ------------------------------------------------*/ -/* --- @track_setLevel@ --- * +/* --- @track_level@ --- * * * Arguments: @unsigned int l@ = tracing level for allocation messages * @@ -85,9 +95,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 +106,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 +117,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 +183,6 @@ extern void track_list(unsigned int l); /*----- Macro wrappers ----------------------------------------------------*/ - /* --- If tracking is to be done, set it up --- */ #ifdef TRACK_ENABLE @@ -196,12 +205,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)