aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-07 22:06:59 +0200
committerMax Kellermann <max@duempel.org>2008-10-07 22:06:59 +0200
commite19f6905d9c209d7587177dbfdbc58869a2167cc (patch)
treecd48ac5c2df14517351de7fa00b4e30d316deca6
parent0d34815f6cfe1a75467e7c8f9406ff15bcbe10ba (diff)
downloadmpd-e19f6905d9c209d7587177dbfdbc58869a2167cc.tar.gz
mpd-e19f6905d9c209d7587177dbfdbc58869a2167cc.tar.xz
mpd-e19f6905d9c209d7587177dbfdbc58869a2167cc.zip
song: replace printSong* with song_print_*
This make argument order more consistent for iterators. Additionally, these now return ssize_t results for error checking.
Diffstat (limited to '')
-rw-r--r--src/dbUtils.c12
-rw-r--r--src/playlist.c4
-rw-r--r--src/song_print.c8
-rw-r--r--src/song_print.h4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index ac324062f..29e92494e 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -68,7 +68,7 @@ static int printDirectoryInDirectory(Directory * directory, void *data)
static int printSongInDirectory(Song * song, mpd_unused void *data)
{
struct client *client = data;
- printSongUrl(client, song);
+ song_print_url(client, song);
return 0;
}
@@ -83,7 +83,7 @@ static int searchInDirectory(Song * song, void *_data)
LocateTagItemArray *array = &data->array;
if (strstrSearchTags(song, array->numItems, array->items))
- printSongInfo(data->client, song);
+ song_print_info(data->client, song);
return 0;
}
@@ -124,7 +124,7 @@ static int findInDirectory(Song * song, void *_data)
LocateTagItemArray *array = &data->array;
if (tagItemsFoundAndMatches(song, array->numItems, array->items))
- printSongInfo(data->client, song);
+ song_print_info(data->client, song);
return 0;
}
@@ -221,8 +221,8 @@ int addAllInToStoredPlaylist(const char *name, const char *utf8file)
static int directoryPrintSongInfo(Song * song, void *data)
{
struct client *client = data;
-
- return printSongInfo(client, song);
+ song_print_info(client, song);
+ return 0;
}
static int sumSongTime(Song * song, void *data)
@@ -285,7 +285,7 @@ static void visitTag(struct client *client, struct strset *set,
struct tag *tag = song->tag;
if (tagType == LOCATE_TAG_FILE_TYPE) {
- printSongUrl(client, song);
+ song_print_url(client, song);
return;
}
diff --git a/src/playlist.c b/src/playlist.c
index b6329cfde..96b170b0a 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -365,7 +365,7 @@ void readPlaylistState(FILE *fp)
static void printPlaylistSongInfo(struct client *client, int song)
{
- printSongInfo(client, playlist.songs[song]);
+ song_print_info(client, playlist.songs[song]);
client_printf(client, "Pos: %i\nId: %i\n", song, playlist.positionToId[song]);
}
@@ -1360,7 +1360,7 @@ int PlaylistInfo(struct client *client, const char *utf8file, int detail)
if (detail) {
Song *song = getSongFromDB(temp);
if (song) {
- printSongInfo(client, song);
+ song_print_info(client, song);
wrote = 1;
}
}
diff --git a/src/song_print.c b/src/song_print.c
index f754f2348..3b4275472 100644
--- a/src/song_print.c
+++ b/src/song_print.c
@@ -22,7 +22,7 @@
#include "tag_print.h"
#include "client.h"
-void printSongUrl(struct client *client, Song * song)
+void song_print_url(struct client *client, Song * song)
{
if (song->parentDir && song->parentDir->path) {
client_printf(client, "%s%s/%s\n", SONG_FILE,
@@ -32,9 +32,9 @@ void printSongUrl(struct client *client, Song * song)
}
}
-int printSongInfo(struct client *client, Song * song)
+int song_print_info(struct client *client, Song * song)
{
- printSongUrl(client, song);
+ song_print_url(client, song);
if (song->tag)
tag_print(client, song->tag);
@@ -48,7 +48,7 @@ int songvec_print(struct client *client, const struct songvec *sv)
Song **sp = sv->base;
for (i = sv->nr; --i >= 0;)
- if (printSongInfo(client, *sp++) < 0)
+ if (song_print_info(client, *sp++) < 0)
return -1;
return 0;
diff --git a/src/song_print.h b/src/song_print.h
index bc7560e88..78537f064 100644
--- a/src/song_print.h
+++ b/src/song_print.h
@@ -23,10 +23,10 @@
struct songvec;
-int printSongInfo(struct client *client, Song * song);
+int song_print_info(struct client *client, Song * song);
int songvec_print(struct client *client, const struct songvec *sv);
-void printSongUrl(struct client *client, Song * song);
+void song_print_url(struct client *client, Song * song);
#endif