summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-02-27 19:50:46 +0000
committerjhb <jhb@FreeBSD.org>2013-02-27 19:50:46 +0000
commit2b2e6341820f4bf973e758ae57713a8e6d356a3a (patch)
tree816ebb18fe50626639453ff4d9e8077daa1693e2 /include
parent743bccf1ecd630e8a4bc5f9e27f286fc4567e98d (diff)
downloadFreeBSD-src-2b2e6341820f4bf973e758ae57713a8e6d356a3a.zip
FreeBSD-src-2b2e6341820f4bf973e758ae57713a8e6d356a3a.tar.gz
Add an implementation of open_memstream() and open_wmemstream(). These
routines provide write-only stdio FILE objects that store their data in a dynamically allocated buffer. They are a string builder interface somewhat akin to a completely dynamic sbuf. Reviewed by: bde, jilles (earlier versions) MFC after: 1 month
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h1
-rw-r--r--include/wchar.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 4fc78b8..19b1e20 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -346,6 +346,7 @@ char *tempnam(const char *, const char *);
FILE *fmemopen(void * __restrict, size_t, const char * __restrict);
ssize_t getdelim(char ** __restrict, size_t * __restrict, int,
FILE * __restrict);
+FILE *open_memstream(char **, size_t *);
int renameat(int, const char *, int, const char *);
int vdprintf(int, const char * __restrict, __va_list);
diff --git a/include/wchar.h b/include/wchar.h
index 9e8d807..4a3fe53 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -207,6 +207,7 @@ int wcwidth(wchar_t);
#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE
size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
size_t, mbstate_t * __restrict);
+FILE *open_wmemstream(wchar_t **, size_t *);
wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict);
wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
wchar_t *wcsdup(const wchar_t *) __malloc_like;
OpenPOWER on IntegriCloud