From 8c107b989f8e8c93877ca1b65bd5727a8fffb1ad Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sun, 28 Sep 2025 08:37:21 +0000 Subject: [PATCH] format git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@12 b9cfdab3-6d41-4d17-bbe4-086880011989 --- include/Milsko/Core.h | 6 +++--- include/Milsko/LowLevel.h | 2 +- include/Milsko/TypeDef.h | 2 +- src/core.c | 10 +++++----- src/window.c | 5 ++--- src/x11.c | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/Milsko/Core.h b/include/Milsko/Core.h index d364b86..719bcd0 100644 --- a/include/Milsko/Core.h +++ b/include/Milsko/Core.h @@ -7,8 +7,8 @@ MILSKODECL HMILSKO MilskoCreateWidget(MilskoClass class, HMILSKO parent, int x, int y, unsigned int width, unsigned int height); MILSKODECL void MilskoDestroyWidget(HMILSKO handle); -MILSKODECL void MilskoLoop(HMILSKO handle); -MILSKODECL void MilskoStep(HMILSKO handle); -MILSKODECL int MilskoPending(HMILSKO handle); +MILSKODECL void MilskoLoop(HMILSKO handle); +MILSKODECL void MilskoStep(HMILSKO handle); +MILSKODECL int MilskoPending(HMILSKO handle); #endif diff --git a/include/Milsko/LowLevel.h b/include/Milsko/LowLevel.h index fd4d408..42cd225 100644 --- a/include/Milsko/LowLevel.h +++ b/include/Milsko/LowLevel.h @@ -24,6 +24,6 @@ MILSKODECL HMILSKOCOLOR MilskoLLAllocColor(HMILSKOLL handle, int r, int g, int b MILSKODECL void MilskoLLGetXYWH(HMILSKOLL handle, int* x, int* y, unsigned int* w, unsigned int* h); MILSKODECL int MilskoLLPending(HMILSKOLL handle); MILSKODECL void MilskoLLNextEvent(HMILSKOLL handle); -MILSKODECL void MilskoLLSleep(int ms); +MILSKODECL void MilskoLLSleep(int ms); #endif diff --git a/include/Milsko/TypeDef.h b/include/Milsko/TypeDef.h index 6989ff6..d29a471 100644 --- a/include/Milsko/TypeDef.h +++ b/include/Milsko/TypeDef.h @@ -27,6 +27,6 @@ typedef void* HMILSKO; #endif typedef struct _MilskoClass { -}* MilskoClass, MilskoClassRec; +} *MilskoClass, MilskoClassRec; #endif diff --git a/src/core.c b/src/core.c index 69c1e08..dbdab74 100644 --- a/src/core.c +++ b/src/core.c @@ -41,20 +41,20 @@ void MilskoDestroyWidget(HMILSKO handle) { free(handle); } -MILSKODECL void MilskoStep(HMILSKO handle){ +MILSKODECL void MilskoStep(HMILSKO handle) { MilskoLLNextEvent(handle->lowlevel); } -MILSKODECL int MilskoPending(HMILSKO handle){ +MILSKODECL int MilskoPending(HMILSKO handle) { int i; - for(i = 0; i < arrlen(handle->children); i++){ + for(i = 0; i < arrlen(handle->children); i++) { if(MilskoPending(handle->children[i])) return 1; } return MilskoLLPending(handle->lowlevel); } -MILSKODECL void MilskoLoop(HMILSKO handle){ - while(1){ +MILSKODECL void MilskoLoop(HMILSKO handle) { + while(1) { MilskoStep(handle); MilskoLLSleep(10); } diff --git a/src/window.c b/src/window.c index 333c5e3..940c88d 100644 --- a/src/window.c +++ b/src/window.c @@ -1,6 +1,5 @@ /* $Id$ */ #include -MilskoClassRec MilskoWindowClassRec = { -}; -MilskoClass MilskoWindowClass = &MilskoWindowClassRec; +MilskoClassRec MilskoWindowClassRec = {}; +MilskoClass MilskoWindowClass = &MilskoWindowClassRec; diff --git a/src/x11.c b/src/x11.c index 3f4a611..81b4818 100644 --- a/src/x11.c +++ b/src/x11.c @@ -89,6 +89,6 @@ void MilskoLLNextEvent(HMILSKOLL handle) { } } -void MilskoLLSleep(int ms){ +void MilskoLLSleep(int ms) { usleep(ms * 1000); }