Update from HarfBuzz. Lars Knoll fixed all the warnings.

2006-04-06  Behdad Esfahbod  <behdad@gnome.org>

        * pango/opentype: Update from HarfBuzz.  Lars Knoll fixed all the
        warnings.
This commit is contained in:
Behdad Esfahbod 2006-04-06 18:23:49 +00:00 committed by Behdad Esfahbod
parent ca57250bc9
commit b31d6def96
4 changed files with 179 additions and 113 deletions

View File

@ -87,6 +87,8 @@ DEF_DUMP (LangSys)
{
int i;
FT_UNUSED(hb_type);
DUMP_FUINT (LangSys, LookupOrderOffset);
DUMP_FUINT (LangSys, ReqFeatureIndex);
DUMP_FUINT (LangSys, FeatureCount);
@ -133,6 +135,8 @@ DEF_DUMP (Feature)
{
int i;
FT_UNUSED(hb_type);
DUMP_FUINT (Feature, FeatureParams);
DUMP_FUINT (Feature, LookupListCount);
@ -142,6 +146,8 @@ DEF_DUMP (Feature)
DEF_DUMP (MarkRecord)
{
FT_UNUSED(hb_type);
DUMP_FUINT (MarkRecord, Class);
DUMP1("<Anchor>%d</Anchor>\n", MarkRecord->MarkAnchor.PosFormat );
}
@ -174,6 +180,8 @@ DEF_DUMP (FeatureList)
DEF_DUMP (Coverage)
{
FT_UNUSED(hb_type);
DUMP_FUINT (Coverage, CoverageFormat);
if (Coverage->CoverageFormat == 1)
@ -199,6 +207,8 @@ DEF_DUMP (Coverage)
DEF_DUMP (ClassRangeRecord)
{
FT_UNUSED(hb_type);
DUMP_FGLYPH (ClassRangeRecord, Start);
DUMP_FGLYPH (ClassRangeRecord, End);
DUMP_FUINT (ClassRangeRecord, Class);
@ -206,6 +216,8 @@ DEF_DUMP (ClassRangeRecord)
DEF_DUMP (ClassDefinition)
{
FT_UNUSED(hb_type);
DUMP_FUINT( ClassDefinition, ClassFormat);
DUMP_FUINT( ClassDefinition, loaded);
@ -235,6 +247,8 @@ DEF_DUMP (ClassDefinition)
DEF_DUMP (SubstLookupRecord)
{
FT_UNUSED(hb_type);
DUMP_FUINT (SubstLookupRecord, SequenceIndex);
DUMP_FUINT (SubstLookupRecord, LookupListIndex);
}
@ -288,6 +302,8 @@ DEF_DUMP (Ligature)
{
int i;
FT_UNUSED(hb_type);
DUMP_FGLYPH (Ligature, LigGlyph);
DUMP_FUINT (Ligature, ComponentCount);
@ -322,6 +338,10 @@ Dump_GSUB_Lookup_Ligature (HB_SubTable *subtable, FILE *stream, int indent, HB_T
DEF_DUMP (ContextSubstFormat1)
{
FT_UNUSED(hb_type);
FT_UNUSED(ContextSubstFormat1);
DUMP("<!-- Not implemented!!! -->\n");
}
@ -334,6 +354,9 @@ DEF_DUMP (ContextSubstFormat2)
DEF_DUMP (ContextSubstFormat3)
{
FT_UNUSED(hb_type);
FT_UNUSED(ContextSubstFormat3);
DUMP("<!-- Not implemented!!! -->\n");
}
@ -361,6 +384,9 @@ Dump_GSUB_Lookup_Context (HB_SubTable *subtable, FILE *stream, int indent, HB_Ty
DEF_DUMP (ChainContextSubstFormat1)
{
FT_UNUSED(hb_type);
FT_UNUSED(ChainContextSubstFormat1);
DUMP("<!-- Not implemented!!! -->\n");
}
@ -430,6 +456,8 @@ Dump_Device (HB_Device *Device, FILE *stream, int indent, HB_Type hb_type)
int n_per;
unsigned int mask;
FT_UNUSED(hb_type);
DUMP_FUINT (Device, StartSize);
DUMP_FUINT (Device, EndSize);
DUMP_FUINT (Device, DeltaFormat);

View File

@ -48,6 +48,10 @@ static FT_Error default_mmfunc( FT_Face face,
FT_Pos* metric_value,
void* data )
{
FT_UNUSED(face);
FT_UNUSED(metric_id);
FT_UNUSED(metric_value);
FT_UNUSED(data);
return HB_Err_No_MM_Interpreter;
}
@ -1013,6 +1017,12 @@ static FT_Error Lookup_DefaultPos( GPOS_Instance* gpi,
FT_UShort context_length,
int nesting_level )
{
FT_UNUSED(gpi);
FT_UNUSED(st);
FT_UNUSED(buffer);
FT_UNUSED(flags);
FT_UNUSED(context_length);
FT_UNUSED(nesting_level);
return HB_Err_Not_Covered;
}
@ -1028,6 +1038,7 @@ static FT_Error Lookup_SinglePos( GPOS_Instance* gpi,
HB_GPOSHeader* gpos = gpi->gpos;
HB_SinglePos* sp = &st->single;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -1591,6 +1602,7 @@ static FT_Error Lookup_PairPos( GPOS_Instance* gpi,
HB_GPOSHeader* gpos = gpi->gpos;
HB_PairPos* pp = &st->pair;
FT_UNUSED(nesting_level);
if ( buffer->in_pos >= buffer->in_length - 1 )
return HB_Err_Not_Covered; /* Not enough glyphs in stream */
@ -1805,6 +1817,7 @@ static FT_Error Lookup_CursivePos( GPOS_Instance* gpi,
FT_Pos entry_x, entry_y;
FT_Pos exit_x, exit_y;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
{
@ -2249,6 +2262,7 @@ static FT_Error Lookup_MarkBasePos( GPOS_Instance* gpi,
HB_Position o;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -2664,6 +2678,7 @@ static FT_Error Lookup_MarkLigPos( GPOS_Instance* gpi,
HB_Position o;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -3006,6 +3021,7 @@ static FT_Error Lookup_MarkMarkPos( GPOS_Instance* gpi,
HB_Position o;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -3897,7 +3913,7 @@ static FT_Error Lookup_ContextPos1( GPOS_Instance* gpi,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + pr[k].GlyphCount - i == buffer->in_length )
if ( j + pr[k].GlyphCount - i == (FT_Long)buffer->in_length )
goto next_posrule;
j++;
}
@ -3990,7 +4006,7 @@ static FT_Error Lookup_ContextPos2( GPOS_Instance* gpi,
if ( error && error != HB_Err_Not_Covered )
goto End;
if ( j + pr->GlyphCount - i == buffer->in_length )
if ( j + pr->GlyphCount - i == (FT_Long)buffer->in_length )
goto next_posclassrule;
j++;
}
@ -4062,7 +4078,7 @@ static FT_Error Lookup_ContextPos3( GPOS_Instance* gpi,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + cpf3->GlyphCount - i == buffer->in_length )
if ( j + cpf3->GlyphCount - i == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -5215,7 +5231,7 @@ static FT_Error Lookup_ChainContextPos1(
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
goto next_chainposrule;
j++;
}
@ -5234,7 +5250,7 @@ static FT_Error Lookup_ChainContextPos1(
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
goto next_chainposrule;
j++;
}
@ -5387,7 +5403,7 @@ static FT_Error Lookup_ChainContextPos2(
if ( error && error != HB_Err_Not_Covered )
goto End1;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
goto next_chainposclassrule;
j++;
}
@ -5417,7 +5433,7 @@ static FT_Error Lookup_ChainContextPos2(
if ( error && error != HB_Err_Not_Covered )
goto End1;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
goto next_chainposclassrule;
j++;
}
@ -5531,7 +5547,7 @@ static FT_Error Lookup_ChainContextPos3(
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -5553,7 +5569,7 @@ static FT_Error Lookup_ChainContextPos3(
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -5968,6 +5984,8 @@ static FT_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi,
static FT_Error Load_DefaultPos( HB_GPOS_SubTable* st,
FT_Stream stream )
{
FT_UNUSED(st);
FT_UNUSED(stream);
return HB_Err_Invalid_GPOS_SubTable_Format;
}
@ -6004,6 +6022,8 @@ FT_Error _HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
static void Free_DefaultPos( HB_GPOS_SubTable* st,
FT_Memory memory )
{
FT_UNUSED(st);
FT_UNUSED(memory);
}
typedef void (*Free_Pos_Func_Type)( HB_GPOS_SubTable* st,

View File

@ -176,6 +176,12 @@ static FT_Error Lookup_DefaultSubst( HB_GSUBHeader* gsub,
FT_UShort context_length,
int nesting_level )
{
FT_UNUSED(gsub);
FT_UNUSED(st);
FT_UNUSED(buffer);
FT_UNUSED(flags);
FT_UNUSED(context_length);
FT_UNUSED(nesting_level);
return HB_Err_Not_Covered;
}
@ -297,6 +303,8 @@ static FT_Error Lookup_SingleSubst( HB_GSUBHeader* gsub,
HB_SingleSubst* ss = &st->single;
HB_GDEFHeader* gdef = gsub->gdef;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -506,6 +514,7 @@ static FT_Error Lookup_MultipleSubst( HB_GSUBHeader* gsub,
HB_MultipleSubst* ms = &st->multiple;
HB_GDEFHeader* gdef = gsub->gdef;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -705,10 +714,9 @@ static FT_Error Lookup_AlternateSubst( HB_GSUBHeader* gsub,
FT_UShort index, alt_index, property;
HB_AlternateSubst* as = &st->alternate;
HB_GDEFHeader* gdef = gsub->gdef;
HB_AlternateSet aset;
FT_UNUSED(nesting_level);
if ( context_length != 0xFFFF && context_length < 1 )
return HB_Err_Not_Covered;
@ -995,6 +1003,7 @@ static FT_Error Lookup_LigatureSubst( HB_GSUBHeader* gsub,
HB_Ligature* lig;
FT_UNUSED(nesting_level);
if ( CHECK_Property( gdef, IN_CURITEM(), flags, &property ) )
return error;
@ -1032,7 +1041,7 @@ static FT_Error Lookup_LigatureSubst( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lig->ComponentCount - i == buffer->in_length )
if ( j + lig->ComponentCount - i == (FT_Long)buffer->in_length )
goto next_ligature;
j++;
}
@ -1924,7 +1933,7 @@ static FT_Error Lookup_ContextSubst1( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + sr[k].GlyphCount - i == buffer->in_length )
if ( j + sr[k].GlyphCount - i == (FT_Long)buffer->in_length )
goto next_subrule;
j++;
}
@ -2015,7 +2024,7 @@ static FT_Error Lookup_ContextSubst2( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
goto End;
if ( j + sr->GlyphCount - i < buffer->in_length )
if ( j + sr->GlyphCount - i < (FT_Long)buffer->in_length )
goto next_subclassrule;
j++;
}
@ -2086,7 +2095,7 @@ static FT_Error Lookup_ContextSubst3( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + csf3->GlyphCount - i == buffer->in_length )
if ( j + csf3->GlyphCount - i == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -3242,7 +3251,7 @@ static FT_Error Lookup_ChainContextSubst1( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
goto next_chainsubrule;
j++;
}
@ -3261,7 +3270,7 @@ static FT_Error Lookup_ChainContextSubst1( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
goto next_chainsubrule;
j++;
}
@ -3413,7 +3422,7 @@ static FT_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
goto End1;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
goto next_chainsubclassrule;
j++;
}
@ -3443,7 +3452,7 @@ static FT_Error Lookup_ChainContextSubst2( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
goto End1;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
goto next_chainsubclassrule;
j++;
}
@ -3555,7 +3564,7 @@ static FT_Error Lookup_ChainContextSubst3( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + igc - i + lgc == buffer->in_length )
if ( j + igc - i + lgc == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -3577,7 +3586,7 @@ static FT_Error Lookup_ChainContextSubst3( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -3896,7 +3905,7 @@ static FT_Error Lookup_ReverseChainContextSubst( HB_GSUBHeader* gsub,
if ( error && error != HB_Err_Not_Covered )
return error;
if ( j + lgc - i == buffer->in_length )
if ( j + lgc - i == (FT_Long)buffer->in_length )
return HB_Err_Not_Covered;
j++;
}
@ -4283,6 +4292,9 @@ static FT_Error GSUB_Do_Glyph_Lookup( HB_GSUBHeader* gsub,
static FT_Error Load_DefaultSubst( HB_GSUB_SubTable* st,
FT_Stream stream )
{
FT_UNUSED(st);
FT_UNUSED(stream);
return HB_Err_Invalid_GSUB_SubTable_Format;
}
@ -4318,6 +4330,8 @@ FT_Error _HB_GSUB_Load_SubTable( HB_GSUB_SubTable* st,
static void Free_DefaultSubst( HB_GSUB_SubTable* st,
FT_Memory memory )
{
FT_UNUSED(st);
FT_UNUSED(memory);
}
typedef void (*Free_Subst_Func_Type)( HB_GSUB_SubTable* st,

View File

@ -41,6 +41,10 @@ FT_BEGIN_HEADER
# define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
#endif
#ifndef FT_UNUSED
# define FT_UNUSED(arg) ((arg) = (arg))
#endif
#include "ftglue.h"
#define ARRAY_LEN(Array) ((int)(sizeof (Array) / sizeof (Array)[0]))