.\" -*-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
-.el .ds o o
+.\"
+.\" Manual for buffer handling
+.\"
+.\" (c) 2005, 2007, 2009, 2017, 2023, 2024 Straylight/Edgeware
+.\"
.
-.TH buf 3 "23 September 2005" "Straylight/Edgeware" "mLib utilities library"
+.\"----- 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.
.
-.SH NAME
-buf \- reading and writing stuff in buffers
+.\"--------------------------------------------------------------------------
+.so ../defs.man \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
+.TH buf 3mLib "23 September 2005" "Straylight/Edgeware" "mLib utilities library"
.\" @BBASE
.\" @BLIM
.\" @BCUR
.\" @buf_vputstrf
.\" @dbuf_putstrf
.\" @dbuf_vputstrf
+.\" @buf_printops
.
.\" @buf_getu8
.\" @buf_getu16
.\" @DBUF_ENCLOSE64_B
.\" @DBUF_ENCLOSEZ
.
+.\"--------------------------------------------------------------------------
+.SH NAME
+buf \- reading and writing stuff in buffers
+.
+.\"--------------------------------------------------------------------------
.SH SYNOPSIS
+.
.nf
.B "#include <mLib/dstr.h>"
.PP
.BI "int dbuf_getf" suff "(dbuf *" db ", double *" x );
.fi
.
+.\"--------------------------------------------------------------------------
.SH DESCRIPTION
The
.B buf
Both functions return the number of bytes written on success
or \-1 on failure.
Note that these functions apply no length framing or termination.
+They are implemented using
+.BR gprintf (3);
+the output operations table is exposed as
+.BR buf_printops ;
+the functions expect the output pointer to be the address of the output
+.BR buf .
.PP
Functions which deal with block lengths assume the length is prefixed to
the data, and don't include themselves. They come in all of the integer
and also restore its current position to its base and
clear its broken flag.
.
+.\"--------------------------------------------------------------------------
.SH "SEE ALSO"
+.
.BR bits (3),
.BR control (3),
.BR dstr (3),
+.BR gprintf (3),
.BR mLib (3).
.
+.\"--------------------------------------------------------------------------
.SH AUTHOR
+.
Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------