Skip to content

Commit 4fe8453

Browse files
committed
bsp/simulator: fix format for SDL2 Windows headers
1 parent dfbb0c3 commit 4fe8453

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+983
-957
lines changed

bsp/simulator/SDL2/include/SDL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ extern DECLSPEC void SDLCALL SDL_Quit(void);
231231

232232
#endif /* SDL_h_ */
233233

234-
/* vi: set ts=4 sw=4 expandtab: */
234+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_assert.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ assert can have unique static variables associated with it.
6464
#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
6565
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
6666
#elif defined(__386__) && defined(__WATCOMC__)
67-
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
67+
#define SDL_TriggerBreakpoint()
68+
{ _asm
69+
{ int 0x03 } }
6870
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
6971
#include <signal.h>
7072
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
@@ -152,12 +154,15 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
152154
*/
153155
#define SDL_enabled_assert(condition) \
154156
do { \
155-
while ( !(condition) ) { \
157+
while ( !(condition) )
158+
{ \
156159
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
157160
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
158-
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
161+
if (sdl_assert_state == SDL_ASSERTION_RETRY)
162+
{ \
159163
continue; /* go again. */ \
160-
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
164+
} else if (sdl_assert_state == SDL_ASSERTION_BREAK)
165+
{ \
161166
SDL_TriggerBreakpoint(); \
162167
} \
163168
break; /* not retrying. */ \
@@ -275,7 +280,8 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
275280
*
276281
* ```c
277282
* const SDL_AssertData *item = SDL_GetAssertionReport();
278-
* while (item) {
283+
* while (item)
284+
{
279285
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
280286
* item->condition, item->function, item->filename,
281287
* item->linenum, item->trigger_count,
@@ -321,4 +327,4 @@ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
321327

322328
#endif /* SDL_assert_h_ */
323329

324-
/* vi: set ts=4 sw=4 expandtab: */
330+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_atomic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
189189
hard-coded at address 0xffff0fa0
190190
*/
191191
typedef void (*SDL_KernelMemoryBarrierFunc)();
192-
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
193-
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
192+
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
193+
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
194194
#elif 0 /* defined(__QNXNTO__) */
195195
#include <sys/cpuinline.h>
196196

@@ -405,4 +405,4 @@ extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
405405

406406
#endif /* SDL_atomic_h_ */
407407

408-
/* vi: set ts=4 sw=4 expandtab: */
408+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,4 +1499,4 @@ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
14991499

15001500
#endif /* SDL_audio_h_ */
15011501

1502-
/* vi: set ts=4 sw=4 expandtab: */
1502+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_bits.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,21 @@ SDL_MostSignificantBitIndex32(Uint32 x)
6969
/* Count Leading Zeroes builtin in GCC.
7070
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
7171
*/
72-
if (x == 0) {
72+
if (x == 0)
73+
{
7374
return -1;
7475
}
7576
return 31 - __builtin_clz(x);
7677
#elif defined(__WATCOMC__) && defined(__386__)
77-
if (x == 0) {
78+
if (x == 0)
79+
{
7880
return -1;
7981
}
8082
return _SDL_bsr_watcom(x);
8183
#elif defined(_MSC_VER)
8284
unsigned long index;
83-
if (_BitScanReverse(&index, x)) {
85+
if (_BitScanReverse(&index, x))
86+
{
8487
return index;
8588
}
8689
return -1;
@@ -95,7 +98,8 @@ SDL_MostSignificantBitIndex32(Uint32 x)
9598
int msbIndex = 0;
9699
int i;
97100

98-
if (x == 0) {
101+
if (x == 0)
102+
{
99103
return -1;
100104
}
101105

@@ -115,7 +119,8 @@ SDL_MostSignificantBitIndex32(Uint32 x)
115119
SDL_FORCE_INLINE SDL_bool
116120
SDL_HasExactlyOneBitSet32(Uint32 x)
117121
{
118-
if (x && !(x & (x - 1))) {
122+
if (x && !(x & (x - 1)))
123+
{
119124
return SDL_TRUE;
120125
}
121126
return SDL_FALSE;
@@ -129,4 +134,4 @@ SDL_HasExactlyOneBitSet32(Uint32 x)
129134

130135
#endif /* SDL_bits_h_ */
131136

132-
/* vi: set ts=4 sw=4 expandtab: */
137+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_blendmode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@ extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor
196196

197197
#endif /* SDL_blendmode_h_ */
198198

199-
/* vi: set ts=4 sw=4 expandtab: */
199+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_clipboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);
138138

139139
#endif /* SDL_clipboard_h_ */
140140

141-
/* vi: set ts=4 sw=4 expandtab: */
141+
/* vi: set ts=4 sw=4 expandtab: */

bsp/simulator/SDL2/include/SDL_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656
#error Wrong SDL_config.h, check your include path?
5757
#endif
5858

59-
#endif /* SDL_config_h_ */
59+
#endif /* SDL_config_h_ */

bsp/simulator/SDL2/include/SDL_config_android.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@
191191
/* Enable the filesystem driver */
192192
#define SDL_FILESYSTEM_ANDROID 1
193193

194-
#endif /* SDL_config_android_h_ */
194+
#endif /* SDL_config_android_h_ */

bsp/simulator/SDL2/include/SDL_config_emscripten.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@
215215
/* Enable system filesystem support */
216216
#define SDL_FILESYSTEM_EMSCRIPTEN 1
217217

218-
#endif /* _SDL_config_emscripten_h_ */
218+
#endif /* _SDL_config_emscripten_h_ */

0 commit comments

Comments
 (0)