Initial revision
This commit is contained in:
18
stralloc/stralloc_readyplus.3
Normal file
18
stralloc/stralloc_readyplus.3
Normal file
@@ -0,0 +1,18 @@
|
||||
.TH stralloc_readyplus 3
|
||||
.SH NAME
|
||||
stralloc_readyplus \- provide space in a stralloc
|
||||
.SH SYNTAX
|
||||
.B #include <str.h>
|
||||
|
||||
extern int \fBstralloc_readyplus\fP(stralloc* \fIsa\fR,unsigned int \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
stralloc_readyplus makes sure that \fIsa\fR has enough space allocated
|
||||
to hold an additional \fIlen\fR bytes: If \fIsa\fR is not allocated,
|
||||
stralloc_ready allocates at least \fIlen\fR bytes of space, and returns
|
||||
1. If \fIsa\fR is already allocated, but not enough to hold \fIlen\fR
|
||||
additional bytes, stralloc_ready allocates at least
|
||||
\fIsa\fR->len+\fIlen\fR bytes of space, copies the old string into the
|
||||
new space, frees the old space, and returns 1. Note that this changes
|
||||
\fIsa\fR.s.
|
||||
.SH "SEE ALSO"
|
||||
stralloc_ready(3)
|
||||
Reference in New Issue
Block a user