aboutsummaryrefslogtreecommitdiffstats
path: root/test/dump_rva2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/dump_rva2.cxx')
-rw-r--r--test/dump_rva2.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/dump_rva2.cxx b/test/dump_rva2.cxx
index e1ba5336a..fd46ee36c 100644
--- a/test/dump_rva2.cxx
+++ b/test/dump_rva2.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -21,19 +21,19 @@
#include "tag/TagId3.hxx"
#include "tag/TagRva2.hxx"
#include "ReplayGainInfo.hxx"
-#include "ConfigGlobal.hxx"
+#include "config/ConfigGlobal.hxx"
#include "util/Error.hxx"
#include "fs/Path.hxx"
+#include "Log.hxx"
#include <id3tag.h>
-#include <glib.h>
-
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#include <stdlib.h>
+#include <stdio.h>
const char *
config_get_string(gcc_unused enum ConfigOption option,
@@ -50,8 +50,8 @@ int main(int argc, char **argv)
#endif
if (argc != 2) {
- g_printerr("Usage: read_rva2 FILE\n");
- return 1;
+ fprintf(stderr, "Usage: read_rva2 FILE\n");
+ return EXIT_FAILURE;
}
const char *path = argv[1];
@@ -60,9 +60,9 @@ int main(int argc, char **argv)
struct id3_tag *tag = tag_id3_load(Path::FromFS(path), error);
if (tag == NULL) {
if (error.IsDefined())
- g_printerr("%s\n", error.GetMessage());
+ LogError(error);
else
- g_printerr("No ID3 tag found\n");
+ fprintf(stderr, "No ID3 tag found\n");
return EXIT_FAILURE;
}
@@ -74,19 +74,19 @@ int main(int argc, char **argv)
id3_tag_delete(tag);
if (!success) {
- g_printerr("No RVA2 tag found\n");
+ fprintf(stderr, "No RVA2 tag found\n");
return EXIT_FAILURE;
}
const ReplayGainTuple *tuple = &replay_gain.tuples[REPLAY_GAIN_ALBUM];
if (tuple->IsDefined())
- g_printerr("replay_gain[album]: gain=%f peak=%f\n",
- tuple->gain, tuple->peak);
+ fprintf(stderr, "replay_gain[album]: gain=%f peak=%f\n",
+ tuple->gain, tuple->peak);
tuple = &replay_gain.tuples[REPLAY_GAIN_TRACK];
if (tuple->IsDefined())
- g_printerr("replay_gain[track]: gain=%f peak=%f\n",
- tuple->gain, tuple->peak);
+ fprintf(stderr, "replay_gain[track]: gain=%f peak=%f\n",
+ tuple->gain, tuple->peak);
return EXIT_SUCCESS;
}