From 95064e45374f3df175dc5dab81017e60a08b49a5 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Thu, 5 Jun 2014 10:19:22 -0400 Subject: [PATCH] Rename lib/ -> core/ I plan to introduce a new lib/ that sits between the gui and the backend files (similar to how glibc sits between the kernel and userspace). This gets the rename out of the way before I change my mind again. Signed-off-by: Anna Schumaker --- .gitignore | 1 + Sconstruct | 4 ++-- {lib => core}/Sconscript | 0 {lib => core}/audio.cpp | 8 ++++---- {lib => core}/callback.cpp | 2 +- {lib => core}/database.cpp | 2 +- {lib => core}/deck.cpp | 8 ++++---- {lib => core}/driver.cpp | 2 +- {lib => core}/file.cpp | 4 ++-- {lib => core}/filter.cpp | 4 ++-- {lib => core}/idle.cpp | 2 +- {lib => core}/index.cpp | 2 +- {lib => core}/library.cpp | 4 ++-- {lib => core}/playlist.cpp | 4 ++-- {lib => core}/queue.cpp | 6 +++--- {lib => core}/random.cpp | 2 +- {lib => core}/tags.cpp | 6 +++--- gui/collection.cpp | 6 +++--- gui/collection_mgr.cpp | 4 ++-- gui/gui.cpp | 14 +++++++------- gui/history.cpp | 2 +- gui/main.cpp | 8 ++++---- gui/model.cpp | 2 +- gui/playlist.cpp | 2 +- gui/queue.cpp | 4 ++-- gui/tabs.cpp | 8 ++++---- include/{lib => core}/audio.h | 2 +- include/{lib => core}/callback.h | 4 ++-- include/{lib => core}/database.h | 2 +- include/{lib => core}/database.hpp | 0 include/{lib => core}/deck.h | 2 +- include/{lib => core}/driver.h | 0 include/{lib => core}/error.h | 0 include/{lib => core}/file.h | 0 include/{lib => core}/filter.h | 0 include/{lib => core}/idle.h | 0 include/{lib => core}/idle.hpp | 0 include/{lib => core}/index.h | 2 +- include/{lib => core}/library.h | 4 ++-- include/{lib => core}/playlist.h | 4 ++-- include/{lib => core}/print.h | 0 include/{lib => core}/queue.h | 4 ++-- include/{lib => core}/random.h | 0 include/{lib => core}/tags.h | 2 +- include/{lib => core}/version.h | 0 include/gui/ocarina.h | 2 +- include/gui/tabs.h | 2 +- tests/Sconscript | 2 +- tests/audio.cpp | 6 +++--- tests/database.cpp | 2 +- tests/deck.cpp | 6 +++--- tests/driver.cpp | 2 +- tests/file.cpp | 2 +- tests/filter.cpp | 2 +- tests/idle.cpp | 2 +- tests/index.cpp | 2 +- tests/library.cpp | 4 ++-- tests/playlist.cpp | 4 ++-- tests/queue.cpp | 8 ++++---- tests/random.cpp | 2 +- tests/tags.cpp | 2 +- tests/version.cpp | 2 +- 62 files changed, 95 insertions(+), 94 deletions(-) rename {lib => core}/Sconscript (100%) rename {lib => core}/audio.cpp (96%) rename {lib => core}/callback.cpp (95%) rename {lib => core}/database.cpp (83%) rename {lib => core}/deck.cpp (97%) rename {lib => core}/driver.cpp (99%) rename {lib => core}/file.cpp (97%) rename {lib => core}/filter.cpp (98%) rename {lib => core}/idle.cpp (96%) rename {lib => core}/index.cpp (97%) rename {lib => core}/library.cpp (98%) rename {lib => core}/playlist.cpp (97%) rename {lib => core}/queue.cpp (98%) rename {lib => core}/random.cpp (90%) rename {lib => core}/tags.cpp (99%) rename include/{lib => core}/audio.h (95%) rename include/{lib => core}/callback.h (92%) rename include/{lib => core}/database.h (97%) rename include/{lib => core}/database.hpp (100%) rename include/{lib => core}/deck.h (96%) rename include/{lib => core}/driver.h (100%) rename include/{lib => core}/error.h (100%) rename include/{lib => core}/file.h (100%) rename include/{lib => core}/filter.h (100%) rename include/{lib => core}/idle.h (100%) rename include/{lib => core}/idle.hpp (100%) rename include/{lib => core}/index.h (95%) rename include/{lib => core}/library.h (88%) rename include/{lib => core}/playlist.h (89%) rename include/{lib => core}/print.h (100%) rename include/{lib => core}/queue.h (96%) rename include/{lib => core}/random.h (100%) rename include/{lib => core}/tags.h (98%) rename include/{lib => core}/version.h (100%) diff --git a/.gitignore b/.gitignore index ab606dd9..7463cf65 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ share/ocarina/#* bin/ .sconsign.dblite *.patch +tests/*-core tests/*-lib *.gcov *.gcda diff --git a/Sconstruct b/Sconstruct index e9d657e9..4dd9d1b7 100644 --- a/Sconstruct +++ b/Sconstruct @@ -41,7 +41,7 @@ Export("env", "test_env") include = SConscript("include/Sconscript") -lib = SConscript("lib/Sconscript") +core = SConscript("core/Sconscript") gui = SConscript("gui/Sconscript") tests = SConscript("tests/Sconscript") @@ -50,7 +50,7 @@ Clean(tests, Glob("tests/*.gcda")) Clean(tests, Glob("tests/*.gcno")) -ocarina = env.Program("bin/ocarina", lib + gui) +ocarina = env.Program("bin/ocarina", core + gui) Default(ocarina) Clean(ocarina, "bin/") diff --git a/lib/Sconscript b/core/Sconscript similarity index 100% rename from lib/Sconscript rename to core/Sconscript diff --git a/lib/audio.cpp b/core/audio.cpp similarity index 96% rename from lib/audio.cpp rename to core/audio.cpp index 4bd0dccb..e73dd2f6 100644 --- a/lib/audio.cpp +++ b/core/audio.cpp @@ -1,10 +1,10 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/lib/callback.cpp b/core/callback.cpp similarity index 95% rename from lib/callback.cpp rename to core/callback.cpp index 46cb1f7c..16d43e3c 100644 --- a/lib/callback.cpp +++ b/core/callback.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include static void no_op() {} diff --git a/lib/database.cpp b/core/database.cpp similarity index 83% rename from lib/database.cpp rename to core/database.cpp index c9817a8d..0e7c2d17 100644 --- a/lib/database.cpp +++ b/core/database.cpp @@ -1,7 +1,7 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include +#include DatabaseEntry :: DatabaseEntry() diff --git a/lib/deck.cpp b/core/deck.cpp similarity index 97% rename from lib/deck.cpp rename to core/deck.cpp index aa35baca..2b6c3b5c 100644 --- a/lib/deck.cpp +++ b/core/deck.cpp @@ -1,10 +1,10 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include -#include -#include +#include +#include +#include +#include class RecentQueue : public Queue diff --git a/lib/driver.cpp b/core/driver.cpp similarity index 99% rename from lib/driver.cpp rename to core/driver.cpp index 66963338..258ac6d1 100644 --- a/lib/driver.cpp +++ b/core/driver.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include Driver :: Driver() {} diff --git a/lib/file.cpp b/core/file.cpp similarity index 97% rename from lib/file.cpp rename to core/file.cpp index 21165b13..e790934a 100644 --- a/lib/file.cpp +++ b/core/file.cpp @@ -1,8 +1,8 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include #include diff --git a/lib/filter.cpp b/core/filter.cpp similarity index 98% rename from lib/filter.cpp rename to core/filter.cpp index a659d47b..941c797f 100644 --- a/lib/filter.cpp +++ b/core/filter.cpp @@ -2,8 +2,8 @@ * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include #include #include diff --git a/lib/idle.cpp b/core/idle.cpp similarity index 96% rename from lib/idle.cpp rename to core/idle.cpp index 2849e97a..899a291e 100644 --- a/lib/idle.cpp +++ b/core/idle.cpp @@ -1,7 +1,7 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include +#include #include diff --git a/lib/index.cpp b/core/index.cpp similarity index 97% rename from lib/index.cpp rename to core/index.cpp index 2f55f67e..d1495391 100644 --- a/lib/index.cpp +++ b/core/index.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include IndexEntry :: IndexEntry() {} diff --git a/lib/library.cpp b/core/library.cpp similarity index 98% rename from lib/library.cpp rename to core/library.cpp index b7404d96..1609e65e 100644 --- a/lib/library.cpp +++ b/core/library.cpp @@ -1,8 +1,8 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include #include diff --git a/lib/playlist.cpp b/core/playlist.cpp similarity index 97% rename from lib/playlist.cpp rename to core/playlist.cpp index ab02bb7d..c77a4f6e 100644 --- a/lib/playlist.cpp +++ b/core/playlist.cpp @@ -1,8 +1,8 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include class PlaylistQueue : public Queue { diff --git a/lib/queue.cpp b/core/queue.cpp similarity index 98% rename from lib/queue.cpp rename to core/queue.cpp index 89c6823e..67a8aeff 100644 --- a/lib/queue.cpp +++ b/core/queue.cpp @@ -1,9 +1,9 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/lib/random.cpp b/core/random.cpp similarity index 90% rename from lib/random.cpp rename to core/random.cpp index 6e515d60..84de4890 100644 --- a/lib/random.cpp +++ b/core/random.cpp @@ -3,7 +3,7 @@ */ #ifdef CONFIG_TEST -#include +#include static unsigned int _random_value = 0; diff --git a/lib/tags.cpp b/core/tags.cpp similarity index 99% rename from lib/tags.cpp rename to core/tags.cpp index 945f85c8..04348c9d 100644 --- a/lib/tags.cpp +++ b/core/tags.cpp @@ -2,9 +2,9 @@ * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/gui/collection.cpp b/gui/collection.cpp index 1501c1ba..801406d3 100644 --- a/gui/collection.cpp +++ b/gui/collection.cpp @@ -1,9 +1,9 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include +#include +#include +#include #include diff --git a/gui/collection_mgr.cpp b/gui/collection_mgr.cpp index edc79c97..812fe9df 100644 --- a/gui/collection_mgr.cpp +++ b/gui/collection_mgr.cpp @@ -1,8 +1,8 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include +#include +#include #include static void on_library_add(unsigned int id, Library *library); diff --git a/gui/gui.cpp b/gui/gui.cpp index b38ab800..ffd0af07 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -1,13 +1,13 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/gui/history.cpp b/gui/history.cpp index 5357d706..6290034f 100644 --- a/gui/history.cpp +++ b/gui/history.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include #include diff --git a/gui/main.cpp b/gui/main.cpp index ba3d6ab4..d858a714 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,10 +1,10 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/gui/model.cpp b/gui/model.cpp index 93db7e95..c9cda64d 100644 --- a/gui/model.cpp +++ b/gui/model.cpp @@ -4,7 +4,7 @@ * See the example at: * https://git.gnome.org/browse/gtkmm-documentation/tree/examples/others/treemodelcustom */ -#include +#include #include #include #include diff --git a/gui/playlist.cpp b/gui/playlist.cpp index 6ab27c36..d9982f9f 100644 --- a/gui/playlist.cpp +++ b/gui/playlist.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include #include diff --git a/gui/queue.cpp b/gui/queue.cpp index fb2832b4..29449288 100644 --- a/gui/queue.cpp +++ b/gui/queue.cpp @@ -1,8 +1,8 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include +#include +#include #include #include diff --git a/gui/tabs.cpp b/gui/tabs.cpp index eec170a2..65613706 100644 --- a/gui/tabs.cpp +++ b/gui/tabs.cpp @@ -1,10 +1,10 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/include/lib/audio.h b/include/core/audio.h similarity index 95% rename from include/lib/audio.h rename to include/core/audio.h index 5228150b..9ea204e3 100644 --- a/include/lib/audio.h +++ b/include/core/audio.h @@ -4,7 +4,7 @@ #ifndef OCARINA_AUDIO_H #define OCARINA_AUDIO_H -#include +#include #include namespace audio diff --git a/include/lib/callback.h b/include/core/callback.h similarity index 92% rename from include/lib/callback.h rename to include/core/callback.h index 90a0d647..37f709fc 100644 --- a/include/lib/callback.h +++ b/include/core/callback.h @@ -4,8 +4,8 @@ #ifndef OCARINA_CALLBACK_H #define OCARINA_CALLBACK_H -#include -#include +#include +#include struct Callbacks { diff --git a/include/lib/database.h b/include/core/database.h similarity index 97% rename from include/lib/database.h rename to include/core/database.h index 59b1d712..c0953f49 100644 --- a/include/lib/database.h +++ b/include/core/database.h @@ -4,7 +4,7 @@ #ifndef OCARINA_DATABASE_H #define OCARINA_DATABASE_H -#include +#include #include #include diff --git a/include/lib/database.hpp b/include/core/database.hpp similarity index 100% rename from include/lib/database.hpp rename to include/core/database.hpp diff --git a/include/lib/deck.h b/include/core/deck.h similarity index 96% rename from include/lib/deck.h rename to include/core/deck.h index 871bd9d5..b6cca7b9 100644 --- a/include/lib/deck.h +++ b/include/core/deck.h @@ -4,7 +4,7 @@ #ifndef OCARINA_DECK_H #define OCARINA_DECK_H -#include +#include #include diff --git a/include/lib/driver.h b/include/core/driver.h similarity index 100% rename from include/lib/driver.h rename to include/core/driver.h diff --git a/include/lib/error.h b/include/core/error.h similarity index 100% rename from include/lib/error.h rename to include/core/error.h diff --git a/include/lib/file.h b/include/core/file.h similarity index 100% rename from include/lib/file.h rename to include/core/file.h diff --git a/include/lib/filter.h b/include/core/filter.h similarity index 100% rename from include/lib/filter.h rename to include/core/filter.h diff --git a/include/lib/idle.h b/include/core/idle.h similarity index 100% rename from include/lib/idle.h rename to include/core/idle.h diff --git a/include/lib/idle.hpp b/include/core/idle.hpp similarity index 100% rename from include/lib/idle.hpp rename to include/core/idle.hpp diff --git a/include/lib/index.h b/include/core/index.h similarity index 95% rename from include/lib/index.h rename to include/core/index.h index b3e65bbf..34cf83fc 100644 --- a/include/lib/index.h +++ b/include/core/index.h @@ -4,7 +4,7 @@ #ifndef OCARINA_INDEX_H #define OCARINA_INDEX_H -#include +#include #include #include diff --git a/include/lib/library.h b/include/core/library.h similarity index 88% rename from include/lib/library.h rename to include/core/library.h index a68be4df..78713525 100644 --- a/include/lib/library.h +++ b/include/core/library.h @@ -4,8 +4,8 @@ #ifndef OCARINA_LIBRARY_H #define OCARINA_LIBRARY_H -#include -#include +#include +#include #include namespace library diff --git a/include/lib/playlist.h b/include/core/playlist.h similarity index 89% rename from include/lib/playlist.h rename to include/core/playlist.h index 746ed59c..34e36d28 100644 --- a/include/lib/playlist.h +++ b/include/core/playlist.h @@ -4,8 +4,8 @@ #ifndef OCARINA_PLAYLIST_H #define OCARINA_PLAYLIST_H -#include -#include +#include +#include #include diff --git a/include/lib/print.h b/include/core/print.h similarity index 100% rename from include/lib/print.h rename to include/core/print.h diff --git a/include/lib/queue.h b/include/core/queue.h similarity index 96% rename from include/lib/queue.h rename to include/core/queue.h index 18f65d34..d1c2807a 100644 --- a/include/lib/queue.h +++ b/include/core/queue.h @@ -4,8 +4,8 @@ #ifndef OCARINA_QUEUE_H #define OCARINA_QUEUE_H -#include -#include +#include +#include #include #include diff --git a/include/lib/random.h b/include/core/random.h similarity index 100% rename from include/lib/random.h rename to include/core/random.h diff --git a/include/lib/tags.h b/include/core/tags.h similarity index 98% rename from include/lib/tags.h rename to include/core/tags.h index 9d4b9e3f..4f7d5137 100644 --- a/include/lib/tags.h +++ b/include/core/tags.h @@ -4,7 +4,7 @@ #ifndef OCARINA_TAGS_H #define OCARINA_TAGS_H -#include +#include enum sort_t { diff --git a/include/lib/version.h b/include/core/version.h similarity index 100% rename from include/lib/version.h rename to include/core/version.h diff --git a/include/gui/ocarina.h b/include/gui/ocarina.h index c0327dfe..2191213d 100644 --- a/include/gui/ocarina.h +++ b/include/gui/ocarina.h @@ -4,7 +4,7 @@ #ifndef OCARINA_H #define OCARINA_H -#include +#include #include diff --git a/include/gui/tabs.h b/include/gui/tabs.h index 7fe1201a..6ba20c44 100644 --- a/include/gui/tabs.h +++ b/include/gui/tabs.h @@ -5,7 +5,7 @@ #define OCARINA_TABS_H #include -#include +#include #include class Tab { diff --git a/tests/Sconscript b/tests/Sconscript index 90814b58..26d5c6a8 100644 --- a/tests/Sconscript +++ b/tests/Sconscript @@ -41,7 +41,7 @@ for arg in sys.argv: def expand_files(extra_files): res = [] for f in extra_files: - res += [ env.Object("%s-lib" % f, "../lib/%s" % f) ] + res += [ env.Object("%s-core" % f, "../core/%s" % f) ] return res def make_program(src, name, extra_files): diff --git a/tests/audio.cpp b/tests/audio.cpp index 5679b1bc..efda10a5 100644 --- a/tests/audio.cpp +++ b/tests/audio.cpp @@ -1,9 +1,9 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include -#include +#include +#include +#include #include "test.h" Track *TRACK_NULL = NULL; diff --git a/tests/database.cpp b/tests/database.cpp index 310d8187..b8ced050 100644 --- a/tests/database.cpp +++ b/tests/database.cpp @@ -3,7 +3,7 @@ * Test a Database */ -#include +#include #include "test.h" #include diff --git a/tests/deck.cpp b/tests/deck.cpp index 139fdf29..0dd579a5 100644 --- a/tests/deck.cpp +++ b/tests/deck.cpp @@ -1,9 +1,9 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include -#include +#include +#include +#include #include "test.h" static Queue *Q_NULL = NULL; diff --git a/tests/driver.cpp b/tests/driver.cpp index 130da86f..8eba2d89 100644 --- a/tests/driver.cpp +++ b/tests/driver.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include #include "test.h" static TestDriver *DRIVER_NULL = NULL; diff --git a/tests/file.cpp b/tests/file.cpp index 8f0bcaf4..fb2f0e25 100644 --- a/tests/file.cpp +++ b/tests/file.cpp @@ -1,7 +1,7 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include +#include #include "test.h" diff --git a/tests/filter.cpp b/tests/filter.cpp index b24865dc..88c02737 100644 --- a/tests/filter.cpp +++ b/tests/filter.cpp @@ -3,7 +3,7 @@ * Test the filtering code */ -#include +#include #include "test.h" static void do_test_lowercase(const std::string &text, const std::string &lc) diff --git a/tests/idle.cpp b/tests/idle.cpp index 69aac7b1..489cc8af 100644 --- a/tests/idle.cpp +++ b/tests/idle.cpp @@ -3,7 +3,7 @@ * Test the idle queue */ -#include +#include #include "test.h" #include diff --git a/tests/index.cpp b/tests/index.cpp index 891aead0..dfc9fc2a 100644 --- a/tests/index.cpp +++ b/tests/index.cpp @@ -3,7 +3,7 @@ * Test a Database */ -#include +#include #include "test.h" #include diff --git a/tests/library.cpp b/tests/library.cpp index 044e0aa0..75ce55f2 100644 --- a/tests/library.cpp +++ b/tests/library.cpp @@ -1,8 +1,8 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include #include "test.h" static Queue *Q_NULL = NULL; diff --git a/tests/playlist.cpp b/tests/playlist.cpp index 6d354563..1308cd9b 100644 --- a/tests/playlist.cpp +++ b/tests/playlist.cpp @@ -1,8 +1,8 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include -#include +#include +#include #include "test.h" static IndexEntry *IDX_NULL = NULL; diff --git a/tests/queue.cpp b/tests/queue.cpp index ba96e97f..7bcfe8ca 100644 --- a/tests/queue.cpp +++ b/tests/queue.cpp @@ -1,10 +1,10 @@ /* * Copyright 2014 (c) Anna Schumaker. */ -#include -#include -#include -#include +#include +#include +#include +#include #include "test.h" diff --git a/tests/random.cpp b/tests/random.cpp index c2eb1215..45a161fd 100644 --- a/tests/random.cpp +++ b/tests/random.cpp @@ -2,7 +2,7 @@ * Copyright 2014 (c) Anna Schumaker. */ -#include +#include #include "test.h" #include diff --git a/tests/tags.cpp b/tests/tags.cpp index 9493a16b..efd307bd 100644 --- a/tests/tags.cpp +++ b/tests/tags.cpp @@ -3,7 +3,7 @@ * Test a DatabaseEntry */ -#include +#include #include "test.h" static Library *LIB_NULL = NULL; diff --git a/tests/version.cpp b/tests/version.cpp index 1cefb1d7..8c31017a 100644 --- a/tests/version.cpp +++ b/tests/version.cpp @@ -1,7 +1,7 @@ /* * Copyright 2013 (c) Anna Schumaker. */ -#include +#include #include "test.h" #ifdef CONFIG_DEBUG