aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 10:49:11 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:47 -0700
commit79e8abb461fa848cce3717333ee5cfa55ee91c71 (patch)
treef8c3cc49a2503ebedeedcdec71e2d2eb91e1db96 /src/dbUtils.c
parentc84c73df00e5e1710d84fdb4be6352d849da8f2b (diff)
downloadmpd-79e8abb461fa848cce3717333ee5cfa55ee91c71.tar.gz
mpd-79e8abb461fa848cce3717333ee5cfa55ee91c71.tar.xz
mpd-79e8abb461fa848cce3717333ee5cfa55ee91c71.zip
song: converted typedef Song to struct song
Again, a data type which can be forward-declared. [ew: * used "struct mpd_song" instead to avoid token duplication (like I did with "struct mpd_tag") as there's no good abbreviation for "song" and identical tokens on the same line don't read well * rewritten using perl -i -p -e 's/\bSong\b/struct mpd_song/g' src/*.[ch] since it was too hard to merge * also, I don't care much for forward declarations ]
Diffstat (limited to '')
-rw-r--r--src/dbUtils.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 4c52fffc2..eb11ff19e 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -68,7 +68,7 @@ struct search_data {
LocateTagItemArray array;
};
-static int searchInDirectory(Song * song, void *_data)
+static int searchInDirectory(struct mpd_song * song, void *_data)
{
struct search_data *data = _data;
int fd = data->fd;
@@ -110,7 +110,7 @@ int searchForSongsIn(int fd, const char *name, int numItems,
return ret;
}
-static int findInDirectory(Song * song, void *_data)
+static int findInDirectory(struct mpd_song * song, void *_data)
{
struct search_data *data = _data;
int fd = data->fd;
@@ -139,7 +139,7 @@ static void printSearchStats(int fd, SearchStats *stats)
fdprintf(fd, "playtime: %li\n", stats->playTime);
}
-static int searchStatsInDirectory(Song * song, void *data)
+static int searchStatsInDirectory(struct mpd_song * song, void *data)
{
SearchStats *stats = data;
@@ -177,7 +177,8 @@ int printAllIn(int fd, const char *name)
printDirectoryInDirectory, (void*)(size_t)fd);
}
-static int directoryAddSongToPlaylist(Song * song, mpd_unused void *data)
+static int
+directoryAddSongToPlaylist(struct mpd_song * song, mpd_unused void *data)
{
return addSongToPlaylist(song, NULL);
}
@@ -186,7 +187,7 @@ struct add_data {
const char *path;
};
-static int directoryAddSongToStoredPlaylist(Song *song, void *_data)
+static int directoryAddSongToStoredPlaylist(struct mpd_song *song, void *_data)
{
struct add_data *data = _data;
@@ -209,7 +210,7 @@ int addAllInToStoredPlaylist(const char *name, const char *utf8file)
&data);
}
-static int sumSongTime(Song * song, void *data)
+static int sumSongTime(struct mpd_song * song, void *data)
{
unsigned long *sum_time = (unsigned long *)data;
@@ -263,7 +264,7 @@ static void freeListCommandItem(ListCommandItem * item)
}
static void visitTag(int fd, struct strset *set,
- Song * song, enum tag_type tagType)
+ struct mpd_song * song, enum tag_type tagType)
{
int i;
struct mpd_tag *tag = song->tag;
@@ -291,7 +292,7 @@ struct list_tags_data {
struct strset *set;
};
-static int listUniqueTagsInDirectory(Song * song, void *_data)
+static int listUniqueTagsInDirectory(struct mpd_song * song, void *_data)
{
struct list_tags_data *data = _data;
ListCommandItem *item = data->item;
@@ -348,7 +349,7 @@ static int sumSavedFilenameMemoryInDirectory(struct directory *dir, void *data)
return 0;
}
-static int sumSavedFilenameMemoryInSong(Song * song, void *data)
+static int sumSavedFilenameMemoryInSong(struct mpd_song * song, void *data)
{
int *sum = data;