aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-03 09:51:35 +0100
committerMax Kellermann <max@duempel.org>2013-01-03 10:02:33 +0100
commit47fc08bffe94d33c88caafd084fa24e31e902798 (patch)
tree6b73aa3f6789fc82100abdf2d1118acfd5666ef5
parentc0f2024a2eebaa156f3c9ddf55f58e00ce5cee8e (diff)
downloadmpd-47fc08bffe94d33c88caafd084fa24e31e902798.tar.gz
mpd-47fc08bffe94d33c88caafd084fa24e31e902798.tar.xz
mpd-47fc08bffe94d33c88caafd084fa24e31e902798.zip
exclude: convert to C++
Diffstat (limited to '')
-rw-r--r--Makefile.am3
-rw-r--r--src/ExcludeList.cxx (renamed from src/exclude.c)9
-rw-r--r--src/ExcludeList.hxx (renamed from src/exclude.h)2
-rw-r--r--src/UpdateWalk.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index fb1ff80f2..dd8b58952 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,7 +82,6 @@ mpd_headers = \
src/encoder_plugin.h \
src/encoder_list.h \
src/encoder_api.h \
- src/exclude.h \
src/fd_util.h \
src/gerror.h \
src/glib_compat.h \
@@ -232,7 +231,7 @@ src_mpd_SOURCES = \
src/DatabasePlugin.hxx \
src/DatabaseVisitor.hxx \
src/DatabaseSelection.cxx src/DatabaseSelection.hxx \
- src/exclude.c \
+ src/ExcludeList.cxx src/ExcludeList.hxx \
src/fd_util.c \
src/fifo_buffer.c src/fifo_buffer.h \
src/growing_fifo.c src/growing_fifo.h \
diff --git a/src/exclude.c b/src/ExcludeList.cxx
index fecc859cb..e71a99203 100644
--- a/src/exclude.c
+++ b/src/ExcludeList.cxx
@@ -23,8 +23,11 @@
*/
#include "config.h"
-#include "exclude.h"
+#include "ExcludeList.hxx"
+
+extern "C" {
#include "path.h"
+}
#include <assert.h>
#include <string.h>
@@ -69,7 +72,7 @@ void
exclude_list_free(GSList *list)
{
while (list != NULL) {
- GPatternSpec *pattern = list->data;
+ GPatternSpec *pattern = (GPatternSpec *)list->data;
g_pattern_spec_free(pattern);
list = g_slist_remove(list, list->data);
}
@@ -83,7 +86,7 @@ exclude_list_check(GSList *list, const char *name_fs)
/* XXX include full path name in check */
for (; list != NULL; list = list->next) {
- GPatternSpec *pattern = list->data;
+ GPatternSpec *pattern = (GPatternSpec *)list->data;
if (g_pattern_match_string(pattern, name_fs))
return true;
diff --git a/src/exclude.h b/src/ExcludeList.hxx
index 5b1229e29..52ba377b5 100644
--- a/src/exclude.h
+++ b/src/ExcludeList.hxx
@@ -27,8 +27,6 @@
#include <glib.h>
-#include <stdbool.h>
-
/**
* Loads and parses a .mpdignore file.
*/
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx
index eb0565832..909687f46 100644
--- a/src/UpdateWalk.cxx
+++ b/src/UpdateWalk.cxx
@@ -29,9 +29,9 @@
#include "song.h"
#include "PlaylistVector.hxx"
#include "Mapper.hxx"
+#include "ExcludeList.hxx"
extern "C" {
-#include "exclude.h"
#include "uri.h"
#include "path.h"
#include "playlist_list.h"