1 /* 2 SDL - Simple DirectMedia Layer 3 Copyright (C) 1997-2006 Sam Lantinga 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19 Sam Lantinga 20 slouken@libsdl.org 21 */ 22 #include "SDL_config.h" 23 24 /* This file defines a structure that carries language-independent 25 error messages 26 */ 27 28 #ifndef _SDL_error_c_h 29 #define _SDL_error_c_h 30 31 #define ERR_MAX_STRLEN 128 32 #define ERR_MAX_ARGS 5 33 34 typedef struct SDL_error { 35 /* This is a numeric value corresponding to the current error */ 36 int error; 37 38 /* This is a key used to index into a language hashtable containing 39 internationalized versions of the SDL error messages. If the key 40 is not in the hashtable, or no hashtable is available, the key is 41 used directly as an error message format string. 42 */ 43 char key[ERR_MAX_STRLEN]; 44 45 /* These are the arguments for the error functions */ 46 int argc; 47 union { 48 void *value_ptr; 49 #if 0 /* What is a character anyway? (UNICODE issues) */ 50 unsigned char value_c; 51 #endif 52 int value_i; 53 double value_f; 54 char buf[ERR_MAX_STRLEN]; 55 } args[ERR_MAX_ARGS]; 56 } SDL_error; 57 58 #endif /* _SDL_error_c_h */ 59