ref: b5349a9b75b233b4036da594187a9959c3446890
parent: a7d2f5e1c0b8e3636a93d9e9e0b1a22457b98faa
author: Werner Lemberg <[email protected]>
date: Tue Feb 19 11:30:15 EST 2002
* builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first. * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused to avoid compiler warning. * src/cff/cffload.c (CFF_Get_String): Ditto. * src/cff/cffobjs.c (CFF_StrCopy): Ditto. * src/psaux/psobjs.c (PS_Table_Done): Ditto. * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto. (pcf_get_bitmaps): The same for `sizebitmaps'. * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for `orig_y'. (t1operator_seac): Comment out more dead code. * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER' conditional. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER' conditional.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2002-02-19 Werner Lemberg <[email protected]>
+
+ * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first.
+
+ * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused
+ to avoid compiler warning.
+ * src/cff/cffload.c (CFF_Get_String): Ditto.
+ * src/cff/cffobjs.c (CFF_StrCopy): Ditto.
+ * src/psaux/psobjs.c (PS_Table_Done): Ditto.
+ * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
+ (pcf_get_bitmaps): The same for `sizebitmaps'.
+ * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
+ `orig_y'.
+ (t1operator_seac): Comment out more dead code.
+ * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
+ conditional.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER'
+ conditional.
+
2002-02-18 Werner Lemberg <[email protected]>
* src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -139,7 +139,10 @@
# least the paths for the `base' and `builds/<system>' directories;
# debug/optimization/warning flags + ansi compliance if needed.
#
-FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
+# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
+# old FreeType versions.
+#
+FT_CFLAGS = $(INCLUDE_FLAGS) $(CFLAGS)
FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -383,6 +383,8 @@
cache->buckets = new_buckets;
cache->size = new_size;
+
+ FT_UNUSED( error );
}
}
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1328,8 +1328,8 @@
if ( adobe_name )
{
- FT_Memory memory = index->stream->memory;
- FT_Error error;
+ FT_Memory memory = index->stream->memory;
+ FT_Error error;
len = (FT_UInt)strlen( adobe_name );
@@ -1338,6 +1338,8 @@
MEM_Copy( name, adobe_name, len );
name[len] = 0;
}
+
+ FT_UNUSED( error );
}
return name;
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -241,6 +241,9 @@
MEM_Copy( result, source, len );
result[len] = 0;
}
+
+ FT_UNUSED( error );
+
return result;
}
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -252,8 +252,8 @@
FT_ULong *aformat,
FT_ULong *asize )
{
- FT_Error error;
- FT_Int i;
+ FT_Error error;
+ FT_Int i;
for ( i = 0; i < ntables; i++ )
@@ -271,6 +271,8 @@
return PCF_Err_Ok;
}
+ FT_UNUSED( error );
+
return PCF_Err_Invalid_File_Format;
}
@@ -617,6 +619,8 @@
nbitmaps,
PCF_GLYPH_PAD_INDEX( format ) ));
FT_TRACE4(( "bitmap size = %d\n", sizebitmaps ));
+
+ FT_UNUSED( sizebitmaps ); /* only used for debugging */
for ( i = 0; i < nbitmaps; i++ )
face->metrics[i].bits = stream->pos + offsets[i];
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -227,6 +227,8 @@
table->capacity = table->cursor;
FREE( old_base );
+
+ FT_UNUSED( error );
}
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -183,8 +183,11 @@
FT_Int achar )
{
FT_Error error;
- FT_Int bchar_index, achar_index, n_base_points;
+ FT_Int bchar_index, achar_index;
+#if 0
+ FT_Int n_base_points;
FT_Outline* base = decoder->builder.base;
+#endif
FT_Vector left_bearing, advance;
@@ -258,7 +261,9 @@
if ( error )
goto Exit;
+#if 0
n_base_points = base->n_points;
+#endif
/* save the left bearing and width of the base character */
/* as they will be erased by the next load. */
@@ -760,6 +765,8 @@
orig_x = builder->last.x = x = builder->pos_x + top[0];
orig_y = builder->last.y = y = builder->pos_y;
+
+ FT_UNUSED( orig_y );
/* the `metrics_only' indicates that we only want to compute */
/* the glyph's metrics (lsb + advance width), not load the */
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -1500,12 +1500,15 @@
PSH2_GlyphRec glyphrec;
PSH2_Glyph glyph = &glyphrec;
FT_Error error;
+#ifdef DEBUG_HINTER
FT_Memory memory;
+#endif
FT_Int dimension;
- memory = globals->memory;
#ifdef DEBUG_HINTER
+ memory = globals->memory;
+
if ( ps2_debug_glyph )
{
psh2_glyph_done( ps2_debug_glyph );
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -151,6 +151,9 @@
face->root.internal->postscript_name = result;
}
+
+ FT_UNUSED( error );
+
return result;
}
}
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -609,7 +609,9 @@
FT_GlyphLoader* gloader = load->gloader;
FT_Outline* outline = &gloader->current.outline;
FT_UInt n_points = outline->n_points;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_UInt n_ins;
+#endif
TT_GlyphZone* zone = &load->zone;
FT_Error error = TT_Err_Ok;
@@ -616,7 +618,9 @@
FT_UNUSED( debug ); /* used by truetype interpreter only */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
n_ins = load->glyph->control_len;
+#endif
/* add shadow points */
@@ -915,19 +919,26 @@
else
{
TT_GlyphSlot glyph = (TT_GlyphSlot)loader->glyph;
- FT_UInt start_point, start_contour;
+ FT_UInt start_point;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ FT_UInt start_contour;
FT_ULong ins_pos; /* position of composite instructions, if any */
+#endif
/* for each subglyph, read composite header */
start_point = gloader->base.outline.n_points;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
start_contour = gloader->base.outline.n_contours;
+#endif
error = face->read_composite_glyph( loader );
if ( error )
goto Fail;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
ins_pos = loader->ins_pos;
+#endif
face->forget_glyph_frame( loader );
opened_frame = 0;