aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 10:49:11 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 10:49:11 +0200
commitd562ba5fbbe117585eaade40a8e9c6ef1bf7ca1f (patch)
tree1e82f7b4854c5d15c4ab59c48120da02e4b41be9 /src/song.c
parent25f67da58c671885c86ecfd991f28ec82b6ce1e2 (diff)
downloadmpd-d562ba5fbbe117585eaade40a8e9c6ef1bf7ca1f.tar.gz
mpd-d562ba5fbbe117585eaade40a8e9c6ef1bf7ca1f.tar.xz
mpd-d562ba5fbbe117585eaade40a8e9c6ef1bf7ca1f.zip
song: converted typedef Song to struct song
Again, a data type which can be forward-declared.
Diffstat (limited to '')
-rw-r--r--src/song.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/song.c b/src/song.c
index 014490eca..c09a49cf0 100644
--- a/src/song.c
+++ b/src/song.c
@@ -28,11 +28,11 @@
#include "os_compat.h"
-Song *
+struct song *
song_alloc(const char *url, struct directory *parent)
{
size_t urllen;
- Song *song;
+ struct song *song;
assert(url);
urllen = strlen(url);
@@ -46,9 +46,10 @@ song_alloc(const char *url, struct directory *parent)
return song;
}
-Song *newSong(const char *url, struct directory *parentDir)
+struct song *
+newSong(const char *url, struct directory *parentDir)
{
- Song *song;
+ struct song *song;
assert(*url);
if (strchr(url, '\n')) {
@@ -79,14 +80,16 @@ Song *newSong(const char *url, struct directory *parentDir)
return song;
}
-void freeJustSong(Song * song)
+void
+freeJustSong(struct song *song)
{
if (song->tag)
tag_free(song->tag);
free(song);
}
-int updateSongInfo(Song * song)
+int
+updateSongInfo(struct song *song)
{
if (song_is_file(song)) {
struct decoder_plugin *plugin;
@@ -114,7 +117,8 @@ int updateSongInfo(Song * song)
return 0;
}
-char *get_song_url(char *path_max_tmp, Song *song)
+char *
+get_song_url(char *path_max_tmp, struct song *song)
{
if (!song)
return NULL;