..
.ie t .ds o \(bu
.el .ds o o
-.TH dstr 3 "8 May 1999" "mLib"
+.TH dstr 3 "8 May 1999" "Straylight/Edgeware" "mLib utilities library"
+.SH NAME
dstr \- a simple dynamic string type
.\" @dstr_create
.\" @dstr_destroy
char *buf; /* Pointer to string buffer */
size_t sz; /* Size of the buffer */
size_t len; /* Length of the string */
+ arena *a; /* Pointer to arena */
} dstr;
.VE
The
is a null pointer.
.hP \*o
At all times,
-.BI sz " >= " len\fR.
+.BR sz " \(>= " len.
.PP
Note that there is no equivalent of the standard C distinction between
the empty string (a pointer to an array of characters whose first
whose
.B len
is zero is an empty string.
+.PP
+The
+.I a
+member refers to the arena from which the string's buffer has been
+allocated. Immediately after creation, this is set to be
+.BR arena_stdlib (3);
+you can set it to point to any other arena of your choice before the
+buffer is allocated.
.SS "Creation and destruction"
The caller is responsible for allocating the
.B dstr