struct _IO_codecvt *cv = &fp->_codecvt;
struct _IO_codecvt *cv = fp->_codecvt;
_IO_wfile_sync (fp)     _IO_FILE *fp;{  _IO_ssize_t delta;  wint_t retval = 0;  /*    char* ptr = cur_ptr(); */  if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)    if (_IO_do_flush (fp))      return WEOF;  delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;  if (delta != 0)    {      /* We have to find out how many bytes we have to go back in the	 external buffer.  */      struct _IO_codecvt *cv = &fp->_codecvt;      _IO_off64_t new_pos;      int clen = (*cv->__codecvt_do_encoding) (cv);      if (clen > 0)	/* It is easy, a fixed number of input bytes are used for each	   wide character.  */	delta *= clen;      else	{	  /* We have to find out the hard way how much to back off.             To do this we determine how much input we needed to             generate the wide characters up to the current reading             position.  */	  int nread;	  fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;	  nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state,					      fp->_IO_read_base,					      fp->_IO_read_end, delta);	  fp->_IO_read_ptr = fp->_IO_read_base + nread;	  delta = -(fp->_IO_read_end - fp->_IO_read_base - nread);	}      new_pos = _IO_SYSSEEK (fp, delta, 1);      if (new_pos != (_IO_off64_t) EOF)	{	  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;	  fp->_IO_read_end = fp->_IO_read_ptr;	}#ifdef ESPIPE      else if (errno == ESPIPE)	; /* Ignore error from unseekable devices. */#endif      else	retval = WEOF;    }  if (retval != WEOF)    fp->_offset = _IO_pos_BAD;  /* FIXME: Cleanup - can this be shared? */  /*    setg(base(), ptr, ptr); */  return retval;}