Changeset 522
- Timestamp:
- 04/29/08 19:04:09 (2 months ago)
- Files:
-
- trunk/thune/parse.c (modified) (3 diffs)
- trunk/thune/series.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/thune/parse.c
r521 r522 34 34 typedef char UChar; 35 35 36 extern int ur_matchString( const UString* strA, int iA, 37 const UString* strB, int iB, int matchCase ); 36 extern int ur_matchString( const UString* strA, UIndex iA, UIndex endA, 37 const UString* strB, UIndex iB, UIndex endB, 38 int matchCase ); 38 39 extern int ur_findString( const UString* strA, UIndex iA, UIndex endA, 39 40 const UString* strB, UIndex iB, UIndex endB, … … 403 404 UString* pat = ur_bin( tval ); 404 405 405 pos = ur_matchString( istr, pos, pat, tval->series.it, 406 pos = ur_matchString( istr, pos, pe->input.end, 407 pat, tval->series.it, 408 ur_sliceEnd( tval, pat ), 406 409 pe->matchCase ); 407 410 if( pos ) … … 483 486 while( count < repMax ) 484 487 { 485 p2 = ur_matchString( istr, pos, pat, tval->series.it, 488 p2 = ur_matchString( istr, pos, pe->input.end, 489 pat, tval->series.it, 490 ur_sliceEnd( tval, pat ), 486 491 pe->matchCase ); 487 492 if( ! p2 ) trunk/thune/series.c
r521 r522 2708 2708 match. 2709 2709 */ 2710 int ur_matchString( const UString* strA, int iA, const UString* strB, int iB, 2710 int ur_matchString( const UString* strA, UIndex iA, UIndex endA, 2711 const UString* strB, UIndex iB, UIndex endB, 2711 2712 int matchCase ) 2712 2713 { 2713 2714 const char* sit = strA->ptr.c + iA; 2714 const char* send = strA->ptr.c + strA->used;2715 const char* send = strA->ptr.c + endA; 2715 2716 const char* pit = strB->ptr.c + iB; 2716 const char* pend = strB->ptr.c + strB->used;2717 2718 assert( iA <= strA->used );2719 assert( iB <= strB->used );2717 const char* pend = strB->ptr.c + endB; 2718 2719 if( (iA >= endA) || (iB >= endB) ) 2720 return -1; 2720 2721 2721 2722 if( matchCase )
