From cfd8ca8d435d091e2fad4a2c427ce8b8d1c82f13 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 10 Nov 2015 10:19:45 -0500 Subject: [PATCH] core/filter: Convert file to C Signed-off-by: Anna Schumaker --- core/core.cpp | 2 ++ core/{filter.cpp => filter.c} | 3 --- core/tags/track.cpp | 2 +- gui/queue/window.cpp | 2 ++ include/core/filter.h | 3 --- tests/core/Sconscript | 2 +- tests/core/audio.cpp | 2 ++ tests/core/deck.cpp | 2 ++ tests/core/{filter.cpp => filter.c} | 2 +- tests/core/library.cpp | 2 ++ tests/core/playlist.cpp | 2 ++ tests/core/queue.cpp | 2 +- tests/core/tags/track.cpp | 2 +- 13 files changed, 17 insertions(+), 11 deletions(-) rename core/{filter.cpp => filter.c} (98%) rename tests/core/{filter.cpp => filter.c} (98%) diff --git a/core/core.cpp b/core/core.cpp index 7ce1fd66..5dcee0bf 100644 --- a/core/core.cpp +++ b/core/core.cpp @@ -4,7 +4,9 @@ #include #include #include +extern "C" { #include +} #include #include #include diff --git a/core/filter.cpp b/core/filter.c similarity index 98% rename from core/filter.cpp rename to core/filter.c index 5956a758..2b965cdd 100644 --- a/core/filter.cpp +++ b/core/filter.c @@ -3,11 +3,8 @@ */ #include - -extern "C" { #include #include -} static struct database filter_index; diff --git a/core/tags/track.cpp b/core/tags/track.cpp index 9235e852..8adb57d2 100644 --- a/core/tags/track.cpp +++ b/core/tags/track.cpp @@ -1,8 +1,8 @@ /** * Copyright 2014 (c) Anna Schumaker. */ -#include extern "C" { +#include #include #include } diff --git a/gui/queue/window.cpp b/gui/queue/window.cpp index 2e3786ee..64465fba 100644 --- a/gui/queue/window.cpp +++ b/gui/queue/window.cpp @@ -1,7 +1,9 @@ /* * Copyright 2015 (c) Anna Schumaker. */ +extern "C" { #include +} #include QueueWindow :: QueueWindow(BaseObjectType *cobject, diff --git a/include/core/filter.h b/include/core/filter.h index 0e440e8d..824b8032 100644 --- a/include/core/filter.h +++ b/include/core/filter.h @@ -7,10 +7,7 @@ #ifndef OCARINA_CORE_FILTER_H #define OCARINA_CORE_FILTER_H -extern "C" { #include -} - /* Called to initialize the filter index. */ void filter_init(); diff --git a/tests/core/Sconscript b/tests/core/Sconscript index 119ea909..0b07913e 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -21,7 +21,7 @@ res += [ CoreTest("date", "date.c") ] res += [ CoreTest("set", "set.c") ] res += [ CoreTest("database", "database.c") ] res += [ CoreTest("index", "index.c") ] -res += [ CoreTest("filter", "filter.cpp") ] +res += [ CoreTest("filter", "filter.c") ] res += [ CoreTest("idle", "idle.cpp") ] res += SConscript("tags/Sconscript") diff --git a/tests/core/audio.cpp b/tests/core/audio.cpp index 2a40cbe4..4acfb774 100644 --- a/tests/core/audio.cpp +++ b/tests/core/audio.cpp @@ -2,7 +2,9 @@ * Copyright 2013 (c) Anna Schumaker. */ #include +extern "C" { #include +} #include #include #include "test.h" diff --git a/tests/core/deck.cpp b/tests/core/deck.cpp index 2e44956e..342b0558 100644 --- a/tests/core/deck.cpp +++ b/tests/core/deck.cpp @@ -2,7 +2,9 @@ * Copyright 2013 (c) Anna Schumaker. */ #include +extern "C" { #include +} #include #include #include "test.h" diff --git a/tests/core/filter.cpp b/tests/core/filter.c similarity index 98% rename from tests/core/filter.cpp rename to tests/core/filter.c index 505d78b1..309b73b1 100644 --- a/tests/core/filter.cpp +++ b/tests/core/filter.c @@ -2,7 +2,7 @@ * Copyright 2014 (c) Anna Schumaker. */ #include -#include "test.h" +#include const gchar *test_strings[] = { /* 0 */ "koji kondo", diff --git a/tests/core/library.cpp b/tests/core/library.cpp index 7e7126a5..59ca465e 100644 --- a/tests/core/library.cpp +++ b/tests/core/library.cpp @@ -1,7 +1,9 @@ /* * Copyright 2013 (c) Anna Schumaker. */ +extern "C" { #include +} #include #include #include diff --git a/tests/core/playlist.cpp b/tests/core/playlist.cpp index 2a0fa40c..50546145 100644 --- a/tests/core/playlist.cpp +++ b/tests/core/playlist.cpp @@ -1,7 +1,9 @@ /* * Copyright 2013 (c) Anna Schumaker. */ +extern "C" { #include +} #include #include #include diff --git a/tests/core/queue.cpp b/tests/core/queue.cpp index b65dffc5..5f1cc819 100644 --- a/tests/core/queue.cpp +++ b/tests/core/queue.cpp @@ -1,9 +1,9 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include #include extern "C" { +#include #include } #include diff --git a/tests/core/tags/track.cpp b/tests/core/tags/track.cpp index d2cb6939..e4bb5db7 100644 --- a/tests/core/tags/track.cpp +++ b/tests/core/tags/track.cpp @@ -2,9 +2,9 @@ * Copyright 2014 (c) Anna Schumaker. */ extern "C" { +#include #include } -#include #include #include #include "../test.h"