w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ftdebug.h File Reference
#include <ft2build.h>
#include <FT_CONFIG_CONFIG_H>
#include <freetype/freetype.h>
#include "compiler-macros.h"
Include dependency graph for ftdebug.h:

Go to the source code of this file.

Macros

#define FT_TRACE(level, varformat)   do { } while ( 0 ) /* nothing */
 
#define FT_TRACE0(varformat)   FT_TRACE( 0, varformat )
 
#define FT_TRACE1(varformat)   FT_TRACE( 1, varformat )
 
#define FT_TRACE2(varformat)   FT_TRACE( 2, varformat )
 
#define FT_TRACE3(varformat)   FT_TRACE( 3, varformat )
 
#define FT_TRACE4(varformat)   FT_TRACE( 4, varformat )
 
#define FT_TRACE5(varformat)   FT_TRACE( 5, varformat )
 
#define FT_TRACE6(varformat)   FT_TRACE( 6, varformat )
 
#define FT_TRACE7(varformat)   FT_TRACE( 7, varformat )
 
#define FT_ERROR(varformat)   do { } while ( 0 ) /* nothing */
 
#define FT_ASSERT(condition)   do { } while ( 0 )
 
#define FT_THROW(e)   FT_ERR_CAT( FT_ERR_PREFIX, e )
 

Functions

FT_Int FT_Trace_Get_Count (void)
 
const char * FT_Trace_Get_Name (FT_Int idx)
 
void FT_Trace_Disable (void)
 
void FT_Trace_Enable (void)
 
void ft_debug_init (void)
 

Macro Definition Documentation

◆ FT_ASSERT

#define FT_ASSERT (   condition)    do { } while ( 0 )

Define the FT_ASSERT and FT_THROW macros. The call to FT_Throw makes it possible to easily set a breakpoint at this function.

Definition at line 241 of file ftdebug.h.

◆ FT_ERROR

#define FT_ERROR (   varformat)    do { } while ( 0 ) /* nothing */

Define the FT_ERROR macro.

Output of this macro is sent to stderr.

Definition at line 211 of file ftdebug.h.

◆ FT_THROW

#define FT_THROW (   e)    FT_ERR_CAT( FT_ERR_PREFIX, e )

Definition at line 243 of file ftdebug.h.

◆ FT_TRACE

#define FT_TRACE (   level,
  varformat 
)    do { } while ( 0 ) /* nothing */

ftdebug.h

Debugging and logging component (specification).

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, 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. Define the trace enums as well as the trace levels array when they are needed. 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.

Definition at line 102 of file ftdebug.h.

◆ FT_TRACE0

#define FT_TRACE0 (   varformat)    FT_TRACE( 0, varformat )

You need two opening and closing parentheses!

Example: FT_TRACE0(( "Value is %i", foo ))

Output of the FT_TRACEX macros is sent to stderr.

Definition at line 187 of file ftdebug.h.

◆ FT_TRACE1

#define FT_TRACE1 (   varformat)    FT_TRACE( 1, varformat )

Definition at line 188 of file ftdebug.h.

◆ FT_TRACE2

#define FT_TRACE2 (   varformat)    FT_TRACE( 2, varformat )

Definition at line 189 of file ftdebug.h.

◆ FT_TRACE3

#define FT_TRACE3 (   varformat)    FT_TRACE( 3, varformat )

Definition at line 190 of file ftdebug.h.

◆ FT_TRACE4

#define FT_TRACE4 (   varformat)    FT_TRACE( 4, varformat )

Definition at line 191 of file ftdebug.h.

◆ FT_TRACE5

#define FT_TRACE5 (   varformat)    FT_TRACE( 5, varformat )

Definition at line 192 of file ftdebug.h.

◆ FT_TRACE6

#define FT_TRACE6 (   varformat)    FT_TRACE( 6, varformat )

Definition at line 193 of file ftdebug.h.

◆ FT_TRACE7

#define FT_TRACE7 (   varformat)    FT_TRACE( 7, varformat )

Definition at line 194 of file ftdebug.h.

Function Documentation

◆ ft_debug_init()

void ft_debug_init ( void  )

Define FT_Message and FT_Panic when needed.

ftdebug.c

Debugging and logging component for WinCE (body).

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, 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. This component contains various macros and functions used to ease the debugging of the FreeType engine. Its main purpose is in assertion checking, tracing, and error detection.

There are now three debugging modes:

  • trace mode

    Error and trace messages are sent to the log file (which can be the standard error output).

  • error mode

    Only error messages are generated.

  • release mode:

    No error message is sent or generated. The code is free from any debugging parts.

ftdebug.c

Debugging and logging component for Win32 (body).

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, 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. This component contains various macros and functions used to ease the debugging of the FreeType engine. Its main purpose is in assertion checking, tracing, and error detection.

There are now three debugging modes:

  • trace mode

    Error and trace messages are sent to the log file (which can be the standard error output).

  • error mode

    Only error messages are generated.

  • release mode:

    No error message is sent or generated. The code is free from any debugging parts.

ftdebug.c

Debugging and logging component (body).

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, 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. This component contains various macros and functions used to ease the debugging of the FreeType engine. Its main purpose is in assertion checking, tracing, and error detection.

There are now three debugging modes:

  • trace mode

    Error and trace messages are sent to the log file (which can be the standard error output).

  • error mode

    Only error messages are generated.

  • release mode:

    No error message is sent or generated. The code is free from any debugging parts.

Definition at line 307 of file ftdebug.c.

◆ FT_Trace_Disable()

void FT_Trace_Disable ( void  )

@function: FT_Trace_Disable

@description: Switch off tracing temporarily. It can be activated again with @FT_Trace_Enable.

Definition at line 330 of file ftdebug.c.

◆ FT_Trace_Enable()

void FT_Trace_Enable ( void  )

@function: FT_Trace_Enable

@description: Activate tracing. Use it after tracing has been switched off with @FT_Trace_Disable.

Definition at line 339 of file ftdebug.c.

◆ FT_Trace_Get_Count()

FT_Int FT_Trace_Get_Count ( void  )

@function: FT_Trace_Get_Count

@description: Return the number of available trace components.

Returns
: 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.

Definition at line 314 of file ftdebug.c.

◆ FT_Trace_Get_Name()

const char* FT_Trace_Get_Name ( FT_Int  idx)

@function: FT_Trace_Get_Name

@description: Return the name of a trace component.

@input: The index of the trace component.

Returns
: 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.

Definition at line 321 of file ftdebug.c.