From 9bda68824ebd1b87d5ab28802ab4c310bc9d148a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 6 Oct 2008 01:44:53 -0700 Subject: song: add print_song_info_x for iterators tha pass void * traverseAllIn will be modified to take < 0 as errors instead of non-zero... --- src/song.c | 5 +++++ src/song.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/song.c b/src/song.c index 61fe78a43..71191c149 100644 --- a/src/song.c +++ b/src/song.c @@ -112,6 +112,11 @@ ssize_t song_print_info(Song *song, int fd) return ret; } +int song_print_info_x(Song * song, void *data) +{ + return song_print_info(song, (int)(size_t)data); +} + static void insertSongIntoList(struct songvec *sv, Song *newsong) { Song *existing = songvec_find(sv, newsong->url); diff --git a/src/song.h b/src/song.h index 3419cd43e..e65f70f38 100644 --- a/src/song.h +++ b/src/song.h @@ -48,6 +48,9 @@ void freeJustSong(Song *); ssize_t song_print_info(Song * song, int fd); +/* like song_print_info, but casts data into an fd first */ +int song_print_info_x(Song * song, void *data); + void readSongInfoIntoList(FILE * fp, struct _Directory *parent); int updateSongInfo(Song * song); -- cgit v1.2.3