@@@ much mess, mostly manpages
[mLib] / struct / atom.3.in
similarity index 73%
rename from struct/atom.3
rename to struct/atom.3.in
index 35d30f9..a176f51 100644 (file)
@@ -1,19 +1,34 @@
 .\" -*-nroff-*-
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.TH atom 3 "21 January 2001" "Straylight/Edgeware" "mLib utilities library"
-.SH NAME
-atom \- atom table manager
+.\"
+.\" Manual for atom interning
+.\"
+.\" (c) 2001, 2005, 2009, 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 atom 3mLib "21 January 2001" "Straylight/Edgeware" "mLib utilities library"
 .\" @atom_createtable
 .\" @atom_destroytable
 .\" @atom_intern
@@ -24,15 +39,20 @@ atom \- atom table manager
 .\" @atom_hash
 .\" @atom_mkiter
 .\" @atom_next
-.\"
+.
 .\" @ATOM_GLOBAL
 .\" @INTERN
 .\" @GENSYM
 .\" @ATOM_NAME
 .\" @ATOM_LEN
 .\" @ATOM_HASH
-.\"
+.
+.\"--------------------------------------------------------------------------
+.SH NAME
+atom \- atom table manager
+.
 .SH SYNOPSIS
+.
 .nf
 .B "#include <mLib/atom.h>"
 .PP
@@ -60,6 +80,8 @@ atom \- atom table manager
 .PP
 .BI "extern atom_table *ATOM_GLOBAL;"
 .fi
+.
+.\"--------------------------------------------------------------------------
 .SH DESCRIPTION
 The
 .B atom
@@ -91,6 +113,7 @@ initialize it using the function
 .B atom_createtable
 and free it when you're finished using
 .BR atom_destroytable .
+.
 .SS "Creating atoms from strings"
 The process of making atoms from strings is called
 .IR interning .
@@ -109,6 +132,7 @@ considered to be a part of the name itself, and does not contribute to
 the atom's length as reported by the
 .B ATOM_LEN
 macro.
+.
 .SS "Uninterned atoms"
 You can make an atom which is guaranteed to be distinct from every other
 atom, and has no sensible text string, by calling
@@ -124,6 +148,7 @@ where
 is an atom-table-specific sequence number.  This text is there as a
 debugging convenience, and doesn't mean that the uninterned atom has the
 same address as an interned atom with the same text.
+.
 .SS "Other enquiries about atoms"
 Atoms can be interrogated to find their names and hashes.  The macro
 .B ATOM_NAME
@@ -136,6 +161,7 @@ returns the atom's hash value, which is useful if you want to use the
 atom as a key in some other structure.  There are lower-case function
 versions of these, which have the same effect.  There is little point in
 using the functions.
+.
 .SS "Enumerating atoms"
 You can iterate over the atoms in an atom table.  The
 .B atom_mkiter
@@ -144,9 +170,17 @@ atom table;
 .B atom_next
 returns the next atom from the iterator.  Atoms are not returned in any
 particular order.
+.
+.\"--------------------------------------------------------------------------
 .SH SEE ALSO
+.
 .BR assoc (3),
 .BR hash (3),
 .BR mLib (3).
+.
+.\"--------------------------------------------------------------------------
 .SH AUTHOR
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------