chiark / gitweb /
Merge branch 'work'
[mLib] / track.h
diff --git a/track.h b/track.h
index 482d759178489d5b8be25b5fcda64e3e4b8d3ee8..afeebcc0f5970cda3d79fdb7196f8aa655a3b13c 100644 (file)
--- a/track.h
+++ b/track.h
@@ -1,13 +1,13 @@
 /* -*-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
  *
  * (c) 1998 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of the mLib utilities library.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * mLib is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * 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.
- */
-
-/*----- 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
  *
+ * 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.
  */
 
-#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)