diff options
Diffstat (limited to 'src/contrib/SDL-3.2.20/build-scripts/clang-format-src.sh')
-rwxr-xr-x | src/contrib/SDL-3.2.20/build-scripts/clang-format-src.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/build-scripts/clang-format-src.sh b/src/contrib/SDL-3.2.20/build-scripts/clang-format-src.sh new file mode 100755 index 0000000..bc0defc --- /dev/null +++ b/src/contrib/SDL-3.2.20/build-scripts/clang-format-src.sh | |||
@@ -0,0 +1,39 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd "$(dirname $0)/../src" | ||
4 | |||
5 | echo "Running clang-format in $(pwd)" | ||
6 | |||
7 | find . -regex '.*\.[chm]p*' -exec clang-format -i {} \; | ||
8 | |||
9 | # Revert third-party code | ||
10 | git checkout \ | ||
11 | events/imKStoUCS.* \ | ||
12 | hidapi \ | ||
13 | joystick/controller_type.c \ | ||
14 | joystick/controller_type.h \ | ||
15 | joystick/hidapi/steam/controller_constants.h \ | ||
16 | joystick/hidapi/steam/controller_structs.h \ | ||
17 | libm \ | ||
18 | stdlib/SDL_malloc.c \ | ||
19 | stdlib/SDL_qsort.c \ | ||
20 | stdlib/SDL_strtokr.c \ | ||
21 | video/khronos \ | ||
22 | video/x11/edid.h \ | ||
23 | video/x11/edid-parse.c \ | ||
24 | video/x11/xsettings-client.* \ | ||
25 | video/yuv2rgb | ||
26 | clang-format -i hidapi/SDL_hidapi.c | ||
27 | |||
28 | # Revert generated code | ||
29 | git checkout \ | ||
30 | dynapi/SDL_dynapi_overrides.h \ | ||
31 | dynapi/SDL_dynapi_procs.h \ | ||
32 | render/*/*Shader*.h \ | ||
33 | render/metal/SDL_shaders_metal_*.h \ | ||
34 | render/vitagxm/SDL_render_vita_gxm_shaders.h \ | ||
35 | video/directx/SDL_d3d12_xbox_cmacros.h \ | ||
36 | video/directx/d3d12.h \ | ||
37 | video/directx/d3d12sdklayers.h \ | ||
38 | |||
39 | echo "clang-format complete!" | ||