misc/libfreetype/builds/wince/ftdebug.c
author koda
Tue, 21 Jun 2011 23:24:50 +0200
changeset 5283 bc0459372238
parent 5172 88f2e05288ba
permissions -rw-r--r--
oops
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 for WinCE (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, 2005, 2008, 2009 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_INTERNAL_DEBUG_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
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
#ifdef FT_DEBUG_LEVEL_ERROR
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
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
#include <stdarg.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
#include <stdlib.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
#include <string.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
#include <windows.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
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
  void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  OutputDebugStringEx( const char*  str )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
    static WCHAR  buf[8192];
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
    int sz = MultiByteToWideChar( CP_ACP, 0, str, -1, buf,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
                                  sizeof ( buf ) / sizeof ( *buf ) );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
    if ( !sz )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
      lstrcpyW( buf, L"OutputDebugStringEx: MultiByteToWideChar failed" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
    OutputDebugStringW( buf );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  }
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
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  FT_Message( const char*  fmt, ... )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
    static char  buf[8192];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
    va_list      ap;
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
    va_start( ap, fmt );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
    vprintf( fmt, ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
    /* send the string to the debugger as well */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
    vsprintf( buf, fmt, ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
    OutputDebugStringEx( buf );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
    va_end( ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
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
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  FT_Panic( const char*  fmt, ... )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
    static char  buf[8192];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
    va_list      ap;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
    va_start( ap, fmt );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
    vsprintf( buf, fmt, ap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
    OutputDebugStringEx( buf );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
    va_end( ap );
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
    exit( EXIT_FAILURE );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
#ifdef FT_DEBUG_LEVEL_TRACE
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  /* array of trace levels, initialized to 0 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  int  ft_trace_levels[trace_count];
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
  /* define array of trace toggle names */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
#define FT_TRACE_DEF( x )  #x ,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  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
   115
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
#include FT_INTERNAL_TRACE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
    NULL
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
#undef FT_TRACE_DEF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
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
  /* 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
   126
  /* 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
   127
  /* toggles, separated by spaces, `;' or `,'.  Example:                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /*    "any:3 memory:6 stream:5"                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /* This will request that all levels be set to 3, except the trace level */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /* for the memory and stream components which are set to 6 and 5,        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /* respectively.                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /* See the file <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
   136
  /* available toggle names.                                               */
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
  /* The level must be between 0 and 6; 0 means quiet (except for serious  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /* runtime errors), and 6 means _very_ verbose.                          */
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
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  ft_debug_init( void )
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
    /* Windows Mobile doesn't have environment API:           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    /* GetEnvironmentStrings, GetEnvironmentVariable, getenv. */
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
    /* FIXME!!! How to set debug mode?                        */
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
    /* const char*  ft2_debug = getenv( "FT2_DEBUG" ); */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    const char*  ft2_debug = 0;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    if ( ft2_debug )
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
      const char*  p = ft2_debug;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
      const char*  q;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
      for ( ; *p; p++ )
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
        /* skip leading whitespace and separators */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
        if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
          continue;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
        /* read toggle name, followed by ':' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
        q = p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
        while ( *p && *p != ':' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
          p++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
        if ( *p == ':' && p > q )
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
          int  n, i, len = p - q;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
          int  level = -1, found = -1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
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
          for ( n = 0; n < trace_count; n++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
            const char*  toggle = ft_trace_toggles[n];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
            for ( i = 0; i < len; i++ )
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 ( toggle[i] != q[i] )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
                break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
            if ( i == len && toggle[i] == 0 )
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
              found = n;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
              break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
            }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
          }
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
          /* read level */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
          p++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
          if ( *p )
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
            level = *p++ - '0';
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
            if ( level < 0 || level > 7 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
              level = -1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
          }
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
          if ( found >= 0 && level >= 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
          {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
            if ( found == trace_any )
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
              /* special case for "any" */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
              for ( n = 0; n < trace_count; n++ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
                ft_trace_levels[n] = level;
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
            else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
              ft_trace_levels[found] = level;
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
    }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
#else  /* !FT_DEBUG_LEVEL_TRACE */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  FT_BASE_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
  ft_debug_init( void )
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
    /* nothing */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
#endif /* !FT_DEBUG_LEVEL_TRACE */
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
#endif /* FT_DEBUG_LEVEL_ERROR */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
/* END */