Changeset 275 for trunk/poppler/freetype2/src/truetype/ttinterp.c
 Timestamp:
 Dec 30, 2009, 5:26:39 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/poppler/freetype2/src/truetype/ttinterp.c
r269 r275 792 792 /* allocate object */ 793 793 if ( FT_NEW( exec ) ) 794 goto Exit;795 796 /* initialize it */794 goto Fail; 795 796 /* initialize it; in case of error this deallocates `exec' too */ 797 797 error = Init_Context( exec, memory ); 798 798 if ( error ) … … 803 803 } 804 804 805 Exit:806 805 return driver>context; 807 806 808 807 Fail: 809 FT_FREE( exec ); 810 811 return 0; 808 return NULL; 812 809 } 813 810 … … 2198 2195 #endif 2199 2196 2200 return TT_DotFix14( dx,dy,2197 return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy, 2201 2198 CUR.GS.projVector.x, 2202 2199 CUR.GS.projVector.y ); … … 2224 2221 FT_Pos dy ) 2225 2222 { 2226 return TT_DotFix14( dx,dy,2223 return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy, 2227 2224 CUR.GS.dualVector.x, 2228 2225 CUR.GS.dualVector.y ); … … 4294 4291 } 4295 4292 4293 /* Although FDEF takes unsigned 32bit integer, */ 4294 /* func # must be within unsigned 16bit integer */ 4295 if ( n > 0xFFFFU ) 4296 { 4297 CUR.error = TT_Err_Too_Many_Function_Defs; 4298 return; 4299 } 4300 4296 4301 rec>range = CUR.curRange; 4297 rec>opc = n;4302 rec>opc = (FT_UInt16)n; 4298 4303 rec>start = CUR.IP + 1; 4299 4304 rec>active = TRUE; 4300 4305 4301 4306 if ( n > CUR.maxFunc ) 4302 CUR.maxFunc = n;4307 CUR.maxFunc = (FT_UInt16)n; 4303 4308 4304 4309 /* Now skip the whole function definition. */ … … 4557 4562 } 4558 4563 4559 def>opc = args[0]; 4564 /* opcode must be unsigned 8bit integer */ 4565 if ( 0 > args[0]  args[0] > 0x00FF ) 4566 { 4567 CUR.error = TT_Err_Too_Many_Instruction_Defs; 4568 return; 4569 } 4570 4571 def>opc = (FT_Byte)args[0]; 4560 4572 def>start = CUR.IP+1; 4561 4573 def>range = CUR.curRange; … … 4563 4575 4564 4576 if ( (FT_ULong)args[0] > CUR.maxIns ) 4565 CUR.maxIns = args[0];4577 CUR.maxIns = (FT_Byte)args[0]; 4566 4578 4567 4579 /* Now skip the whole function definition. */ … … 5531 5543 if ( CUR.GS.both_x_axis ) 5532 5544 { 5533 dx = TT_MulFix14( args[0], 0x4000 );5545 dx = TT_MulFix14( (FT_UInt32)args[0], 0x4000 ); 5534 5546 dy = 0; 5535 5547 } … … 5537 5549 { 5538 5550 dx = 0; 5539 dy = TT_MulFix14( args[0], 0x4000 );5551 dy = TT_MulFix14( (FT_UInt32)args[0], 0x4000 ); 5540 5552 } 5541 5553 } … … 5543 5555 #endif 5544 5556 { 5545 dx = TT_MulFix14( args[0], CUR.GS.freeVector.x );5546 dy = TT_MulFix14( args[0], CUR.GS.freeVector.y );5557 dx = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.x ); 5558 dy = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.y ); 5547 5559 } 5548 5560 … … 5710 5722 if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */ 5711 5723 { 5712 CUR.zp0.org[point].x = TT_MulFix14( distance, CUR.GS.freeVector.x );5713 CUR.zp0.org[point].y = TT_MulFix14( distance, CUR.GS.freeVector.y ),5724 CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.x ); 5725 CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.y ), 5714 5726 CUR.zp0.cur[point] = CUR.zp0.org[point]; 5715 5727 } … … 5898 5910 { 5899 5911 CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x + 5900 TT_MulFix14( cvt_dist, CUR.GS.freeVector.x ); 5912 TT_MulFix14( (FT_UInt32)cvt_dist, 5913 CUR.GS.freeVector.x ); 5901 5914 5902 5915 CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y + 5903 TT_MulFix14( cvt_dist, CUR.GS.freeVector.y ); 5916 TT_MulFix14( (FT_UInt32)cvt_dist, 5917 CUR.GS.freeVector.y ); 5904 5918 5905 5919 CUR.zp1.cur[point] = CUR.zp0.cur[point];
Note: See TracChangeset
for help on using the changeset viewer.