move /src/util/intdef.h to /src/util/types.h

This commit is contained in:
2025-10-09 12:05:01 +02:00
parent 27c862c215
commit aa58d931aa
17 changed files with 16 additions and 16 deletions

View File

@@ -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.

View File

@@ -11,7 +11,7 @@
#include <time.h>
#include "../error.h"
#include "../util/intdef.h"
#include "../types.h"
#define SECTOR 0x1000 // sector size
#define TABLE 0x800 // table (total) element count

View File

@@ -4,8 +4,8 @@
#include <stdlib.h>
#include "../types.h"
#include "../util/atrb.h"
#include "../util/intdef.h"
/* contains chunk metadata */
struct mcx_chunk {

View File

@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include "../util/intdef.h"
#include "../types.h"
#define MAX_DEPTH 512

View File

@@ -7,8 +7,8 @@
#include <stdbool.h>
#include <stdlib.h>
#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,

View File

@@ -5,7 +5,7 @@
#include <stdarg.h>
#include <stdio.h>
#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);

View File

@@ -5,8 +5,8 @@
#include <stdio.h>
#include <stdlib.h>
#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, ...);

View File

@@ -7,7 +7,7 @@
#include <stdint.h>
#include "../error.h"
#include "../util/intdef.h"
#include "../types.h"
#include "shader.h"
#define VERTC 3

View File

@@ -7,7 +7,7 @@
#include <glad/gl.h>
#include "../error.h"
#include "../util/intdef.h"
#include "../types.h"
#include "input.h"
#include "render.h"

View File

@@ -10,9 +10,9 @@
#include <stdlib.h>
#include <string.h>
#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

View File

@@ -5,8 +5,8 @@
#include <stddef.h>
#include <stdlib.h>
#include "../types.h"
#include "atrb.h"
#include "intdef.h"
/* error codes */
enum conf_err {

View File

@@ -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`

View File

@@ -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;

View File

@@ -3,7 +3,7 @@
#pragma once
#include <stdio.h>
#include "../src/util/intdef.h"
#include "../src/types.h"
extern uint test_okay;
extern uint test_fail;

View File

@@ -5,8 +5,8 @@
#include <math.h>
#include <string.h>
#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) {

View File

@@ -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);