~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various manual fixes.
[mLib]
/
man
/
trace.3
diff --git
a/man/trace.3
b/man/trace.3
index
68d87ad
..
d1f08d7
100644
(file)
--- a/
man/trace.3
+++ b/
man/trace.3
@@
-1,10
+1,11
@@
.\" -*-nroff-*-
.\" -*-nroff-*-
-.TH trace 3 "21 October 1999"
mLib
+.TH trace 3 "21 October 1999"
"Straylight/Edgeware" "mLib utilities library"
.SH "NAME"
trace \- configurable tracing output
.\" @trace
.\" @trace_block
.\" @trace_on
.SH "NAME"
trace \- configurable tracing output
.\" @trace
.\" @trace_block
.\" @trace_on
+.\" @trace_custom
.\" @trace_level
.\" @tracing
.\" @traceopt
.\" @trace_level
.\" @tracing
.\" @traceopt
@@
-20,10
+21,13
@@
trace \- configurable tracing output
.BI " const void *" b ", size_t " sz );
.BI "void trace_on(FILE *" fp ", unsigned " l );
.BI " const void *" b ", size_t " sz );
.BI "void trace_on(FILE *" fp ", unsigned " l );
+.BI "void trace_custom(void (*" func ")(const char *" buf ,
+.BI " size_t " sz ", void *" v ),
+.BI " void *" v );
.BI "void trace_level(unsigned " l );
.BI "unsigned tracing(void);"
.BI "void trace_level(unsigned " l );
.BI "unsigned tracing(void);"
-.BI "unsigned traceopt(trace_opt *" t ", const char *" p ,
+.BI "unsigned traceopt(
const
trace_opt *" t ", const char *" p ,
.BI " unsigned " f ", unsigned " bad );
.BI T( statements\fR... )
.BI " unsigned " f ", unsigned " bad );
.BI T( statements\fR... )
@@
-72,6
+76,11
@@
which takes the new level as its single argument. The function
.B tracing
returns the current trace level, or zero if there is no trace
destination set.
.B tracing
returns the current trace level, or zero if there is no trace
destination set.
+.PP
+For more advanced programs, a custom output function may be provided by
+.B trace_custom
+and passing a function which will write a buffer of data somewhere
+sensible.
.SS "Parsing user trace options"
The function
.B traceopt
.SS "Parsing user trace options"
The function
.B traceopt
@@
-159,4
+168,4
@@
of course, the entire contents of the macro is ignored.
.SH "SEE ALSO"
.BR mLib (3).
.SH "AUTHOR"
.SH "SEE ALSO"
.BR mLib (3).
.SH "AUTHOR"
-Mark Wooding, <mdw@
nsict.org
>
+Mark Wooding, <mdw@
distorted.org.uk
>