struct _IO_codecvt *cd; enum __codecvt_result status; _IO_ssize_t count; int tries; const char *read_ptr_copy;
JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_new_file_finish), JUMP_INIT(overflow, (_IO_overflow_t) INTUSE(_IO_wfile_overflow)), JUMP_INIT(underflow, (_IO_underflow_t) INTUSE(_IO_wfile_underflow)), JUMP_INIT(uflow, (_IO_underflow_t) INTUSE(_IO_wdefault_uflow)), JUMP_INIT(pbackfail, (_IO_pbackfail_t) INTUSE(_IO_wdefault_pbackfail)), JUMP_INIT(xsputn, INTUSE(_IO_wfile_xsputn)), JUMP_INIT(xsgetn, INTUSE(_IO_file_xsgetn)), JUMP_INIT(seekoff, INTUSE(_IO_wfile_seekoff)), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, _IO_new_file_setbuf), JUMP_INIT(sync, (_IO_sync_t) INTUSE(_IO_wfile_sync)), JUMP_INIT(doallocate, _IO_wfile_doallocate), JUMP_INIT(read, INTUSE(_IO_file_read)), JUMP_INIT(write, _IO_new_file_write), JUMP_INIT(seek, INTUSE(_IO_file_seek)), JUMP_INIT(close, INTUSE(_IO_file_close)), JUMP_INIT(stat, INTUSE(_IO_file_stat)), JUMP_INIT(showmanyc, _IO_default_showmanyc), JUMP_INIT(imbue, _IO_default_imbue) }; libc_hidden_data_def (_IO_wfile_jumps)
INTDEF(_IO_wdo_write)wint_t_IO_wfile_underflow (fp)     _IO_FILE *fp;{  struct _IO_codecvt *cd;  enum __codecvt_result status;  _IO_ssize_t count;  int tries;  const char *read_ptr_copy;  if (__builtin_expect (fp->_flags & _IO_NO_READS, 0))    {      fp->_flags |= _IO_ERR_SEEN;      __set_errno (EBADF);      return WEOF;    }  if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)    return *fp->_wide_data->_IO_read_ptr;  cd = fp->_codecvt;  /* Maybe there is something left in the external buffer.  */  if (fp->_IO_read_ptr < fp->_IO_read_end)    {      /* There is more in the external.  Convert it.  */      const char *read_stop = (const char *) fp->_IO_read_ptr;      fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;      fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr =	fp->_wide_data->_IO_buf_base;      status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,				       fp->_IO_read_ptr, fp->_IO_read_end,				       &read_stop,				       fp->_wide_data->_IO_read_ptr,				       fp->_wide_data->_IO_buf_end,				       &fp->_wide_data->_IO_read_end);      fp->_IO_read_ptr = (char *) read_stop;      /* If we managed to generate some text return the next character.  */      if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)	return *fp->_wide_data->_IO_read_ptr;      if (status == __codecvt_error)	{	  __set_errno (EILSEQ);	  fp->_flags |= _IO_ERR_SEEN;	  return WEOF;	}      /* Move the remaining content of the read buffer to the beginning.  */      memmove (fp->_IO_buf_base, fp->_IO_read_ptr,	       fp->_IO_read_end - fp->_IO_read_ptr);      fp->_IO_read_end = (fp->_IO_buf_base			  + (fp->_IO_read_end - fp->_IO_read_ptr));      fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;    }  else    fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =      fp->_IO_buf_base;  if (fp->_IO_buf_base == NULL)    {      /* Maybe we already have a push back pointer.  */      if (fp->_IO_save_base != NULL)	{	  free (fp->_IO_save_base);	  fp->_flags &= ~_IO_IN_BACKUP;	}      INTUSE(_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.  */      if (fp->_wide_data->_IO_save_base != NULL)	{	  free (fp->_wide_data->_IO_save_base);	  fp->_flags &= ~_IO_IN_BACKUP;	}      INTUSE(_IO_wdoallocbuf) (fp);    }  /* Flush all line buffered files before reading. */  /* FIXME This can/should be moved to genops ?? */  if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))    {#if 0      INTUSE(_IO_flush_all_linebuffered) ();#else      /* We used to flush all line-buffered stream.  This really isn't	 required by any standard.  My recollection is that	 traditional Unix systems did this for stdout.  stderr better	 not be line buffered.  So we do just that here	 explicitly.  --drepper */      _IO_acquire_lock (_IO_stdout);      if ((_IO_stdout->_flags & (_IO_LINKED | _IO_NO_WRITES | _IO_LINE_BUF))	  == (_IO_LINKED | _IO_LINE_BUF))	_IO_OVERFLOW (_IO_stdout, EOF);      _IO_release_lock (_IO_stdout);#endif    }  INTUSE(_IO_switch_to_get_mode) (fp);  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;  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr =    fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base;  tries = 0; again:  count = _IO_SYSREAD (fp, fp->_IO_read_end,		       fp->_IO_buf_end - fp->_IO_read_end);  if (count <= 0)    {      if (count == 0 && tries == 0)	fp->_flags |= _IO_EOF_SEEN;      else	fp->_flags |= _IO_ERR_SEEN, count = 0;    }  fp->_IO_read_end += count;  if (count == 0)    {      if (tries != 0)	/* There are some bytes in the external buffer but they don't           convert to anything.  */	__set_errno (EILSEQ);      return WEOF;    }  if (fp->_offset != _IO_pos_BAD)    _IO_pos_adjust (fp->_offset, count);  /* Now convert the read input.  */  fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;  fp->_IO_read_base = fp->_IO_read_ptr;  status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,				   fp->_IO_read_ptr, fp->_IO_read_end,				   &read_ptr_copy,				   fp->_wide_data->_IO_read_end,				   fp->_wide_data->_IO_buf_end,				   &fp->_wide_data->_IO_read_end);  fp->_IO_read_ptr = (char *) read_ptr_copy;  if (fp->_wide_data->_IO_read_end == fp->_wide_data->_IO_buf_base)    {      if (status == __codecvt_error || fp->_IO_read_end == fp->_IO_buf_end)	{	  __set_errno (EILSEQ);	  fp->_flags |= _IO_ERR_SEEN;	  return WEOF;	}      /* The read bytes make no complete character.  Try reading again.  */      assert (status == __codecvt_partial);      ++tries;      goto again;    }  return *fp->_wide_data->_IO_read_ptr;}