Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
820 B

.TH stralloc_readyplus 3
stralloc_readyplus \- provide space in a stralloc
.B #include <stralloc.h>
extern int \fBstralloc_readyplus\fP(stralloc* \fIsa\fR,unsigned int \fIlen\fR);
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
If stralloc_readyplus runs out of memory, it leaves \fIsa\fR alone and
returns 0.