File: fmt_strm_malloc.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (20 lines) | stat: -rw-r--r-- 617 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.TH fmt_strm_malloc 3
.SH NAME
fmt_strm_malloc \- write multiple ASCII strings
.SH SYNTAX
.B #include <stdlib.h>
.B #include <libowfat/fmt.h>

char* \fBfmt_strm_malloc\fP(const char *\fIsource\fR, ...);
.SH DESCRIPTION
fmt_strm_malloc copies all leading nonzero bytes from \fIsource\fR and
following function arguments to a freshly allocated heap buffer and
returns a pointer to it.

The buffer was allocated with \fImalloc\fR and you need to call
\fIfree\fR on it when you are done.

Unlink fmt_strm, fmt_strm_malloc does append \\0.

.SH "SEE ALSO"
fmt_str(3), fmt_strm(3), fmt_strm_alloca(3), alloca(3), strcpy(3)