commit 5511bde
uint
·
2026-08-04 21:19:05 +0000 UTC
parent d867cab
Rename maus_win->maus_windows
6 files changed,
+21,
-23
+8,
-8
1@@ -15,24 +15,24 @@ exit /b 1
2 :: MSVC
3 :msvc
4 cl /diagnostics:color /nologo /W3 /O2 /Iinclude /DBACKEND_WIN /c ^
5- source/maus.c source/maus_win.c source/maus_font.c source/utils.c
6-lib /nologo /OUT:build\libmaus_win.lib *.obj
7+ source/maus.c source/maus_windows.c source/maus_font.c source/utils.c
8+lib /nologo /OUT:build\libmaus_windows.lib *.obj
9 move /Y *.obj build\
10 goto :eof
11
12 :: GCC
13 :gcc
14-cc -std=c99 -Wall -Wextra -O2 -Iinclude -DBACKEND_WIN -c ^
15- source/maus.c source/maus_win.c source/maus_font.c source/utils.c
16+cc -ansi -pedantic-errors -Wall -Wextra -O2 -Iinclude -DBACKEND_WIN -c ^
17+ source/maus.c source/maus_windows.c source/maus_font.c source/utils.c
18 move *.o build\
19-ar rcs build\libmaus_win.a build\maus.o build\maus_win.o build\maus_font.o build\utils.o
20+ar rcs build\libmaus_windows.a build\maus.o build\maus_windows.o build\maus_font.o build\utils.o
21 goto :eof
22
23 :: GCC
24 :clang
25-clang -std=c99 -Wall -Wextra -O2 -Iinclude -DBACKEND_WIN -c ^
26- source/maus.c source/maus_win.c source/maus_font.c source/utils.c
27+clang -ansi -pedantic-errors -Wall -Wextra -O2 -Iinclude -DBACKEND_WIN -c ^
28+ source/maus.c source/maus_windows.c source/maus_font.c source/utils.c
29 move *.o build\
30-ar rcs build\libmaus_win.a build\maus.o build\maus_win.o build\maus_font.o build\utils.o
31+ar rcs build\libmaus_windows.a build\maus.o build\maus_windows.o build\maus_font.o build\utils.o
32 goto :eof
33
+3,
-3
1@@ -11,17 +11,17 @@ echo Usage: build.bat [msvc^|gcc^|clang]
2 exit /b 1
3
4 :msvc
5-cl /diagnostics:color /nologo /W3 /O2 /I..\..\include main.c ..\..\build\libmaus_win.lib user32.lib gdi32.lib /link /OUT:basic-window.exe
6+cl /diagnostics:color /nologo /W3 /O2 /I..\..\include main.c ..\..\build\libmaus_windows.lib user32.lib gdi32.lib /link /OUT:basic-window.exe
7 echo Build complete
8 goto :eof
9
10 :gcc
11-cc -std=c99 -Wall -Wextra -g -I../../include main.c ../../build/libmaus_win.a -lgdi32 -luser32 -o basic-window.exe
12+cc -ansi -pedantic-errors -Wall -Wextra -g -I../../include main.c ../../build/libmaus_windows.a -lgdi32 -luser32 -o basic-window.exe
13 echo Build complete
14 goto :eof
15
16 :clang
17-clang -std=c99 -Wall -Wextra -g -I../../include main.c ../../build/libmaus_win.a -lgdi32 -luser32 -o basic-window.exe
18+clang -ansi -pedantic-errors -Wall -Wextra -g -I../../include main.c ../../build/libmaus_windows.a -lgdi32 -luser32 -o basic-window.exe
19 echo Build complete
20 goto :eof
21
+5,
-4
1@@ -1,5 +1,5 @@
2-#ifndef MAUSWIN_H
3-#define MAUSWIN_H
4+#ifndef MAUS_H
5+#define MAUS_H
6
7 #include <stdio.h>
8 #include <stdint.h>
9@@ -38,7 +38,7 @@
10 #include "maus_wayland.h"
11
12 #elif defined(BACKEND_WIN)
13- #include "maus_win.h"
14+ #include "maus_windows.h"
15
16 #elif defined(BACKEND_MAC)
17 /* ... */
18@@ -180,4 +180,5 @@ void maus_target_fps(Maus* mw, uint32_t fps);
19 /* change behavior of mouse based on state passed */
20 void maus_cur_set_mode(Maus* mw, MausCursorState state);
21
22-#endif /* MAUSWIN_H */
23+#endif /* MAUS */
24+
R include/maus_win.h =>
include/maus_windows.h
+3,
-3
1@@ -1,5 +1,5 @@
2-#ifndef MAUS_WIN_H
3-#define MAUS_WIN_H
4+#ifndef MAUS_WINDOWS_H
5+#define MAUS_WINDOWS_H
6
7 #include <stdint.h>
8
9@@ -16,5 +16,5 @@ typedef struct {
10 uint32_t rh;
11 } MausBackend;
12
13-#endif /* MAUS_WIN_H */
14+#endif /* MAUS_WINDOWS_H */
15
+1,
-4
1@@ -22,9 +22,6 @@ deps = []
2 c_args = []
3 backend_override_options = ['c_std=c89']
4 lib_name = 'maus_' + backend
5-if backend == 'windows'
6- lib_name = 'maus_win'
7-endif
8
9 if backend == 'x11'
10 c_args += ['-DBACKEND_X11']
11@@ -55,7 +52,7 @@ elif backend == 'windows'
12 cc.find_library('gdi32'),
13 cc.find_library('user32'),
14 ]
15- backend_sources += ['source/maus_win.c']
16+ backend_sources += ['source/maus_windows.c']
17 endif
18
19 common = static_library(
R source/maus_win.c =>
source/maus_windows.c
+1,
-1
1@@ -3,7 +3,7 @@
2
3 #include "maus.h"
4 #include "maus_input.h"
5-#include "maus_win.h"
6+#include "maus_windows.h"
7
8 typedef struct {
9 UINT vk;