From 4b512a68903953e1372c3ad3b982eed72a7db681 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Dec 2011 02:43:36 +0000 Subject: Add serd_file_sink for the common case of writing to a FILE* stream. git-svn-id: http://svn.drobilla.net/serd/trunk@262 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- serd/serd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index eebfa113..3e84c302 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -659,6 +659,16 @@ SERD_API void serd_writer_free(SerdWriter* writer); +/** + A convenience sink function for writing to a FILE*. + + This function can be used as a SerdSink when writing to a FILE*. The + associated @c stream parameter must be a FILE* opened for writing. +*/ +SERD_API +size_t +serd_file_sink(const void* buf, size_t len, void* stream); + /** Set a prefix to be removed from matching blank node identifiers. */ -- cgit v1.2.1