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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
diff --git a/ChangeLog b/ChangeLog
index 55733a0..1f0163b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
2017-03-17 Werner Lemberg <wl@gnu.org>
+ 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 <wl@gnu.org>
+
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;