From 4d31834178f45ab77b94a25023463d256fa8295a Mon Sep 17 00:00:00 2001 From: Quinn Date: Fri, 21 Mar 2025 16:46:03 +0100 Subject: [PATCH] apply new formatting rules to project --- src/util/gen/dynarr.h | 42 +++++++++++++++++++++--------------------- src/window/audio.c | 10 +++++----- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/util/gen/dynarr.h b/src/util/gen/dynarr.h index 15a09ea..f5dffd4 100644 --- a/src/util/gen/dynarr.h +++ b/src/util/gen/dynarr.h @@ -1,28 +1,28 @@ #ifndef DYNARR_H -#define DYNARR_H -#include +# define DYNARR_H +# include -#define DYNARR_COMB2(a, b) a##b -#define DYNARR_COMB1(a, b) DYNARR_COMB2(a, b) +# define DYNARR_COMB2(a, b) a##b +# define DYNARR_COMB1(a, b) DYNARR_COMB2(a, b) #endif // DYNARR_H #ifdef DYNARR_TYPE -#include -#include -#include +# include +# include +# include // customising the linkage -#ifndef DYNARR_LINKAGE -#define DYNARR_LINKAGE static inline -#endif +# ifndef DYNARR_LINKAGE +# define DYNARR_LINKAGE static inline +# endif // customising the name -#ifndef DYNARR_NAME -#define DYNARR_NAME DYNARR_COMB1(dynarr_, DYNARR_TYPE) -#endif // DYNARR_NAME +# ifndef DYNARR_NAME +# define DYNARR_NAME DYNARR_COMB1(dynarr_, DYNARR_TYPE) +# endif // DYNARR_NAME -#define DYNARR_COUNT_MAX (SIZE_MAX / sizeof(DYNARR_TYPE)) -#define DYNARR_FUNC(name) DYNARR_COMB1(DYNARR_NAME, _##name) // name of the initialization funcition +# define DYNARR_COUNT_MAX (SIZE_MAX / sizeof(DYNARR_TYPE)) +# define DYNARR_FUNC(name) DYNARR_COMB1(DYNARR_NAME, _##name) // name of the initialization funcition // define the dynamic array structure typedef struct { @@ -166,11 +166,11 @@ DYNARR_LINKAGE uint8_t DYNARR_FUNC(remove)(DYNARR_NAME* arr, size_t idx) { } // clean up all defined definitions so they can be used again later -#undef DYNARR_COUNT_MAX -#undef DYNARR_FUNC -#undef DYNARR_NAME -#undef DYNARR_LINKAGE -#undef DYNARR_TYPE +# undef DYNARR_COUNT_MAX +# undef DYNARR_FUNC +# undef DYNARR_NAME +# undef DYNARR_LINKAGE +# undef DYNARR_TYPE #elif __INCLUDE_LEVEL__ != 0 -#error define DYNARR_TYPE before including +# error define DYNARR_TYPE before including #endif // DYNARR_TYPE diff --git a/src/window/audio.c b/src/window/audio.c index 6fa32e6..aec4dde 100644 --- a/src/window/audio.c +++ b/src/window/audio.c @@ -8,13 +8,13 @@ #include #ifdef __unix__ -#include -#define fexists(fname) (access(fname, F_OK) == 0) +# include +# define fexists(fname) (access(fname, F_OK) == 0) #elif _WIN32 -#include -#define fexists(fname) (_access(fname, 0) == 0) +# include +# define fexists(fname) (_access(fname, 0) == 0) #else -#error platform not supported! +# error platform not supported! #endif #include "../error.h"