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:
2026-07-30 18:17:37 -04:00
parent 8d21d5c7dd
commit 28bde4176d
32 changed files with 694 additions and 697 deletions

View File

@@ -10,11 +10,11 @@
// e.g., combining two element of PATH_MAX into a string buffer of AKGL_STRING_MAX_LENGTH.
// We have to draw a line in the sand somewhere or we will just let our buffers grow forever
// to keep the compiler happy.
#define DISABLE_GCC_WARNING_FORMAT_TRUNCATION \
_Pragma("GCC diagnostic push") \
#define DISABLE_GCC_WARNING_FORMAT_TRUNCATION \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wformat-truncation\"")
#define RESTORE_GCC_WARNINGS \
#define RESTORE_GCC_WARNINGS \
_Pragma("GCC diagnostic pop")
#define AKGL_ERR_SDL (AKERR_LAST_ERRNO_VALUE + 18)

View File

@@ -140,5 +140,5 @@ akerr_ErrorContext AKERR_NOIGNORE *akgl_game_state_unlock(void);
* @throws AKERR_* Propagates an error reported by a delegated operation.
*/
akerr_ErrorContext AKERR_NOIGNORE *akgl_game_update(akgl_Iterator *opflags);
#endif //_AKGL_GAME_H_

View File

@@ -26,7 +26,7 @@ typedef struct akgl_PhysicsBackend {
double gravity_y;
double gravity_z;
SDL_Time gravity_time;
SDL_Time timer_gravity;
SDL_Time timer_gravity;
} akgl_PhysicsBackend;
/**

View File

@@ -15,8 +15,8 @@
/** @brief Provides a fixed-capacity, heap-managed string buffer. */
typedef struct
{
int refcount;
char data[AKGL_MAX_STRING_LENGTH];
int refcount;
char data[AKGL_MAX_STRING_LENGTH];
} akgl_String;
/**

View File

@@ -11,17 +11,17 @@
/** @brief Represents a two-dimensional point. */
typedef struct point {
int x;
int y;
int z;
int x;
int y;
int z;
} point;
/** @brief Stores the corners of an axis-aligned rectangle. */
typedef struct RectanglePoints {
point topleft;
point topright;
point bottomleft;
point bottomright;
point topleft;
point topright;
point bottomleft;
point bottomright;
} RectanglePoints;
#define AKGL_COLLIDE_RECTANGLES(r1x, r1y, r1w, r1h, r2x, r2y, r2w, r2h) ((r1x < (r2x + r2w)) || ((r1x + r1w) > r2x)