result = GCONV_EMPTY_INPUT;
__gconv_transform_ucs4_utf8 (struct gconv_step *step,			     struct gconv_step_data *data, const char *inbuf,			     size_t *inlen, size_t *written, int do_flush){  struct gconv_step *next_step = step + 1;  struct gconv_step_data *next_data = data + 1;  gconv_fct fct = next_step->fct;  size_t do_write;  int result;  /* If the function is called with no input this means we have to reset     to the initial state.  The possibly partly converted input is     dropped.  */  if (do_flush)    {      /* Clear the state.  */      memset (data->data, '\0', sizeof (mbstate_t));      do_write = 0;      /* Call the steps down the chain if there are any.  */      if (data->is_last)	result = GCONV_OK;      else	{	  struct gconv_step *next_step = step + 1;	  struct gconv_step_data *next_data = data + 1;	  result = (*fct) (next_step, next_data, NULL, 0, written, 1);	  /* Clear output buffer.  */	  data->outbufavail = 0;	}    }  else    {      do_write = 0;      do	{	  const char *newinbuf = inbuf;	  size_t actually = __wcsnrtombs (&data->outbuf[data->outbufavail],					  (const wchar_t **) &newinbuf,					  *inlen / sizeof (wchar_t),					  data->outbufsize - data->outbufavail,					  (mbstate_t *) data->data);	  /* Status so far.  */	  result = GCONV_EMPTY_INPUT;	  /* Remember how much we converted.  */	  do_write += newinbuf - inbuf;	  *inlen -= (newinbuf - inbuf) * sizeof (wchar_t);	  data->outbufavail += actually;	  if (data->outbufavail > 0)	    {	      /* Call the functions below in the chain.  */	      size_t newavail = data->outbufavail;	      result = (*fct) (next_step, next_data, data->outbuf, &newavail,			       written, 0);	      /* Correct the output buffer.  */	      if (newavail != data->outbufavail)		{		  memmove (data->outbuf,			   &data->outbuf[data->outbufavail - newavail],			   newavail);		  data->outbufavail = newavail;		}	    }	}      while (*inlen > 0 && result == GCONV_EMPTY_INPUT);    }  if (written != NULL && data->is_last)    *written = do_write / sizeof (wchar_t);  return result;}