src/SDL_error_c.h
author Sam Lantinga
Wed, 01 Feb 2006 06:32:25 +0000
changeset 1312 c9b51268668f
parent 911 04a403e4ccf5
child 1402 d910939febfa
permissions -rw-r--r--
Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.
     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 
    23 /* This file defines a structure that carries language-independent
    24    error messages
    25 */
    26 
    27 #ifndef _SDL_error_c_h
    28 #define _SDL_error_c_h
    29 
    30 #define ERR_MAX_STRLEN	128
    31 #define ERR_MAX_ARGS	5
    32 
    33 typedef struct SDL_error {
    34 	/* This is a numeric value corresponding to the current error */
    35 	int error;
    36 
    37 	/* This is a key used to index into a language hashtable containing
    38 	   internationalized versions of the SDL error messages.  If the key
    39 	   is not in the hashtable, or no hashtable is available, the key is
    40 	   used directly as an error message format string.
    41 	*/
    42 	unsigned char key[ERR_MAX_STRLEN];
    43 
    44 	/* These are the arguments for the error functions */
    45 	int argc;
    46 	union {
    47 		void *value_ptr;
    48 #if 0	/* What is a character anyway?  (UNICODE issues) */
    49 		unsigned char value_c;
    50 #endif
    51 		int value_i;
    52 		double value_f;
    53 		unsigned char buf[ERR_MAX_STRLEN];
    54 	} args[ERR_MAX_ARGS];
    55 } SDL_error;
    56 
    57 #endif /* _SDL_error_c_h */