blob: dc931755416834ed71466539aaa940f4326b5e77 [file] [log] [blame]
Nicolas Capens7b21f272014-06-04 22:51:10 -04001/*!****************************************************************************
2
3 @file PVRTError.h
4 @copyright Copyright (c) Imagination Technologies Limited.
5 @brief PVRT error codes.
6
7******************************************************************************/
8#ifndef _PVRTERROR_H_
9#define _PVRTERROR_H_
10
11#if defined(ANDROID)
12 #include <android/log.h>
13#else
14 #if defined(_WIN32)
15 #include <windows.h>
16 #else
17 #include <stdio.h>
18 #endif
19#endif
20/*!***************************************************************************
21 Macros
22*****************************************************************************/
23
24/*! Outputs a string to the standard error if built for debugging. */
25#if !defined(PVRTERROR_OUTPUT_DEBUG)
26 #if defined(_DEBUG) || defined(DEBUG)
27 #if defined(ANDROID)
28 #define PVRTERROR_OUTPUT_DEBUG(A) __android_log_print(ANDROID_LOG_INFO, "PVRTools", A);
29 #elif defined(_WIN32) && !defined(UNDER_CE)
30 #define PVRTERROR_OUTPUT_DEBUG(A) OutputDebugStringA(A);
31 #else
32 #define PVRTERROR_OUTPUT_DEBUG(A) fprintf(stderr,A);
33 #endif
34 #else
35 #define PVRTERROR_OUTPUT_DEBUG(A)
36 #endif
37#endif
38
39
40/*!***************************************************************************
41 Enums
42*****************************************************************************/
43/*!***************************************************************************
44 @enum EPVRTError
45 @brief EPVRT error conditions.
46*****************************************************************************/
47enum EPVRTError
48{
49 PVR_SUCCESS = 0, /*!< Success! :D */
50 PVR_FAIL = 1, /*!< Failed :( */
51 PVR_OVERFLOW = 2 /*!< Overflow error :| */
52};
53
54/*!***************************************************************************
55 @brief Outputs a string to the standard error.
56 @param[in] format printf style format followed by arguments it requires.
57*****************************************************************************/
58void PVRTErrorOutputDebug(char const * const format, ...);
59
60#endif // _PVRTERROR_H_
61
62/*****************************************************************************
63End of file (PVRTError.h)
64*****************************************************************************/
65