summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f0e91f2)
raw | patch | inline | side by side (parent: f0e91f2)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 17 Mar 2017 21:43:28 +0000 (22:43 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 17 Mar 2017 21:43:28 +0000 (22:43 +0100) |
src/mpdclient.c | patch | blob | history | |
src/mpdclient.h | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index f0076b6047442e4682097da63883a1ae9029a090..548ff5971343d29b1564e85a6921b4a98cd1ab53 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
#define BUFSIZE 1024
-/* sort by song format */
-gint
-compare_filelistentry_format(gconstpointer filelist_entry1,
- gconstpointer filelist_entry2,
- const char *song_format)
-{
- const struct mpd_entity *e1 =
- ((const struct filelist_entry *)filelist_entry1)->entity;
- const struct mpd_entity *e2 =
- ((const struct filelist_entry *)filelist_entry2)->entity;
-
- int n = 0;
- if (e1 && e2 &&
- mpd_entity_get_type(e1) == MPD_ENTITY_TYPE_SONG &&
- mpd_entity_get_type(e2) == MPD_ENTITY_TYPE_SONG) {
- char key1[BUFSIZE], key2[BUFSIZE];
- strfsong(key1, BUFSIZE, song_format, mpd_entity_get_song(e1));
- strfsong(key2, BUFSIZE, song_format, mpd_entity_get_song(e2));
- n = strcmp(key1,key2);
- }
-
- return n;
-}
-
-
/****************************************************************************/
/*** mpdclient functions ****************************************************/
/****************************************************************************/
diff --git a/src/mpdclient.h b/src/mpdclient.h
index f7ec9260e3dfea229025232557e2f6862619199d..9314f7ac33fb1f22ea1068417d0c72b8d7900fb8 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
bool
mpdclient_filelist_add_all(struct mpdclient *c, struct filelist *fl);
-/* sort by song format */
-gcc_pure
-gint compare_filelistentry_format(gconstpointer filelist_entry1,
- gconstpointer filelist_entry2,
- const char *song_format);
-
#endif