Commit 47fc08bf authored by Max Kellermann's avatar Max Kellermann

exclude: convert to C++

parent c0f2024a
...@@ -82,7 +82,6 @@ mpd_headers = \ ...@@ -82,7 +82,6 @@ mpd_headers = \
src/encoder_plugin.h \ src/encoder_plugin.h \
src/encoder_list.h \ src/encoder_list.h \
src/encoder_api.h \ src/encoder_api.h \
src/exclude.h \
src/fd_util.h \ src/fd_util.h \
src/gerror.h \ src/gerror.h \
src/glib_compat.h \ src/glib_compat.h \
...@@ -232,7 +231,7 @@ src_mpd_SOURCES = \ ...@@ -232,7 +231,7 @@ src_mpd_SOURCES = \
src/DatabasePlugin.hxx \ src/DatabasePlugin.hxx \
src/DatabaseVisitor.hxx \ src/DatabaseVisitor.hxx \
src/DatabaseSelection.cxx src/DatabaseSelection.hxx \ src/DatabaseSelection.cxx src/DatabaseSelection.hxx \
src/exclude.c \ src/ExcludeList.cxx src/ExcludeList.hxx \
src/fd_util.c \ src/fd_util.c \
src/fifo_buffer.c src/fifo_buffer.h \ src/fifo_buffer.c src/fifo_buffer.h \
src/growing_fifo.c src/growing_fifo.h \ src/growing_fifo.c src/growing_fifo.h \
......
...@@ -23,8 +23,11 @@ ...@@ -23,8 +23,11 @@
*/ */
#include "config.h" #include "config.h"
#include "exclude.h" #include "ExcludeList.hxx"
extern "C" {
#include "path.h" #include "path.h"
}
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
...@@ -69,7 +72,7 @@ void ...@@ -69,7 +72,7 @@ void
exclude_list_free(GSList *list) exclude_list_free(GSList *list)
{ {
while (list != NULL) { while (list != NULL) {
GPatternSpec *pattern = list->data; GPatternSpec *pattern = (GPatternSpec *)list->data;
g_pattern_spec_free(pattern); g_pattern_spec_free(pattern);
list = g_slist_remove(list, list->data); list = g_slist_remove(list, list->data);
} }
...@@ -83,7 +86,7 @@ exclude_list_check(GSList *list, const char *name_fs) ...@@ -83,7 +86,7 @@ exclude_list_check(GSList *list, const char *name_fs)
/* XXX include full path name in check */ /* XXX include full path name in check */
for (; list != NULL; list = list->next) { for (; list != NULL; list = list->next) {
GPatternSpec *pattern = list->data; GPatternSpec *pattern = (GPatternSpec *)list->data;
if (g_pattern_match_string(pattern, name_fs)) if (g_pattern_match_string(pattern, name_fs))
return true; return true;
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
#include <glib.h> #include <glib.h>
#include <stdbool.h>
/** /**
* Loads and parses a .mpdignore file. * Loads and parses a .mpdignore file.
*/ */
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "song.h" #include "song.h"
#include "PlaylistVector.hxx" #include "PlaylistVector.hxx"
#include "Mapper.hxx" #include "Mapper.hxx"
#include "ExcludeList.hxx"
extern "C" { extern "C" {
#include "exclude.h"
#include "uri.h" #include "uri.h"
#include "path.h" #include "path.h"
#include "playlist_list.h" #include "playlist_list.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment