This code is refactored from MCRead::exec...

It looks like it should really be doing:

if (sentinal is eof)
  read to eof
else
  MCFilesExecReadUntil

MCFilesExecReadComplete

i.e. if eof mode then read to eof and put that into t_output, otherwise do the ExecReadUntil to put the data in t_output (have a look at the case RF_UNTIL clase in MCRead::exec in the current master branch).