aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.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/playlist.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 'src/playlist.c')
-rw-r--r--src/playlist.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 96b170b0a..fe172ebbf 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -21,6 +21,7 @@
#include "command.h"
#include "ls.h"
#include "tag.h"
+#include "song.h"
#include "song_print.h"
#include "client.h"
#include "conf.h"
@@ -140,7 +141,7 @@ void initPlaylist(void)
playlist_saveAbsolutePaths =
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
- playlist.songs = xmalloc(sizeof(Song *) * playlist_max_length);
+ playlist.songs = xmalloc(sizeof(struct song *) * playlist_max_length);
playlist.songMod = xmalloc(sizeof(uint32_t) * playlist_max_length);
playlist.order = xmalloc(sizeof(int) * playlist_max_length);
playlist.idToPosition = xmalloc(sizeof(int) * playlist_max_length *
@@ -452,7 +453,7 @@ enum playlist_result playlistId(struct client *client, int id)
static void swapSongs(int song1, int song2)
{
- Song *sTemp;
+ struct song *sTemp;
int iTemp;
sTemp = playlist.songs[song1];
@@ -554,7 +555,7 @@ static void clearPlayerQueue(void)
enum playlist_result addToPlaylist(const char *url, int *added_id)
{
- Song *song;
+ struct song *song;
DEBUG("add to playlist: %s\n", url);
@@ -569,7 +570,7 @@ enum playlist_result addToPlaylist(const char *url, int *added_id)
int addToStoredPlaylist(const char *url, const char *utf8file)
{
- Song *song;
+ struct song *song;
DEBUG("add to stored playlist: %s\n", url);
@@ -590,7 +591,8 @@ int addToStoredPlaylist(const char *url, const char *utf8file)
return ACK_ERROR_NO_EXIST;
}
-enum playlist_result addSongToPlaylist(Song * song, int *added_id)
+enum playlist_result
+addSongToPlaylist(struct song *song, int *added_id)
{
int id;
@@ -775,7 +777,8 @@ enum playlist_result deleteFromPlaylistById(int id)
return deleteFromPlaylist(song);
}
-void deleteASongFromPlaylist(const Song * song)
+void
+deleteASongFromPlaylist(const struct song *song)
{
int i;
@@ -877,8 +880,8 @@ enum playlist_result playPlaylistById(int id, int stopOnError)
static void syncCurrentPlayerDecodeMetadata(void)
{
- Song *songPlayer = playerCurrentDecodeSong();
- Song *song;
+ struct song *songPlayer = playerCurrentDecodeSong();
+ struct song *song;
int songNum;
char path_max_tmp[MPD_PATH_MAX];
@@ -1000,7 +1003,7 @@ void setPlaylistRepeatStatus(int status)
enum playlist_result moveSongInPlaylist(int from, int to)
{
int i;
- Song *tmpSong;
+ struct song *tmpSong;
int tmpId;
int currentSong;
@@ -1358,7 +1361,7 @@ int PlaylistInfo(struct client *client, const char *utf8file, int detail)
int wrote = 0;
if (detail) {
- Song *song = getSongFromDB(temp);
+ struct song *song = getSongFromDB(temp);
if (song) {
song_print_info(client, song);
wrote = 1;