misc/libfreetype/src/base/ftdebug.c
author koda
Tue, 04 Dec 2012 03:27:12 +0100
changeset 8217 e3f47a1d6f2b
parent 5172 88f2e05288ba
permissions -rw-r--r--
readd this debug line, commented out, could be useful
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftdebug.c                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    Debugging and logging component (body).                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2001, 2002, 2004, 2008 by                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /* This component contains various macros and functions used to ease the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* debugging of the FreeType engine.  Its main purpose is in assertion   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* checking, tracing, and error detection.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /* There are now three debugging modes:                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  /* - trace mode                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  /*   Error and trace messages are sent to the log file (which can be the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
  /*   standard error output).                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /* - error mode                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /*   Only error messages are generated.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /* - release mode:                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*   No error message is sent or generated.  The code is free from any   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
  /*   debugging parts.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
#include FT_INTERNAL_DEBUG_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
#ifdef FT_DEBUG_LEVEL_ERROR
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /* documentation is in ftdebug.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  FT_Message( const char*  fmt, ... )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
    va_list  ap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
    va_start( ap, fmt );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
    vfprintf( stderr, fmt, ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
    va_end( ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /* documentation is in ftdebug.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  FT_Panic( const char*  fmt, ... )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
    va_list  ap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
    va_start( ap, fmt );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
    vfprintf( stderr, fmt, ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
    va_end( ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
    exit( EXIT_FAILURE );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
#endif /* FT_DEBUG_LEVEL_ERROR */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
#ifdef FT_DEBUG_LEVEL_TRACE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  /* array of trace levels, initialized to 0 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  int  ft_trace_levels[trace_count];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /* define array of trace toggle names */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
#define FT_TRACE_DEF( x )  #x ,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  static const char*  ft_trace_toggles[trace_count + 1] =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
#include FT_INTERNAL_TRACE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
    NULL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
#undef FT_TRACE_DEF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  /* documentation is in ftdebug.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  FT_BASE_DEF( FT_Int )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  FT_Trace_Get_Count( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
    return trace_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  /* documentation is in ftdebug.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  FT_BASE_DEF( const char * )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  FT_Trace_Get_Name( FT_Int  idx )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
    int  max = FT_Trace_Get_Count();
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    if ( idx < max )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
      return ft_trace_toggles[idx];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
    else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
      return NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /* Initialize the tracing sub-system.  This is done by retrieving the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /* value of the `FT2_DEBUG' environment variable.  It must be a list of  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /* toggles, separated by spaces, `;', or `,'.  Example:                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*    export FT2_DEBUG="any:3 memory:7 stream:5"                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /* This requests that all levels be set to 3, except the trace level for */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /* the memory and stream components which are set to 7 and 5,            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /* respectively.                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /* See the file <include/freetype/internal/fttrace.h> for details of the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /* available toggle names.                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /* The level must be between 0 and 7; 0 means quiet (except for serious  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /* runtime errors), and 7 means _very_ verbose.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  ft_debug_init( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    const char*  ft2_debug = getenv( "FT2_DEBUG" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    if ( ft2_debug )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
      const char*  p = ft2_debug;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
      const char*  q;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
      for ( ; *p; p++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
        /* skip leading whitespace and separators */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
        if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
          continue;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
        /* read toggle name, followed by ':' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
        q = p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
        while ( *p && *p != ':' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
          p++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
        if ( *p == ':' && p > q )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
        {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
          FT_Int  n, i, len = (FT_Int)( p - q );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
          FT_Int  level = -1, found = -1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
          for ( n = 0; n < trace_count; n++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
            const char*  toggle = ft_trace_toggles[n];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
            for ( i = 0; i < len; i++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
            {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
              if ( toggle[i] != q[i] )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
                break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
            if ( i == len && toggle[i] == 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
            {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
              found = n;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
              break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
          }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
          /* read level */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
          p++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
          if ( *p )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
            level = *p++ - '0';
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
            if ( level < 0 || level > 7 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
              level = -1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
          }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
          if ( found >= 0 && level >= 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
            if ( found == trace_any )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
            {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
              /* special case for `any' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
              for ( n = 0; n < trace_count; n++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
                ft_trace_levels[n] = level;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
            else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
              ft_trace_levels[found] = level;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
          }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
        }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
#else  /* !FT_DEBUG_LEVEL_TRACE */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  ft_debug_init( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
    /* nothing */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  FT_BASE_DEF( FT_Int )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  FT_Trace_Get_Count( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
    return 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
  FT_BASE_DEF( const char * )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  FT_Trace_Get_Name( FT_Int  idx )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
    FT_UNUSED( idx );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
    return NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
#endif /* !FT_DEBUG_LEVEL_TRACE */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
/* END */