diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-06 01:44:53 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-06 01:44:53 -0700 |
commit | 9bda68824ebd1b87d5ab28802ab4c310bc9d148a (patch) | |
tree | 5313fbb46b5012e09a874abf3cd22f7e03d6a6ff /src | |
parent | 36c0254a850bf3b24cfd67175cd17bc6afa6035b (diff) | |
download | mpd-9bda68824ebd1b87d5ab28802ab4c310bc9d148a.tar.gz mpd-9bda68824ebd1b87d5ab28802ab4c310bc9d148a.tar.xz mpd-9bda68824ebd1b87d5ab28802ab4c310bc9d148a.zip |
song: add print_song_info_x for iterators tha pass void *
traverseAllIn will be modified to take < 0 as errors instead of
non-zero...
Diffstat (limited to 'src')
-rw-r--r-- | src/song.c | 5 | ||||
-rw-r--r-- | src/song.h | 3 |
2 files changed, 8 insertions, 0 deletions
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); |