Wrap long lines to fit within 80 columns across the codebase

Pure whitespace/line-break reformatting (braces, newlines, and line
continuations matching this codebase's existing wrap conventions) - no
logic, string content, or identifiers changed anywhere. Confirmed via
diff against the pre-change tree and by rebuilding + re-running the
affected test suites, which produce identical pass/fail results.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-09-05 13:13:10 -05:00
co-authored by Claude Sonnet 5
parent de53bebeb8
commit cebd3d81e7
70 changed files with 1025 additions and 425 deletions
+57 -19
View File
@@ -124,7 +124,9 @@ static bool_t run_tileset_async(assetloading_t *loading) {
static zip_t *g_zip = NULL;
static int tileset_zip_add(zip_t *za, const char_t *name, const void *data, size_t len) {
static int tileset_zip_add(
zip_t *za, const char_t *name, const void *data, size_t len
) {
zip_source_t *s = zip_source_buffer(za, data, len, 0);
return (int)zip_file_add(za, name, s, ZIP_FL_OVERWRITE);
}
@@ -139,14 +141,30 @@ static int zip_setup(void **state) {
zip_t *za = zip_open_from_source(write_src, ZIP_TRUNCATE, &err);
if(!za) { zip_source_free(write_src); return -1; }
if(tileset_zip_add(za, "valid.tileset", DTF_VALID, sizeof(DTF_VALID)) < 0 ||
tileset_zip_add(za, "badmagic.tileset", DTF_BAD_MAGIC, sizeof(DTF_BAD_MAGIC)) < 0 ||
tileset_zip_add(za, "badversion.tileset", DTF_BAD_VERSION, sizeof(DTF_BAD_VERSION)) < 0 ||
tileset_zip_add(za, "zerowidth.tileset", DTF_ZERO_WIDTH, sizeof(DTF_ZERO_WIDTH)) < 0 ||
tileset_zip_add(za, "zeroheight.tileset", DTF_ZERO_HEIGHT, sizeof(DTF_ZERO_HEIGHT)) < 0 ||
tileset_zip_add(za, "zerocolumns.tileset", DTF_ZERO_COLUMNS, sizeof(DTF_ZERO_COLUMNS)) < 0 ||
tileset_zip_add(za, "zerorows.tileset", DTF_ZERO_ROWS, sizeof(DTF_ZERO_ROWS)) < 0 ||
tileset_zip_add(za, "invaliduv.tileset", DTF_INVALID_UV, sizeof(DTF_INVALID_UV)) < 0) {
if(
tileset_zip_add(za, "valid.tileset", DTF_VALID, sizeof(DTF_VALID)) < 0 ||
tileset_zip_add(
za, "badmagic.tileset", DTF_BAD_MAGIC, sizeof(DTF_BAD_MAGIC)
) < 0 ||
tileset_zip_add(
za, "badversion.tileset", DTF_BAD_VERSION, sizeof(DTF_BAD_VERSION)
) < 0 ||
tileset_zip_add(
za, "zerowidth.tileset", DTF_ZERO_WIDTH, sizeof(DTF_ZERO_WIDTH)
) < 0 ||
tileset_zip_add(
za, "zeroheight.tileset", DTF_ZERO_HEIGHT, sizeof(DTF_ZERO_HEIGHT)
) < 0 ||
tileset_zip_add(
za, "zerocolumns.tileset", DTF_ZERO_COLUMNS, sizeof(DTF_ZERO_COLUMNS)
) < 0 ||
tileset_zip_add(
za, "zerorows.tileset", DTF_ZERO_ROWS, sizeof(DTF_ZERO_ROWS)
) < 0 ||
tileset_zip_add(
za, "invaliduv.tileset", DTF_INVALID_UV, sizeof(DTF_INVALID_UV)
) < 0
) {
zip_close(za); return -1;
}
@@ -369,16 +387,36 @@ static void test_tileset_missing_file(void **state) {
int main(void) {
assertInit();
const struct CMUnitTest tests[] = {
cmocka_unit_test_setup_teardown(test_tileset_valid_loads, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_data_cleared_after_load, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_bad_magic, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_bad_version, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_zero_tile_width, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_zero_tile_height, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_zero_columns, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_zero_rows, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_invalid_uv, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(test_tileset_missing_file, zip_setup, zip_teardown),
cmocka_unit_test_setup_teardown(
test_tileset_valid_loads, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_data_cleared_after_load, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_bad_magic, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_bad_version, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_zero_tile_width, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_zero_tile_height, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_zero_columns, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_zero_rows, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_invalid_uv, zip_setup, zip_teardown
),
cmocka_unit_test_setup_teardown(
test_tileset_missing_file, zip_setup, zip_teardown
),
};
return cmocka_run_group_tests(tests, NULL, NULL);
}