Update for SDL3 coding style (#6717)

I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.

In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.

The script I ran for the src directory is added as build-scripts/clang-format-src.sh

This fixes:
#6592
#6593
#6594

(cherry picked from commit 5750bcb174)
This commit is contained in:
Sam Lantinga
2022-11-30 12:51:59 -08:00
parent 5c4bc807f7
commit b8d85c6939
764 changed files with 50598 additions and 54407 deletions
+6 -7
View File
@@ -11,7 +11,7 @@
*/
/* Test program to test dynamic loading with the loadso subsystem.
*/
*/
#include <stdio.h>
#include <stdlib.h>
@@ -19,10 +19,9 @@
#include "SDL.h"
typedef int (*fntype) (const char *);
typedef int (*fntype)(const char *);
int
main(int argc, char *argv[])
int main(int argc, char *argv[])
{
int retval = 0;
int hello = 0;
@@ -56,13 +55,13 @@ main(int argc, char *argv[])
lib = SDL_LoadObject(libname);
if (lib == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadObject('%s') failed: %s\n",
libname, SDL_GetError());
libname, SDL_GetError());
retval = 3;
} else {
fn = (fntype) SDL_LoadFunction(lib, symname);
fn = (fntype)SDL_LoadFunction(lib, symname);
if (fn == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadFunction('%s') failed: %s\n",
symname, SDL_GetError());
symname, SDL_GetError());
retval = 4;
} else {
SDL_Log("Found %s in %s at %p\n", symname, libname, fn);