commit 9d81de1

uint  ·  2026-10-14 18:50:34 +0000 UTC
parent 0b0f486
rename util.h->utils.h to avoid collision on BSDs
12 files changed,  +14, -14
R include/util.h => include/utils.h
+3, -3
 1@@ -1,5 +1,5 @@
 2-#ifndef UTIL_H
 3-#define UTIL_H
 4+#ifndef UTILS_H
 5+#define UTILS_H
 6 
 7 #define RGBA(r, g, b, a) (((u32)(r)) | ((u32)(g) << 8) | ((u32)(b) << 16) | ((u32)(a) << 24))
 8 
 9@@ -53,4 +53,4 @@ void mg_die(MGErrorCodes ec, const char* fmt, ...);
10 /* log message */
11 void mg_log(LogType lt, const char* fmt, ...);
12 
13-#endif /* UTIL_H */
14+#endif /* UTILS_H */
+1, -1
1@@ -73,7 +73,7 @@ message('Selected windowing: ' + window_backend)
2 sources = [
3     'source/main.c',
4     'source/config.c',
5-    'source/util.c',
6+    'source/utils.c',
7     'source/world/block.c',
8     'source/world/chunk.c',
9     'source/client/camera.c',
+1, -1
1@@ -1,5 +1,5 @@
2 #include "mgmath.h"
3-#include "util.h"
4+#include "utils.h"
5 #include "client/player.h"
6 #include "net/mc_proto.h"
7 #include "net/packet.h"
+1, -1
1@@ -2,7 +2,7 @@
2 #include <string.h>
3 
4 #include "types.h"
5-#include "util.h"
6+#include "utils.h"
7 #include "client/world.h"
8 
9 #define MC_CHUNK_SECTION_BLOCK_BYTES 8192
+1, -1
1@@ -3,7 +3,7 @@
2 
3 #include "config.h"
4 #include "mgmath.h"
5-#include "util.h"
6+#include "utils.h"
7 #include "client/camera.h"
8 #include "client/player.h"
9 #include "client/world.h"
+1, -1
1@@ -1,7 +1,7 @@
2 #include <stdlib.h>
3 #include <string.h>
4 
5-#include "util.h"
6+#include "utils.h"
7 #include "net/mc_chunk.h"
8 #include "net/packet.h"
9 #include "world/chunk.h"
+1, -1
1@@ -3,7 +3,7 @@
2 #include <stdlib.h>
3 #include <time.h>
4 
5-#include "util.h"
6+#include "utils.h"
7 #include "platform/platform.h"
8 
9 static MGContext* platform_ctx;
+1, -1
1@@ -1,6 +1,6 @@
2 #include <SDL2/SDL.h>
3 
4-#include "util.h"
5+#include "utils.h"
6 #include "platform/platform.h"
7 
8 static void platform_key_set(MGContext* ctx, MGKey key, i32 down);
+1, -1
1@@ -2,7 +2,7 @@
2 #include <sokol_gfx.h>
3 #include <stb_image_c89.h>
4 
5-#include "util.h"
6+#include "utils.h"
7 #include "types.h"
8 #include "platform/platform.h"
9 #include "renderer/renderer.h"
R source/util.c => source/utils.c
+1, -1
1@@ -2,7 +2,7 @@
2 #include <stdio.h>
3 #include <stdlib.h>
4 
5-#include "util.h"
6+#include "utils.h"
7 
8 static void vlog(FILE* fd, const char* fmt, va_list ap);
9 
+1, -1
1@@ -4,7 +4,7 @@
2 #include <string.h>
3 
4 #include "json.h"
5-#include "util.h"
6+#include "utils.h"
7 #include "world/block.h"
8 
9 #define NAME_SIZE 128
+1, -1
1@@ -1,7 +1,7 @@
2 #include <stdlib.h>
3 #include <string.h>
4 
5-#include "util.h"
6+#include "utils.h"
7 #include "world/chunk.h"
8 
9 #define MAX_MESH_VERTICES 65535U