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:
@@ -29,7 +29,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
char *characterjson = NULL;
|
||||
char pathbuf[4096];
|
||||
char cwdbuf[1024];
|
||||
|
||||
|
||||
if ( argc < 3 ) {
|
||||
SDL_Log("charviewer [CHARACTER_FILE] [SPRITE ...]");
|
||||
return SDL_APP_FAILURE;
|
||||
@@ -39,9 +39,9 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
characterjson = argv[1];
|
||||
memset((char *)&pathbuf, 0x00, 4096);
|
||||
memset((char *)&cwdbuf, 0x00, 1024);
|
||||
|
||||
|
||||
ATTEMPT {
|
||||
|
||||
|
||||
FAIL_ZERO_BREAK(errctx, appstate, AKERR_NULLPOINTER, "NULL appstate pointer");
|
||||
FAIL_ZERO_BREAK(errctx, getcwd((char *)&cwdbuf, 1024), AKERR_NULLPOINTER, "Couldn't get current working directory");
|
||||
|
||||
@@ -79,7 +79,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
memset((char *)&pathbuf, 0x00, 4096);
|
||||
}
|
||||
|
||||
ATTEMPT {
|
||||
ATTEMPT {
|
||||
if ( characterjson[0] != '/' ) {
|
||||
sprintf((char *)&pathbuf, "%s/%s", (char *)&cwdbuf, characterjson);
|
||||
} else {
|
||||
@@ -105,7 +105,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
SDL_Log("Opening gamepad %d", gamepadids[0]);
|
||||
FAIL_ZERO_BREAK(errctx, SDL_OpenGamepad(gamepadids[0]), AKGL_ERR_SDL, "%s", SDL_GetError());
|
||||
CATCH(errctx, akgl_controller_default(0, "player", 0, gamepadids[0]));
|
||||
|
||||
|
||||
} CLEANUP {
|
||||
} PROCESS(errctx) {
|
||||
} HANDLE_DEFAULT(errctx) {
|
||||
@@ -123,7 +123,7 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
|
||||
ATTEMPT {
|
||||
FAIL_ZERO_BREAK(errctx, appstate, AKERR_NULLPOINTER, "NULL appstate pointer");
|
||||
FAIL_ZERO_BREAK(errctx, event, AKERR_NULLPOINTER, "NULL event pointer");
|
||||
|
||||
|
||||
CATCH(errctx, akgl_controller_handle_event(appstate, event));
|
||||
if (event->type == SDL_EVENT_QUIT) {
|
||||
return SDL_APP_SUCCESS; /* end the program, reporting success to the OS. */
|
||||
@@ -140,7 +140,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
akgl_Iterator opflags;
|
||||
|
||||
PREPARE_ERROR(errctx);
|
||||
|
||||
|
||||
AKGL_BITMASK_CLEAR(opflags.flags);
|
||||
AKGL_BITMASK_ADD(opflags.flags, AKGL_ITERATOR_OP_UPDATE);
|
||||
AKGL_BITMASK_ADD(opflags.flags, AKGL_ITERATOR_OP_RENDER);
|
||||
|
||||
Reference in New Issue
Block a user