diff --git a/core/database.c b/core/containers/database.c similarity index 97% rename from core/database.c rename to core/containers/database.c index 904b087f..91d0a493 100644 --- a/core/database.c +++ b/core/containers/database.c @@ -1,7 +1,7 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include +#include #define DB_ENTRY_AT(db, index) \ (struct db_entry *)g_ptr_array_index(db->db_entries, index) @@ -20,7 +20,7 @@ static void __dbe_free(struct database *db, struct db_entry *dbe) } } -struct db_entry *__dbe_next(const struct database *db, unsigned int index) +static struct db_entry *__dbe_next(const struct database *db, unsigned int index) { if (!db->db_entries) return NULL; diff --git a/gui/manager.cpp b/gui/manager.cpp index 740362b8..131afee1 100644 --- a/gui/manager.cpp +++ b/gui/manager.cpp @@ -2,7 +2,7 @@ * Copyright 2014 (c) Anna Schumaker. */ extern "C" { -#include +#include #include } #include diff --git a/include/core/database.h b/include/core/containers/database.h similarity index 96% rename from include/core/database.h rename to include/core/containers/database.h index f72fefda..d06cdb3d 100644 --- a/include/core/database.h +++ b/include/core/containers/database.h @@ -18,8 +18,8 @@ * * The database class will add a newline after each struct db_entry. */ -#ifndef OCARINA_CORE_DATABASE_H -#define OCARINA_CORE_DATABASE_H +#ifndef OCARINA_CORE_CONTAINERS_DATABASE_H +#define OCARINA_CORE_CONTAINERS_DATABASE_H #include @@ -144,4 +144,4 @@ struct db_entry *db_next(const struct database *, struct db_entry *); ent != NULL; \ ent = next, next = db_next(db, ent)) -#endif /* OCARINA_CORE_DATABASE_H */ +#endif /* OCARINA_CORE_CONTAINERS_DATABASE_H */ diff --git a/include/core/index.h b/include/core/index.h index 23bf5737..31632f49 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/core/tags/album.h b/include/core/tags/album.h index cda74146..69237b13 100644 --- a/include/core/tags/album.h +++ b/include/core/tags/album.h @@ -14,7 +14,7 @@ #ifndef OCARINA_CORE_TAGS_ALBUM_H #define OCARINA_CORE_TAGS_ALBUM_H -#include +#include struct album { unsigned int al_year; /* This album's year. */ diff --git a/include/core/tags/artist.h b/include/core/tags/artist.h index cc94aaad..e5a0dfff 100644 --- a/include/core/tags/artist.h +++ b/include/core/tags/artist.h @@ -13,7 +13,7 @@ #ifndef OCARINA_CORE_TAGS_ARTIST_H #define OCARINA_CORE_TAGS_ARTIST_H -#include +#include struct artist { gchar *ar_name; /* This artist's name. */ diff --git a/include/core/tags/genre.h b/include/core/tags/genre.h index 0301cb53..5660e7ec 100644 --- a/include/core/tags/genre.h +++ b/include/core/tags/genre.h @@ -13,7 +13,7 @@ #ifndef OCARINA_CORE_TAGS_GENRE_H #define OCARINA_CORE_TAGS_GENRE_H -#include +#include struct genre { gchar *ge_name; /* This genre's name. */ diff --git a/include/core/tags/library.h b/include/core/tags/library.h index e9e1a242..c65b3c05 100644 --- a/include/core/tags/library.h +++ b/include/core/tags/library.h @@ -13,7 +13,7 @@ #ifndef OCARINA_CORE_TAGS_LIBRARY_H #define OCARINA_CORE_TAGS_LIBRARY_H -#include +#include struct library { unsigned int li_size; /* This library's track count. */ diff --git a/include/core/tags/track.h b/include/core/tags/track.h index 02f1295c..92fda933 100644 --- a/include/core/tags/track.h +++ b/include/core/tags/track.h @@ -20,7 +20,7 @@ #ifndef OCARINA_CORE_TAGS_TRACK_H #define OCARINA_CORE_TAGS_TRACK_H -#include +#include #include #include #include diff --git a/tests/core/Sconscript b/tests/core/Sconscript index 09a821de..41069ed0 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -20,7 +20,6 @@ res += [ CoreTest("file", "file.c") ] res += [ CoreTest("date", "date.c") ] res += SConscript("containers/Sconscript") -res += [ CoreTest("database", "database.c") ] res += [ CoreTest("index", "index.c") ] res += [ CoreTest("filter", "filter.c") ] res += [ CoreTest("idle", "idle.c") ] diff --git a/tests/core/containers/Sconscript b/tests/core/containers/Sconscript index 68123914..6bd7a26a 100644 --- a/tests/core/containers/Sconscript +++ b/tests/core/containers/Sconscript @@ -12,5 +12,6 @@ def ContainerTest(name, source): return run res = [ ContainerTest("set", "set.c") ] +res = [ ContainerTest("database", "database.c") ] Return("res") diff --git a/tests/core/database.c b/tests/core/containers/database.c similarity index 99% rename from tests/core/database.c rename to tests/core/containers/database.c index 8c748fdd..fb096a5d 100644 --- a/tests/core/database.c +++ b/tests/core/containers/database.c @@ -2,7 +2,7 @@ * Copyright 2014 (c) Anna Schumaker. * Test a Database */ -#include +#include #include #include