public void ReadChar()
{
if (_eof) // if already eof, nothing to do here
return;
if (ibuf == null || ibufidx >= MyC.MAXBUF)
{
ibuf = new char[MyC.MAXBUF];
_eof = false;
ibufread = rfile.Read(ibuf, 0, MyC.MAXBUF);
ibufidx = 0;
if (buf == null)
buf = new StringBuilder(MyC.MAXSTR);
}
look = ibuf[ibufidx++];
if (ibufread < MyC.MAXBUF && ibufidx > ibufread)
_eof = true;
/*
* track the read characters
*/
buf.Append(look);
if (look == '\n')
bufline++;
}