Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
77 lines (65 loc) · 2.06 KB

SDL_error.h

File metadata and controls

77 lines (65 loc) · 2.06 KB
 
Apr 26, 2001
Apr 26, 2001
1
/*
Apr 8, 2011
Apr 8, 2011
2
3
Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
Apr 26, 2001
Apr 26, 2001
4
Apr 8, 2011
Apr 8, 2011
5
6
7
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Apr 26, 2001
Apr 26, 2001
8
Apr 8, 2011
Apr 8, 2011
9
10
11
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
Apr 26, 2001
Apr 26, 2001
12
Apr 8, 2011
Apr 8, 2011
13
14
15
16
17
18
19
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Apr 26, 2001
Apr 26, 2001
20
21
*/
Jul 10, 2006
Jul 10, 2006
22
/**
Oct 19, 2009
Oct 19, 2009
23
24
25
* \file SDL_error.h
*
* Simple error message routines for SDL.
Jul 10, 2006
Jul 10, 2006
26
*/
Apr 26, 2001
Apr 26, 2001
27
28
29
30
#ifndef _SDL_error_h
#define _SDL_error_h
Feb 10, 2006
Feb 10, 2006
31
32
#include "SDL_stdinc.h"
Apr 26, 2001
Apr 26, 2001
33
34
35
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
Jul 10, 2006
Jul 10, 2006
36
/* *INDENT-OFF* */
Apr 26, 2001
Apr 26, 2001
37
extern "C" {
Jul 10, 2006
Jul 10, 2006
38
/* *INDENT-ON* */
Apr 26, 2001
Apr 26, 2001
39
40
41
#endif
/* Public functions */
Apr 11, 2002
Apr 11, 2002
42
extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
Aug 29, 2010
Aug 29, 2010
43
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
Apr 11, 2002
Apr 11, 2002
44
extern DECLSPEC void SDLCALL SDL_ClearError(void);
Apr 26, 2001
Apr 26, 2001
45
Oct 19, 2009
Oct 19, 2009
46
47
48
49
/**
* \name Internal error functions
*
* \internal
Feb 8, 2011
Feb 8, 2011
50
* Private error reporting function - used internally.
Oct 19, 2009
Oct 19, 2009
51
52
*/
/*@{*/
Apr 26, 2001
Apr 26, 2001
53
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
Feb 16, 2006
Feb 16, 2006
54
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
Jul 10, 2006
Jul 10, 2006
55
56
57
58
59
60
61
62
typedef enum
{
SDL_ENOMEM,
SDL_EFREAD,
SDL_EFWRITE,
SDL_EFSEEK,
SDL_UNSUPPORTED,
SDL_LASTERROR
Apr 26, 2001
Apr 26, 2001
63
} SDL_errorcode;
Nov 15, 2004
Nov 15, 2004
64
extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
Oct 19, 2009
Oct 19, 2009
65
/*@}*//*Internal error functions*/
Apr 26, 2001
Apr 26, 2001
66
67
68
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
Jul 10, 2006
Jul 10, 2006
69
/* *INDENT-OFF* */
Apr 26, 2001
Apr 26, 2001
70
}
Jul 10, 2006
Jul 10, 2006
71
/* *INDENT-ON* */
Apr 26, 2001
Apr 26, 2001
72
73
74
75
#endif
#include "close_code.h"
#endif /* _SDL_error_h */
Jul 10, 2006
Jul 10, 2006
76
77
/* vi: set ts=4 sw=4 expandtab: */