freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master d5bfa05 2/3: Fixes for conditional compilation.


From: Werner LEMBERG
Subject: [freetype2] master d5bfa05 2/3: Fixes for conditional compilation.
Date: Sat, 18 Mar 2017 02:07:41 -0400 (EDT)

branch: master
commit d5bfa053f5854cc42966634e1b26a8024b7a51d4
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Fixes for conditional compilation.
    
    * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
    earlier.
    
    * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
    TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
    (sfnt_done_face): Protect some code with
    TT_CONFIG_OPTION_GX_VAR_SUPPORT.
    
    * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
    warning.
    
    * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
    into TT_USE_BYTECODE_INTERPRETER block.
    
    (tt_loader_init): Put `error' variable into
    TT_USE_BYTECODE_INTERPRETER block.
---
 ChangeLog              | 21 +++++++++++++++++++++
 src/autofit/afcjk.c    |  2 +-
 src/autofit/afindic.c  |  2 +-
 src/sfnt/sfobjs.c      |  5 ++++-
 src/sfnt/ttsbit.c      |  3 +++
 src/truetype/ttgload.c | 10 ++++++----
 6 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 55733a0..1f0163b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2017-03-17  Werner Lemberg  <address@hidden>
 
+       Fixes for conditional compilation.
+
+       * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
+       earlier.
+
+       * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
+       TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
+       (sfnt_done_face): Protect some code with
+       TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+
+       * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
+       warning.
+
+       * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
+       into TT_USE_BYTECODE_INTERPRETER block.
+
+       (tt_loader_init): Put `error' variable into
+       TT_USE_BYTECODE_INTERPRETER block.
+
+2017-03-17  Werner Lemberg  <address@hidden>
+
        Fix preprocessor warning.
 
        * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index f172a9f..ec05ee4 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -29,13 +29,13 @@
 #include "afglobal.h"
 #include "afpic.h"
 #include "aflatin.h"
+#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_CJK
 
 #undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
 
-#include "afcjk.h"
 #include "aferrors.h"
 
 
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 03c611b..23be46e 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -18,13 +18,13 @@
 
 #include "aftypes.h"
 #include "aflatin.h"
+#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_INDIC
 
 #include "afindic.h"
 #include "aferrors.h"
-#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_USE_WARPER
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 3640074..0418d83 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -856,7 +856,6 @@
                   FT_Parameter*  params )
   {
     FT_Error      error;
-    FT_Memory     memory = face->root.memory;
     FT_Library    library = face->root.driver->root.library;
     SFNT_Service  sfnt;
     FT_Int        face_index;
@@ -943,6 +942,8 @@
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
     {
+      FT_Memory  memory = face->root.memory;
+
       FT_ULong  fvar_len;
 
       FT_ULong  version;
@@ -1754,8 +1755,10 @@
     FT_FREE( face->sbit_strike_map );
     face->root.num_fixed_sizes = 0;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
     FT_FREE( face->postscript_name );
     FT_FREE( face->var_postscript_prefix );
+#endif
 
     face->sfnt = NULL;
   }
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 9829593..5a0215d 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -1460,6 +1460,9 @@
     FT_Byte*  p;
 
     FT_UNUSED( map );
+#ifndef FT_CONFIG_OPTION_USE_PNG
+    FT_UNUSED( metrics_only );
+#endif
 
 
     strike_index = face->sbit_strike_map[strike_index];
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 0fdaa85..eecf7af 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -332,7 +332,6 @@
     FT_Outline*     outline;
     FT_UShort       n_ins;
     FT_Int          n_points;
-    FT_ULong        tmp;
 
     FT_Byte         *flag, *flag_limit;
     FT_Byte         c, count;
@@ -402,6 +401,9 @@
 
     if ( IS_HINTED( load->load_flags ) )
     {
+      FT_ULong  tmp;
+
+
       /* check instructions size */
       if ( ( limit - p ) < n_ins )
       {
@@ -2270,17 +2272,17 @@
                   FT_Int32      load_flags,
                   FT_Bool       glyf_table_only )
   {
-    FT_Error  error;
-
     TT_Face    face;
     FT_Stream  stream;
+
 #ifdef TT_USE_BYTECODE_INTERPRETER
+    FT_Error   error;
     FT_Bool    pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
-#endif
 #if defined TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY || \
     defined TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
     TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( (TT_Face)glyph->face );
 #endif
+#endif
 
 
     face   = (TT_Face)glyph->face;



reply via email to

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