diff options
author | Max Kellermann <max@duempel.org> | 2014-07-30 20:58:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-30 22:17:01 +0200 |
commit | 9fb351a139a56fc7b1ece549894f8fc31fa887cd (patch) | |
tree | 7c9ce42a1262af587f1b9fede2b24ff39cef93fc /test/run_input.cxx | |
parent | 0d0ccacdf3e154b1cc27a0840fce80ac13f9641c (diff) | |
download | mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.tar.gz mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.tar.xz mpd-9fb351a139a56fc7b1ece549894f8fc31fa887cd.zip |
*Save, *State: use the OutputStream API instead of FILE*
Diffstat (limited to 'test/run_input.cxx')
-rw-r--r-- | test/run_input.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/run_input.cxx b/test/run_input.cxx index 130d0f031..f53711cc9 100644 --- a/test/run_input.cxx +++ b/test/run_input.cxx @@ -28,6 +28,8 @@ #include "util/Error.hxx" #include "thread/Cond.hxx" #include "Log.hxx" +#include "fs/output/BufferedOutputStream.hxx" +#include "fs/output/StdioOutputStream.hxx" #ifdef ENABLE_ARCHIVE #include "archive/ArchiveList.hxx" @@ -40,6 +42,15 @@ #include <unistd.h> #include <stdlib.h> +static void +tag_save(FILE *file, const Tag &tag) +{ + StdioOutputStream sos(file); + BufferedOutputStream bos(sos); + tag_save(bos, tag); + bos.Flush(); +} + static int dump_input_stream(InputStream *is) { |