if (a->type == TYPETEXT) map = mutt_get_translation (Charset, mutt_get_send_charset (send_charset, sizeof(send_charset), a, 1));
if (a->type == TYPETEXT && (!a->noconv)) fc = fgetconv_open (fpin, Charset, mutt_get_send_charset (send_charset, sizeof (send_charset), a, 1)); else fc = fgetconv_open (fpin, 0, 0);
int mutt_write_mime_body (BODY *a, FILE *f){  char *p, boundary[SHORT_STRING];  char send_charset[SHORT_STRING];  FILE *fpin;  BODY *t;  CHARSET_MAP *map = NULL;    if (a->type == TYPEMULTIPART)  {    /* First, find the boundary to use */    if (!(p = mutt_get_parameter ("boundary", a->parameter)))    {      dprint (1, (debugfile, "mutt_write_mime_body(): no boundary parameter found!\n"));      mutt_error _("No boundary parameter found! [report this error]");      return (-1);    }    strfcpy (boundary, p, sizeof (boundary));    for (t = a->parts; t ; t = t->next)    {      fprintf (f, "\n--%s\n", boundary);      if (mutt_write_mime_header (t, f) == -1)	return -1;      fputc ('\n', f);      if (mutt_write_mime_body (t, f) == -1)	return -1;    }    fprintf (f, "\n--%s--\n", boundary);    return (ferror (f) ? -1 : 0);  }#ifdef HAVE_PGP  /* This is pretty gross, but it's the best solution for now... */  if (a->type == TYPEAPPLICATION && mutt_strcmp (a->subtype, "pgp-encrypted") == 0)  {    fputs ("Version: 1\n", f);    return 0;  }#endif /* HAVE_PGP */  if ((fpin = fopen (a->filename, "r")) == NULL)  {    dprint(1,(debugfile, "write_mime_body: %s no longer exists!\n",a->filename));    mutt_error (_("%s no longer exists!"), a->filename);    return -1;  }  if (a->type == TYPETEXT)    map = mutt_get_translation (Charset, mutt_get_send_charset (send_charset, sizeof(send_charset), a, 1));  if (a->encoding == ENCQUOTEDPRINTABLE)    encode_quoted (fpin, f, mutt_is_text_type (a->type, a->subtype), 		   a->type == TYPETEXT && (!a->noconv) ? map : NULL);  else if (a->encoding == ENCBASE64)    encode_base64 (fpin, f, mutt_is_text_type (a->type, a->subtype), 		   a->type == TYPETEXT && (!a->noconv) ? map : NULL);  else    encode_8bit (fpin, f, mutt_is_text_type (a->type, a->subtype),		      a->type == TYPETEXT && (!a->noconv) ? map : NULL);  fclose (fpin);  return (ferror (f) ? -1 : 0);}