You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
758 B
Groff

24 years ago
.TH stralloc_ready 3
.SH NAME
stralloc_ready \- provide space in a stralloc
.SH SYNTAX
.B #include <stralloc.h>
24 years ago
22 years ago
int \fBstralloc_ready\fP(stralloc* \fIsa\fR,unsigned int \fIlen\fR);
24 years ago
.SH DESCRIPTION
stralloc_ready makes sure that \fIsa\fR has enough space allocated to hold
\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 bytes, stralloc_ready allocates at least \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.
If stralloc_ready runs out of memory, it leaves \fIsa\fR alone and
returns 0.
24 years ago
.SH "SEE ALSO"
stralloc_readyplus(3)