From d333cdfad5107bbcd65a3b898819953c71cd961c Mon Sep 17 00:00:00 2001 From: Kyler Date: Fri, 28 Nov 2025 21:27:39 -0700 Subject: [PATCH] Add meta header and implementation for version printing --- SLS_C/include/sls/{main.h => meta.h} | 0 SLS_C/src/main.c | 7 +------ SLS_C/src/meta.c | 13 +++++++++++++ SLS_C/src/repl.c | 2 +- SLS_C/tests/tests.c | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) rename SLS_C/include/sls/{main.h => meta.h} (100%) create mode 100644 SLS_C/src/meta.c diff --git a/SLS_C/include/sls/main.h b/SLS_C/include/sls/meta.h similarity index 100% rename from SLS_C/include/sls/main.h rename to SLS_C/include/sls/meta.h diff --git a/SLS_C/src/main.c b/SLS_C/src/main.c index 0b12858..84974fc 100644 --- a/SLS_C/src/main.c +++ b/SLS_C/src/main.c @@ -7,15 +7,10 @@ #include #include -#include "sls/main.h" +#include "sls/meta.h" #include "sls/bool.h" #include "sls/repl.h" -void print_version() { - printf("YREA SLS (" SLS_NAME ") " SLS_VER " (" GIT_COMMIT_HASH ")\n"); - printf("Compiled with " COMPILER_NAME " %d at " __DATE__ " " __TIME__ "\n", COMPILER_VER); -} - int main(int argc, char *argv[]) { Boolean version = FALSE; Boolean file = FALSE; diff --git a/SLS_C/src/meta.c b/SLS_C/src/meta.c new file mode 100644 index 0000000..0812b60 --- /dev/null +++ b/SLS_C/src/meta.c @@ -0,0 +1,13 @@ +// Kyler Olsen +// YREA SLS +// MEta File +// November 2025 + +#include + +#include "sls/meta.h" + +void print_version() { + printf("YREA SLS (" SLS_NAME ") " SLS_VER " (" GIT_COMMIT_HASH ")\n"); + printf("Compiled with " COMPILER_NAME " %d at " __DATE__ " " __TIME__ "\n", COMPILER_VER); +} diff --git a/SLS_C/src/repl.c b/SLS_C/src/repl.c index 0015df1..a2da030 100644 --- a/SLS_C/src/repl.c +++ b/SLS_C/src/repl.c @@ -8,7 +8,7 @@ #include #include "sls/repl.h" -#include "sls/main.h" +#include "sls/meta.h" #include "sls/errors.h" #include "sls/lexer.h" #include "sls/string.h" diff --git a/SLS_C/tests/tests.c b/SLS_C/tests/tests.c index 08d5f12..3f6c816 100644 --- a/SLS_C/tests/tests.c +++ b/SLS_C/tests/tests.c @@ -10,7 +10,7 @@ #include "sls/errors.h" #include "tests/tests.h" -static const Boolean PRINT_SUCCESSFUL_TESTS = TRUE; +static const Boolean PRINT_SUCCESSFUL_TESTS = FALSE; const SlsStr TEST_FILE_NAME = SLS_STR_CONST("TEST_FILE.SLS");