File: clang-format-src.sh

package info (click to toggle)
libsdl3 3.2.10%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 42,240 kB
  • sloc: ansic: 389,254; objc: 12,241; xml: 9,084; cpp: 5,728; perl: 4,547; python: 3,370; sh: 947; makefile: 265; cs: 56
file content (39 lines) | stat: -rwxr-xr-x 996 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

cd "$(dirname $0)/../src"

echo "Running clang-format in $(pwd)"

find . -regex '.*\.[chm]p*' -exec clang-format -i {} \;

# Revert third-party code
git checkout \
    events/imKStoUCS.* \
    hidapi \
    joystick/controller_type.c \
    joystick/controller_type.h \
    joystick/hidapi/steam/controller_constants.h \
    joystick/hidapi/steam/controller_structs.h \
    libm \
    stdlib/SDL_malloc.c \
    stdlib/SDL_qsort.c \
    stdlib/SDL_strtokr.c \
    video/khronos \
    video/x11/edid.h \
    video/x11/edid-parse.c \
    video/x11/xsettings-client.* \
    video/yuv2rgb
clang-format -i hidapi/SDL_hidapi.c

# Revert generated code
git checkout \
    dynapi/SDL_dynapi_overrides.h \
    dynapi/SDL_dynapi_procs.h \
    render/*/*Shader*.h \
    render/metal/SDL_shaders_metal_*.h \
    render/vitagxm/SDL_render_vita_gxm_shaders.h \
    video/directx/SDL_d3d12_xbox_cmacros.h \
    video/directx/d3d12.h \
    video/directx/d3d12sdklayers.h \

echo "clang-format complete!"