X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcid%2Fcidparse.c;h=d8476cdae8987392df41e9d726367357644710a8;hb=afcae9b7a0a6009d33581fac78416fc9623a8a18;hp=4d21160ceac9ae19ce53a182b5c7cd2911388394;hpb=46ec2c26b7d34b4a37c96ed6049ce3fd0702dc78;p=framework%2Fgraphics%2Ffreetype.git diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index 4d21160..d8476cd 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ +/* Copyright 1996-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, */ @@ -74,7 +74,7 @@ "%!PS-Adobe-3.0 Resource-CIDFont", 31 ) ) { FT_TRACE2(( " not a CID-keyed font\n" )); - error = CID_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); } FT_FRAME_EXIT(); @@ -99,7 +99,7 @@ if ( stream_len == 0 ) { FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" )); - error = CID_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -117,12 +117,12 @@ if ( p[0] == 'S' && ft_strncmp( (char*)p, "StartData", 9 ) == 0 ) { /* save offset of binary data after `StartData' */ - offset += p - buffer + 10; + offset += (FT_ULong)( p - buffer + 10 ); goto Found; } else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 ) { - offset += p - buffer + 7; + offset += (FT_ULong)( p - buffer + 7 ); goto Found; } } @@ -178,14 +178,12 @@ if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 ) parser->binary_length = ft_atol( (const char *)arg2 ); - limit = parser->root.limit; - cur = parser->root.cursor; goto Exit; } else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 ) { FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" )); - error = CID_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; }