aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:28:01 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:28:01 +0200
commit386c303121a8c53f11cc91c59bbe87f93a503b31 (patch)
treeb239f006ebfbd1f08942109eb2ad2265895a4634 /src/tag.c
parentf73319c0489e08e1277b80107729ac1f2ea8e7fd (diff)
downloadmpd-386c303121a8c53f11cc91c59bbe87f93a503b31.tar.gz
mpd-386c303121a8c53f11cc91c59bbe87f93a503b31.tar.xz
mpd-386c303121a8c53f11cc91c59bbe87f93a503b31.zip
tag: moved code to tag_print.c
Move everything which dumps a tag to a file descriptor to tag_print.c. This relaxes dependencies and splits the code into smaller parts.
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/tag.c b/src/tag.c
index 6e31a1651..248951e9d 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -17,8 +17,8 @@
*/
#include "tag.h"
+#include "tag_internal.h"
#include "tag_pool.h"
-#include "myfprintf.h"
#include "utils.h"
#include "utf8.h"
#include "log.h"
@@ -53,7 +53,7 @@ const char *mpdTagItemKeys[TAG_NUM_OF_ITEM_TYPES] = {
"Disc"
};
-static mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES];
+mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES];
void tag_lib_init(void)
{
@@ -104,29 +104,6 @@ void tag_lib_init(void)
free(temp);
}
-void tag_print_types(int fd)
-{
- int i;
-
- for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
- if (ignoreTagItems[i] == 0)
- fdprintf(fd, "tagtype: %s\n", mpdTagItemKeys[i]);
- }
-}
-
-void tag_print(int fd, const struct tag *tag)
-{
- int i;
-
- if (tag->time >= 0)
- fdprintf(fd, SONG_TIME "%i\n", tag->time);
-
- for (i = 0; i < tag->numOfItems; i++) {
- fdprintf(fd, "%s: %s\n", mpdTagItemKeys[tag->items[i]->type],
- tag->items[i]->value);
- }
-}
-
struct tag *tag_ape_load(const char *file)
{
struct tag *ret = NULL;