src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Remove the instructions from position "startRange" to (and including)
/// position "endRange" from the buffer.  If the range removed contains the
/// "current" instruction (from GetNext or GetPrev) then the "current"
/// instruction becomes the instruction before startRange in the buffer.
/// </summary>
Remove the instructions from position "startRange" to (and including)
position "endRange" from the buffer.  If the range removed contains the
"current" instruction (from GetNext or GetPrev) then the "current"
instruction becomes the instruction before startRange in the buffer.
Remove the instructions from position " startRange " to ( and including ) position " endRange " from the buffer . If the range removed contains the " current " instruction ( from GetNext or GetPrev ) then the " current " instruction becomes the instruction before startRange in the buffer .
public void RemoveInstructions(int startRange, int endRange) {
            if (startRange < 0) startRange = 0;
            if (endRange >= tide-1) {
                tide = startRange;
                return;
            }
            int offset = endRange-startRange+1;
            for (int i=endRange+1; i < tide; i++) {
                buffer[i-offset] = buffer[i];
                buffer[i-offset].index = (uint)(i-offset);
            }
            tide -= offset;
            if ((currI >= startRange) && (currI <= endRange)) currI = startRange-1;
        }
public void RemoveInstructions ( int startRange , int endRange ) { if ( startRange < 0 ) startRange = 0 ; if ( endRange >= tide - 1 ) { tide = startRange ; return ; } int offset = endRange - startRange + 1 ; for ( int i = endRange + 1 ; i < tide ; i ++ ) { buffer [ i - offset ] = buffer [ i ] ; buffer [ i - offset ] . index = ( uint ) ( i - offset ) ; } tide -= offset ; if ( ( currI >= startRange ) && ( currI <= endRange ) ) currI = startRange - 1 ; }
Remove the instructions from position "startRange" to (and including)
position "endRange" from the buffer.
Remove the instructions from position " startRange " to ( and including ) position " endRange " from the buffer .
// cut to startRange
startRange
int
endRange
int