aboutsummaryrefslogtreecommitdiffstats
path: root/src/filelist.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-10-03filelist: added filelist_find_directory()Max Kellermann1-0/+19
The function filelist_find_directory() will be useful for the following patch.
2008-09-25filelist: removed attribute "updated"Max Kellermann1-1/+0
Since all screen updating is now on demand, we don't need this flag anymore.
2008-09-19filelist: fix segfault during filelist_sort()Max Kellermann1-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.
2008-09-19filelist: free entries with g_slice_free()Max Kellermann1-2/+2
Somehow I forgot about changing free() to g_slice_free() in the previous patch...
2008-09-19filelist: allocate entries with g_slice_alloc()Max Kellermann1-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.
2008-09-19filelist: use GPtrArray instead of GListMax Kellermann1-26/+31
Since we do a lot of indexed accesses to the filelist, a linked list doesn't seem appropriate. Use GPtrArray instead.
2008-09-19filelist: provide more functions for working with a filelistMax Kellermann1-0/+56
Avoid direct accesses to the filelist struct, provide an API for that.
2008-09-19filelist: drop "mpdclient" prefixMax Kellermann1-3/+2
The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
2008-09-19filelist: song must not be NULLMax Kellermann1-1/+4
A caller must not pass NULL to mpdclient_filelist_find_song(). Replace the check with an assertion.
2008-09-19mpdclient: moved code to filelist.cMax Kellermann1-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().