clang-format-src.sh 996 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. cd "$(dirname $0)/../src"
  3. echo "Running clang-format in $(pwd)"
  4. find . -regex '.*\.[chm]p*' -exec clang-format -i {} \;
  5. # Revert third-party code
  6. git checkout \
  7. events/imKStoUCS.* \
  8. hidapi \
  9. joystick/controller_type.c \
  10. joystick/controller_type.h \
  11. joystick/hidapi/steam/controller_constants.h \
  12. joystick/hidapi/steam/controller_structs.h \
  13. libm \
  14. stdlib/SDL_malloc.c \
  15. stdlib/SDL_qsort.c \
  16. stdlib/SDL_strtokr.c \
  17. video/khronos \
  18. video/x11/edid.h \
  19. video/x11/edid-parse.c \
  20. video/x11/xsettings-client.* \
  21. video/yuv2rgb
  22. clang-format -i hidapi/SDL_hidapi.c
  23. # Revert generated code
  24. git checkout \
  25. dynapi/SDL_dynapi_overrides.h \
  26. dynapi/SDL_dynapi_procs.h \
  27. render/*/*Shader*.h \
  28. render/metal/SDL_shaders_metal_*.h \
  29. render/vitagxm/SDL_render_vita_gxm_shaders.h \
  30. video/directx/SDL_d3d12_xbox_cmacros.h \
  31. video/directx/d3d12.h \
  32. video/directx/d3d12sdklayers.h \
  33. echo "clang-format complete!"