Reindent all C sources to the canonical stroustrup style
Mechanical whitespace-only change across src/, include/, tests/, and util/, applied with scripts/reindent.sh. No behavioral change. Most files already conformed. The genuine outliers indented at 2 columns (json_helpers.c, util.c from akgl_rectangle_points onward, assets.c, staticstring.c, akgl_actor_add_child, util.h, staticstring.h) or used spaces where the canonical form is a tab (draw.c). cc-mode also re-aligns line-continuation backslashes in multi-line macros to its default c-backslash-column, which is required for the tree to be a fixed point of the indenter. Verified whitespace-only: `git diff -w` over this change is empty apart from three trailing blank lines removed at EOF in src/heap.c, src/registry.c, and tests/tilemap.c. The build produces no new errors and ctest is unchanged at 13/14, with `character` still the one intentional failure. The tree is now a fixed point of `scripts/reindent.sh --check`. include/akgl/SDL_GameControllerDB.h is generated and excluded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -86,7 +86,7 @@ akerr_ErrorContext *test_character_iterate_state_sprites()
|
||||
akgl_Sprite *testsprite = NULL;
|
||||
akgl_Sprite *testsprite2 = NULL;
|
||||
akgl_Iterator opflags = {.flags = AKGL_ITERATOR_OP_RELEASE, .layerid = 0};
|
||||
|
||||
|
||||
PREPARE_ERROR(errctx);
|
||||
ATTEMPT {
|
||||
CATCH(errctx, akgl_heap_next_character(&testchar));
|
||||
@@ -126,7 +126,7 @@ akerr_ErrorContext *test_character_iterate_state_sprites()
|
||||
} CLEANUP {
|
||||
IGNORE(akgl_heap_release_sprite(testsprite));
|
||||
IGNORE(akgl_heap_release_sprite(testsprite2));
|
||||
IGNORE(akgl_heap_release_character(testchar));
|
||||
IGNORE(akgl_heap_release_character(testchar));
|
||||
} PROCESS(errctx) {
|
||||
} FINISH(errctx, true);
|
||||
SUCCEED_RETURN(errctx);
|
||||
@@ -140,7 +140,7 @@ akerr_ErrorContext *test_akgl_character_load_json()
|
||||
akgl_Sprite *comparesprite = NULL;
|
||||
int tsrc = 0;
|
||||
int tsrc2 = 0;
|
||||
|
||||
|
||||
PREPARE_ERROR(errctx);
|
||||
ATTEMPT {
|
||||
CATCH(errctx, akgl_heap_next_character(&testcharacter));
|
||||
@@ -158,7 +158,7 @@ akerr_ErrorContext *test_akgl_character_load_json()
|
||||
testsprite2,
|
||||
AKERR_KEY,
|
||||
"Sprite 2 loaded from json but not in registry");
|
||||
|
||||
|
||||
CATCH(errctx, akgl_character_load_json("assets/testcharacter.json"));
|
||||
testcharacter = SDL_GetPointerProperty(AKGL_REGISTRY_CHARACTER, "testcharacter", NULL);
|
||||
FAIL_ZERO_BREAK(
|
||||
@@ -196,11 +196,11 @@ int main(void)
|
||||
PREPARE_ERROR(errctx);
|
||||
ATTEMPT {
|
||||
SDL_SetAppMetadata("SDL3-GameTest", "0.1", "net.aklabs.sdl3-gametest");
|
||||
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO )) {
|
||||
FAIL_BREAK(errctx, AKGL_ERR_SDL, "Couldn't initialize SDL: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
|
||||
if (!SDL_CreateWindowAndRenderer("net/aklabs/libakgl/test_character", 640, 480, SDL_WINDOW_HIDDEN, &window, &renderer)) {
|
||||
FAIL_BREAK(errctx, AKGL_ERR_SDL, "Couldn't create window/renderer: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user