diff --git a/src/btop.cpp b/src/btop.cpp index e2651c9..0cf42b6 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -33,6 +33,7 @@ tab-size = 4 #include #include +#include #include #include #include @@ -42,18 +43,15 @@ tab-size = 4 #if defined(__linux__) #define LINUX - #include #elif defined(__unix__) || !defined(__APPLE__) && defined(__MACH__) #include #if defined(BSD) - // #include #error BSD support not yet implemented! #endif #elif defined(__APPLE__) && defined(__MACH__) #include #if TARGET_OS_MAC == 1 #define OSX - // #include #error OSX support not yet implemented! #endif #else diff --git a/src/btop_config.cpp b/src/btop_config.cpp index 45fce43..89c7046 100644 --- a/src/btop_config.cpp +++ b/src/btop_config.cpp @@ -23,6 +23,7 @@ tab-size = 4 #include #include +#include #include using robin_hood::unordered_flat_map, std::map, std::array, std::atomic; diff --git a/src/btop_linux.cpp b/src/btop_linux.cpp index 9f995b4..7d84e28 100644 --- a/src/btop_linux.cpp +++ b/src/btop_linux.cpp @@ -32,7 +32,7 @@ tab-size = 4 #include -#include +#include #include #include diff --git a/src/btop_linux.hpp b/src/btop_shared.hpp similarity index 89% rename from src/btop_linux.hpp rename to src/btop_shared.hpp index a871e4e..3419b81 100644 --- a/src/btop_linux.hpp +++ b/src/btop_shared.hpp @@ -20,25 +20,26 @@ tab-size = 4 #include #include -#include #include +#include -using std::string, std::vector, std::atomic; +using std::string, std::vector; namespace Global { + extern string Version; extern int coreCount; } namespace Tools { + //* Platform specific function for system_uptime double system_uptime(); } namespace Proc { - extern std::filesystem::path proc_path; extern size_t numpids; - extern atomic stop; - extern atomic collecting; + extern std::atomic stop; + extern std::atomic collecting; extern vector sort_vector; //* Container for process information diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp index 004209c..4f56106 100644 --- a/src/btop_tools.cpp +++ b/src/btop_tools.cpp @@ -31,6 +31,7 @@ tab-size = 4 #include #include +#include #include using std::string_view, std::array, std::regex, std::max, std::to_string, std::cin, diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index c9fc091..6ab63a5 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -31,10 +31,6 @@ using std::string, std::vector; //? ------------------------------------------------- NAMESPACES ------------------------------------------------------ -namespace Global { - extern string Version; -} - //* Collection of escape codes for text style and formatting namespace Fx { extern const string e; //* Escape sequence start