aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.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/directory.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/directory.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/directory.c b/src/directory.c
index 75dae22dd..5e8f89f31 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -17,7 +17,7 @@
*/
#include "directory.h"
-
+#include "song.h"
#include "conf.h"
#include "log.h"
#include "ls.h"
@@ -448,7 +448,7 @@ int readDirectoryDB(void)
static int
traverseAllInSubDirectory(struct directory * directory,
- int (*forEachSong) (Song *, void *),
+ int (*forEachSong) (struct song *, void *),
int (*forEachDir) (struct directory *, void *),
void *data)
{
@@ -474,13 +474,13 @@ traverseAllInSubDirectory(struct directory * directory,
int
traverseAllIn(const char *name,
- int (*forEachSong) (Song *, void *),
+ int (*forEachSong) (struct song *, void *),
int (*forEachDir) (struct directory *, void *), void *data)
{
struct directory *directory;
if ((directory = getDirectory(name)) == NULL) {
- Song *song;
+ struct song *song;
if ((song = getSongFromDB(name)) && forEachSong) {
return forEachSong(song, data);
}
@@ -499,9 +499,10 @@ void directory_init(void)
stats.dbPlayTime = sumSongTimesIn(NULL);
}
-Song *getSongFromDB(const char *file)
+struct song *
+getSongFromDB(const char *file)
{
- Song *song = NULL;
+ struct song *song = NULL;
struct directory *directory;
char *dir = NULL;
char *duplicated = xstrdup(file);