summaryrefslogtreecommitdiff
path: root/colm/pdarun.c
diff options
context:
space:
mode:
Diffstat (limited to 'colm/pdarun.c')
-rw-r--r--colm/pdarun.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/colm/pdarun.c b/colm/pdarun.c
index 85c9148a..d5fab334 100644
--- a/colm/pdarun.c
+++ b/colm/pdarun.c
@@ -135,8 +135,7 @@ Head *streamPull( Program *prg, FsmRun *fsmRun, StreamImpl *is, long length )
runBuf->next = fsmRun->consumeBuf;
fsmRun->consumeBuf = runBuf;
- int lenCopied = 0;
- is->funcs->getData( fsmRun, is, 0, runBuf->data, length, &lenCopied );
+ is->funcs->getData( fsmRun, is, 0, runBuf->data, length );
is->funcs->consumeData( is, length );
fsmRun->p = fsmRun->pe = 0;
@@ -764,8 +763,7 @@ Head *peekMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is )
runBuf->next = fsmRun->consumeBuf;
fsmRun->consumeBuf = runBuf;
- int lenCopied = 0;
- is->funcs->getData( fsmRun, is, 0, runBuf->data, length, &lenCopied );
+ is->funcs->getData( fsmRun, is, 0, runBuf->data, length );
fsmRun->p = fsmRun->pe = 0;
fsmRun->toklen = 0;
@@ -794,14 +792,9 @@ Head *extractMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is )
runBuf->next = fsmRun->consumeBuf;
fsmRun->consumeBuf = runBuf;
- int lenCopied = 0;
- int total = 0;
- is->funcs->getData( fsmRun, is, 0, runBuf->data, length, &lenCopied );
- total += lenCopied;
- while ( total < length ) {
- is->funcs->getData( fsmRun, is, total, runBuf->data+total, length-total, &lenCopied );
- total += lenCopied;
- }
+ int total = is->funcs->getData( fsmRun, is, 0, runBuf->data, length );
+ while ( total < length )
+ total += is->funcs->getData( fsmRun, is, total, runBuf->data+total, length-total );
is->funcs->consumeData( is, length );