cd = &fp->_codecvt;
cd = fp->_codecvt;
_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 (fp->_flags & _IO_NO_READS)    {      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)    {      /* Convert it.  */      size_t avail_bytes = fp->_IO_read_end - fp->_IO_read_ptr;      if (avail_bytes >= (*cd->__codecvt_do_max_length) (cd))	{	  /* There is more in the external.  */	  const char *read_stop = (const char *) fp->_IO_read_ptr;	  fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;	  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_end,					   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;	}      _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;	}      _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))    _IO_flush_all_linebuffered ();  _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;}