Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>

I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
This commit is contained in:
Sam Lantinga
2022-11-26 20:43:38 -08:00
parent 9a64aa6f95
commit 0a48abc860
661 changed files with 1623 additions and 2833 deletions

View File

@@ -24,7 +24,7 @@
Used by the test framework and test cases.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* Assert check message format */
#define SDLTEST_ASSERT_CHECK_FORMAT "Assert '%s': %s"

View File

@@ -20,7 +20,7 @@
*/
/* Ported from original test/common.c file. */
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
static const char *video_usage[] = {
"[--video driver]", "[--renderer driver]", "[--gldebug]",

View File

@@ -26,7 +26,7 @@
Rewritten for test lib by Andreas Schiffler.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* Counter for _CompareSurface calls; used for filename creation when comparisons fail */

View File

@@ -25,7 +25,7 @@
Original source code contributed by A. Schiffler for GSOC project.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
int SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext)

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* ---- 8x8 font definition ---- */

View File

@@ -24,7 +24,7 @@
Data generators for fuzzing test data in a reproducible way.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
#include <float.h> /* Needed for FLT_MAX and DBL_EPSILON */
#include <limits.h> /* Needed for UCHAR_MAX, etc. */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
#include <stdlib.h> /* Needed for exit() */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* GIMP RGB C-Source image dump (blit.c) */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* GIMP RGB C-Source image dump (alpha.c) */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* GIMP RGBA C-Source image dump (face.c) */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* GIMP RGB C-Source image dump (primitives.c) */

View File

@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* GIMP RGB C-Source image dump (alpha.c) */

View File

@@ -29,8 +29,7 @@
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
# define _CRT_SECURE_NO_WARNINGS
#endif
#include "SDL.h"
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
#include <time.h> /* Needed for localtime() */

View File

@@ -50,7 +50,7 @@
** documentation and/or software. **
***********************************************************************
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
/* Forward declaration of static helper function */
static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in);

View File

@@ -18,11 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_assert.h"
#include "SDL_stdinc.h"
#include "SDL_log.h"
#include "SDL_test_crc32.h"
#include "SDL_test_memory.h"
#include <SDL3/SDL_test.h>
#ifdef HAVE_LIBUNWIND_H
#define UNW_LOCAL_ONLY

View File

@@ -27,7 +27,7 @@
Original source code contributed by A. Schiffler for GSOC project.
*/
#include "SDL_test.h"
#include <SDL3/SDL_test.h>
#include <stdlib.h> /* Needed for srand() and rand() */
#include <time.h> /* Needed for time() */