Code

filelist: drop "mpdclient" prefix
authorMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 14:22:44 +0000 (16:22 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 14:22:44 +0000 (16:22 +0200)
The separate filelist library does not depend on mpdclient, so the
prefix is superfluous.

src/filelist.c
src/filelist.h
src/mpdclient.c
src/screen_artist.c
src/screen_browser.c
src/screen_file.c
src/screen_search.c
src/utils.c

index 7b45416062038f778f765bc1a6f17923860f21e1..55b4cfabf07e9f8f1a1cb0ab8e1c055845940962 100644 (file)
@@ -24,7 +24,7 @@
 #include <assert.h>
 
 void
-mpdclient_filelist_free(struct filelist *filelist)
+filelist_free(struct filelist *filelist)
 {
        GList *list = g_list_first(filelist->list);
 
@@ -47,8 +47,7 @@ mpdclient_filelist_free(struct filelist *filelist)
 }
 
 struct filelist_entry *
-mpdclient_filelist_find_song(struct filelist *fl,
-                            const struct mpd_song *song)
+filelist_find_song(struct filelist *fl, const struct mpd_song *song)
 {
        GList *list = g_list_first(fl->list);
 
index 81ff5a37c0547408b0041a98202b23c0bac74688..3b33eb44960fd75eb29fb6caf4d6222d0daf91c1 100644 (file)
@@ -44,10 +44,9 @@ typedef struct filelist {
 } mpdclient_filelist_t;
 
 void
-mpdclient_filelist_free(struct filelist *filelist);
+filelist_free(struct filelist *filelist);
 
 struct filelist_entry *
-mpdclient_filelist_find_song(struct filelist *flist,
-                            const struct mpd_song *song);
+filelist_find_song(struct filelist *flist, const struct mpd_song *song);
 
 #endif
index 2f5591f609154b2c1446f7e852af1b9f6ec15f2c..5a630fb2bd2a3b67c3033b00b3df0a69467c3ac1 100644 (file)
@@ -808,7 +808,7 @@ mpdclient_filelist_search_utf8(mpdclient_t *c,
        }
 
        if (mpdclient_finish_command(c)) {
-               mpdclient_filelist_free(filelist);
+               filelist_free(filelist);
                return NULL;
        }
 
@@ -841,7 +841,7 @@ mpdclient_filelist_update(mpdclient_t *c, mpdclient_filelist_t *filelist)
     {    
       gchar *path = g_strdup(filelist->path);
 
-      mpdclient_filelist_free(filelist);
+      filelist_free(filelist);
       filelist = mpdclient_filelist_get(c, path);
       g_free(path);
       return filelist;
index c5d5a268b11b42d0dde51e0e5114f0a70c87fce1..61f05cc51d26f2a85eec56a8f352688888065b73 100644 (file)
@@ -102,7 +102,7 @@ update_metalist(mpdclient_t *c, char *m_artist, char *m_album)
                metalist = string_list_free(metalist);
        if (browser.filelist) {
                mpdclient_remove_playlist_callback(c, playlist_changed_callback);
-               mpdclient_filelist_free(browser.filelist);
+               filelist_free(browser.filelist);
                browser.filelist = NULL;
        }
 
@@ -186,7 +186,7 @@ static void
 quit(void)
 {
        if (browser.filelist)
-               mpdclient_filelist_free(browser.filelist);
+               filelist_free(browser.filelist);
        if (metalist)
                string_list_free(metalist);
        g_free(artist);
@@ -287,7 +287,7 @@ add_query(mpdclient_t *c, int table, char *_filter)
        addlist = mpdclient_filelist_search_utf8(c, TRUE, table, _filter);
        if (addlist) {
                mpdclient_filelist_add_all(c, addlist);
-               mpdclient_filelist_free(addlist);
+               filelist_free(addlist);
        }
 }
 
index 828cbe21ca6c2749ffda7b909aeda3002e38d6ca..47fda6abe4da7c88bfe14117ae31ba283a56064f 100644 (file)
@@ -54,7 +54,7 @@ clear_highlights(mpdclient_filelist_t *fl)
 static void
 set_highlight(mpdclient_filelist_t *fl, mpd_Song *song, int highlight)
 {
-       struct filelist_entry *entry = mpdclient_filelist_find_song(fl, song);
+       struct filelist_entry *entry = filelist_find_song(fl, song);
        mpd_InfoEntity *entity;
 
        if (entry == NULL)
@@ -201,7 +201,7 @@ browser_change_directory(struct screen_browser *browser, mpdclient_t *c,
        } else
                return -1;
 
-       mpdclient_filelist_free(browser->filelist);
+       filelist_free(browser->filelist);
        browser->filelist = mpdclient_filelist_get(c, path);
        sync_highlights(c, browser->filelist);
        list_window_check_selected(browser->lw, browser->filelist->length);
index ea20f950695677780bfd1c6dc8f95e2e80e40803..3df1a3fdc4cfd62b2fd5dfdccea7bdbb7cf9e9ce 100644 (file)
@@ -133,7 +133,7 @@ static void
 browse_exit(void)
 {
        if (browser.filelist)
-               mpdclient_filelist_free(browser.filelist);
+               filelist_free(browser.filelist);
        list_window_free(browser.lw);
        list_window_free_state(browser.lw_state);
 }
index 549221e74bbf7f8ef815b33039f7bc439e105537..822729ad43c7fd961eb6667948ec2c70fd96f4ba 100644 (file)
@@ -167,7 +167,7 @@ search_clear(mpd_unused screen_t *screen, mpdclient_t *c,
 {
        if (browser.filelist) {
                mpdclient_remove_playlist_callback(c, playlist_changed_callback);
-               mpdclient_filelist_free(browser.filelist);
+               filelist_free(browser.filelist);
                browser.filelist = NULL;
        }
        if (clear_pattern && pattern) {
@@ -292,7 +292,7 @@ search_advanced_query(char *query, mpdclient_t *c)
                }
 
                if (mpdclient_finish_command(c) && fl)
-                       mpdclient_filelist_free(fl);
+                       filelist_free(fl);
 
                fl->updated = TRUE;
        }
@@ -355,7 +355,7 @@ quit(void)
        if (search_history)
                string_list_free(search_history);
        if (browser.filelist)
-               mpdclient_filelist_free(browser.filelist);
+               filelist_free(browser.filelist);
        list_window_free(browser.lw);
 
        if (pattern) {
index 9241296f69704eb09805a27b90f09629eadb33b0..65eaceca2191f4a0a6dc37dcf957e499124b8196 100644 (file)
@@ -116,6 +116,6 @@ gcmp_list_from_path(mpdclient_t *c, const gchar *path, GList *list, gint types)
                flist = flist->next;
        }
 
-       mpdclient_filelist_free(filelist);
+       filelist_free(filelist);
        return list;
 }