From 6341b76a865de034f814c6ac81ae15c9f9836017 Mon Sep 17 00:00:00 2001 From: Nishi Date: Tue, 28 Apr 2026 15:08:00 +0900 Subject: [PATCH] perltidy --- pl/ostype/FreeBSD.pl | 3 +-- pl/ostype/OpenBSD.pl | 3 +-- pl/rules.pl | 5 ++--- src/backend/gdi.c | 4 ++-- src/widget/opengl.c | 15 ++++++++------- tools/readme.pl | 5 ++++- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/pl/ostype/FreeBSD.pl b/pl/ostype/FreeBSD.pl index 5ba602b..4d4b17a 100644 --- a/pl/ostype/FreeBSD.pl +++ b/pl/ostype/FreeBSD.pl @@ -1,8 +1,7 @@ my @enabled_backends = (); add_incdir2("-I/usr/local/include"); -add_libdir( - "-L/usr/local/lib -Wl,-R/usr/local/lib"); +add_libdir("-L/usr/local/lib -Wl,-R/usr/local/lib"); if (param_get("wayland") && not(param_get("tiny"))) { push(@enabled_backends, "wayland"); diff --git a/pl/ostype/OpenBSD.pl b/pl/ostype/OpenBSD.pl index 5fb0cda..dbbc3be 100644 --- a/pl/ostype/OpenBSD.pl +++ b/pl/ostype/OpenBSD.pl @@ -1,6 +1,5 @@ add_incdir2("-I/usr/local/include"); -add_libdir( - "-L/usr/local/lib -Wl,-R/usr/local/lib"); +add_libdir("-L/usr/local/lib -Wl,-R/usr/local/lib"); use_backend("x11"); add_libs("-lpthread"); diff --git a/pl/rules.pl b/pl/rules.pl index 498e304..4741b1c 100644 --- a/pl/rules.pl +++ b/pl/rules.pl @@ -12,7 +12,7 @@ if (param_get("tiny")) { # these don't actually disable either, they're here for the final output. param_set("wayland", 0); - param_set("dbus", 0); + param_set("dbus", 0); } if (param_get("classic-theme")) { add_cflags("-DUSE_CLASSIC_THEME"); @@ -96,7 +96,7 @@ if (grep(/^cocoa$/, @backends) || param_get("gnustep")) { } if (grep(/^haiku$/, @backends)) { - new_object("src/backend/haiku.cxx"); + new_object("src/backend/haiku.cxx"); } if (param_get("stb-image")) { @@ -118,7 +118,6 @@ if (param_get("allow-sloppy-focus")) { add_cflags("-DALLOW_SLOPPY_FOCUS"); } - add_incdir("-Iexternal/libz/include"); if (param_get("freetype2")) { diff --git a/src/backend/gdi.c b/src/backend/gdi.c index e030c1f..f273b8b 100644 --- a/src/backend/gdi.c +++ b/src/backend/gdi.c @@ -876,9 +876,9 @@ static int MwLLGDICallInitImpl(void) { if(wsymtbl.lib_dwmapi != NULL) DwmSetWindowAttribute = MwDynamicSymbol(wsymtbl.lib_dwmapi, "DwmSetWindowAttribute"); - if((ntdll = GetModuleHandle("ntdll.dll")) != NULL && GetProcAddress(ntdll, "wine_get_version") != NULL){ + if((ntdll = GetModuleHandle("ntdll.dll")) != NULL && GetProcAddress(ntdll, "wine_get_version") != NULL) { is_plgblt_reliable = 0; - }else{ + } else { is_plgblt_reliable = 1; } diff --git a/src/widget/opengl.c b/src/widget/opengl.c index 219c02f..53374b8 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -129,16 +129,17 @@ static int wcreate(MwWidget handle) { SetPixelFormat(o->dc, pf, &pfd); o->lib = MwDynamicOpen("opengl32.dll"); - if(!o->lib){ - printf("Could not load OpenGL widget under WGL!\n"); \ + if(!o->lib) { + printf("Could not load OpenGL widget under WGL!\n"); return 1; } -#define WGL_FUNC(x) o->x = MwDynamicSymbol(o->lib, #x); \ - if(o->x == NULL){ \ - printf("Could not load OpenGL widget under WGL! " #x " missing.\n"); \ - return 1; \ - } +#define WGL_FUNC(x) \ + o->x = MwDynamicSymbol(o->lib, #x); \ + if(o->x == NULL) { \ + printf("Could not load OpenGL widget under WGL! " #x " missing.\n"); \ + return 1; \ + } WGL_FUNC(wglCreateContext); WGL_FUNC(wglMakeCurrent); diff --git a/tools/readme.pl b/tools/readme.pl index 182b010..d7c1909 100755 --- a/tools/readme.pl +++ b/tools/readme.pl @@ -60,6 +60,7 @@ c("Requirements"); l(""); l(" Milsko requires either"); l(" * A Windows environment with GDI (so anything NT or 9x)"); + #l(" * A MacOS environment with Cocoa (10.4 or above supported)"); l(" * A Unix-like environment with Wayland and/or X11 for runtime."); l(""); @@ -108,7 +109,9 @@ l("1) Determine if you need Vulkan and/or OpenGL."); l(""); l("2) Either:"); l(" a.) Run `./configure'. For help, run `./configure --help'."); -l(" b.) Use CMake; i.e. `cmake -B build`. (if contributing, name the build folder build as that's what's included in the .gitignore)"); +l( +" b.) Use CMake; i.e. `cmake -B build`. (if contributing, name the build folder build as that's what's included in the .gitignore)" +); l(""); l("3) Run `make'."); l("");