fprintf (out, "Content-Length: %ld\n", h->content->length);
fprintf (out, "Content-Length: " OFF_T_FMT "\n", h->content->length);
mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix){  char buffer[SHORT_STRING];  if (h->env)    flags |= (h->env->irt_changed ? CH_UPDATE_IRT : 0)      | (h->env->refs_changed ? CH_UPDATE_REFS : 0);    if (mutt_copy_hdr (in, out, h->offset, h->content->offset, flags, prefix) == -1)    return (-1);  if (flags & CH_TXTPLAIN)  {    char chsbuf[SHORT_STRING];    fputs ("MIME-Version: 1.0\n", out);    fputs ("Content-Transfer-Encoding: 8bit\n", out);    fputs ("Content-Type: text/plain; charset=", out);    mutt_canonical_charset (chsbuf, sizeof (chsbuf), Charset ? Charset : "us-ascii");    rfc822_cat(buffer, sizeof(buffer), chsbuf, MimeSpecials);    fputs(buffer, out);    fputc('\n', out);        if (ferror (out) != 0 || feof (out) != 0)      return -1;      }  if (flags & CH_UPDATE)  {    if ((flags & CH_NOSTATUS) == 0)    {      if (h->env->irt_changed && h->env->in_reply_to)      {	LIST *listp = h->env->in_reply_to;	if (fputs ("In-Reply-To: ", out) == EOF)	  return (-1);	for (; listp; listp = listp->next)	  if ((fputs (listp->data, out) == EOF) || (fputc (' ', out) == EOF))	    return (-1);	if (fputc ('\n', out) == EOF)	  return (-1);      }      if (h->env->refs_changed && h->env->references)      {	LIST *listp = h->env->references, *refs = NULL, *t;	if (fputs ("References: ", out) == EOF)	  return (-1);	/* Mutt stores references in reverse order, thus we create	 * a reordered refs list that we can put in the headers */	for (; listp; listp = listp->next, refs = t)	{	  t = (LIST *)safe_malloc (sizeof (LIST));	  t->data = listp->data;	  t->next = refs;	}	for (; refs; refs = refs->next)	  if ((fputs (refs->data, out) == EOF) || (fputc (' ', out) == EOF))	    return (-1);	/* clearing refs from memory */	for (t = refs; refs; refs = t->next, t = refs)	  FREE (&refs);	if (fputc ('\n', out) == EOF)	  return (-1);      }      if (h->old || h->read)      {	if (fputs ("Status: ", out) == EOF)	  return (-1);	if (h->read)	{	  if (fputs ("RO", out) == EOF)	    return (-1);	}	else if (h->old)	{	  if (fputc ('O', out) == EOF)	    return (-1);	}	if (fputc ('\n', out) == EOF)	  return (-1);      }      if (h->flagged || h->replied)      {	if (fputs ("X-Status: ", out) == EOF)	  return (-1);	if (h->replied)	{	  if (fputc ('A', out) == EOF)	    return (-1);	}	if (h->flagged)	{	  if (fputc ('F', out) == EOF)	    return (-1);	}		if (fputc ('\n', out) == EOF)	  return (-1);      }    }  }  if (flags & CH_UPDATE_LEN &&      (flags & CH_NOLEN) == 0)  {    fprintf (out, "Content-Length: %ld\n", h->content->length);    if (h->lines != 0 || h->content->length == 0)      fprintf (out, "Lines: %d\n", h->lines);  }  if ((flags & CH_NONEWLINE) == 0)  {    if (flags & CH_PREFIX)      fputs(prefix, out);    if (fputc ('\n', out) == EOF) /* add header terminator */      return (-1);  }  if (ferror (out) || feof (out))    return -1;    return (0);}