diff --git a/docs/dev/styleref.md b/docs/dev/styleref.md index ea3f158..78a32a2 100644 --- a/docs/dev/styleref.md +++ b/docs/dev/styleref.md @@ -21,7 +21,7 @@ Where we have dependencies on: | [openGL](https://www.opengl.org/) | hardware accelleration, for handling graphics. | It is intended to be platform-agnostic, within reason. But the main focus is for [Linux](https://wikipedia.org/wiki/Linux) systems with [x86_64](https://wikipedia.org/wiki/X86-64) architecture. -Within [intdef.h](/src/util/intdef.h) there live definitions for fixed-width integer types. +Within [types.h](/src/types.h) there live definitions for fixed-width integer types. ### style guide - Code must be written correctly, read [Correct C](./correct-c.md) if more information is required. diff --git a/src/dat/mcx.c b/src/dat/mcx.c index a92ad8b..719ed37 100644 --- a/src/dat/mcx.c +++ b/src/dat/mcx.c @@ -11,7 +11,7 @@ #include #include "../error.h" -#include "../util/intdef.h" +#include "../types.h" #define SECTOR 0x1000 // sector size #define TABLE 0x800 // table (total) element count diff --git a/src/dat/mcx.h b/src/dat/mcx.h index 5e39fc7..2b48f34 100644 --- a/src/dat/mcx.h +++ b/src/dat/mcx.h @@ -4,8 +4,8 @@ #include +#include "../types.h" #include "../util/atrb.h" -#include "../util/intdef.h" /* contains chunk metadata */ struct mcx_chunk { diff --git a/src/dat/nbt.c b/src/dat/nbt.c index e36d0fc..ab6ea6f 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -8,7 +8,7 @@ #include #include -#include "../util/intdef.h" +#include "../types.h" #define MAX_DEPTH 512 diff --git a/src/dat/nbt.h b/src/dat/nbt.h index f74c948..f203c71 100644 --- a/src/dat/nbt.h +++ b/src/dat/nbt.h @@ -7,8 +7,8 @@ #include #include +#include "../types.h" #include "../util/atrb.h" -#include "../util/intdef.h" /* NBT (named binary tag) is a tree data structure. Tags have a numeric type ID, name and a payload. * NBT files are a compressed `compound` tag. GZip is the compression used in most cases, diff --git a/src/error.c b/src/error.c index f027e2b..5959ddf 100644 --- a/src/error.c +++ b/src/error.c @@ -5,7 +5,7 @@ #include #include -#include "util/intdef.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/error.h index 0b75dd8..196fdc6 100644 --- a/src/error.h +++ b/src/error.h @@ -5,8 +5,8 @@ #include #include +#include "types.h" #include "util/atrb.h" -#include "util/intdef.h" #include "util/macro.h" void error_debug(uint ln, const char *restrict file, const char *restrict fmt, ...); diff --git a/src/io/render.c b/src/io/render.c index 2964487..044babd 100644 --- a/src/io/render.c +++ b/src/io/render.c @@ -7,7 +7,7 @@ #include #include "../error.h" -#include "../util/intdef.h" +#include "../types.h" #include "shader.h" #define VERTC 3 diff --git a/src/io/window.c b/src/io/window.c index e93779c..8e87ad2 100644 --- a/src/io/window.c +++ b/src/io/window.c @@ -7,7 +7,7 @@ #include #include "../error.h" -#include "../util/intdef.h" +#include "../types.h" #include "input.h" #include "render.h" diff --git a/src/util/intdef.h b/src/types.h similarity index 100% rename from src/util/intdef.h rename to src/types.h diff --git a/src/util/conf.c b/src/util/conf.c index 98b4eef..ffb269e 100644 --- a/src/util/conf.c +++ b/src/util/conf.c @@ -10,9 +10,9 @@ #include #include +#include "../types.h" #include "../error.h" #include "atrb.h" -#include "intdef.h" int conf_procbuf(const char *restrict buf, char *restrict kout, char *restrict vout, usize len) { bool feq = false; // whether we've found the equal sign diff --git a/src/util/conf.h b/src/util/conf.h index a0323ab..ee7d1d8 100644 --- a/src/util/conf.h +++ b/src/util/conf.h @@ -5,8 +5,8 @@ #include #include +#include "../types.h" #include "atrb.h" -#include "intdef.h" /* error codes */ enum conf_err { diff --git a/src/util/vec.h b/src/util/vec.h index 6c38bd8..1ebe933 100644 --- a/src/util/vec.h +++ b/src/util/vec.h @@ -2,7 +2,7 @@ * Licensed under the MIT Licence. See LICENSE for details */ #pragma once -#include "intdef.h" +#include "../types.h" #if defined(__has_attribute) && __has_attribute(vector_size) typedef float fvec2 __attribute__((vector_size(sizeof(float) * 2))); // SMID vector for 2 `float` diff --git a/test/test.c b/test/test.c index 4b062d6..36ed5fa 100644 --- a/test/test.c +++ b/test/test.c @@ -2,7 +2,7 @@ * Licensed under the MIT Licence. See LICENSE for details */ #include "test.h" -#include "../src/util/intdef.h" +#include "../src/types.h" uint test_okay = 0; uint test_fail = 0; diff --git a/test/test.h b/test/test.h index e7f0eec..b259e78 100644 --- a/test/test.h +++ b/test/test.h @@ -3,7 +3,7 @@ #pragma once #include -#include "../src/util/intdef.h" +#include "../src/types.h" extern uint test_okay; extern uint test_fail; diff --git a/test/test_conf.c b/test/test_conf.c index 02b8a68..25ae30b 100644 --- a/test/test_conf.c +++ b/test/test_conf.c @@ -5,8 +5,8 @@ #include #include +#include "../src/types.h" #include "../src/util/conf.h" -#include "../src/util/intdef.h" #include "test.h" void test_conf_procbuf(const char *restrict buf, const char *restrict expect_key, const char *restrict expect_val, int expect_return) { diff --git a/test/test_conf.h b/test/test_conf.h index fb0d4e0..90f74c9 100644 --- a/test/test_conf.h +++ b/test/test_conf.h @@ -2,8 +2,8 @@ * Licensed under the MIT Licence. See LICENSE for details */ #pragma once +#include "../src/types.h" #include "../src/util/conf.h" -#include "../src/util/intdef.h" void test_conf_procbuf(const char *restrict buf, const char *restrict expect_key, const char *restrict expect_val, int expect_return); void test_conf_matchopt(struct conf_entry *restrict opts, usize optc, const char *restrict key, int expect_index);