aboutsummaryrefslogtreecommitdiffstats
path: root/src/filelist.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* filelist: added filelist_find_directory()Max Kellermann2008-10-031-0/+19
| | | | | The function filelist_find_directory() will be useful for the following patch.
* filelist: removed attribute "updated"Max Kellermann2008-09-251-1/+0
| | | | | Since all screen updating is now on demand, we don't need this flag anymore.
* filelist: fix segfault during filelist_sort()Max Kellermann2008-09-191-1/+13
| | | | | | | When I converted the filelist from GList to GPtrArray, I missed that the GCompareFunc does not actually get the pointers from g_ptr_array_sort(), but pointers to the pointers... run g_ptr_array_sort_with_data() instead with a wrapper function.
* filelist: free entries with g_slice_free()Max Kellermann2008-09-191-2/+2
| | | | | Somehow I forgot about changing free() to g_slice_free() in the previous patch...
* filelist: allocate entries with g_slice_alloc()Max Kellermann2008-09-191-4/+2
| | | | | In this case, slices are faster. Also fix a memory leak in filelist_prepend() which I simply forgot about in the last patch set.
* filelist: use GPtrArray instead of GListMax Kellermann2008-09-191-26/+31
| | | | | Since we do a lot of indexed accesses to the filelist, a linked list doesn't seem appropriate. Use GPtrArray instead.
* filelist: provide more functions for working with a filelistMax Kellermann2008-09-191-0/+56
| | | | Avoid direct accesses to the filelist struct, provide an API for that.
* filelist: drop "mpdclient" prefixMax Kellermann2008-09-191-3/+2
| | | | | The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
* filelist: song must not be NULLMax Kellermann2008-09-191-1/+4
| | | | | A caller must not pass NULL to mpdclient_filelist_find_song(). Replace the check with an assertion.
* mpdclient: moved code to filelist.cMax Kellermann2008-09-191-0/+69
Move everything which is solely filelist related to filelist.c and filelist.h. Fix the indentation of that file, and provide the struct name "filelist". Don't clear data in mpdclient_filelist_free() before calling g_free(). Constify the "song" parameter to mpdclient_filelist_find_song().