shithub: freetype+ttf2subf

Download patch

ref: 015a9b8d8f6f4e775ff40581e8ac7a0116174b04
parent: 9f94d8533cefa8a023a0b81633032fe0aaea08fb
author: Werner Lemberg <wl@gnu.org>
date: Mon Dec 7 05:27:42 EST 2020

*/*: s/FT_LOGGING/FT_DEBUG_LOGGING/.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-07  Werner Lemberg  <wl@gnu.org>
+
+	*/*: s/FT_LOGGING/FT_DEBUG_LOGGING/.
+
 2020-12-05  Werner Lemberg  <wl@gnu.org>
 
 	* builds/toplevel.mk (do-dist): Remove `submodules` directory.
--- a/README.git
+++ b/README.git
@@ -35,9 +35,9 @@
 repository.
 
 
-For using the `FT_LOGGING' macro while debugging (see `docs/DEBUG' for
-more information)  use the  following git  commands to  checkout `dlg'
-library as a git submodule.
+For   using  the   `FT_DEBUG_LOGGING'  macro   while  debugging   (see
+`docs/DEBUG' for more  information) use the following  git commands to
+checkout `dlg' library as a git submodule.
 
   git submodule init
   git submodule update
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -1128,9 +1128,9 @@
 if test "$have_pthread" != no; then
   CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
   LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS $PTHREAD_LIBS"
-  ftoption_set FT_LOGGING
+  ftoption_set FT_DEBUG_LOGGING
 else
-  ftoption_unset FT_LOGGING
+  ftoption_unset FT_DEBUG_LOGGING
 fi
 
 AC_SUBST([CFLAGS])
