aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-07-15 05:04:16 +0000
committerAvuton Olrich <avuton@gmail.com>2006-07-15 05:04:16 +0000
commit3ad41fdda63edee8d2acadbc564137939fc5d1ab (patch)
tree27ed6366f41943c7a7d425f07e59a3c36b5c68c7 /src/song.c
parentbe006b86ed2802cd76b5b39be8adbd2d9c3c4ce7 (diff)
downloadmpd-3ad41fdda63edee8d2acadbc564137939fc5d1ab.tar.gz
mpd-3ad41fdda63edee8d2acadbc564137939fc5d1ab.tar.xz
mpd-3ad41fdda63edee8d2acadbc564137939fc5d1ab.zip
[CLEANUP] Remove unused code
Cleanup whitespace->tabs git-svn-id: https://svn.musicpd.org/mpd/trunk@4347 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/song.c b/src/song.c
index 94d7896c6..ed27667b4 100644
--- a/src/song.c
+++ b/src/song.c
@@ -63,7 +63,7 @@ Song * newSong(char * url, int type, Directory * parentDir) {
assert(type == SONG_TYPE_URL || parentDir);
if(song->type == SONG_TYPE_FILE) {
- InputPlugin * plugin;
+ InputPlugin * plugin;
unsigned int next = 0;
char * song_url = getSongUrl(song);
char * abs_path = rmp2amp(utf8ToFsCharset(song_url));
@@ -115,7 +115,7 @@ Song * addSongToList(SongList * list, char * url, char * utf8path,
}
if(song==NULL) return NULL;
-
+
insertInList(list, song->url, (void *)song);
return song;
@@ -169,7 +169,7 @@ void writeSongInfoFromList(FILE * fp, SongList * list) {
myfprintf(fp,"%s\n",SONG_END);
}
-void insertSongIntoList(SongList * list, ListNode ** nextSongNode, char * key,
+static void insertSongIntoList(SongList * list, ListNode ** nextSongNode, char * key,
Song * song)
{
ListNode * nodeTemp;
@@ -266,7 +266,7 @@ void readSongInfoIntoList(FILE * fp, SongList * list, Directory * parentDir) {
exit(EXIT_FAILURE);
}
}
-
+
if(song) {
insertSongIntoList(list, &nextSongNode, song->url, song);
song = NULL;
@@ -281,7 +281,7 @@ void readSongInfoIntoList(FILE * fp, SongList * list, Directory * parentDir) {
int updateSongInfo(Song * song) {
if(song->type == SONG_TYPE_FILE) {
- InputPlugin * plugin;
+ InputPlugin * plugin;
unsigned int next = 0;
char * song_url = getSongUrl(song);
char * abs_path = rmp2amp(song_url);
@@ -292,26 +292,14 @@ int updateSongInfo(Song * song) {
while(!song->tag && (plugin = isMusic(song_url,
&(song->mtime), next++))) {
- song->tag = plugin->tagDupFunc(abs_path);
- }
+ song->tag = plugin->tagDupFunc(abs_path);
+ }
if(!song->tag || song->tag->time<0) return -1;
}
return 0;
}
-Song * songDup(Song * song) {
- Song * ret = malloc(sizeof(Song));
-
- ret->url = strdup(song->url);
- ret->mtime = song->mtime;
- ret->tag = mpdTagDup(song->tag);
- ret->type = song->type;
- ret->parentDir = song->parentDir;
-
- return ret;
-}
-
/* pass song = NULL to reset, we do this freeJustSong(), so that if
* we free and recreate this memory we make sure to print it correctly*/
char * getSongUrl(Song * song) {