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:
@@ -21,9 +21,9 @@
|
||||
#include <akgl/error.h>
|
||||
|
||||
/** @brief Fail the enclosing ATTEMPT block unless @p cond holds. */
|
||||
#define TEST_ASSERT(e, cond, ...) \
|
||||
if ( ! (cond) ) { \
|
||||
FAIL_BREAK(e, AKGL_ERR_BEHAVIOR, __VA_ARGS__); \
|
||||
#define TEST_ASSERT(e, cond, ...) \
|
||||
if ( ! (cond) ) { \
|
||||
FAIL_BREAK(e, AKGL_ERR_BEHAVIOR, __VA_ARGS__); \
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,25 +33,25 @@
|
||||
* paths in a row without draining AKERR_ARRAY_ERROR. Pass 0 for @p expected to
|
||||
* require success.
|
||||
*/
|
||||
#define TEST_EXPECT_STATUS(e, expected, stmt, desc) \
|
||||
{ \
|
||||
akerr_ErrorContext *__tec = (stmt); \
|
||||
int __tst = ( __tec == NULL ) ? 0 : __tec->status; \
|
||||
if ( __tec != NULL ) { \
|
||||
__tec->handled = true; \
|
||||
__tec = akerr_release_error(__tec); \
|
||||
} \
|
||||
if ( __tst != (expected) ) { \
|
||||
FAIL_BREAK( \
|
||||
e, \
|
||||
AKGL_ERR_BEHAVIOR, \
|
||||
"%s: expected status %d (%s), got %d (%s)", \
|
||||
desc, \
|
||||
(int)(expected), \
|
||||
akerr_name_for_status((int)(expected), NULL), \
|
||||
__tst, \
|
||||
akerr_name_for_status(__tst, NULL)); \
|
||||
} \
|
||||
#define TEST_EXPECT_STATUS(e, expected, stmt, desc) \
|
||||
{ \
|
||||
akerr_ErrorContext *__tec = (stmt); \
|
||||
int __tst = ( __tec == NULL ) ? 0 : __tec->status; \
|
||||
if ( __tec != NULL ) { \
|
||||
__tec->handled = true; \
|
||||
__tec = akerr_release_error(__tec); \
|
||||
} \
|
||||
if ( __tst != (expected) ) { \
|
||||
FAIL_BREAK( \
|
||||
e, \
|
||||
AKGL_ERR_BEHAVIOR, \
|
||||
"%s: expected status %d (%s), got %d (%s)", \
|
||||
desc, \
|
||||
(int)(expected), \
|
||||
akerr_name_for_status((int)(expected), NULL), \
|
||||
__tst, \
|
||||
akerr_name_for_status(__tst, NULL)); \
|
||||
} \
|
||||
}
|
||||
|
||||
/** @brief Require that @p stmt succeeds, reporting @p desc if it does not. */
|
||||
|
||||
Reference in New Issue
Block a user