From e7d8b456aa3bd2a97ce803aea1c2820cf972d75a Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Sat, 19 Apr 2025 07:31:54 -0400 Subject: [PATCH] Everywhere: Update to clang-format 20 --- System/Api/Tcp.HC | 9 +++------ System/Core/Compositor.HC | 6 ++---- System/Drivers/Display.HC | 15 +++++---------- System/Drivers/VMSVGA.HC | 6 ++---- System/FFI/ELF64.HC | 3 +-- System/Libraries/Clipboard.HC | 3 +-- System/Libraries/Function.HC | 6 ++---- System/Libraries/Graphics2D.HC | 6 ++---- System/Libraries/String.HC | 3 +-- 9 files changed, 19 insertions(+), 38 deletions(-) diff --git a/System/Api/Tcp.HC b/System/Api/Tcp.HC index 99f436c..cd32cca 100644 --- a/System/Api/Tcp.HC +++ b/System/Api/Tcp.HC @@ -25,12 +25,9 @@ class TcpSocket { U64 send_buffer_filled; U64 send_buffer_kick; // We set this to 1 when we have data available to net, // Net sets back to 0 when ready to receive - U0(*close) - (); - U64(*receive) - (U64 buf, U64 length); - U0(*send) - (U64 buf, U64 length); + U0 (*close)(); + U64 (*receive)(U64 buf, U64 length); + U0 (*send)(U64 buf, U64 length); }; class TcpBind { diff --git a/System/Core/Compositor.HC b/System/Core/Compositor.HC index 897eedf..3077b07 100644 --- a/System/Core/Compositor.HC +++ b/System/Core/Compositor.HC @@ -85,8 +85,7 @@ class @compositor Bool in_drag; Bool in_resize; CTask* task; - U0(*Init) - (); + U0 (*Init)(); Window* (*CreateWindow)(I64 x, I64 y, I64 width, I64 height, I64 flags = WIN_FLAGS_DEFAULT, U8* title = NULL, Context2D* icon = NULL); @@ -98,8 +97,7 @@ class @compositor U0 (*RegisterForGlobalInputEvents)(Window* win); U0 (*UnregisterForGlobalInputEvents)(Window* win); U0 (*SetWallpaper)(Context2D* ctx, U32 mode = CPZ_WALLPAPER_AUTORESIZE, U32 background = Color(0, 0, 0)); - U0(*Task) - (); + U0 (*Task)(); }; @compositor Compositor; diff --git a/System/Drivers/Display.HC b/System/Drivers/Display.HC index cc97257..ec8117d 100644 --- a/System/Drivers/Display.HC +++ b/System/Drivers/Display.HC @@ -6,16 +6,11 @@ class @display I64 driver; U64 fb; - U0(*Init) - (I64 width, I64 height, I64 bpp, I64 driver); - I64(*Width) - (); - I64(*Height) - (); - I64(*Bpp) - (); - I64(*Driver) - (); + U0 (*Init)(I64 width, I64 height, I64 bpp, I64 driver); + I64 (*Width)(); + I64 (*Height)(); + I64 (*Bpp)(); + I64 (*Driver)(); U0 (*Update)(); }; diff --git a/System/Drivers/VMSVGA.HC b/System/Drivers/VMSVGA.HC index 9e42374..8162c9d 100644 --- a/System/Drivers/VMSVGA.HC +++ b/System/Drivers/VMSVGA.HC @@ -242,10 +242,8 @@ U0 @vmsvga_display_update() { @vmsvga_reg_write(VMSVGA_REG_ENABLE, 1); } class @vmsvga { - U0(*Init) - (I64 w, I64 h, I64 bpp); - U64(*FrameBuffer) - (); + U0 (*Init)(I64 w, I64 h, I64 bpp); + U64 (*FrameBuffer)(); }; @vmsvga VMSVGA; diff --git a/System/FFI/ELF64.HC b/System/FFI/ELF64.HC index 50e6315..5b75594 100644 --- a/System/FFI/ELF64.HC +++ b/System/FFI/ELF64.HC @@ -76,8 +76,7 @@ class Elf { I64 symtab_size; }; -U0(*_start) -(); +U0 (*_start)(); U0 unimplemented_symbol() { diff --git a/System/Libraries/Clipboard.HC b/System/Libraries/Clipboard.HC index c920a83..a3c1b8b 100644 --- a/System/Libraries/Clipboard.HC +++ b/System/Libraries/Clipboard.HC @@ -35,8 +35,7 @@ class @clipboard U0 (*Init)(); U0 (*Insert)(I64 type, U8* data); I64 (*Length)(); - U0(*Task) - (); + U0 (*Task)(); }; @clipboard Clipboard; diff --git a/System/Libraries/Function.HC b/System/Libraries/Function.HC index d66c443..67c1e66 100644 --- a/System/Libraries/Function.HC +++ b/System/Libraries/Function.HC @@ -12,10 +12,8 @@ U0 @function_patch(U32 from, U32 to) class @function { - U0(*InsertCall) - (U32 from, U32 to); - U0(*Patch) - (U32 from, U32 to); + U0 (*InsertCall)(U32 from, U32 to); + U0 (*Patch)(U32 from, U32 to); }; @function Function; diff --git a/System/Libraries/Graphics2D.HC b/System/Libraries/Graphics2D.HC index 655b79f..275f0f8 100644 --- a/System/Libraries/Graphics2D.HC +++ b/System/Libraries/Graphics2D.HC @@ -1558,10 +1558,8 @@ class @graphics2d Context2D* fb; Context2D* (*FrameBufferContext2D)(); - U0(*Init) - (); - U0(*Flip) - (Context2D * ctx); + U0 (*Init)(); + U0 (*Flip)(Context2D* ctx); I64 qwords; }; diff --git a/System/Libraries/String.HC b/System/Libraries/String.HC index bca0e71..0b6d2ac 100644 --- a/System/Libraries/String.HC +++ b/System/Libraries/String.HC @@ -149,8 +149,7 @@ U0 @string_trim(U8* s, U8 ch = NULL, I64 mode = TRIM_BOTH) class @string { - U0(*Append) - (U8 * dst, U8 * fmt, ...); + U0 (*Append)(U8* dst, U8* fmt, ...); Bool (*BeginsWith)(U8* fragment, U8* str); Bool (*EndsWith)(U8* fragment, U8* str); Bool (*IsNumber)(U8* s);