char * _teto_excute_modx86(const char * code) { char *_Ptr = (char *)code, *_Tmp; int count_function = 0; FUNCTION_LIST *_F_Head = 0; int string_len_tmp = 0; _F_Head = (FUNCTION_LIST *)malloc(sizeof(FUNCTION_LIST)); // function MATCH // function\s+<functionname>\s* if (_Ptr = MatchLast(code, TETO_MATCH_FUNCTION)) { InitFList(_F_Head); if (!(_Ptr = SkipWH(_Ptr))) ; // throw _Tmp = SkipIWH(_Ptr); string_len_tmp = _Tmp - _Ptr; _Ptr = _Tmp; ////////////////////////////////// _Tmp = (char *)malloc(string_len_tmp + 1); PutText(_Ptr, _Tmp, string_len_tmp); _F_Head->Name = _Tmp; ////////////////////////////////// _teto_excute_function_others(_Ptr, _F_Head); } }
BOOL GBlend::BlendMtoN() { UINT32 t ; while ( IsntEnd(Type0) || IsntEnd(Type1) ) { if ( LPtr1==EndLengthPtr1-1 ) MatchLast( LPtr0, EndLengthPtr0, *LPtr1+Length1-Length0, Match0, Total0 ) ; else Match ( LPtr0, EndLengthPtr0, *LPtr1+Length1-Length0, Match0, Total0 ) ; if ( LPtr0==EndLengthPtr0-1 ) MatchLast( LPtr1, EndLengthPtr1, *LPtr0+Length0-Length1, Match1, Total1 ) ; else Match ( LPtr1, EndLengthPtr1, *LPtr0+Length0-Length1, Match1, Total1 ) ; if ( abs(Match0)<abs(Match1) ) { if ( Total0!=1 ) { Match0 += *LPtr1+Length1-Length0 ; if ( IsntCurve(Type1) ) { P11.x = (2*P10.x+P13.x)/3 ; P12.x = (P10.x+2*P13.x)/3 ; P11.y = (2*P10.y+P13.y)/3 ; P12.y = (P10.y+2*P13.y)/3 ; } for ( t=2 ; t<=Total0 ; t++ ) { if ( IsCurve(Type0) || IsCurve(Type1) ) { if ( IsntCurve(Type0) ) { P01.x = (2*P00.x+P03.x)/3 ; P02.x = (P00.x+2*P03.x)/3 ; P01.y = (2*P00.y+P03.y)/3 ; P02.y = (P00.y+2*P03.y)/3 ; } Split( P10,P11,P12,P13, *LPtr0,Match0 ) ; if ( !BlendCurve( P01,P02,P03, L1,L2,M ) ) return FALSE ; P10 = M ; P11 = R1 ; P12 = R2 ; } else { P10.x += MulDiv(P13.x-P10.x,*LPtr0,Match0) ; P10.y += MulDiv(P13.y-P10.y,*LPtr0,Match0) ; if ( !BlendPoint( PT_LINETO, P03, P10 ) ) return FALSE ; } P00 = P03 ; Match0 -= *LPtr0 ; ReadPath0() ; } } } else { if ( Total1!=1 ) { Match1 += *LPtr0+Length0-Length1 ; if ( IsntCurve(Type0) ) { P01.x = (2*P00.x+P03.x)/3 ; P02.x = (P00.x+2*P03.x)/3 ; P01.y = (2*P00.y+P03.y)/3 ; P02.y = (P00.y+2*P03.y)/3 ; } for ( t=2 ; t<=Total1 ; t++ ) { if ( IsCurve(Type0) || IsCurve(Type1) ) { if ( IsntCurve(Type1) ) { P11.x = (2*P10.x+P13.x)/3 ; P12.x = (P10.x+2*P13.x)/3 ; P11.y = (2*P10.y+P13.y)/3 ; P12.y = (P10.y+2*P13.y)/3 ; } Split( P00,P01,P02,P03, *LPtr1,Match1 ) ; if ( !BlendCurve( L1,L2,M, P11,P12,P13 ) ) return FALSE ; P00 = M ; P01 = R1 ; P02 = R2 ; } else { P00.x += MulDiv(P03.x-P00.x,*LPtr1,Match1) ; P00.y += MulDiv(P03.y-P00.y,*LPtr1,Match1) ; if ( !BlendPoint( PT_LINETO, P00, P13 ) ) return FALSE ; } P10 = P13 ; Match1 -= *LPtr1 ; ReadPath1() ; } } } if ( !Blend1to1() ) return FALSE ; } /* while */ return TRUE ; }