.\" -*-nroff-*-
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.de hP
-.IP
-.ft B
-\h'-\w'\\$1\ 'u'\\$1\ \c
-.ft P
-..
-.ie t \{\
-. ds o \(bu
-. de VP
-. sp .4v
-..
-\}
-.el \{\
-. ds o o
-. de VP
-. sp
-..
-\}
+.\"
+.\" Manual for generalized output formatting
+.\"
+.\" (c) 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 gprintf 3 "9 March 2024" "Straylight/Edgeware" "mLib utilities library"
+.\"--------------------------------------------------------------------------
+.TH gprintf 3mLib "9 March 2024" "Straylight/Edgeware" "mLib utilities library"
+.\" @gprintf
+.\" @vgprintf
+.\" @gprintf_memputf
.
+.\" @file_printops
+.
+.\"--------------------------------------------------------------------------
.SH NAME
gprintf \- generalized output formatting
.
+.\"--------------------------------------------------------------------------
.SH SYNOPSIS
+.
.nf
.B "#include <mLib/gprintf.h>"
.PP
.B "const struct gprintf_ops file_printops;"
.fi
.
+.\"--------------------------------------------------------------------------
.SH DESCRIPTION
+.
The
.B "<mLib/gprintf.h>"
header file declares facilities for generalized output formatting
.BR buf_putstrf...(3)
functions.
.PP
+The formatting is intended to be convenient and safe
+rather than efficient,
+so don't expect blistering performance.
+Similarly, there may be differences
+between the formatting done by
+.B gprintf
+and the C ilbrary's
+.BR sprintf (3)
+because the former has to do most of its work itself.
+In particular,
+.B gprintf
+understands the POSIX
+.RB ` n$ '
+positional parameter notation accepted by many Unix C libraries,
+even if the underlying C library does not.
+.PP
To use it, you must define a
.B "struct gprintf_ops"
structure,
/* ...\& other cleanup ...\& */
.VE
.
+.\"--------------------------------------------------------------------------
.SH "SEE ALSO"
+.
.BR buf (3),
.BR dstr (3),
.BR mLib (3).
.
+.\"--------------------------------------------------------------------------
.SH AUTHOR
+.
+.\"--------------------------------------------------------------------------
Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------