freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] Always provide logging API.


From: Werner Lemberg
Subject: [Git][freetype/freetype][master] Always provide logging API.
Date: Sun, 31 Jan 2021 13:29:48 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

4 changed files:

Changes:

  • ChangeLog
    1
    +2021-01-31  Werner Lemberg  <wl@gnu.org>
    
    2
    +
    
    3
    +	Always provide logging API.
    
    4
    +
    
    5
    +	It's easier to have stubs if FT_DEBUG_LOGGING is undefined than to
    
    6
    +	modify `ftexport.sym` conditionally.
    
    7
    +
    
    8
    +	Problem reported by Alexei.
    
    9
    +
    
    10
    +	* src/base/ftdebug.c: Include `ftlogging.h`.
    
    11
    +
    
    12
    +	(FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler,
    
    13
    +	FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs.
    
    14
    +
    
    1 15
     2021-01-31  Werner Lemberg  <wl@gnu.org>
    
    2 16
     
    
    3 17
     	* builds/unix/configure.raw: Fix typo.
    

  • docs/DEBUG
    ... ... @@ -260,7 +260,7 @@ IV. Additional Capabilities with `FT_DEBUG_LOGGING'
    260 260
     If `FT_DEBUG_LOGGING' is  defined, four APIs are  available to provide
    
    261 261
     additional debugging support.  Use
    
    262 262
     
    
    263
    -  #include<freetype/ftlogging.h>
    
    263
    +  #include <freetype/ftlogging.h>
    
    264 264
     
    
    265 265
     to access them.
    
    266 266
     
    

  • include/freetype/ftlogging.h
    ... ... @@ -66,8 +66,8 @@ FT_BEGIN_HEADER
    66 66
        *   ```
    
    67 67
        *
    
    68 68
        * @note:
    
    69
    -   *   This function is only available if compilation option
    
    70
    -   *   `FT_DEBUG_LOGGING` is set.
    
    69
    +   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`
    
    70
    +   *   isn't set.
    
    71 71
        */
    
    72 72
       FT_EXPORT( void )
    
    73 73
       FT_Trace_Set_Level( const char*  tracing_level );
    
    ... ... @@ -85,8 +85,8 @@ FT_BEGIN_HEADER
    85 85
        *
    
    86 86
        *
    
    87 87
        * @note:
    
    88
    -   *   This function is only available if compilation option
    
    89
    -   *   `FT_DEBUG_LOGGING` is set.
    
    88
    +   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`
    
    89
    +   *   isn't set.
    
    90 90
        */
    
    91 91
       FT_EXPORT( void )
    
    92 92
       FT_Trace_Set_Default_Level( void );
    
    ... ... @@ -131,8 +131,8 @@ FT_BEGIN_HEADER
    131 131
        *     New logging function.
    
    132 132
        *
    
    133 133
        * @note:
    
    134
    -   *   This function is only available if compilation option
    
    135
    -   *   `FT_DEBUG_LOGGING` is set.
    
    134
    +   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`
    
    135
    +   *   isn't set.
    
    136 136
        */
    
    137 137
       FT_EXPORT( void )
    
    138 138
       FT_Set_Log_Handler( FT_Custom_Log_Handler  handler );
    
    ... ... @@ -148,8 +148,8 @@ FT_BEGIN_HEADER
    148 148
        *   log handler to FreeType's built-in version.
    
    149 149
        *
    
    150 150
        * @note:
    
    151
    -   *   This function is only available if compilation option
    
    152
    -   *   `FT_DEBUG_LOGGING` is set.
    
    151
    +   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`
    
    152
    +   *   isn't set.
    
    153 153
        */
    
    154 154
       FT_EXPORT( void )
    
    155 155
       FT_Set_Default_Log_Handler( void );
    

  • src/base/ftdebug.c
    ... ... @@ -42,6 +42,7 @@
    42 42
     
    
    43 43
     
    
    44 44
     #include <freetype/freetype.h>
    
    45
    +#include <freetype/ftlogging.h>
    
    45 46
     #include <freetype/internal/ftdebug.h>
    
    46 47
     #include <freetype/internal/ftobjs.h>
    
    47 48
     
    
    ... ... @@ -589,7 +590,7 @@
    589 590
       /* documentation is in ftlogging.h */
    
    590 591
     
    
    591 592
       FT_EXPORT_DEF( void )
    
    592
    -  FT_Set_Default_Log_Handler()
    
    593
    +  FT_Set_Default_Log_Handler( void )
    
    593 594
       {
    
    594 595
         custom_output_handler = NULL;
    
    595 596
       }
    
    ... ... @@ -608,7 +609,36 @@
    608 609
         va_end( ap );
    
    609 610
       }
    
    610 611
     
    
    611
    -#endif /* FT_DEBUG_LOGGING */
    
    612
    +#else /* !FT_DEBUG_LOGGING */
    
    613
    +
    
    614
    +  FT_EXPORT_DEF( void )
    
    615
    +  FT_Trace_Set_Level( const char*  level )
    
    616
    +  {
    
    617
    +    FT_UNUSED( level );
    
    618
    +  }
    
    619
    +
    
    620
    +
    
    621
    +  FT_EXPORT_DEF( void )
    
    622
    +  FT_Trace_Set_Default_Level( void )
    
    623
    +  {
    
    624
    +    /* nothing */
    
    625
    +  }
    
    626
    +
    
    627
    +
    
    628
    +  FT_EXPORT_DEF( void )
    
    629
    +  FT_Set_Log_Handler( FT_Custom_Log_Handler  handler )
    
    630
    +  {
    
    631
    +    FT_UNUSED( handler );
    
    632
    +  }
    
    633
    +
    
    634
    +
    
    635
    +  FT_EXPORT_DEF( void )
    
    636
    +  FT_Set_Default_Log_Handler( void )
    
    637
    +  {
    
    638
    +    /* nothing */
    
    639
    +  }
    
    640
    +
    
    641
    +#endif /* !FT_DEBUG_LOGGING */
    
    612 642
     
    
    613 643
     
    
    614 644
     /* END */


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]