Commit | Line | Data |
---|---|---|
ef79bbde P |
1 | /* |
2 | SDL - Simple DirectMedia Layer | |
3 | Copyright (C) 1997-2010 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 | { | |
36 | /* This is a numeric value corresponding to the current error */ | |
37 | int error; | |
38 | ||
39 | /* This is a key used to index into a language hashtable containing | |
40 | internationalized versions of the SDL error messages. If the key | |
41 | is not in the hashtable, or no hashtable is available, the key is | |
42 | used directly as an error message format string. | |
43 | */ | |
44 | char key[ERR_MAX_STRLEN]; | |
45 | ||
46 | /* These are the arguments for the error functions */ | |
47 | int argc; | |
48 | union | |
49 | { | |
50 | void *value_ptr; | |
51 | #if 0 /* What is a character anyway? (UNICODE issues) */ | |
52 | unsigned char value_c; | |
53 | #endif | |
54 | int value_i; | |
55 | double value_f; | |
56 | char buf[ERR_MAX_STRLEN]; | |
57 | } args[ERR_MAX_ARGS]; | |
58 | } SDL_error; | |
59 | ||
60 | #endif /* _SDL_error_c_h */ | |
61 | ||
62 | /* vi: set ts=4 sw=4 expandtab: */ |