From cebe0df8a25040f66f2ca23b636f7efb81e88d43 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 9 Oct 2025 12:08:57 +0200 Subject: [PATCH] move `/src/error.?` to `/src/util/error.?` --- src/dat/mcx.c | 2 +- src/io/render.c | 2 +- src/io/shader.c | 2 +- src/io/window.c | 2 +- src/main.c | 2 +- src/util/conf.c | 2 +- src/{ => util}/error.c | 2 +- src/{ => util}/error.h | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) rename src/{ => util}/error.c (98%) rename src/{ => util}/error.h (92%) diff --git a/src/dat/mcx.c b/src/dat/mcx.c index 719ed37..df767e0 100644 --- a/src/dat/mcx.c +++ b/src/dat/mcx.c @@ -10,8 +10,8 @@ #include #include -#include "../error.h" #include "../types.h" +#include "../util/error.h" #define SECTOR 0x1000 // sector size #define TABLE 0x800 // table (total) element count diff --git a/src/io/render.c b/src/io/render.c index 044babd..f448043 100644 --- a/src/io/render.c +++ b/src/io/render.c @@ -6,8 +6,8 @@ #include #include -#include "../error.h" #include "../types.h" +#include "../util/error.h" #include "shader.h" #define VERTC 3 diff --git a/src/io/shader.c b/src/io/shader.c index 6e69537..a3b6605 100644 --- a/src/io/shader.c +++ b/src/io/shader.c @@ -6,7 +6,7 @@ #include #include -#include "../error.h" +#include "../util/error.h" // NOTE: we are currently just sucking up the memory costs for ease. We can either include the source files themselves. Or use compression, where I'd prefer the latter for ease of installation. diff --git a/src/io/window.c b/src/io/window.c index 8e87ad2..54b2dc7 100644 --- a/src/io/window.c +++ b/src/io/window.c @@ -6,8 +6,8 @@ #include #include -#include "../error.h" #include "../types.h" +#include "../util/error.h" #include "input.h" #include "render.h" diff --git a/src/main.c b/src/main.c index afb7fb7..c1d5cee 100644 --- a/src/main.c +++ b/src/main.c @@ -5,8 +5,8 @@ #include #include -#include "error.h" #include "io/window.h" +#include "util/error.h" /* reroutes GLFW errors to our logging system. */ static void error_callback(int err, const char *const msg) { diff --git a/src/util/conf.c b/src/util/conf.c index ffb269e..c0aa53d 100644 --- a/src/util/conf.c +++ b/src/util/conf.c @@ -11,7 +11,7 @@ #include #include "../types.h" -#include "../error.h" +#include "../util/error.h" #include "atrb.h" int conf_procbuf(const char *restrict buf, char *restrict kout, char *restrict vout, usize len) { diff --git a/src/error.c b/src/util/error.c similarity index 98% rename from src/error.c rename to src/util/error.c index 5959ddf..2002133 100644 --- a/src/error.c +++ b/src/util/error.c @@ -5,7 +5,7 @@ #include #include -#include "types.h" +#include "../types.h" static void error_log(FILE *restrict stream, const char *restrict pfx, uint ln, const char *restrict file, const char *restrict fmt, va_list ap) { fprintf(stream, "(%s:%u) [%s] '", file, ln, pfx); diff --git a/src/error.h b/src/util/error.h similarity index 92% rename from src/error.h rename to src/util/error.h index 196fdc6..d179028 100644 --- a/src/error.h +++ b/src/util/error.h @@ -5,9 +5,9 @@ #include #include -#include "types.h" -#include "util/atrb.h" -#include "util/macro.h" +#include "../types.h" +#include "../util/atrb.h" +#include "../util/macro.h" void error_debug(uint ln, const char *restrict file, const char *restrict fmt, ...); void error_info(uint ln, const char *restrict file, const char *restrict fmt, ...);