diff --git a/core/Sconscript b/core/Sconscript index 12ba978b..fef823db 100644 --- a/core/Sconscript +++ b/core/Sconscript @@ -1,7 +1,5 @@ #!/usr/bin/python -Import("env") - -env.UsePackage("taglib_c") - -res = Glob("*.cpp") + Glob("*.c") + SConscript("tags/Sconscript") +res = Glob("*.cpp") + Glob("*.c") +res += SConscript("tags/Sconscript") +res += SConscript("containers/Sconscript") Return("res") diff --git a/core/containers/Sconscript b/core/containers/Sconscript new file mode 100644 index 00000000..23f622a0 --- /dev/null +++ b/core/containers/Sconscript @@ -0,0 +1,3 @@ +#!/usr/bin/python +res = Glob("*.c") +Return("res") diff --git a/core/set.c b/core/containers/set.c similarity index 96% rename from core/set.c rename to core/containers/set.c index ad401f75..60384011 100644 --- a/core/set.c +++ b/core/containers/set.c @@ -2,7 +2,7 @@ * Copyright 2015 (c) Anna Schumaker. */ -#include +#include void set_copy(const struct set *lhs, struct set *rhs) { diff --git a/core/tags/Sconscript b/core/tags/Sconscript index 334970c3..0cf4bb59 100644 --- a/core/tags/Sconscript +++ b/core/tags/Sconscript @@ -1,3 +1,6 @@ #!/usr/bin/python +Import("env") + +env.UsePackage("taglib_c") res = Glob("*.cpp") + Glob("*.c") Return("res") diff --git a/include/core/set.h b/include/core/containers/set.h similarity index 94% rename from include/core/set.h rename to include/core/containers/set.h index 3a1afa2f..6174087f 100644 --- a/include/core/set.h +++ b/include/core/containers/set.h @@ -1,8 +1,8 @@ /* * Copyright 2015 (c) Anna Schumaker. */ -#ifndef OCARINA_CORE_SET_H -#define OCARINA_CORE_SET_H +#ifndef OCARINA_CORE_CONTAINERS_SET_H +#define OCARINA_CORE_CONTAINERS_SET_H #include #include @@ -88,4 +88,4 @@ static inline void set_iter_init(const struct set *set, struct set_iter *it) #define set_for_each(set, it) \ for (set_iter_init(set, it); set_iter_next(it); ) -#endif /* OCARINA_CORE_SET_H */ +#endif /* OCARINA_CORE_CONTAINERS_SET_H */ diff --git a/include/core/filter.h b/include/core/filter.h index 824b8032..af8e9901 100644 --- a/include/core/filter.h +++ b/include/core/filter.h @@ -7,7 +7,7 @@ #ifndef OCARINA_CORE_FILTER_H #define OCARINA_CORE_FILTER_H -#include +#include /* Called to initialize the filter index. */ void filter_init(); diff --git a/include/core/index.h b/include/core/index.h index d9622472..23bf5737 100644 --- a/include/core/index.h +++ b/include/core/index.h @@ -7,8 +7,8 @@ #ifndef OCARINA_CORE_INDEX_H #define OCARINA_CORE_INDEX_H +#include #include -#include struct index_entry { diff --git a/include/gui/queue/window.h b/include/gui/queue/window.h index d2f20004..9a8b5329 100644 --- a/include/gui/queue/window.h +++ b/include/gui/queue/window.h @@ -5,7 +5,7 @@ #define OCARINA_GUI_QUEUE_WINDOW_H extern "C" { -#include +#include } #include #include diff --git a/tests/core/Sconscript b/tests/core/Sconscript index bfaac03f..09a821de 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -18,7 +18,8 @@ res += [ CoreTest("string", "string.c") ] res += [ CoreTest("random", "random.c") ] res += [ CoreTest("file", "file.c") ] res += [ CoreTest("date", "date.c") ] -res += [ CoreTest("set", "set.c") ] + +res += SConscript("containers/Sconscript") res += [ CoreTest("database", "database.c") ] res += [ CoreTest("index", "index.c") ] res += [ CoreTest("filter", "filter.c") ] diff --git a/tests/core/containers/Sconscript b/tests/core/containers/Sconscript new file mode 100644 index 00000000..68123914 --- /dev/null +++ b/tests/core/containers/Sconscript @@ -0,0 +1,16 @@ +#!/usr/bin/python +import os +Import("env", "UnitTest", "core_objs") + +def ContainerTest(name, source): + global core_objs + if os.path.exists("../../../core/containers/%s" % source): + core_objs += [ env.Object("../../../core/containers/%s" % source) ] + run = UnitTest("core/containers/%s" % name, [ source ] + core_objs) + Alias("tests/core", run) + Alias("tests/core/containers", run) + return run + +res = [ ContainerTest("set", "set.c") ] + +Return("res") diff --git a/tests/core/set.c b/tests/core/containers/set.c similarity index 99% rename from tests/core/set.c rename to tests/core/containers/set.c index 7eff18f3..c909756b 100644 --- a/tests/core/set.c +++ b/tests/core/containers/set.c @@ -1,7 +1,7 @@ /* * Copyright 2015 (c) Anna Schumaker. */ -#include +#include #include