From d562ba5fbbe117585eaade40a8e9c6ef1bf7ca1f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 10:49:11 +0200 Subject: song: converted typedef Song to struct song Again, a data type which can be forward-declared. --- src/song.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/song.h') diff --git a/src/song.h b/src/song.h index fc50e70c1..658921324 100644 --- a/src/song.h +++ b/src/song.h @@ -30,21 +30,24 @@ struct client; -typedef struct _Song { +struct song { struct tag *tag; struct directory *parentDir; time_t mtime; char url[sizeof(size_t)]; -} Song; +}; -Song * +struct song * song_alloc(const char *url, struct directory *parent); -Song *newSong(const char *url, struct directory *parentDir); +struct song * +newSong(const char *url, struct directory *parentDir); -void freeJustSong(Song *); +void +freeJustSong(struct song *); -int updateSongInfo(Song * song); +int +updateSongInfo(struct song *song); /* * get_song_url - Returns a path of a song in UTF8-encoded form @@ -52,9 +55,11 @@ int updateSongInfo(Song * song); * buffer is assumed to be MPD_PATH_MAX or greater (including * terminating '\0'). */ -char *get_song_url(char *path_max_tmp, Song * song); +char * +get_song_url(char *path_max_tmp, struct song *song); -static inline int song_is_file(const Song *song) +static inline int +song_is_file(const struct song *song) { return !!song->parentDir; } -- cgit v1.2.3