src/SDL_error_c.h
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1659 14717b52abc0
child 2859 99210400e8b9
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
    29 #define _SDL_error_c_h
    29 #define _SDL_error_c_h
    30 
    30 
    31 #define ERR_MAX_STRLEN	128
    31 #define ERR_MAX_STRLEN	128
    32 #define ERR_MAX_ARGS	5
    32 #define ERR_MAX_ARGS	5
    33 
    33 
    34 typedef struct SDL_error {
    34 typedef struct SDL_error
    35 	/* This is a numeric value corresponding to the current error */
    35 {
    36 	int error;
    36     /* This is a numeric value corresponding to the current error */
       
    37     int error;
    37 
    38 
    38 	/* This is a key used to index into a language hashtable containing
    39     /* This is a key used to index into a language hashtable containing
    39 	   internationalized versions of the SDL error messages.  If the key
    40        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        is not in the hashtable, or no hashtable is available, the key is
    41 	   used directly as an error message format string.
    42        used directly as an error message format string.
    42 	*/
    43      */
    43 	char key[ERR_MAX_STRLEN];
    44     char key[ERR_MAX_STRLEN];
    44 
    45 
    45 	/* These are the arguments for the error functions */
    46     /* These are the arguments for the error functions */
    46 	int argc;
    47     int argc;
    47 	union {
    48     union
    48 		void *value_ptr;
    49     {
    49 #if 0	/* What is a character anyway?  (UNICODE issues) */
    50         void *value_ptr;
    50 		unsigned char value_c;
    51 #if 0                           /* What is a character anyway?  (UNICODE issues) */
       
    52         unsigned char value_c;
    51 #endif
    53 #endif
    52 		int value_i;
    54         int value_i;
    53 		double value_f;
    55         double value_f;
    54 		char buf[ERR_MAX_STRLEN];
    56         char buf[ERR_MAX_STRLEN];
    55 	} args[ERR_MAX_ARGS];
    57     } args[ERR_MAX_ARGS];
    56 } SDL_error;
    58 } SDL_error;
    57 
    59 
    58 #endif /* _SDL_error_c_h */
    60 #endif /* _SDL_error_c_h */
       
    61 /* vi: set ts=4 sw=4 expandtab: */