slouken@0: /* slouken@5535: Simple DirectMedia Layer slouken@12503: Copyright (C) 1997-2019 Sam Lantinga slouken@0: slouken@5535: This software is provided 'as-is', without any express or implied slouken@5535: warranty. In no event will the authors be held liable for any damages slouken@5535: arising from the use of this software. slouken@0: slouken@5535: Permission is granted to anyone to use this software for any purpose, slouken@5535: including commercial applications, and to alter it and redistribute it slouken@5535: freely, subject to the following restrictions: slouken@0: slouken@5535: 1. The origin of this software must not be misrepresented; you must not slouken@5535: claim that you wrote the original software. If you use this software slouken@5535: in a product, an acknowledgment in the product documentation would be slouken@5535: appreciated but is not required. slouken@5535: 2. Altered source versions must be plainly marked as such, and must not be slouken@5535: misrepresented as being the original software. slouken@5535: 3. This notice may not be removed or altered from any source distribution. slouken@0: */ icculus@8093: #include "./SDL_internal.h" slouken@0: slouken@0: /* This file defines a structure that carries language-independent slouken@0: error messages slouken@0: */ slouken@0: slouken@10638: #ifndef SDL_error_c_h_ slouken@10638: #define SDL_error_c_h_ slouken@0: slouken@7191: #define ERR_MAX_STRLEN 128 slouken@7191: #define ERR_MAX_ARGS 5 slouken@0: slouken@1895: typedef struct SDL_error slouken@1895: { slouken@1895: /* This is a numeric value corresponding to the current error */ slouken@1895: int error; slouken@0: slouken@1895: /* This is a key used to index into a language hashtable containing slouken@1895: internationalized versions of the SDL error messages. If the key slouken@1895: is not in the hashtable, or no hashtable is available, the key is slouken@1895: used directly as an error message format string. slouken@1895: */ slouken@1895: char key[ERR_MAX_STRLEN]; slouken@0: slouken@1895: /* These are the arguments for the error functions */ slouken@1895: int argc; slouken@1895: union slouken@1895: { slouken@1895: void *value_ptr; slouken@1895: #if 0 /* What is a character anyway? (UNICODE issues) */ slouken@1895: unsigned char value_c; slouken@0: #endif slouken@1895: int value_i; sezero@11875: long value_l; slouken@1895: double value_f; slouken@1895: char buf[ERR_MAX_STRLEN]; slouken@1895: } args[ERR_MAX_ARGS]; slouken@0: } SDL_error; slouken@0: slouken@6044: /* Defined in SDL_thread.c */ slouken@6044: extern SDL_error *SDL_GetErrBuf(void); slouken@6044: slouken@10638: #endif /* SDL_error_c_h_ */ slouken@4472: slouken@1895: /* vi: set ts=4 sw=4 expandtab: */