chiark / gitweb /
Version bump.
[mLib] / trace.h
diff --git a/trace.h b/trace.h
index 6ebc0648d8136c301cb95e04b76d81b785a62df6..c78ba8ff06396b129967eed6e564e2c303623c6a 100644 (file)
--- a/trace.h
+++ b/trace.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: trace.h,v 1.5 1999/12/10 23:42:04 mdw Exp $
+ * $Id: trace.h,v 1.6 2001/02/03 16:23:55 mdw Exp $
  *
  * Tracing functions for debugging
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: trace.h,v $
+ * Revision 1.6  2001/02/03 16:23:55  mdw
+ * New custom trace output interface.
+ *
  * Revision 1.5  1999/12/10 23:42:04  mdw
  * Change header file guard names.
  *
@@ -108,6 +111,21 @@ extern void trace_block(unsigned /*l*/, const char */*s*/,
 
 extern void trace_on(FILE */*fp*/, unsigned /*l*/);
 
+/* --- @trace_custom@ --- *
+ *
+ * Arguments:  @void (*func)(const char *buf, size_t sz, void *v)@ =
+ *                     output function
+ *             @void *v@ = magic handle to give to function
+ *
+ * Returns:    ---
+ *
+ * Use:                Sets up a custom trace handler.
+ */
+
+extern void trace_custom(void (*/*func*/)(const char */*buf*/,
+                                         size_t /*sz*/, void */*v*/),
+                        void */*v*/);
+
 /* --- @trace_level@ --- *
  *
  * Arguments:  @unsigned l@ = trace level to set
@@ -132,7 +150,7 @@ extern unsigned tracing(void);
 
 /* --- @traceopt@ --- *
  *
- * Arguments:  @trace_opt *t@ = pointer to trace options table
+ * Arguments:  @const trace_opt *t@ = pointer to trace options table
  *             @const char *p@ = option string supplied by user
  *             @unsigned f@ = initial tracing flags
  *             @unsigned bad@ = forbidden tracing flags
@@ -144,7 +162,7 @@ extern unsigned tracing(void);
  *             `?' character, a help message is displayed.
  */
 
-extern unsigned traceopt(trace_opt */*t*/, const char */*p*/,
+extern unsigned traceopt(const trace_opt */*t*/, const char */*p*/,
                         unsigned /*f*/, unsigned /*bad*/);
 
 /*----- Tracing macros ----------------------------------------------------*/