PageRenderTime 20ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/xcode/SDL.framework/Versions/A/Headers/SDL_error.h

https://bitbucket.org/randrian/openclonk2
C++ Header | 61 lines | 26 code | 9 blank | 26 comment | 0 complexity | 5fb3271472ef250fae59ae26284cbe1b MD5 | raw file
Possible License(s): WTFPL, 0BSD, LGPL-2.1, CC-BY-3.0
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2006 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. /* Simple error message routines for SDL */
  19. #ifndef _SDL_error_h
  20. #define _SDL_error_h
  21. #include "SDL_stdinc.h"
  22. #include "begin_code.h"
  23. /* Set up for C function definitions, even when using C++ */
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Public functions */
  28. extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
  29. extern DECLSPEC char * SDLCALL SDL_GetError(void);
  30. extern DECLSPEC void SDLCALL SDL_ClearError(void);
  31. /* Private error message function - used internally */
  32. #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
  33. #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
  34. typedef enum {
  35. SDL_ENOMEM,
  36. SDL_EFREAD,
  37. SDL_EFWRITE,
  38. SDL_EFSEEK,
  39. SDL_UNSUPPORTED,
  40. SDL_LASTERROR
  41. } SDL_errorcode;
  42. extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
  43. /* Ends C function definitions when using C++ */
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #include "close_code.h"
  48. #endif /* _SDL_error_h */