New function `pquis'.
[mLib] / man / sym.3
index 10b8084..d81186b 100644 (file)
--- a/man/sym.3
+++ b/man/sym.3
@@ -1,7 +1,7 @@
 .\" -*-nroff-*-
 .de VS
 .sp 1
 .\" -*-nroff-*-
 .de VS
 .sp 1
-.RS 5
+.RS
 .nf
 .ft B
 ..
 .nf
 .ft B
 ..
 .RE
 .sp 1
 ..
 .RE
 .sp 1
 ..
-.TH sym 3mLib "8 May 1999" mLib
+.TH sym 3 "8 May 1999" mLib
 .SH NAME
 sym \- symbol table manager
 .SH NAME
 sym \- symbol table manager
+.\" @sym_create
+.\" @sym_destroy
+.\" @sym_find
+.\" @sym_remove
+.\" @sym_mkiter
+.\" @sym_next
+.\"
+.\" @SYM_NAME
+.\"
 .SH SYNOPSIS
 .nf
 .B "#include <mLib/sym.h>"
 .SH SYNOPSIS
 .nf
 .B "#include <mLib/sym.h>"
@@ -75,7 +84,7 @@ passing it to the function
 After initialization, the table contains no entries.
 .PP
 Initializing a symbol table involves allocating some memory.  If this
 After initialization, the table contains no entries.
 .PP
 Initializing a symbol table involves allocating some memory.  If this
-allocation failes, an
+allocation fails, an
 .B EXC_NOMEM
 exception is raised.
 .PP
 .B EXC_NOMEM
 exception is raised.
 .PP
@@ -90,27 +99,27 @@ Most of the actual work is done by the function
 It does both lookup and creation, depending on its arguments.  To do its
 job, it needs to know the following bits of information:
 .TP
 It does both lookup and creation, depending on its arguments.  To do its
 job, it needs to know the following bits of information:
 .TP
-.I t
+.BI "sym_table *" t
 A pointer to a symbol table to manipulate.
 .TP
 A pointer to a symbol table to manipulate.
 .TP
-.I n
+.BI "const char *" n
 The address of the
 .I key
 to look up or create.  Usually this will be a simple text string,
 although it can actually be any arbitrary binary data.
 .TP
 The address of the
 .I key
 to look up or create.  Usually this will be a simple text string,
 although it can actually be any arbitrary binary data.
 .TP
-.I l
+.BI "long " l
 The length of the key.  If this is \-1,
 .B sym_find
 assumes that the key is a null-terminated string, and calculates its
 length itself.
 .TP
 The length of the key.  If this is \-1,
 .B sym_find
 assumes that the key is a null-terminated string, and calculates its
 length itself.
 .TP
-.I sz
+.BI "size_t " sz
 The size of the value block to allocate if the key could not be found.
 If this is zero, no value is allocated, and a null pointer is returned
 to indicate an unsuccessful lookup.
 .TP
 The size of the value block to allocate if the key could not be found.
 If this is zero, no value is allocated, and a null pointer is returned
 to indicate an unsuccessful lookup.
 .TP
-.I f
+.BI "unsigned *" f
 The address of a `found' flag to set.  This is an output parameter.  On
 exit,
 .B sym_find
 The address of a `found' flag to set.  This is an output parameter.  On
 exit,
 .B sym_find
@@ -199,7 +208,7 @@ for (sym_mkiter(&i, t); (v = sym_next(&i)) != 0; ) {
 That ought to be enough examples to be getting on with.
 .SH CAVEATS
 The symbol table manager requires the suballocator (see
 That ought to be enough examples to be getting on with.
 .SH CAVEATS
 The symbol table manager requires the suballocator (see
-.BR sub (3mLib)
+.BR sub (3)
 for details).  You must ensure that
 .B sub_init
 has been called before using any symbol tables in your program.
 for details).  You must ensure that
 .B sub_init
 has been called before using any symbol tables in your program.
@@ -209,6 +218,7 @@ hash function.  The hash chains are kept very short (probably too short,
 actually).  Every time a symbol is found, its block is promoted to the
 front of its bin chain so it gets found faster next time.
 .SH SEE ALSO
 actually).  Every time a symbol is found, its block is promoted to the
 front of its bin chain so it gets found faster next time.
 .SH SEE ALSO
-.BR sub (3mLib).
+.BR sub (3),
+.BR mLib (3).
 .SH AUTHOR
 Mark Wooding, <mdw@nsict.org>
 .SH AUTHOR
 Mark Wooding, <mdw@nsict.org>