include/SDL_error.h
changeset 3407 d3baf5ac4e37
parent 2859 99210400e8b9
child 3697 f7b03b6838cb
equal deleted inserted replaced
3406:8ae607392409 3407:d3baf5ac4e37
    19     Sam Lantinga
    19     Sam Lantinga
    20     slouken@libsdl.org
    20     slouken@libsdl.org
    21 */
    21 */
    22 
    22 
    23 /**
    23 /**
    24  * \file SDL_error.h
    24  *  \file SDL_error.h
    25  * Simple error message routines for SDL
    25  *  
       
    26  *  Simple error message routines for SDL.
    26  */
    27  */
    27 
    28 
    28 #ifndef _SDL_error_h
    29 #ifndef _SDL_error_h
    29 #define _SDL_error_h
    30 #define _SDL_error_h
    30 
    31 
    41 /* Public functions */
    42 /* Public functions */
    42 extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
    43 extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
    43 extern DECLSPEC char *SDLCALL SDL_GetError(void);
    44 extern DECLSPEC char *SDLCALL SDL_GetError(void);
    44 extern DECLSPEC void SDLCALL SDL_ClearError(void);
    45 extern DECLSPEC void SDLCALL SDL_ClearError(void);
    45 
    46 
    46 /* Private error message function - used internally */
    47 /**
       
    48  *  \name Internal error functions
       
    49  *  
       
    50  *  \internal 
       
    51  *  Private error message function - used internally.
       
    52  */
       
    53 /*@{*/
    47 #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
    54 #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
    48 #define SDL_Unsupported()	SDL_Error(SDL_UNSUPPORTED)
    55 #define SDL_Unsupported()	SDL_Error(SDL_UNSUPPORTED)
    49 typedef enum
    56 typedef enum
    50 {
    57 {
    51     SDL_ENOMEM,
    58     SDL_ENOMEM,
    54     SDL_EFSEEK,
    61     SDL_EFSEEK,
    55     SDL_UNSUPPORTED,
    62     SDL_UNSUPPORTED,
    56     SDL_LASTERROR
    63     SDL_LASTERROR
    57 } SDL_errorcode;
    64 } SDL_errorcode;
    58 extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
    65 extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
    59 
    66 /*@}*//*Internal error functions*/
    60 
    67 
    61 /* Ends C function definitions when using C++ */
    68 /* Ends C function definitions when using C++ */
    62 #ifdef __cplusplus
    69 #ifdef __cplusplus
    63 /* *INDENT-OFF* */
    70 /* *INDENT-OFF* */
    64 }
    71 }