.\" @base64_init
.SH SYNOPSIS
.nf
-.B "#include <mLib/base64.h>
+.B "#include <mLib/base64.h>"
.BI "void base64_encode(base64_ctx *" ctx ,
.BI " const void *" p ", size_t " sz ,
separate the output lines. The default indent string contains only a
newline character. The
.B maxline
-member gives the maxmimum length of line that
+member gives the maximum length of line that
.B base64_encode
is allowed to produce. If this is not a multiple of 4, it is rounded
up to the next highest multiple of four before use. A value of zero
conn \- selector for nonblocking connections
.SH SYNOPSIS
.nf
-.B "#include <mLib/conn.h>
+.B "#include <mLib/conn.h>"
.BI "void conn_init(conn *" c ", sel_state *" s ", int " fd ,
.BI " struct sockaddr *" dst ", int " dsz ,
.\" -*-nroff-*-
+.ie t \{\
+. ds ss \s8\u
+. ds se \d\s0
+.\}
+.el \{\
+. ds ss ^
+. ds se
+.\}
.TH crc32 3 "8 May 1999" "mLib"
.SH NAME
crc32 \- calculate 32-bit CRC
.PP
The exact behaviour of the CRC is beyond the scope of this manual;
suffice to say that the result is, in some suitable representation, the
-remainder after division in the finite field GF(2^32) of the block by a
-carefully chosen polynomial of order 32.
+remainder after division in the finite field GF(2\*(ss32\*(se) of the
+block by a carefully chosen polynomial of order 32.
.SH "RETURN VALUE"
The return value is the 32-bit CRC of the input block.
.SH "SEE ALSO"
.\"
.SH SYNOPSIS
.nf
-.B "#include <mLib/dspool.h>
+.B "#include <mLib/dspool.h>"
.BI "void dspool_create(dspool *" p ", size_t " isz );
.BI "void dspool_destroy(dspool *" p );
.BI "dstr *dspool_get(dspool *" p );
.BI "void dspool_put(dspool *" p ", dstr *" d );
-.BI "dstr *DSGET(dspool *" p ", d );
+.BI "void DSGET(dspool *" p ", " d );
.BI "void DSPUT(dspool *" p ", dstr *" d );
.fi
.SH DESCRIPTION
It is passed the address of a pool structure
.I p
and the initial size
-.I izs
+.I isz
to allocate for new dynamic strings obtained from the pool. A newly
created pool contains no strings. Once a pool is no longer required,
the function
.BI "void dstr_putz(dstr *" d );
.BI "void dstr_puts(dstr *" d ", const char *" s );
.BI "int dstr_vputf(dstr *" d ", va_list " ap );
-.BI "int dstr_putf(dstr *" d ", ...);
+.BI "int dstr_putf(dstr *" d ", ...);"
.BI "void dstr_putd(dstr *" d ", const dstr *" p );
.BI "void dstr_putm(dstr *" d ", const void *" p ", size_t " sz );
.BI "int dstr_putline(dstr *" d ", FILE *" fp );
At all times,
.BI sz " >= " len\fR.
.PP
-Note that there is no equaivalent of the standard C distinction between
+Note that there is no equivalent of the standard C distinction between
the empty string (a pointer to an array of characters whose first
-element is zero) and the nonexistant string (a null pointer). Any
+element is zero) and the nonexistent string (a null pointer). Any
.B dstr
whose
.B len
function empties a string
.I without
deallocating any memory. Therefore appending more characters is quick,
-beause the old buffer is still there and doesn't need to be allocated.
+because the old buffer is still there and doesn't need to be allocated.
Calling
.VS
dstr_reset(d);
.VE
-is equivalent to directly assinging
+is equivalent to directly assigning
.VS
d->len = 0;
.VE
`trims' a string's buffer so that it's just large enough for the string
contents and a null terminating byte. This might raise an exception due
to lack of memory. (There are two possible ways this might happen.
-Firstly, the underlying allocator might just be braindamaged enough to
+Firstly, the underlying allocator might just be brain-damaged enough to
fail on reducing a block's size. Secondly, tidying an empty string with no
buffer allocated for it causes allocation of a buffer large enough for
the terminating null byte.)
.B dstr_putf
doesn't (and probably never will) understand the
.RB ` n$ '
-positional paramter notation accepted by many Unix C libraries. There
+positional parameter notation accepted by many Unix C libraries. There
is no macro equivalent of
.BR dstr_putf .
.PP
.B DWRITE
is equivalent.
.SH "SECURITY CONSIDERATIONS"
-The implemenetation of the
+The implementation of the
.B dstr
functions is designed to do string handling in security-critical
programs. However, there may be bugs in the code somewhere. In
.\" @THROW
.\" @RETHROW
.\"
-.\" @exc_encaught
+.\" @exc_uncaught
.\"
.\" @EXC_PAIR
.\" @EXC_ALLOC
.\" @EXC_ALLOCS
.\"
.SH SYNOPSIS
-.B "#include <mLib/exc.h>
+.B "#include <mLib/exc.h>"
.sp 1
.B TRY
.I statement
String data. Signals a miscellaneous failure. The data is a pointer to
an explanatory string.
.SH BUGS
-The call to an exception handler is acheived using
+The call to an exception handler is achieved using
.BR longjmp (3).
Therefore all the caveats about
.B longjmp
.\" @lock_file
.SH SYNOPSIS
.nf
-.B "#include <mLib/lock.h>
+.B "#include <mLib/lock.h>"
.BI "int lock_file(int " fd ", unsigned " how );
.fi
.B arg
member of the data block; a null pointer is stored if there was no
argument. If a negated option was found, the option character is
-returned ORred with
+returned ORed with
.B OPTF_NEGATED
(bit 8 set).
.SS "Long option parsing"
selector is not added to its multiplexor: this must be done explicitly.
.PP
The handler function for a file multiplexor is passed three arguments:
-the file descriptor for the file, a mode argument which descibes the
+the file descriptor for the file, a mode argument which describes the
file's new condition, and the pointer argument set up at initialization
time.
.PP
array elements are filled with null pointers.
.TP
.I c
-The maxmimum number of words to extract; also, the number of elements in
+The maximum number of words to extract; also, the number of elements in
the array
.IR v .
.TP
.VS
DESTROY(p)
.VE
-rather than the more cubersome
+rather than the more cumbersome
.VS
sub_free(p, sizeof(*p));
.VE
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
.\" @url_dec
.SH SYNOPSIS
.nf
-.B "#include <mLib/url.h>
+.B "#include <mLib/url.h>"
.BI "void url_initenc(url_ectx *" ctx );
.BI "void url_enc(url_ectx *" ctx ", dstr *" d ,