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/song_print.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/song_print.c') 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; } -- cgit v1.2.3