diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 10:49:11 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:47 -0700 |
commit | 79e8abb461fa848cce3717333ee5cfa55ee91c71 (patch) | |
tree | f8c3cc49a2503ebedeedcdec71e2d2eb91e1db96 /src/update.c | |
parent | c84c73df00e5e1710d84fdb4be6352d849da8f2b (diff) | |
download | mpd-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 'src/update.c')
-rw-r--r-- | src/update.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/update.c b/src/update.c index 00561cab1..674ad0519 100644 --- a/src/update.c +++ b/src/update.c @@ -45,7 +45,7 @@ static const int update_task_id_max = 1 << 15; static int update_task_id; -static Song *delete; +static struct mpd_song *delete; static struct condition delete_cond; @@ -61,7 +61,7 @@ static void directory_set_stat(struct directory *dir, const struct stat *st) dir->stat = 1; } -static void delete_song(struct directory *dir, Song *del) +static void delete_song(struct directory *dir, struct mpd_song *del) { /* first, prevent traversers in main task from getting this */ songvec_delete(&dir->songs, del); @@ -85,7 +85,7 @@ struct delete_data { }; /* passed to songvec_for_each */ -static int delete_song_if_removed(Song *song, void *_data) +static int delete_song_if_removed(struct mpd_song *song, void *_data) { struct delete_data *data = _data; @@ -192,7 +192,7 @@ addToDirectory(struct directory *directory, const char *name) } if (S_ISREG(st.st_mode) && hasMusicSuffix(name, 0) && isMusic(name, NULL, 0)) { - Song *song; + struct mpd_song *song; const char *shortname = mpd_basename(name); if (!(song = newSong(shortname, directory))) @@ -212,7 +212,7 @@ addToDirectory(struct directory *directory, const char *name) static enum update_return updateInDirectory(struct directory *directory, const char *name) { - Song *song; + struct mpd_song *song; struct stat st; if (myStat(name, &st)) @@ -307,7 +307,7 @@ static struct directory * addDirectoryPathToDB(const char *utf8path) char *parent; struct directory *parentDirectory; struct directory *directory; - Song *conflicting; + struct mpd_song *conflicting; parent = parent_path(path_max_tmp, utf8path); @@ -365,7 +365,7 @@ static enum update_return updatePath(const char *utf8path) { struct directory *directory; struct directory *parentDirectory; - Song *song; + struct mpd_song *song; time_t mtime; enum update_return ret = UPDATE_RETURN_NOUPDATE; char path_max_tmp[MPD_PATH_MAX]; |