if (type == 0) { choice = b; type = TXTHTML; }
choice = b; type = TXTHTML;
void alternative_handler (BODY *a, STATE *s){  BODY *choice = NULL;  BODY *b;  LIST *t;  char buf[STRING];  int type = 0;  /* First, search list of prefered types */  t = AlternativeOrderList;  while (t && !choice)  {    if (a && a->parts)       b = a->parts;    else      b = a;    while (b && !choice)    {      int i;      /* catch base only matches */      i = strlen (t->data) - 1;      if (!strchr(t->data, '/') || 	  (i > 0 && t->data[i-1] == '/' && t->data[i] == '*'))      {	if (!strcasecmp(t->data, TYPE(b)))	{	  choice = b;	}      }      else      {	snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);	if (!strcasecmp(t->data, buf))	{	  choice = b;	}      }      b = b->next;    }    t = t->next;  }  /* Next, look for an autoviewable type */  if (a && a->parts)     b = a->parts;  else    b = a;  while (b && !choice)  {    snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);    if (mutt_is_autoview (buf))    {      rfc1524_entry *entry = rfc1524_new_entry ();      if (rfc1524_mailcap_lookup (b, buf, entry, M_AUTOVIEW))      {	choice = b;      }      rfc1524_free_entry (&entry);    }    b = b->next;  }  /* Then, look for a text entry */  if (!choice)  {    if (a && a->parts)       b = a->parts;    else      b = a;    while (b)    {      if (b->type == TYPETEXT)      {	if (strcasecmp ("plain", b->subtype) == 0)	{	  choice = b;	  type = TXTPLAIN;	}	else if (strcasecmp ("enriched", b->subtype) == 0)	{	  if (type == 0 || type > TXTENRICHED)	  {	    choice = b;	    type = TXTENRICHED;	  }	}	else if (strcasecmp ("html", b->subtype) == 0)	{	  if (type == 0)	  {	    choice = b;	    type = TXTHTML;	  }	}      }      b = b->next;    }  }  /* Finally, look for other possibilities */  if (!choice)  {    if (a && a->parts)       b = a->parts;    else      b = a;    while (b && !choice)    {      if (mutt_can_decode (b))	choice = b;      b = b->next;    }  }  if (choice)  {    if (s->flags & M_DISPLAY && !option (OPTWEED))    {      fseek (s->fpin, choice->hdr_offset, 0);      mutt_copy_bytes(s->fpin, s->fpout, choice->offset-choice->hdr_offset);    }    mutt_body_handler (choice, s);  }  else if (s->flags & M_DISPLAY)  {    /* didn't find anything that we could display! */    state_puts(_("[-- Error:  Could not display any parts of Multipart/Alternative! --]\n"), s);  }}