@@ -1185,7 +1185,7 @@
 
 if test $have_pthread = no; then
   AC_MSG_WARN([
-  \`FT_LOGGING' will not work since the \`pthread' library is not available.
+  \`FT_DEBUG_LOGGING' will not work since the \`pthread' library is not available.
   ])
 fi
 
--- a/builds/windows/ftdebug.c
+++ b/builds/windows/ftdebug.c
@@ -46,7 +46,7 @@
 #include <freetype/internal/ftobjs.h>
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
   /**************************************************************************
    *
@@ -87,7 +87,7 @@
   dlg_handler            ft_default_log_handler = NULL;
   FT_Custom_Log_Handler  custom_output_handler  = NULL;
 
-#endif /* FT_LOGGING*/
+#endif /* FT_DEBUG_LOGGING*/
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -255,7 +255,7 @@
     const char*  ft2_debug = NULL;
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
     if ( ft_custom_trace_level != NULL )
       ft2_debug = ft_custom_trace_level;
     else
@@ -276,7 +276,7 @@
         if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
           continue;
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
         /* check extra arguments for logging */
         if ( *p == '-' )
@@ -317,7 +317,7 @@
           }
         }
 
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
         /* read toggle name, followed by ':' */
         q = p;
@@ -423,7 +423,7 @@
 #endif /* !FT_DEBUG_LEVEL_TRACE */
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
   /**************************************************************************
    *
@@ -621,7 +621,7 @@
     va_end( ap );
   }
 
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
 
 /* END */
--- a/builds/windows/vc2010/freetype.vcxproj
+++ b/builds/windows/vc2010/freetype.vcxproj
@@ -90,7 +90,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\..\src\dlg\;$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;FT_LOGGING;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;FT_DEBUG_LOGGING;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <DisableLanguageExtensions>false</DisableLanguageExtensions>
@@ -119,7 +119,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\..\src\dlg\;$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;FT_LOGGING;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;FT_DEBUG_LOGGING;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <DisableLanguageExtensions>false</DisableLanguageExtensions>
@@ -148,7 +148,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\..\src\dlg;$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;FT_LOGGING;DLG_STATIC;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;FT_DEBUG_LOGGING;DLG_STATIC;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <DisableLanguageExtensions>false</DisableLanguageExtensions>
@@ -177,7 +177,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\..\src\dlg;$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;FT_LOGGING;DLG_STATIC;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;FT_DEBUG_LOGGING;DLG_STATIC;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <DisableLanguageExtensions>false</DisableLanguageExtensions>
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -443,7 +443,7 @@
    *   to a file, FreeType uses an the external `dlg` library (the source
    *   code is in `src/dlg`).
    */
-#define FT_LOGGING
+#define FT_DEBUG_LOGGING
 
 
   /**************************************************************************
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -12,10 +12,10 @@
   - `ttdebug' didn't show changed point coordinates (bug introduced in
     version 2.10.3).
 
-  - A new configuration macro  `FT_LOGGING` is available.  It provides
-    extended debugging capabilities for  FreeType, for example showing
-    a time stamp  or displaying the component a  tracing message comes
-    from.  See file `docs/DEBUG` for more information.
+  - A  new configuration  macro `FT_DEBUG_LOGGING`  is available.   It
+    provides extended debugging capabilities for FreeType, for example
+    showing a time stamp or displaying the component a tracing message
+    comes from.  See file `docs/DEBUG` for more information.
 
     This work was Priyesh Kumar's GSoC 2020 project.
 
--- a/docs/DEBUG
+++ b/docs/DEBUG
@@ -44,7 +44,7 @@
     When `FT2_DEBUG_MEMORY'  isn't defined  at runtime,  the debugging
     memory manager is ignored, and performance is unaffected.
 
-  FT_LOGGING
+  FT_DEBUG_LOGGING
 
     #define this macro for enhanced logging support; it automatically
     sets `FT_DEBUG_LEVEL_TRACE' and `FT_DEBUG_LEVEL_ERROR'.
@@ -165,7 +165,7 @@
     the memory and io components, which  are set to the trace levels 5
     and 4, respectively.
 
-    If `FT_LOGGING' is defined, two more options are available.
+    If `FT_DEBUG_LOGGING' is defined, two more options are available.
 
     * -v: Print also  the name of FreeType's component  from which the
           current log is produced.
@@ -190,8 +190,8 @@
   FT_LOGGING_FILE
 
     This  variable  is  only  used  if  FreeType  is  built  with  the
-    `FT_LOGGING'  macro defined.   It contains  the path  to the  file
-    where the  user wants  to put  his log  file.  If  it is  not set,
+    `FT_DEBUG_LOGGING'  macro defined.   It contains  the path  to the
+    file where the user wants to put  his log file.  If it is not set,
     FreeType uses stderr.
 
     Examples:
@@ -254,10 +254,10 @@
     freed blocks are released at runtime.
 
 
-IV. Additional Capabilities with `FT_LOGGING'
----------------------------------------------
+IV. Additional Capabilities with `FT_DEBUG_LOGGING'
+---------------------------------------------------
 
-If  `FT_LOGGING'  is  defined,  four APIs  are  available  to  provide
+If `FT_DEBUG_LOGGING' is  defined, four APIs are  available to provide
 additional debugging support.  Use
 
   #include<freetype/ftlogging.h>
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -445,7 +445,7 @@
    *
    *   This option needs a C99 compiler.
    */
-/* #define FT_LOGGING */
+/* #define FT_DEBUG_LOGGING */
 
 
   /**************************************************************************
--- a/include/freetype/ftlogging.h
+++ b/include/freetype/ftlogging.h
@@ -36,11 +36,11 @@
    *   External Debugging APIs
    *
    * @abstract:
-   *   Public APIs to control the `FT_LOGGING` macro.
+   *   Public APIs to control the `FT_DEBUG_LOGGING` macro.
    *
    * @description:
    *   This section contains the declarations of public functions that
-   *   enables fine control of what the `FT_LOGGING` macro outputs.
+   *   enables fine control of what the `FT_DEBUG_LOGGING` macro outputs.
    *
    */
 
@@ -66,8 +66,8 @@
    *   ```
    *
    * @note:
-   *   This function is only available if compilation option `@FT_LOGGING`
-   *   is set.
+   *   This function is only available if compilation option
+   *   `FT_DEBUG_LOGGING` is set.
    */
   FT_EXPORT( void )
   FT_Trace_Set_Level( const char*  tracing_level );
@@ -85,8 +85,8 @@
    *
    *
    * @note:
-   *   This function is only available if compilation option `@FT_LOGGING`
-   *   is set.
+   *   This function is only available if compilation option
+   *   `FT_DEBUG_LOGGING` is set.
    */
   FT_EXPORT( void )
   FT_Trace_Set_Default_Level( void );
@@ -131,8 +131,8 @@
    *     New logging function.
    *
    * @note:
-   *   This function is only available if compilation option `@FT_LOGGING`
-   *   is set.
+   *   This function is only available if compilation option
+   *   `FT_DEBUG_LOGGING` is set.
    */
   FT_EXPORT( void )
   FT_Set_Log_Handler( FT_Custom_Log_Handler  handler );
@@ -148,8 +148,8 @@
    *   log handler to FreeType's built-in version.
    *
    * @note:
-   *   This function is only available if compilation option `@FT_LOGGING`
-   *   is set.
+   *   This function is only available if compilation option
+   *   `FT_DEBUG_LOGGING` is set.
    */
   FT_EXPORT( void )
   FT_Set_Default_Log_Handler( void );
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -31,20 +31,20 @@
 
 #include "compiler-macros.h"
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 #include <../src/dlg/dlg/dlg.h>
 #include <../src/dlg/dlg/output.h>
 
 #include <freetype/ftlogging.h>
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
 
 FT_BEGIN_HEADER
 
-  /* force the definition of FT_DEBUG_LEVEL_TRACE if FT_LOGGING is */
-  /* already defined.                                              */
-  /*                                                               */
-#ifdef FT_LOGGING
+  /* 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
@@ -104,11 +104,11 @@
 
   /*************************************************************************
    *
-   * If FT_LOGGING is enabled, tracing messages are sent to dlg's API.
-   * If FT_LOGGING is disabled, tracing messages are sent to `FT_Message`
-   * (defined in ftdebug.c).
+   * 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_LOGGING
+#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 )
@@ -132,7 +132,7 @@
             ft_remove_tag( dlg_tag );                                      \
           } while( 0 )
 
-#else /* !FT_LOGGING */
+#else /* !FT_DEBUG_LOGGING */
 
 #define FT_LOG( level, varformat )                                         \
           do                                                               \
@@ -141,7 +141,7 @@
               FT_Message varformat;                                        \
           } while ( 0 )
 
-#endif /* !FT_LOGGING */
+#endif /* !FT_DEBUG_LOGGING */
 
 
 #ifdef FT_DEBUG_LEVEL_TRACE
@@ -259,14 +259,14 @@
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
-  /*************************************************************************
+  /**************************************************************************
    *
-   * If FT_LOGGING is enabled, error messages are sent to dlg's API.
-   * If FT_LOGGING is disabled, error messages are sent to `FT_Message`
+   * 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_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
 #define FT_ERROR( varformat )                                      \
           do                                                       \
@@ -279,11 +279,11 @@
             ft_remove_tag( dlg_tag );                              \
           } while ( 0 )
 
-#else /* !FT_LOGGING */
+#else /* !FT_DEBUG_LOGGING */
 
 #define FT_ERROR( varformat )  FT_Message varformat
 
-#endif /* !FT_LOGGING */
+#endif /* !FT_DEBUG_LOGGING */
 
 
 #else  /* !FT_DEBUG_LEVEL_ERROR */
@@ -358,7 +358,7 @@
   ft_debug_init( void );
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
   /**************************************************************************
    *
@@ -388,7 +388,7 @@
 
   /**************************************************************************
    *
-   * If FT_LOGGING macro is enabled, FreeType needs to initialize and
+   * If FT_DEBUG_LOGGING macro is enabled, FreeType needs to initialize and
    * un-initialize `FILE*`.
    *
    * These functions are defined in `ftdebug.c`.
@@ -425,7 +425,7 @@
   FT_Logging_Callback( const char*  fmt,
                        ... );
 
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
 
 FT_END_HEADER
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -46,7 +46,7 @@
 #include <freetype/internal/ftobjs.h>
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
   /**************************************************************************
    *
@@ -87,7 +87,7 @@
   dlg_handler            ft_default_log_handler = NULL;
   FT_Custom_Log_Handler  custom_output_handler  = NULL;
 
-#endif /* FT_LOGGING*/
+#endif /* FT_DEBUG_LOGGING*/
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -242,7 +242,7 @@
     const char*  ft2_debug = NULL;
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
     if ( ft_custom_trace_level != NULL )
       ft2_debug = ft_custom_trace_level;
     else
@@ -263,7 +263,7 @@
         if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
           continue;
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
         /* check extra arguments for logging */
         if ( *p == '-' )
@@ -304,7 +304,7 @@
           }
         }
 
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
         /* read toggle name, followed by ':' */
         q = p;
@@ -410,7 +410,7 @@
 #endif /* !FT_DEBUG_LEVEL_TRACE */
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 
   /**************************************************************************
    *
@@ -608,7 +608,7 @@
     va_end( ap );
   }
 
-#endif /* FT_LOGGING */
+#endif /* FT_DEBUG_LOGGING */
 
 
 /* END */
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -202,7 +202,7 @@
     FT_Memory  memory;
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
     ft_logging_init();
 #endif
 
@@ -252,7 +252,7 @@
     /* discard memory manager */
     FT_Done_Memory( memory );
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
     ft_logging_deinit();
 #endif
 
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -5292,12 +5292,12 @@
     if ( !memory || !alibrary )
       return FT_THROW( Invalid_Argument );
 
-#ifndef FT_LOGGING
+#ifndef FT_DEBUG_LOGGING
 #ifdef FT_DEBUG_LEVEL_ERROR
     /* init debugging support */
     ft_debug_init();
 #endif /* FT_DEBUG_LEVEL_ERROR */
-#endif /* !FT_LOGGING */
+#endif /* !FT_DEBUG_LOGGING */
 
     /* first of all, allocate the library object */
     if ( FT_NEW( library ) )
--- a/src/dlg/dlgwrap.c
+++ b/src/dlg/dlgwrap.c
@@ -24,7 +24,7 @@
 #include <freetype/freetype.h>
 
 
-#ifdef FT_LOGGING
+#ifdef FT_DEBUG_LOGGING
 #include "dlg.c"
 #else
   /* ANSI C doesn't like empty source files */