tizen 2.3.1 release
[framework/graphics/freetype.git] / include / internal / ftdebug.h
similarity index 93%
rename from include/freetype/internal/ftdebug.h
rename to include/internal/ftdebug.h
index 7baae35..58a3916 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component (specification).                     */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by             */
+/*  Copyright 1996-2002, 2004, 2006-2009, 2013 by                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -185,7 +185,8 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
-  /* Define the FT_ASSERT macro.                                           */
+  /* Define the FT_ASSERT and FT_THROW macros.  The call to `FT_Throw'     */
+  /* makes it possible to easily set a breakpoint at this function.        */
   /*                                                                       */
   /*************************************************************************/
 
@@ -199,10 +200,18 @@ FT_BEGIN_HEADER
                         __LINE__, __FILE__ );                       \
           } while ( 0 )
 
+#define FT_THROW( e )                                   \
+          ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ),   \
+                      __LINE__,                         \
+                      __FILE__ )                      | \
+            FT_ERR_CAT( FT_ERR_PREFIX, e )            )
+
 #else /* !FT_DEBUG_LEVEL_ERROR */
 
 #define FT_ASSERT( condition )  do { } while ( 0 )
 
+#define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
+
 #endif /* !FT_DEBUG_LEVEL_ERROR */
 
 
@@ -226,22 +235,18 @@ FT_BEGIN_HEADER
   FT_Panic( const char*  fmt,
             ... );
 
+  /* report file name and line number of an error */
+  FT_BASE( int )
+  FT_Throw( FT_Error     error,
+            int          line,
+            const char*  file );
+
 #endif /* FT_DEBUG_LEVEL_ERROR */
 
 
   FT_BASE( void )
   ft_debug_init( void );
 
-
-#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
-
-  /* We disable the warning `conditional expression is constant' here */
-  /* in order to compile cleanly with the maximum level of warnings.  */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
 FT_END_HEADER
 
 #endif /* __FTDEBUG_H__ */