Max Kellermann
ba96920a52
path: replaced mpd_basename() with g_path_get_basename()
...
GLib's g_path_get_basename() is much more reliable than
mpd_basename(). The latter could be tricked into an assertion
failure.
2008-10-20 22:18:12 +02:00
Eric Wong
06c8a9ed0b
{dir,song}vec: fix off-by-one errors in {dir,song}vec_delete
...
Found by Valgrind while looking for another bug...
Hmm.. I should really just make this code generic since
they're duplicated...
2008-10-14 11:10:00 +02:00
Max Kellermann
69617438a9
dirvec: dirvec_find() compares basename
...
It is invalid to pass a path with the wrong dirname to dirvec_find().
To be able to find a subdirectory only by its basename, compare only
the basename of both paths.
2008-10-13 16:33:04 +02:00
Max Kellermann
a5480108f8
dirvec: constant pointers in dirvec_find()
...
dirvec_find() does not modify the object, thus it should get a const
pointer.
2008-10-09 15:24:34 +02:00
Max Kellermann
68977af6e0
directory: eliminate CamelCase
...
CamelCase is ugly, rename the functions.
2008-10-08 11:07:58 +02:00
Max Kellermann
71351160b1
don't include os_compat.h
...
When there are standardized headers, use these instead of the bloated
os_compat.h.
2008-10-08 10:49:29 +02:00
Max Kellermann
25f67da58c
directory: converted typedef Directory to struct directory
...
The struct can be forward-declared by other headers, which relaxes the
header dependencies.
2008-10-08 10:49:05 +02:00
Max Kellermann
4cfd356e12
dirvec: moved code to dirvec.c
...
Having all functions as static (non-inline) functions generates GCC
warnings, and duplicates binary code across several object files.
Most of dirvec's methods are too complex for becoming inline
functions. Move them all to dirvec.c and publish the prototypes in
dirvec.h.
2008-10-08 06:55:10 +02:00