40
40
/* The size of the stack buffer to use for rendering assert messages. */
41
41
#define SDL_MAX_ASSERT_MESSAGE_STACK 256
42
42
43
- static SDL_assert_state SDLCALL SDL_PromptAssertion (const SDL_assert_data * data , void * userdata );
43
+ static SDL_AssertState SDLCALL SDL_PromptAssertion (const SDL_AssertData * data , void * userdata );
44
44
45
45
/*
46
46
* We keep all triggered assertions in a singly-linked list so we can
47
47
* generate a report later.
48
48
*/
49
- static SDL_assert_data * triggered_assertions = NULL ;
49
+ static SDL_AssertData * triggered_assertions = NULL ;
50
50
51
51
#ifndef SDL_THREADS_DISABLED
52
52
static SDL_mutex * assertion_mutex = NULL ;
@@ -67,7 +67,7 @@ static void debug_print(const char *fmt, ...)
67
67
va_end (ap );
68
68
}
69
69
70
- static void SDL_AddAssertionToReport (SDL_assert_data * data )
70
+ static void SDL_AddAssertionToReport (SDL_AssertData * data )
71
71
{
72
72
/* (data) is always a static struct defined with the assert macros, so
73
73
we don't have to worry about copying or allocating them. */
@@ -84,7 +84,7 @@ static void SDL_AddAssertionToReport(SDL_assert_data *data)
84
84
#define ENDLINE "\n"
85
85
#endif
86
86
87
- static int SDL_RenderAssertMessage (char * buf , size_t buf_len , const SDL_assert_data * data )
87
+ static int SDL_RenderAssertMessage (char * buf , size_t buf_len , const SDL_AssertData * data )
88
88
{
89
89
return SDL_snprintf (buf , buf_len ,
90
90
"Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE " '%s'" ,
@@ -95,7 +95,7 @@ static int SDL_RenderAssertMessage(char *buf, size_t buf_len, const SDL_assert_d
95
95
96
96
static void SDL_GenerateAssertionReport (void )
97
97
{
98
- const SDL_assert_data * item = triggered_assertions ;
98
+ const SDL_AssertData * item = triggered_assertions ;
99
99
100
100
/* only do this if the app hasn't assigned an assertion handler. */
101
101
if ((item != NULL ) && (assertion_handler != SDL_PromptAssertion )) {
@@ -139,10 +139,10 @@ static SDL_NORETURN void SDL_AbortAssertion(void)
139
139
SDL_ExitProcess (42 );
140
140
}
141
141
142
- static SDL_assert_state SDLCALL SDL_PromptAssertion (const SDL_assert_data * data , void * userdata )
142
+ static SDL_AssertState SDLCALL SDL_PromptAssertion (const SDL_AssertData * data , void * userdata )
143
143
{
144
144
const char * envr ;
145
- SDL_assert_state state = SDL_ASSERTION_ABORT ;
145
+ SDL_AssertState state = SDL_ASSERTION_ABORT ;
146
146
SDL_Window * window ;
147
147
SDL_MessageBoxData messagebox ;
148
148
SDL_MessageBoxButtonData buttons [] = {
@@ -235,7 +235,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
235
235
if (selected == -1 ) {
236
236
state = SDL_ASSERTION_IGNORE ;
237
237
} else {
238
- state = (SDL_assert_state )selected ;
238
+ state = (SDL_AssertState )selected ;
239
239
}
240
240
} else {
241
241
#if defined(__EMSCRIPTEN__ )
@@ -318,11 +318,11 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
318
318
return state ;
319
319
}
320
320
321
- SDL_assert_state
322
- SDL_ReportAssertion (SDL_assert_data * data , const char * func , const char * file ,
321
+ SDL_AssertState
322
+ SDL_ReportAssertion (SDL_AssertData * data , const char * func , const char * file ,
323
323
int line )
324
324
{
325
- SDL_assert_state state = SDL_ASSERTION_IGNORE ;
325
+ SDL_AssertState state = SDL_ASSERTION_IGNORE ;
326
326
static int assertion_running = 0 ;
327
327
328
328
#ifndef SDL_THREADS_DISABLED
@@ -416,17 +416,17 @@ void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata)
416
416
}
417
417
}
418
418
419
- const SDL_assert_data * SDL_GetAssertionReport (void )
419
+ const SDL_AssertData * SDL_GetAssertionReport (void )
420
420
{
421
421
return triggered_assertions ;
422
422
}
423
423
424
424
void SDL_ResetAssertionReport (void )
425
425
{
426
- SDL_assert_data * next = NULL ;
427
- SDL_assert_data * item ;
426
+ SDL_AssertData * next = NULL ;
427
+ SDL_AssertData * item ;
428
428
for (item = triggered_assertions ; item != NULL ; item = next ) {
429
- next = (SDL_assert_data * )item -> next ;
429
+ next = (SDL_AssertData * )item -> next ;
430
430
item -> always_ignore = SDL_FALSE ;
431
431
item -> trigger_count = 0 ;
432
432
item -> next = NULL ;
0 commit comments