Skip to content

Commit

Permalink
Merge 6a15408 into 5b1b71f
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Jun 25, 2019
2 parents 5b1b71f + 6a15408 commit d10edd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/block-io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ struct BlockIO <: IO
function find_end_pos(bio::BlockIO, end_byte::Char)
seekend(bio)
try
while(!eof(bio.s) && (end_byte != read(bio, UInt8))) continue end
while(!eof(bio.s) && (end_byte != read(bio, Char))) continue end
end
position(bio.s)
end

function find_start_pos(bio::BlockIO, end_byte::Char)
(bio.r.start == 1) && (return bio.r.start)
seekstart(bio)
!eof(bio.s) && while(end_byte != read(bio, UInt8)) continue end
!eof(bio.s) && while(end_byte != read(bio, Char)) continue end
position(bio.s)+1
end

Expand Down

0 comments on commit d10edd7

Please sign in to comment.