31 #if SDL_THREADS_DISABLED 34 #define SDL_GetErrBuf() (&SDL_global_error) 39 #define SDL_ERRBUFIZE 1024 59 if (fmt ==
NULL)
return -1;
70 while (*fmt ==
'.' || (*fmt >=
'0' && *fmt <=
'9')) {
95 const char *str = va_arg(ap,
const char *);
120 #pragma GCC diagnostic push 121 #pragma GCC diagnostic ignored "-Wformat-nonliteral" 145 while (*fmt && (maxlen > 0)) {
147 char tmp[32], *spot = tmp;
149 while ((*fmt ==
'.' || (*fmt >=
'0' && *fmt <=
'9'))
216 msg -= (-maxlen) + 1;
224 #pragma GCC diagnostic pop 267 main(
int argc,
char *argv[])
276 SDL_SetError(
"This is the error: %s (%f)", buffer, 1.0);
int SDL_Error(SDL_errorcode code)
static const char * SDL_LookupString(const char *key)
SDL_error * SDL_GetErrBuf(void)
const char * SDL_GetError(void)
union SDL_error::@23 args[ERR_MAX_ARGS]
GLenum GLuint GLenum GLsizei const GLchar * buf
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
int SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt,...)
static char * SDL_GetErrorMsg(char *errstr, int maxlen)
#define SDL_arraysize(array)
#define SDL_PRINTF_FORMAT_STRING
void SDL_ClearError(void)