summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 06:19:44 +0000
commit0de5be92a3a0fe27e8521fc4de67e19b1057842e (patch)
treee93a390fe965486cca19498840cb8d7904252fec /Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h
parent27ce96eea3f1190bd744448cfa149e8d767af95a (diff)
revert freetype to 2.10.4
git-svn-id: svn://tug.org/texlive/trunk@60360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h')
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h170
1 files changed, 7 insertions, 163 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h
index b9787a7098a..df5357ad550 100644
--- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h
+++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h
@@ -4,7 +4,7 @@
*
* Debugging and logging component (specification).
*
- * Copyright (C) 1996-2021 by
+ * Copyright (C) 1996-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -31,23 +31,9 @@
#include "compiler-macros.h"
-#ifdef FT_DEBUG_LOGGING
-#include <dlg/output.h>
-#include <dlg/dlg.h>
-
-#include <freetype/ftlogging.h>
-#endif /* FT_DEBUG_LOGGING */
-
FT_BEGIN_HEADER
- /* force the definition of FT_DEBUG_LEVEL_TRACE if FT_DEBUG_LOGGING is */
- /* already defined. */
- /* */
-#ifdef FT_DEBUG_LOGGING
-#undef FT_DEBUG_LEVEL_TRACE
-#define FT_DEBUG_LEVEL_TRACE
-#endif
/* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
/* is already defined; this simplifies the following #ifdefs */
@@ -96,67 +82,21 @@ FT_BEGIN_HEADER
* Each component must define the macro FT_COMPONENT to a valid FT_Trace
* value before using any TRACE macro.
*
- * To get consistent logging output, there should be no newline character
- * (i.e., '\n') or a single trailing one in the message string of
- * `FT_TRACEx` and `FT_ERROR`.
- */
-
-
- /*************************************************************************
- *
- * If FT_DEBUG_LOGGING is enabled, tracing messages are sent to dlg's API.
- * If FT_DEBUG_LOGGING is disabled, tracing messages are sent to
- * `FT_Message` (defined in ftdebug.c).
*/
-#ifdef FT_DEBUG_LOGGING
-
- /* we need two macros to convert the names of `FT_COMPONENT` to a string */
-#define FT_LOGGING_TAG( x ) FT_LOGGING_TAG_( x )
-#define FT_LOGGING_TAG_( x ) #x
- /* we need two macros to convert the component and the trace level */
- /* to a string that combines them */
-#define FT_LOGGING_TAGX( x, y ) FT_LOGGING_TAGX_( x, y )
-#define FT_LOGGING_TAGX_( x, y ) #x ":" #y
+#ifdef FT_DEBUG_LEVEL_TRACE
+ /* 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_LOG( level, varformat ) \
- do \
- { \
- const char* dlg_tag = FT_LOGGING_TAGX( FT_COMPONENT, level ); \
- \
- \
- ft_add_tag( dlg_tag ); \
- if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
- { \
- if ( custom_output_handler != NULL ) \
- FT_Logging_Callback varformat; \
- else \
- dlg_trace varformat; \
- } \
- ft_remove_tag( dlg_tag ); \
- } while( 0 )
-
-#else /* !FT_DEBUG_LOGGING */
-
-#define FT_LOG( level, varformat ) \
+#define FT_TRACE( level, varformat ) \
do \
{ \
if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
FT_Message varformat; \
} while ( 0 )
-#endif /* !FT_DEBUG_LOGGING */
-
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
- /* 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 ) FT_LOG( level, varformat )
-
#else /* !FT_DEBUG_LEVEL_TRACE */
#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */
@@ -264,32 +204,7 @@ FT_BEGIN_HEADER
#ifdef FT_DEBUG_LEVEL_ERROR
- /**************************************************************************
- *
- * If FT_DEBUG_LOGGING is enabled, error messages are sent to dlg's API.
- * If FT_DEBUG_LOGGING is disabled, error messages are sent to `FT_Message`
- * (defined in ftdebug.c).
- *
- */
-#ifdef FT_DEBUG_LOGGING
-
-#define FT_ERROR( varformat ) \
- do \
- { \
- const char* dlg_tag = FT_LOGGING_TAG( FT_COMPONENT ); \
- \
- \
- ft_add_tag( dlg_tag ); \
- dlg_trace varformat; \
- ft_remove_tag( dlg_tag ); \
- } while ( 0 )
-
-#else /* !FT_DEBUG_LOGGING */
-
-#define FT_ERROR( varformat ) FT_Message varformat
-
-#endif /* !FT_DEBUG_LOGGING */
-
+#define FT_ERROR( varformat ) FT_Message varformat
#else /* !FT_DEBUG_LEVEL_ERROR */
@@ -362,77 +277,6 @@ FT_BEGIN_HEADER
FT_BASE( void )
ft_debug_init( void );
-
-#ifdef FT_DEBUG_LOGGING
-
- /**************************************************************************
- *
- * 'dlg' uses output handlers to control how and where log messages are
- * printed. Therefore we need to define a default output handler for
- * FreeType.
- */
- FT_BASE( void )
- ft_log_handler( const struct dlg_origin* origin,
- const char* string,
- void* data );
-
-
- /**************************************************************************
- *
- * 1. `ft_default_log_handler` stores the function pointer that is used
- * internally by FreeType to print logs to a file.
- *
- * 2. `custom_output_handler` stores the function pointer to the callback
- * function provided by the user.
- *
- * It is defined in `ftdebug.c`.
- */
- extern dlg_handler ft_default_log_handler;
- extern FT_Custom_Log_Handler custom_output_handler;
-
-
- /**************************************************************************
- *
- * If FT_DEBUG_LOGGING macro is enabled, FreeType needs to initialize and
- * un-initialize `FILE*`.
- *
- * These functions are defined in `ftdebug.c`.
- */
- FT_BASE( void )
- ft_logging_init( void );
-
- FT_BASE( void )
- ft_logging_deinit( void );
-
-
- /**************************************************************************
- *
- * For printing the name of `FT_COMPONENT` along with the actual log we
- * need to add a tag with the name of `FT_COMPONENT`.
- *
- * These functions are defined in `ftdebug.c`.
- */
- FT_BASE( void )
- ft_add_tag( const char* tag );
-
- FT_BASE( void )
- ft_remove_tag( const char* tag );
-
-
- /**************************************************************************
- *
- * A function to print log data using a custom callback logging function
- * (which is set using `FT_Set_Log_Handler`).
- *
- * This function is defined in `ftdebug.c`.
- */
- FT_BASE( void )
- FT_Logging_Callback( const char* fmt,
- ... );
-
-#endif /* FT_DEBUG_LOGGING */
-
-
FT_END_HEADER
#endif /* FTDEBUG_H_ */