public override bool rgc_fill_buffer()
{
int bufsize = this.bufsiz;
int bufpose = this.bufpos;
int matchstart = this.matchstart;
// if the buffer is not full, we fill it
if (bufpose < bufsize)
return rgc_size_fill_con_buffer( bufpose, bufsize-bufpose );
if (0 < matchstart)
{
// we shift the buffer left and we fill the buffer
byte[] buffer = this.buffer;
int movesize = bufpose-matchstart;
for ( int i= 0 ; i < movesize ; ++i)
buffer[i] = buffer[matchstart + i];
bufpose -= matchstart;
this.matchstart = 0;
this.matchstop -= matchstart;
this.forward -= matchstart;
this.lastchar = buffer[matchstart-1];
return rgc_size_fill_con_buffer( bufpose, bufsize-bufpose );
}
// we current token is too large for the buffer
// we have to enlarge it.
rgc_double_buffer();
return rgc_fill_buffer();
}