X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fpshinter%2Fpshrec.c;h=73a18ffd64045c5d74aaeabe7a7a93dc418c4459;hb=refs%2Fheads%2Ftizen_2.3.1;hp=0910cc5e6a540cf78d7198c89ff827200f500a0f;hpb=8526ee87c0873c7424db20114d94a6b227e24edf;p=framework%2Fgraphics%2Ffreetype.git diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 0910cc5..73a18ff 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hints recorder (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2007, 2009 by */ +/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -64,7 +64,7 @@ { FT_UInt old_max = table->max_hints; FT_UInt new_max = count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -83,7 +83,7 @@ FT_Memory memory, PS_Hint *ahint ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count; PS_Hint hint = 0; @@ -139,7 +139,7 @@ { FT_UInt old_max = ( mask->max_bits + 7 ) >> 3; FT_UInt new_max = ( count + 7 ) >> 3; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -186,7 +186,7 @@ FT_Int idx, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* p; @@ -236,7 +236,7 @@ { FT_UInt old_max = table->max_masks; FT_UInt new_max = count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -256,7 +256,7 @@ PS_Mask *amask ) { FT_UInt count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; PS_Mask mask = 0; @@ -287,7 +287,7 @@ FT_Memory memory, PS_Mask *amask ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count; PS_Mask mask; @@ -316,7 +316,7 @@ FT_UInt bit_count, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error; PS_Mask mask; @@ -384,7 +384,7 @@ FT_UInt count; - count = ( count1 <= count2 ) ? count1 : count2; + count = FT_MIN( count1, count2 ); for ( ; count >= 8; count -= 8 ) { if ( p1[0] & p2[0] ) @@ -409,7 +409,7 @@ FT_Memory memory ) { FT_UInt temp; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; /* swap index1 and index2 so that index1 < index2 */ @@ -499,7 +499,7 @@ FT_Memory memory ) { FT_Int index1, index2; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; for ( index1 = table->num_masks - 1; index1 > 0; index1-- ) @@ -561,7 +561,7 @@ FT_Memory memory ) { PS_Mask mask; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; /* get last hint mask */ @@ -583,12 +583,13 @@ FT_UInt end_point ) { FT_UInt count = dim->masks.num_masks; - PS_Mask mask; if ( count > 0 ) { - mask = dim->masks.masks + count - 1; + PS_Mask mask = dim->masks.masks + count - 1; + + mask->end_point = end_point; } } @@ -621,7 +622,7 @@ FT_UInt end_point, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error; /* reset current mask, if any */ @@ -646,7 +647,7 @@ FT_Memory memory, FT_Int *aindex ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt flags = 0; @@ -717,7 +718,7 @@ FT_Int hint3, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count = dim->counters.num_masks; PS_Mask counter = dim->counters.masks; @@ -791,18 +792,17 @@ ps_dimension_done( &hints->dimension[0], memory ); ps_dimension_done( &hints->dimension[1], memory ); - hints->error = PSH_Err_Ok; + hints->error = FT_Err_Ok; hints->memory = 0; } - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) ps_hints_init( PS_Hints hints, FT_Memory memory ) { FT_MEM_ZERO( hints, sizeof ( *hints ) ); hints->memory = memory; - return PSH_Err_Ok; } @@ -815,7 +815,7 @@ { case PS_HINT_TYPE_1: case PS_HINT_TYPE_2: - hints->error = PSH_Err_Ok; + hints->error = FT_Err_Ok; hints->hint_type = hint_type; ps_dimension_init( &hints->dimension[0] ); @@ -823,7 +823,7 @@ break; default: - hints->error = PSH_Err_Invalid_Argument; + hints->error = FT_THROW( Invalid_Argument ); hints->hint_type = hint_type; FT_TRACE0(( "ps_hints_open: invalid charstring type\n" )); @@ -894,7 +894,7 @@ FT_Int dimension, FT_Fixed* stems ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( !hints->error ) @@ -938,7 +938,7 @@ else { FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type\n" )); - error = PSH_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } } @@ -956,7 +956,7 @@ ps_hints_t1reset( PS_Hints hints, FT_UInt end_point ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( !hints->error ) @@ -979,7 +979,7 @@ else { /* invalid hint type */ - error = PSH_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } }