From a67facd051d817dd53bac1aebfc554b07420e8cd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 7 Oct 2008 02:06:01 -0700 Subject: song: Add song_print_url_x It'll be handy for passing throug songvec_for_each like song_print_info_x. --- src/song.c | 5 +++++ src/song.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/song.c b/src/song.c index 71191c149..f967e3e17 100644 --- a/src/song.c +++ b/src/song.c @@ -117,6 +117,11 @@ int song_print_info_x(Song * song, void *data) return song_print_info(song, (int)(size_t)data); } +int song_print_url_x(Song * song, void *data) +{ + return song_print_url(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 e65f70f38..d8189d42c 100644 --- a/src/song.h +++ b/src/song.h @@ -57,6 +57,9 @@ int updateSongInfo(Song * song); ssize_t song_print_url(Song * song, int fd); +/* like song_print_url_x, but casts data into an fd first */ +int song_print_url_x(Song * song, void *data); + /* * get_song_url - Returns a path of a song in UTF8-encoded form * path_max_tmp is the argument that the URL is written to, this -- cgit v1.2.3