Commit aa6ea607d90fa4c3212a7363e42647848102bad4

Sam Lantinga 2022-05-18T06:57:28

Fixed whitespace Whitespace inconsistencies reported in https://github.com/libsdl-org/SDL/pull/5673

diff --git a/build-scripts/androidbuildlibs.sh b/build-scripts/androidbuildlibs.sh
index 3e57b47..dc72172 100755
--- a/build-scripts/androidbuildlibs.sh
+++ b/build-scripts/androidbuildlibs.sh
@@ -33,22 +33,21 @@ lib=
 ndk_args=
 
 # Allow an external caller to specify locations.
-for arg in $*
-do
-  if [ "${arg:0:8}" == "NDK_OUT=" ]; then
-	obj=${arg#NDK_OUT=}
-  elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
-	lib=${arg#NDK_LIBS_OUT=}
-  else
-    ndk_args="$ndk_args $arg"
-  fi
+for arg in $*; do
+    if [ "${arg:0:8}" == "NDK_OUT=" ]; then
+        obj=${arg#NDK_OUT=}
+    elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
+        lib=${arg#NDK_LIBS_OUT=}
+    else
+        ndk_args="$ndk_args $arg"
+    fi
 done
 
 if [ -z $obj ]; then
-  obj=$buildandroid/obj
+    obj=$buildandroid/obj
 fi
 if [ -z $lib ]; then
-  lib=$buildandroid/lib
+    lib=$buildandroid/lib
 fi
 
 for dir in $build $buildandroid $obj $lib; do
@@ -64,11 +63,11 @@ done
 # ndk-build makefile segments that use them, e.g., default-application.mk.
 # For consistency, pass all values on the command line.
 ndk-build \
-  NDK_PROJECT_PATH=null \
-  NDK_OUT=$obj \
-  NDK_LIBS_OUT=$lib \
-  APP_BUILD_SCRIPT=Android.mk \
-  APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
-  APP_PLATFORM=android-16 \
-  APP_MODULES="SDL2 SDL2_main" \
-  $ndk_args
+    NDK_PROJECT_PATH=null \
+    NDK_OUT=$obj \
+    NDK_LIBS_OUT=$lib \
+    APP_BUILD_SCRIPT=Android.mk \
+    APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
+    APP_PLATFORM=android-16 \
+    APP_MODULES="SDL2 SDL2_main" \
+    $ndk_args
diff --git a/build-scripts/update-copyright.sh b/build-scripts/update-copyright.sh
index ea1f798..c69ec72 100755
--- a/build-scripts/update-copyright.sh
+++ b/build-scripts/update-copyright.sh
@@ -1,8 +1,7 @@
 #!/bin/sh
 
-find . -type f -exec grep -Il "Copyright" {} \;     \
-| grep -v \.git                             \
-| while read file;                            \
-do \
-  LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
+find . -type f -exec grep -Il "Copyright" {} \; \
+| grep -v \.git                                 \
+| while read file; do                           \
+    LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
 done
diff --git a/src/filesystem/psp/SDL_sysfilesystem.c b/src/filesystem/psp/SDL_sysfilesystem.c
index e9c6ee4..4abb90a 100644
--- a/src/filesystem/psp/SDL_sysfilesystem.c
+++ b/src/filesystem/psp/SDL_sysfilesystem.c
@@ -34,44 +34,44 @@
 char *
 SDL_GetBasePath(void)
 {
-  char *retval = NULL;
-  size_t len;
-  char cwd[FILENAME_MAX];
-  
-  getcwd(cwd, sizeof(cwd));
-  len = SDL_strlen(cwd) + 2;
-  retval = (char *) SDL_malloc(len);
-  SDL_snprintf(retval, len, "%s/", cwd);
-
-  return retval;
+    char *retval = NULL;
+    size_t len;
+    char cwd[FILENAME_MAX];
+
+    getcwd(cwd, sizeof(cwd));
+    len = SDL_strlen(cwd) + 2;
+    retval = (char *) SDL_malloc(len);
+    SDL_snprintf(retval, len, "%s/", cwd);
+
+    return retval;
 }
 
 char *
 SDL_GetPrefPath(const char *org, const char *app)
 {
-  char *retval = NULL;
-  size_t len;
-  char *base = SDL_GetBasePath();
-  if (!app) {
-    SDL_InvalidParamError("app");
-    return NULL;
-  }
-  if(!org) {
-    org = "";
-  }
-
-  len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
-  retval = (char *) SDL_malloc(len);
-
-  if (*org) {
-    SDL_snprintf(retval, len, "%s%s/%s/", base, org, app);
-  } else {
-    SDL_snprintf(retval, len, "%s%s/", base, app);
-  }
-  free(base);
-
-  mkdir(retval, 0755);
-  return retval;
+    char *retval = NULL;
+    size_t len;
+    char *base = SDL_GetBasePath();
+    if (!app) {
+        SDL_InvalidParamError("app");
+        return NULL;
+    }
+    if(!org) {
+        org = "";
+    }
+
+    len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
+    retval = (char *) SDL_malloc(len);
+
+    if (*org) {
+        SDL_snprintf(retval, len, "%s%s/%s/", base, org, app);
+    } else {
+        SDL_snprintf(retval, len, "%s%s/", base, app);
+    }
+    free(base);
+
+    mkdir(retval, 0755);
+    return retval;
 }
 
 #endif /* SDL_FILESYSTEM_PSP */