*Save, *State: use the OutputStream API instead of FILE*
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "playlist/PlaylistRegistry.hxx"
|
||||
#include "playlist/PlaylistPlugin.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "fs/output/BufferedOutputStream.hxx"
|
||||
#include "fs/output/StdioOutputStream.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "thread/Cond.hxx"
|
||||
#include "Log.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();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const char *uri;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user