aboutsummaryrefslogtreecommitdiffstats
path: root/src/songvec.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-07 02:25:27 -0700
committerEric Wong <normalperson@yhbt.net>2008-10-07 02:37:58 -0700
commita340bf0dee5bf134770f5d5f532efa90cdb08b3c (patch)
tree85b36b35ebf08c32bf3b1ae3d0621143b0fe660a /src/songvec.c
parent99841dca7bdc7e85df88800df86e22bb70ed683d (diff)
downloadmpd-a340bf0dee5bf134770f5d5f532efa90cdb08b3c.tar.gz
mpd-a340bf0dee5bf134770f5d5f532efa90cdb08b3c.tar.xz
mpd-a340bf0dee5bf134770f5d5f532efa90cdb08b3c.zip
directory: use songvec_for_each for iterators
Get rid of songvec_write so we can enforce proper locking
Diffstat (limited to '')
-rw-r--r--src/songvec.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/songvec.c b/src/songvec.c
index 640eff0a8..cf0991029 100644
--- a/src/songvec.c
+++ b/src/songvec.c
@@ -104,34 +104,3 @@ int songvec_for_each(struct songvec *sv, int (*fn)(Song *, void *), void *arg)
return 0;
}
-
-int songvec_write(struct songvec *sv, int fd, int extra)
-{
- int i;
- Song **sp = sv->base;
-
- if (extra) {
- if (fdprintf(fd, SONG_BEGIN "\n") < 0)
- return -1;
-
- for (i = sv->nr; --i >= 0; ) {
- Song *song = *sp++;
- if (fdprintf(fd, SONG_KEY "%s\n", song->url) < 0)
- return -1;
- if (song_print_info(song, fd) < 0)
- return -1;
- if (fdprintf(fd,
- SONG_MTIME "%li\n", (long)song->mtime) < 0)
- return -1;
- }
-
- if (fdprintf(fd, SONG_END "\n") < 0)
- return -1;
- } else {
- for (i = sv->nr; --i >= 0;)
- if (song_print_info(*sp++, fd) < 0)
- return -1;
- }
-
- return 0;
-}