misc/winutils/include/SDL_error.h
author nemo
Thu, 17 May 2012 20:23:58 -0400
changeset 7091 7989850b4418
parent 6560 ca07e6be08d0
child 7809 7d4fb2f35f4f
permissions -rw-r--r--
Might help if this was actually its own unique weapon
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     1
/*
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     2
    SDL - Simple DirectMedia Layer
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     3
    Copyright (C) 1997-2009 Sam Lantinga
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     4
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     5
    This library is free software; you can redistribute it and/or
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     6
    modify it under the terms of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     7
    License as published by the Free Software Foundation; either
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     8
    version 2.1 of the License, or (at your option) any later version.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     9
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    10
    This library is distributed in the hope that it will be useful,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    13
    Lesser General Public License for more details.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    14
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    15
    You should have received a copy of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    16
    License along with this library; if not, write to the Free Software
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    18
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    19
    Sam Lantinga
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    20
    slouken@libsdl.org
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    21
*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    22
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    23
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    24
 *  @file SDL_error.h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
 *  Simple error message routines for SDL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    26
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    27
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    28
#ifndef _SDL_error_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
#define _SDL_error_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    30
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    31
#include "SDL_stdinc.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    33
#include "begin_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    34
/* Set up for C function definitions, even when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    36
extern "C" {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    37
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    38
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    39
/** 
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    40
 *  @name Public functions
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    41
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    42
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    43
extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    44
extern DECLSPEC char * SDLCALL SDL_GetError(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    45
extern DECLSPEC void SDLCALL SDL_ClearError(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    46
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    47
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    48
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    49
 *  @name Private functions
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    50
 *  @internal Private error message function - used internally
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    51
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    52
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    53
#define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    54
#define SDL_Unsupported()	SDL_Error(SDL_UNSUPPORTED)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    55
typedef enum {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    56
	SDL_ENOMEM,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    57
	SDL_EFREAD,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    58
	SDL_EFWRITE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    59
	SDL_EFSEEK,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    60
	SDL_UNSUPPORTED,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    61
	SDL_LASTERROR
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    62
} SDL_errorcode;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    63
extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    64
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    65
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    66
/* Ends C function definitions when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    67
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    68
}
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    69
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    70
#include "close_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    71
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    72
#endif /* _SDL_error_h */