From dc8b64fdef1f8bc4499eef3aca17ed336ea3569b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Sep 2008 13:53:55 +0200 Subject: pass "struct client" to dbUtils.c, song.c, tag_print.c Don't pass the raw file descriptor around. This migration patch is rather large, because all of the sources have inter dependencies - we have to change all of them at the same time. --- src/tag_print.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/tag_print.c') diff --git a/src/tag_print.c b/src/tag_print.c index c5d50880f..0ed107895 100644 --- a/src/tag_print.c +++ b/src/tag_print.c @@ -19,28 +19,30 @@ #include "tag_print.h" #include "tag.h" #include "tag_internal.h" -#include "myfprintf.h" +#include "client.h" #include "song.h" -void tag_print_types(int fd) +void tag_print_types(struct client *client) { int i; for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) { if (ignoreTagItems[i] == 0) - fdprintf(fd, "tagtype: %s\n", mpdTagItemKeys[i]); + client_printf(client, "tagtype: %s\n", + mpdTagItemKeys[i]); } } -void tag_print(int fd, const struct tag *tag) +void tag_print(struct client *client, const struct tag *tag) { int i; if (tag->time >= 0) - fdprintf(fd, SONG_TIME "%i\n", tag->time); + client_printf(client, 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); + client_printf(client, "%s: %s\n", + mpdTagItemKeys[tag->items[i]->type], + tag->items[i]->value); } } -- cgit v1.2.3