@@@ much mess, mostly manpages
[mLib] / codec / codec.3.in
similarity index 83%
rename from codec/codec.3
rename to codec/codec.3.in
index f2a0f29..06d340a 100644 (file)
@@ -1,7 +1,34 @@
 .\" -*-nroff-*-
-.TH codec 3 "9 January 2009" "Straylight/Edgeware" "mLib utilities library"
-.SH NAME
-codec \- binary encoding and decoding
+.\"
+.\" Manual for new-fangled binary encoding and decoding
+.\"
+.\" (c) 2009, 2014, 2015, 2019, 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 codec 3mLib "9 January 2009" "Straylight/Edgeware" "mLib utilities library"
 .\" @codec_class
 .\" @codec_strerror
 .\" @null_codec_class
@@ -11,7 +38,14 @@ codec \- binary encoding and decoding
 .\" @base32_class
 .\" @base32hex_class
 .\" @hex_class
+.
+.\"--------------------------------------------------------------------------
+.SH NAME
+codec \- binary encoding and decoding
+.
+.\"--------------------------------------------------------------------------
 .SH SYNOPSIS
+.
 .nf
 .B "#include <mLib/codec.h>"
 .B "#include <mLib/base64.h>"
@@ -63,13 +97,17 @@ codec \- binary encoding and decoding
 .PP
 .BI "const char *codec_strerror(int " err ");"
 .fi
+.
+.\"--------------------------------------------------------------------------
 .SH DESCRIPTION
+.
 The
 .B codec
 system provides an object-based interface to functions which encode
 binary data as plain text and decode the result to recover the original
 binary data.  The interface makes it easy to support multiple encodings
 and select an appropriate one at runtime.
+.
 .SS "The codec_class structure"
 The
 .B codec_class
@@ -179,6 +217,7 @@ flags, a decoder should only accept the exact encoding that the
 corresponding encoder would produce (with
 .I maxline
 = 0 to inhibit line-breaking).
+.
 .SS "The codec and codec_ops structures"
 The
 .B codec
@@ -256,6 +295,7 @@ The
 .B codec_strerror
 function converts these error codes to brief, (moderately)
 human-readable strings.
+.
 .SS "Provided codecs"
 The library provides a number of standard codecs.
 .TP
@@ -291,9 +331,17 @@ of messages if padding is suppressed.
 Implements hex encoding, defined by RFC4648 under the name Base16.  For
 compatibility with that specification, output is in upper case by
 default.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR bincode (1),
 .BR dstr (3),
 .BR mLib (3).
+.
+.\"--------------------------------------------------------------------------
 .SH AUTHOR
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------