author | Sam Lantinga <slouken@libsdl.org> |
Mon, 29 May 2006 04:04:35 +0000 | |
branch | SDL-1.3 |
changeset 1668 | 4da1ee79c9af |
parent 1662 | 782fd950bd46 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
SDL - Simple DirectMedia Layer |
|
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
3 |
Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
|
5 |
This library is free software; you can redistribute it and/or |
|
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
0 | 7 |
License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
8 |
version 2.1 of the License, or (at your option) any later version. |
0 | 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 |
|
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
13 |
Lesser General Public License for more details. |
0 | 14 |
|
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
977
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
|
19 |
Sam Lantinga |
|
251
b8688cfdc232
Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 |
slouken@libsdl.org |
0 | 21 |
*/ |
22 |
||
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
23 |
/** |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
24 |
* \file SDL_error.h |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
25 |
* Simple error message routines for SDL |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
26 |
*/ |
0 | 27 |
|
28 |
#ifndef _SDL_error_h |
|
29 |
#define _SDL_error_h |
|
30 |
||
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
31 |
#include "SDL_stdinc.h" |
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
32 |
|
0 | 33 |
#include "begin_code.h" |
34 |
/* Set up for C function definitions, even when using C++ */ |
|
35 |
#ifdef __cplusplus |
|
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
36 |
/* *INDENT-OFF* */ |
0 | 37 |
extern "C" { |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
38 |
/* *INDENT-ON* */ |
0 | 39 |
#endif |
40 |
||
41 |
/* Public functions */ |
|
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
42 |
extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
43 |
extern DECLSPEC char *SDLCALL SDL_GetError(void); |
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
44 |
extern DECLSPEC void SDLCALL SDL_ClearError(void); |
0 | 45 |
|
46 |
/* Private error message function - used internally */ |
|
47 |
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) |
|
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
48 |
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
49 |
typedef enum |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
50 |
{ |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
51 |
SDL_ENOMEM, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
52 |
SDL_EFREAD, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
53 |
SDL_EFWRITE, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
54 |
SDL_EFSEEK, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
55 |
SDL_UNSUPPORTED, |
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
56 |
SDL_LASTERROR |
0 | 57 |
} SDL_errorcode; |
1668
4da1ee79c9af
more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents:
1662
diff
changeset
|
58 |
extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code); |
0 | 59 |
|
60 |
||
61 |
/* Ends C function definitions when using C++ */ |
|
62 |
#ifdef __cplusplus |
|
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
63 |
/* *INDENT-OFF* */ |
0 | 64 |
} |
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
65 |
/* *INDENT-ON* */ |
0 | 66 |
#endif |
67 |
#include "close_code.h" |
|
68 |
||
69 |
#endif /* _SDL_error_h */ |
|
1662
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
70 |
|
782fd950bd46
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
71 |
/* vi: set ts=4 sw=4 expandtab: */ |