aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_print.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:53:55 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:53:55 +0200
commitdc8b64fdef1f8bc4499eef3aca17ed336ea3569b (patch)
treeba98b059e544ddecd774bd4c97ce66898cba3be0 /src/song_print.c
parent5609a1fcd09c498fdcdfe0f535052e8d8c3ef05c (diff)
downloadmpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.tar.gz
mpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.tar.xz
mpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.zip
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.
Diffstat (limited to 'src/song_print.c')
-rw-r--r--src/song_print.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/song_print.c b/src/song_print.c
index d7bca662a..77741e768 100644
--- a/src/song_print.c
+++ b/src/song_print.c
@@ -19,34 +19,34 @@
#include "song_print.h"
#include "directory.h"
#include "tag_print.h"
-#include "myfprintf.h"
+#include "client.h"
-void printSongUrl(int fd, Song * song)
+void printSongUrl(struct client *client, Song * song)
{
if (song->parentDir && song->parentDir->path) {
- fdprintf(fd, "%s%s/%s\n", SONG_FILE,
- getDirectoryPath(song->parentDir), song->url);
+ client_printf(client, "%s%s/%s\n", SONG_FILE,
+ getDirectoryPath(song->parentDir), song->url);
} else {
- fdprintf(fd, "%s%s\n", SONG_FILE, song->url);
+ client_printf(client, "%s%s\n", SONG_FILE, song->url);
}
}
-int printSongInfo(int fd, Song * song)
+int printSongInfo(struct client *client, Song * song)
{
- printSongUrl(fd, song);
+ printSongUrl(client, song);
if (song->tag)
- tag_print(fd, song->tag);
+ tag_print(client, song->tag);
return 0;
}
-int printSongInfoFromList(int fd, SongList * list)
+int printSongInfoFromList(struct client *client, SongList * list)
{
ListNode *tempNode = list->firstNode;
while (tempNode != NULL) {
- printSongInfo(fd, (Song *) tempNode->data);
+ printSongInfo(client, (Song *) tempNode->data);
tempNode = tempNode->nextNode;
}