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

@@ -25,7 +25,6 @@
#ifndef SDL_systhread_h_
#define SDL_systhread_h_
#include "SDL_thread.h"
#include "SDL_thread_c.h"
/* Set up for C function definitions, even when using C++ */

View File

@@ -22,10 +22,8 @@
/* System independent thread management routines for SDL */
#include "SDL_thread.h"
#include "SDL_thread_c.h"
#include "SDL_systhread.h"
#include "SDL_hints.h"
#include "../SDL_error_c.h"

View File

@@ -23,7 +23,6 @@
#ifndef SDL_thread_c_h_
#define SDL_thread_c_h_
#include "SDL_thread.h"
/* Need the definitions of SYS_ThreadHandle */
#if SDL_THREADS_DISABLED

View File

@@ -26,7 +26,6 @@
implementation, written by Christopher Tate and Owen Smith. Thanks!
*/
#include "SDL_thread.h"
#include "../generic/SDL_syscond_c.h"

View File

@@ -20,7 +20,6 @@
*/
#include "../../SDL_internal.h"
#include "SDL_thread.h"
#ifndef SDL_syscond_generic_h_
#define SDL_syscond_generic_h_

View File

@@ -22,7 +22,6 @@
/* An implementation of mutexes using semaphores */
#include "SDL_thread.h"
#include "SDL_systhread_c.h"

View File

@@ -22,8 +22,6 @@
/* An implementation of semaphores using mutexes and condition variables */
#include "SDL_timer.h"
#include "SDL_thread.h"
#include "SDL_systhread_c.h"

View File

@@ -22,7 +22,6 @@
/* Thread management routines for SDL */
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD

View File

@@ -25,7 +25,6 @@
#include <3ds.h>
#include "SDL_mutex.h"
struct SDL_mutex
{

View File

@@ -26,7 +26,6 @@
#include <3ds.h>
#include "SDL_thread.h"
struct SDL_semaphore
{

View File

@@ -24,7 +24,6 @@
#include <e32std.h>
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
struct SDL_mutex

View File

@@ -24,8 +24,6 @@
#include <e32std.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#define SDL_MUTEX_TIMEOUT -2

View File

@@ -28,8 +28,6 @@
extern "C" {
#undef NULL
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
};

View File

@@ -28,8 +28,6 @@
#include <stdlib.h>
#include <timer_alarm.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include <kernel.h>

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
#include <kernel.h>

View File

@@ -28,7 +28,6 @@
implementation, written by Christopher Tate and Owen Smith. Thanks!
*/
#include "SDL_thread.h"
struct SDL_cond
{

View File

@@ -24,7 +24,6 @@
/* An implementation of mutexes using semaphores */
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
#include <pspthreadman.h>

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include <pspthreadman.h>
#include <pspkerror.h>

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
#include <pspkerneltypes.h>

View File

@@ -26,7 +26,6 @@
#include <errno.h>
#include <pthread.h>
#include "SDL_thread.h"
#include "SDL_sysmutex_c.h"
struct SDL_cond

View File

@@ -23,7 +23,6 @@
#include <errno.h>
#include <pthread.h>
#include "SDL_thread.h"
#if !SDL_THREAD_PTHREAD_RECURSIVE_MUTEX && \
!SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP

View File

@@ -26,8 +26,6 @@
#include <sys/time.h>
#include <time.h>
#include "SDL_thread.h"
#include "SDL_timer.h"
/* Wrapper around POSIX 1003.1b semaphores */

View File

@@ -20,8 +20,6 @@
*/
#include "../../SDL_internal.h"
#include "SDL_system.h"
#include "SDL_hints.h"
#include <pthread.h>
@@ -48,7 +46,6 @@
#endif
#endif
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
#ifdef __ANDROID__

View File

@@ -19,7 +19,6 @@
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"

View File

@@ -21,7 +21,6 @@
#include "../../SDL_internal.h"
extern "C" {
#include "SDL_thread.h"
}
#include <chrono>

View File

@@ -21,7 +21,6 @@
#include "../../SDL_internal.h"
extern "C" {
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
}

View File

@@ -23,7 +23,6 @@
/* Thread management routines for SDL */
extern "C" {
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
}

View File

@@ -28,7 +28,6 @@
implementation, written by Christopher Tate and Owen Smith. Thanks!
*/
#include "SDL_thread.h"
struct SDL_cond
{

View File

@@ -22,7 +22,6 @@
#if SDL_THREAD_VITA
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
#include <psp2/kernel/threadmgr.h>

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include <psp2/types.h>
#include <psp2/kernel/error.h>

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
#include <psp2/types.h>

View File

@@ -20,8 +20,6 @@
*/
#include "../../SDL_internal.h"
#include "SDL_hints.h"
#include "SDL_thread.h"
#include "../generic/SDL_syscond_c.h"
#include "SDL_sysmutex_c.h"

View File

@@ -31,7 +31,6 @@
*/
#include "SDL_hints.h"
#include "SDL_sysmutex_c.h"

View File

@@ -22,7 +22,6 @@
#include "../../core/windows/SDL_windows.h"
#include "SDL_mutex.h"
typedef SDL_mutex * (*pfnSDL_CreateMutex)(void);
typedef int (*pfnSDL_LockMutex)(SDL_mutex *);

View File

@@ -35,9 +35,6 @@
#include "../../core/windows/SDL_windows.h"
#include "SDL_hints.h"
#include "SDL_thread.h"
#include "SDL_timer.h"
typedef SDL_sem * (*pfnSDL_CreateSemaphore)(Uint32);
typedef void (*pfnSDL_DestroySemaphore)(SDL_sem *);

View File

@@ -24,8 +24,6 @@
/* Win32 thread management routines for SDL */
#include "SDL_hints.h"
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
#include "SDL_systhread_c.h"

View File

@@ -25,7 +25,6 @@
#include "../../core/windows/SDL_windows.h"
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#if WINAPI_FAMILY_WINRT