From 57b61e366f0147b9b075436e5f86e1c33448af23 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Sun, 28 Jan 2024 18:52:01 +0100 Subject: [PATCH] core_library to core --- build_tool/library.cpp | 2 +- {core_library => core}/core.c | 1 + {core_library => core}/core.cpp | 0 {core_library => core}/core.h | 0 {core_library => core}/filesystem.c | 0 {core_library => core}/filesystem.h | 0 tests/test_filesystem.c | 2 +- tests/test_lexer.cpp | 2 +- tests/test_main.cpp | 2 +- 9 files changed, 5 insertions(+), 4 deletions(-) rename {core_library => core}/core.c (95%) rename {core_library => core}/core.cpp (100%) rename {core_library => core}/core.h (100%) rename {core_library => core}/filesystem.c (100%) rename {core_library => core}/filesystem.h (100%) diff --git a/build_tool/library.cpp b/build_tool/library.cpp index f11548c..28f35d1 100644 --- a/build_tool/library.cpp +++ b/build_tool/library.cpp @@ -2,7 +2,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#include "../core_library/core.c" +#include "../core/core.c" #define CL_Allocator MA_Arena * #define CL_Allocate(a, s) MA_PushSizeNonZeroed(a, s) diff --git a/core_library/core.c b/core/core.c similarity index 95% rename from core_library/core.c rename to core/core.c index b5dbac0..f1f9299 100644 --- a/core_library/core.c +++ b/core/core.c @@ -3,6 +3,7 @@ leeway for big buffers and other such things. Just make sure to not relay on it because it's easier unless specified. - Not sure if we should assume that strings should use allocators or arenas, for now it's arenas because I don't have other use cases @todo +- Add compiler checking to make sure it's on the path and if it's not message - Add file, line info to Arenas! - Remove static buffers from filesystem, use scratch arenas, more secure, data corruption instead of control flow corruption - Use allocators instead of concrete Arenas diff --git a/core_library/core.cpp b/core/core.cpp similarity index 100% rename from core_library/core.cpp rename to core/core.cpp diff --git a/core_library/core.h b/core/core.h similarity index 100% rename from core_library/core.h rename to core/core.h diff --git a/core_library/filesystem.c b/core/filesystem.c similarity index 100% rename from core_library/filesystem.c rename to core/filesystem.c diff --git a/core_library/filesystem.h b/core/filesystem.h similarity index 100% rename from core_library/filesystem.h rename to core/filesystem.h diff --git a/tests/test_filesystem.c b/tests/test_filesystem.c index ae5884d..3aed797 100644 --- a/tests/test_filesystem.c +++ b/tests/test_filesystem.c @@ -1,4 +1,4 @@ -#include "../core_library/core.c" +#include "../core/core.c" int main() { MA_Arena arena = {0}; diff --git a/tests/test_lexer.cpp b/tests/test_lexer.cpp index 91ec22f..74ee88d 100644 --- a/tests/test_lexer.cpp +++ b/tests/test_lexer.cpp @@ -36,7 +36,7 @@ void TestLexDir(S8_String dir) { void TestClexer() { TestLexDir("../standalone_libraries"); - TestLexDir("../core_library"); + TestLexDir("../core"); TestLexDir("../build_tool"); TestLexDir("../tests"); } \ No newline at end of file diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 48bf71b..ae7bf09 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -1,4 +1,4 @@ -#include "../core_library/core.cpp" +#include "../core/core.cpp" #include "test_table.cpp" #include "test_array.cpp" #include "test_arena.cpp"