@@@ much mess, mostly manpages
[mLib] / trace / trace.3.in
similarity index 76%
rename from trace/trace.3
rename to trace/trace.3.in
index d0e4fcf..f3f33d5 100644 (file)
@@ -1,7 +1,34 @@
 .\" -*-nroff-*-
-.TH trace 3 "21 October 1999" "Straylight/Edgeware" "mLib utilities library"
-.SH "NAME"
-trace \- configurable tracing output
+.\"
+.\" Manual for tracing
+.\"
+.\" (c) 1999, 2001, 2005, 2009, 2017, 2023, 2024 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of the mLib utilities library.
+.\"
+.\" mLib is free software: you can redistribute it and/or modify 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.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
+.TH trace 3mLib "21 October 1999" "Straylight/Edgeware" "mLib utilities library"
 .\" @trace
 .\" @trace_block
 .\" @trace_on
@@ -12,7 +39,14 @@ trace \- configurable tracing output
 .\" @NTRACE
 .\" @T
 .\" IF_TRACING
+.
+.\"--------------------------------------------------------------------------
+.SH "NAME"
+trace \- configurable tracing output
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .nf
 .B "#include <mLib/trace.h>"
 .PP
@@ -36,7 +70,10 @@ trace \- configurable tracing output
 .BI T( statements\fR... )
 .BI "IF_TRACING(unsigned " l ", " statements\fR... )
 .fi
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B <mLib/trace.h>
 header declares some functions and macros for handling trace output.
@@ -52,6 +89,7 @@ is a trace destination set, and the result of a bitwise AND between the
 message level and the overall tracing level is nonzero.  The idea is
 that the programmer assigns a different bit to each group of trace
 messages, and allows a user to select which ones are wanted.
+.
 .SS "Producing trace output"
 The basic function is
 .BR trace .
@@ -66,6 +104,7 @@ formats an arbitrary block of memory as a hex dump.  The arguments are,
 in order, the message level, a pointer to the header string for the hex
 dump, the base address of the block to dump, and the size of the block
 in bytes.
+.
 .SS "Configuring trace output"
 The tracing destination is set with the function
 .BR trace_on :
@@ -84,6 +123,7 @@ 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
@@ -146,6 +186,7 @@ program can set the
 .I bad
 mask to prevent access to secret information when running setuid, or to
 zero when not.
+.
 .SS "Macro support for tracing"
 The tracing macros are intended to make insertion of tracing information
 unobtrusive and painless.  If the
@@ -168,7 +209,15 @@ macro is useful.  Its first argument is a message level; if the trace
 level is set such that the message will be printed, the code in the
 second argument is executed.  If code is being compiled without tracing,
 of course, the entire contents of the macro is ignored.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR mLib (3).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------