diff --git a/src/base/array/array.h b/src/base/array/array.h index 311a37f..d2049b3 100644 --- a/src/base/array/array.h +++ b/src/base/array/array.h @@ -134,7 +134,7 @@ void _array_clear(GenericArray *array, u64 item_size); GenericArray *_array_alloc_capacity(const Allocator *allocator, u64 capacity, u64 item_size, b8 fill); // Base array types -typedef struct str8 Str8; +typedef struct Str8 Str8; WAPP_DEF_ARRAY_TYPE(void *, VoidPtrArray); WAPP_DEF_ARRAY_TYPE(c8 , C8Array); diff --git a/src/base/dbl_list/dbl_list.h b/src/base/dbl_list/dbl_list.h index 84ac9d0..47c043b 100644 --- a/src/base/dbl_list/dbl_list.h +++ b/src/base/dbl_list/dbl_list.h @@ -81,7 +81,7 @@ GenericNode *_dbl_list_remove(GenericList *list, u64 index, u64 item_size); void _dbl_list_empty(GenericList *list, u64 item_size); // Base list types -typedef struct str8 Str8; +typedef struct Str8 Str8; WAPP_DEF_DBL_LIST_TYPE(void *, VoidPtrNode, VoidPtrList); WAPP_DEF_DBL_LIST_TYPE(c8 , C8Node , C8List); diff --git a/src/base/mem/allocator/mem_allocator.h b/src/base/mem/allocator/mem_allocator.h index 968d0df..add3ca4 100644 --- a/src/base/mem/allocator/mem_allocator.h +++ b/src/base/mem/allocator/mem_allocator.h @@ -17,8 +17,8 @@ typedef void *(MemReallocFunc)(void *ptr, u64 old_size, u64 new_size, void *all typedef void *(MemReallocAlignedFunc)(void *ptr, u64 old_size, u64 new_size, u64 alignment, void *alloc_obj); typedef void (MemFreeFunc)(void **ptr, u64 size, void *alloc_obj); -typedef struct allocator Allocator; -struct allocator { +typedef struct Allocator Allocator; +struct Allocator { void *obj; MemAllocFunc *alloc; MemAllocAlignedFunc *alloc_aligned; diff --git a/src/base/strings/str8/str8.h b/src/base/strings/str8/str8.h index 7abdbc9..1f8c3ae 100644 --- a/src/base/strings/str8/str8.h +++ b/src/base/strings/str8/str8.h @@ -15,8 +15,8 @@ BEGIN_C_LINKAGE #endif // !WAPP_PLATFORM_CPP -typedef struct str8 Str8; -struct str8 { +typedef struct Str8 Str8; +struct Str8 { u64 capacity; u64 size; c8 *buf; diff --git a/src/os/allocators/arena/mem_arena.c b/src/os/allocators/arena/mem_arena.c index 3b13506..1052d65 100644 --- a/src/os/allocators/arena/mem_arena.c +++ b/src/os/allocators/arena/mem_arena.c @@ -17,7 +17,7 @@ #define ARENA_MINIMUM_CAPACITY KiB(16) // Allocate minimum of 4 pages -struct arena { +struct Arena { u8 *buf; u8 *offset; u64 capacity; diff --git a/src/os/allocators/arena/mem_arena.h b/src/os/allocators/arena/mem_arena.h index ff3f45f..69bba20 100644 --- a/src/os/allocators/arena/mem_arena.h +++ b/src/os/allocators/arena/mem_arena.h @@ -11,7 +11,7 @@ BEGIN_C_LINKAGE #endif // !WAPP_PLATFORM_CPP -typedef struct arena Arena; +typedef struct Arena Arena; #define wapp_mem_arena_init(arena_dptr, base_capacity) \ (wapp_mem_arena_init_custom(arena_dptr, base_capacity, WAPP_MEM_ALLOC_RESERVE, false)) diff --git a/src/os/shell/commander/commander_output.h b/src/os/shell/commander/commander_output.h index 7aed06a..7fc7ffd 100644 --- a/src/os/shell/commander/commander_output.h +++ b/src/os/shell/commander/commander_output.h @@ -25,8 +25,8 @@ typedef enum { SHELL_ERR_PROC_EXIT_FAIL, } CMDError; -typedef struct commander_result CMDResult; -struct commander_result { +typedef struct CMDResult CMDResult; +struct CMDResult { i32 exit_code; CMDError error; b8 exited; diff --git a/src/os/shell/termcolour/win/termcolour_win.c b/src/os/shell/termcolour/win/termcolour_win.c index be23db3..d6219a6 100644 --- a/src/os/shell/termcolour/win/termcolour_win.c +++ b/src/os/shell/termcolour/win/termcolour_win.c @@ -13,8 +13,8 @@ #define WIN32_LEAN_AND_MEAN #include -typedef struct termcolour_data TermcolourData; -struct termcolour_data { +typedef struct TermcolourData TermcolourData; +struct TermcolourData { HANDLE handle; WORD default_colour; WORD current_colour; diff --git a/src/prng/xorshift/xorshift.c b/src/prng/xorshift/xorshift.c index 343323b..d681924 100644 --- a/src/prng/xorshift/xorshift.c +++ b/src/prng/xorshift/xorshift.c @@ -7,8 +7,8 @@ #include #include -typedef struct split_mix_64_state SplitMix64State; -struct split_mix_64_state { +typedef struct SplitMix64State SplitMix64State; +struct SplitMix64State { u64 seed; }; diff --git a/src/prng/xorshift/xorshift.h b/src/prng/xorshift/xorshift.h index 72eca29..7a66d05 100644 --- a/src/prng/xorshift/xorshift.h +++ b/src/prng/xorshift/xorshift.h @@ -10,8 +10,8 @@ BEGIN_C_LINKAGE #endif // !WAPP_PLATFORM_CPP -typedef struct xor_256_state XOR256State; -struct xor_256_state { +typedef struct XOR256State XOR256State; +struct XOR256State { u64 x; u64 y; u64 z; diff --git a/src/testing/tester/tester.h b/src/testing/tester/tester.h index 11bd542..6e3c722 100644 --- a/src/testing/tester/tester.h +++ b/src/testing/tester/tester.h @@ -17,8 +17,8 @@ BEGIN_C_LINKAGE #define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL) -typedef struct test_func_result TestFuncResult; -struct test_func_result { +typedef struct TestFuncResult TestFuncResult; +struct TestFuncResult { Str8 name; b8 passed; diff --git a/src/uuid/uuid.c b/src/uuid/uuid.c index 279082b..06993fb 100644 --- a/src/uuid/uuid.c +++ b/src/uuid/uuid.c @@ -9,8 +9,8 @@ #define UUID_STR_FORMAT ("%.8" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.12" PRIx64) -typedef struct uuid4 UUID4; -struct uuid4 { +typedef struct UUID4 UUID4; +struct UUID4 { u64 high; u64 low; }; diff --git a/src/uuid/uuid.h b/src/uuid/uuid.h index ed85fcd..4707378 100644 --- a/src/uuid/uuid.h +++ b/src/uuid/uuid.h @@ -15,8 +15,8 @@ BEGIN_C_LINKAGE #define WAPP_UUID_SPEC WAPP_STR8_SPEC #define wapp_uuid_varg(WUUID) wapp_str8_varg((WUUID).uuid) -typedef struct wapp_uuid WUUID; -struct wapp_uuid { +typedef struct WUUID WUUID; +struct WUUID { Str8 uuid; };