summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/include/freetype/internal/ftdebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/internal/ftdebug.h')
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftdebug.h248
1 files changed, 138 insertions, 110 deletions
diff --git a/src/3rdparty/freetype/include/freetype/internal/ftdebug.h b/src/3rdparty/freetype/include/freetype/internal/ftdebug.h
index 292a4eedb8..54a9673afa 100644
--- a/src/3rdparty/freetype/include/freetype/internal/ftdebug.h
+++ b/src/3rdparty/freetype/include/freetype/internal/ftdebug.h
@@ -1,24 +1,24 @@
-/***************************************************************************/
-/* */
-/* ftdebug.h */
-/* */
-/* Debugging and logging component (specification). */
-/* */
-/* Copyright 1996-2018 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
-/* */
-/* This file is part of the FreeType project, and may only be used, */
-/* modified, and distributed under the terms of the FreeType project */
-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
-/* this file you indicate that you have read the license and */
-/* understand and accept it fully. */
-/* */
-/* */
-/* IMPORTANT: A description of FreeType's debugging support can be */
-/* found in `docs/DEBUG.TXT'. Read it if you need to use or */
-/* understand this code. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * ftdebug.h
+ *
+ * Debugging and logging component (specification).
+ *
+ * Copyright (C) 1996-2019 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ *
+ * IMPORTANT: A description of FreeType's debugging support can be
+ * found in 'docs/DEBUG.TXT'. Read it if you need to use or
+ * understand this code.
+ *
+ */
#ifndef FTDEBUG_H_
@@ -42,12 +42,12 @@ FT_BEGIN_HEADER
#endif
- /*************************************************************************/
- /* */
- /* Define the trace enums as well as the trace levels array when they */
- /* are needed. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define the trace enums as well as the trace levels array when they are
+ * needed.
+ *
+ */
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -62,32 +62,37 @@ FT_BEGIN_HEADER
} FT_Trace;
- /* defining the array of trace levels, provided by `src/base/ftdebug.c' */
- extern int ft_trace_levels[trace_count];
+ /* a pointer to the array of trace levels, */
+ /* provided by `src/base/ftdebug.c' */
+ extern int* ft_trace_levels;
#undef FT_TRACE_DEF
#endif /* FT_DEBUG_LEVEL_TRACE */
- /*************************************************************************/
- /* */
- /* Define the FT_TRACE macro */
- /* */
- /* IMPORTANT! */
- /* */
- /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */
- /* value before using any TRACE macro. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define the FT_TRACE macro
+ *
+ * IMPORTANT!
+ *
+ * Each component must define the macro FT_COMPONENT to a valid FT_Trace
+ * value before using any TRACE macro.
+ *
+ */
#ifdef FT_DEBUG_LEVEL_TRACE
-#define FT_TRACE( level, varformat ) \
- do \
- { \
- if ( ft_trace_levels[FT_COMPONENT] >= level ) \
- FT_Message varformat; \
+ /* we need two macros here to make cpp expand `FT_COMPONENT' */
+#define FT_TRACE_COMP( x ) FT_TRACE_COMP_( x )
+#define FT_TRACE_COMP_( x ) trace_ ## x
+
+#define FT_TRACE( level, varformat ) \
+ do \
+ { \
+ if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
+ FT_Message varformat; \
} while ( 0 )
#else /* !FT_DEBUG_LEVEL_TRACE */
@@ -97,62 +102,85 @@ FT_BEGIN_HEADER
#endif /* !FT_DEBUG_LEVEL_TRACE */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Trace_Get_Count */
- /* */
- /* <Description> */
- /* Return the number of available trace components. */
- /* */
- /* <Return> */
- /* The number of trace components. 0 if FreeType 2 is not built with */
- /* FT_DEBUG_LEVEL_TRACE definition. */
- /* */
- /* <Note> */
- /* This function may be useful if you want to access elements of */
- /* the internal `ft_trace_levels' array by an index. */
- /* */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Get_Count
+ *
+ * @description:
+ * Return the number of available trace components.
+ *
+ * @return:
+ * The number of trace components. 0 if FreeType 2 is not built with
+ * FT_DEBUG_LEVEL_TRACE definition.
+ *
+ * @note:
+ * This function may be useful if you want to access elements of the
+ * internal trace levels array by an index.
+ */
FT_BASE( FT_Int )
FT_Trace_Get_Count( void );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Trace_Get_Name */
- /* */
- /* <Description> */
- /* Return the name of a trace component. */
- /* */
- /* <Input> */
- /* The index of the trace component. */
- /* */
- /* <Return> */
- /* The name of the trace component. This is a statically allocated */
- /* C string, so do not free it after use. NULL if FreeType 2 is not */
- /* built with FT_DEBUG_LEVEL_TRACE definition. */
- /* */
- /* <Note> */
- /* Use @FT_Trace_Get_Count to get the number of available trace */
- /* components. */
- /* */
- /* This function may be useful if you want to control FreeType 2's */
- /* debug level in your application. */
- /* */
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Get_Name
+ *
+ * @description:
+ * Return the name of a trace component.
+ *
+ * @input:
+ * The index of the trace component.
+ *
+ * @return:
+ * The name of the trace component. This is a statically allocated
+ * C~string, so do not free it after use. `NULL` if FreeType is not
+ * built with FT_DEBUG_LEVEL_TRACE definition.
+ *
+ * @note:
+ * Use @FT_Trace_Get_Count to get the number of available trace
+ * components.
+ */
FT_BASE( const char* )
FT_Trace_Get_Name( FT_Int idx );
- /*************************************************************************/
- /* */
- /* You need two opening and closing parentheses! */
- /* */
- /* Example: FT_TRACE0(( "Value is %i", foo )) */
- /* */
- /* Output of the FT_TRACEX macros is sent to stderr. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Disable
+ *
+ * @description:
+ * Switch off tracing temporarily. It can be activated again with
+ * @FT_Trace_Enable.
+ */
+ FT_BASE( void )
+ FT_Trace_Disable( void );
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Trace_Enable
+ *
+ * @description:
+ * Activate tracing. Use it after tracing has been switched off with
+ * @FT_Trace_Disable.
+ */
+ FT_BASE( void )
+ FT_Trace_Enable( void );
+
+
+ /**************************************************************************
+ *
+ * You need two opening and closing parentheses!
+ *
+ * Example: FT_TRACE0(( "Value is %i", foo ))
+ *
+ * Output of the FT_TRACEX macros is sent to stderr.
+ *
+ */
#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat )
#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat )
@@ -164,13 +192,13 @@ FT_BEGIN_HEADER
#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat )
- /*************************************************************************/
- /* */
- /* Define the FT_ERROR macro. */
- /* */
- /* Output of this macro is sent to stderr. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define the FT_ERROR macro.
+ *
+ * Output of this macro is sent to stderr.
+ *
+ */
#ifdef FT_DEBUG_LEVEL_ERROR
@@ -183,12 +211,12 @@ FT_BEGIN_HEADER
#endif /* !FT_DEBUG_LEVEL_ERROR */
- /*************************************************************************/
- /* */
- /* Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw' */
- /* makes it possible to easily set a breakpoint at this function. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw` makes
+ * it possible to easily set a breakpoint at this function.
+ *
+ */
#ifdef FT_DEBUG_LEVEL_ERROR
@@ -215,11 +243,11 @@ FT_BEGIN_HEADER
#endif /* !FT_DEBUG_LEVEL_ERROR */
- /*************************************************************************/
- /* */
- /* Define `FT_Message' and `FT_Panic' when needed. */
- /* */
- /*************************************************************************/
+ /**************************************************************************
+ *
+ * Define `FT_Message` and `FT_Panic` when needed.
+ *
+ */
#ifdef FT_DEBUG_LEVEL_ERROR