chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add list of link pages to generate.
[mLib]
/
man
/
dstr.3
diff --git
a/man/dstr.3
b/man/dstr.3
index 3eec044bece7d84cd20d6b6fb6bdd7ce70312fce..6fde3a139e495812931105dd90bc645179fdd9f9 100644
(file)
--- a/
man/dstr.3
+++ b/
man/dstr.3
@@
-11,7
+11,7
@@
.RE
.sp 1
..
.RE
.sp 1
..
-.de
H
P
+.de
h
P
.IP
.ft B
\h'-\w'\\$1\ 'u'\\$1\ \c
.IP
.ft B
\h'-\w'\\$1\ 'u'\\$1\ \c
@@
-19,8
+19,34
@@
..
.ie t .ds o \(bu
.el .ds o o
..
.ie t .ds o \(bu
.el .ds o o
-.TH dstr 3
mLib
"8 May 1999" "mLib"
+.TH dstr 3 "8 May 1999" "mLib"
dstr \- a simple dynamic string type
dstr \- a simple dynamic string type
+.\" @dstr_create
+.\" @dstr_destroy
+.\" @dstr_reset
+.\" @dstr_ensure
+.\" @dstr_tidy
+.\"
+.\" @dstr_putc
+.\" @dstr_putz
+.\" @dstr_puts
+.\" @dstr_putf
+.\" @dstr_putd
+.\" @dstr_putm
+.\" @dstr_putline
+.\" @dstr_write
+.\"
+.\" @DCREATE
+.\" @DDESTROY
+.\" @DRESET
+.\" @DENSURE
+.\" @DPUTC
+.\" @DPUTZ
+.\" @DPUTS
+.\" @DPUTD
+.\" @DPUTM
+.\" @DWRITE
+.\"
.SH SYNOPSIS
.nf
.B "#include <mLib/dstr.h>"
.SH SYNOPSIS
.nf
.B "#include <mLib/dstr.h>"
@@
-46,6
+72,7
@@
dstr \- a simple dynamic string type
.BI "void DDESTROY(dstr *" d );
.BI "void DRESET(dstr *" d );
.BI "void DENSURE(dstr *" d ", size_t " sz );
.BI "void DDESTROY(dstr *" d );
.BI "void DRESET(dstr *" d );
.BI "void DENSURE(dstr *" d ", size_t " sz );
+.BI "void DPUTC(dstr *" c ", char " ch );
.BI "void DPUTZ(dstr *" d );
.BI "void DPUTS(dstr *" d ", const char *" s );
.BI "void DPUTD(dstr *" d ", const dstr *" p );
.BI "void DPUTZ(dstr *" d );
.BI "void DPUTS(dstr *" d ", const char *" s );
.BI "void DPUTD(dstr *" d ", const dstr *" p );
@@
-107,7
+134,7
@@
include a null-terminating byte, if there is one.
The following invariants are maintained by
.B dstr
and must hold when any function is called:
The following invariants are maintained by
.B dstr
and must hold when any function is called:
-.
H
P \*o
+.
h
P \*o
If
.B sz
is nonzero, then
If
.B sz
is nonzero, then
@@
-119,7
+146,7
@@
If
is zero, then
.B buf
is a null pointer.
is zero, then
.B buf
is a null pointer.
-.
H
P \*o
+.
h
P \*o
At all times,
.BI sz " >= " len\fR.
.PP
At all times,
.BI sz " >= " len\fR.
.PP
@@
-134,15
+161,15
@@
is zero is an empty string.
The caller is responsible for allocating the
.B dstr
structure. It can be initialized in any of the following ways:
The caller is responsible for allocating the
.B dstr
structure. It can be initialized in any of the following ways:
-.
H
P \*o
+.
h
P \*o
Using the macro
.B DSTR_INIT
as an initializer in the declaration of the object.
Using the macro
.B DSTR_INIT
as an initializer in the declaration of the object.
-.
H
P \*o
+.
h
P \*o
Passing its address to the
.B dstr_create
function.
Passing its address to the
.B dstr_create
function.
-.
H
P \*o
+.
h
P \*o
Passing its address to the (equivalent)
.B DCREATE
macro.
Passing its address to the (equivalent)
.B DCREATE
macro.
@@
-204,7
+231,7
@@
Extending a string never returns a failure result. Instead, if there
isn't enough memory for a longer string, the exception
.B EXC_NOMEM
is raised. See
isn't enough memory for a longer string, the exception
.B EXC_NOMEM
is raised. See
-.BR exc (3
mLib
)
+.BR exc (3)
for more information about
.BR mLib 's
exception handling system.
for more information about
.BR mLib 's
exception handling system.
@@
-364,5
+391,8
@@
particular, the
.B dstr_putf
functions is quite complicated, and could do with some checking by
independent people who know what they're doing.
.B dstr_putf
functions is quite complicated, and could do with some checking by
independent people who know what they're doing.
+.SH "SEE ALSO"
+.BR exc (3),
+.BR mLib (3).
.SH AUTHOR
Mark Wooding, <mdw@nsict.org>
.SH AUTHOR
Mark Wooding, <mdw@nsict.org>