(_IO_wfile_underflow): Correct not entirely empty external buffer correctly.

This commit is contained in:
Ulrich Drepper 2000-07-25 18:55:52 +00:00
parent 7f6ba52fc6
commit a756bab867

View File

@ -179,9 +179,6 @@ _IO_wfile_underflow (fp)
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =
fp->_IO_buf_base;
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end =
fp->_IO_buf_base;
if (fp->_IO_buf_base == NULL)
{
/* Maybe we already have a push back pointer. */
@ -191,8 +188,14 @@ _IO_wfile_underflow (fp)
fp->_flags &= ~_IO_IN_BACKUP;
}
_IO_doallocbuf (fp);
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =
fp->_IO_buf_base;
}
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end =
fp->_IO_buf_base;
if (fp->_wide_data->_IO_buf_base == NULL)
{
/* Maybe we already have a push back pointer. */
@ -211,11 +214,6 @@ _IO_wfile_underflow (fp)
_IO_switch_to_get_mode (fp);
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
fp->_IO_read_end = fp->_IO_buf_base;
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
= fp->_IO_buf_base;
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr =
fp->_wide_data->_IO_buf_base;
fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_buf_base;