29 #include FT_CONFIG_CONFIG_H
41 #ifdef FT_DEBUG_LEVEL_TRACE
42 #undef FT_DEBUG_LEVEL_ERROR
43 #define FT_DEBUG_LEVEL_ERROR
54 #ifdef FT_DEBUG_LEVEL_TRACE
56 #define FT_TRACE_DEF( x ) trace_ ## x ,
59 typedef enum FT_Trace_
69 extern int* ft_trace_levels;
87 #ifdef FT_DEBUG_LEVEL_TRACE
90 #define FT_TRACE_COMP( x ) FT_TRACE_COMP_( x )
91 #define FT_TRACE_COMP_( x ) trace_ ## x
93 #define FT_TRACE( level, varformat ) \
96 if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
97 FT_Message varformat; \
102 #define FT_TRACE( level, varformat ) do { } while ( 0 )
187 #define FT_TRACE0( varformat ) FT_TRACE( 0, varformat )
188 #define FT_TRACE1( varformat ) FT_TRACE( 1, varformat )
189 #define FT_TRACE2( varformat ) FT_TRACE( 2, varformat )
190 #define FT_TRACE3( varformat ) FT_TRACE( 3, varformat )
191 #define FT_TRACE4( varformat ) FT_TRACE( 4, varformat )
192 #define FT_TRACE5( varformat ) FT_TRACE( 5, varformat )
193 #define FT_TRACE6( varformat ) FT_TRACE( 6, varformat )
194 #define FT_TRACE7( varformat ) FT_TRACE( 7, varformat )
205 #ifdef FT_DEBUG_LEVEL_ERROR
207 #define FT_ERROR( varformat ) FT_Message varformat
211 #define FT_ERROR( varformat ) do { } while ( 0 )
223 #ifdef FT_DEBUG_LEVEL_ERROR
225 #define FT_ASSERT( condition ) \
228 if ( !( condition ) ) \
229 FT_Panic( "assertion failed on line %d of file %s\n", \
230 __LINE__, __FILE__ ); \
233 #define FT_THROW( e ) \
234 ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ), \
237 FT_ERR_CAT( FT_ERR_PREFIX, e ) )
241 #define FT_ASSERT( condition ) do { } while ( 0 )
243 #define FT_THROW( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
254 #ifdef FT_DEBUG_LEVEL_ERROR
260 FT_Message(
const char* fmt,
265 FT_Panic(
const char* fmt,
FT_Trace_Get_Name(FT_Int idx)