if (!HEADER_DATA(h)->sid)
if (h->index == -1)
void imap_expunge_mailbox (IMAP_DATA* idata){  HEADER* h;  int i, cacheno;  for (i = 0; i < idata->ctx->msgcount; i++)  {    h = idata->ctx->hdrs[i];    if (!HEADER_DATA(h)->sid)    {      dprint (2, (debugfile, "Expunging message UID %d.\n", HEADER_DATA (h)->uid));      h->active = 0;      /* free cached body from disk, if neccessary */      cacheno = HEADER_DATA(h)->uid % IMAP_CACHE_LEN;      if (idata->cache[cacheno].uid == HEADER_DATA(h)->uid &&	  idata->cache[cacheno].path)      {	unlink (idata->cache[cacheno].path);	FREE (&idata->cache[cacheno].path);      }      imap_free_header_data (&h->data);    }  }  /* We may be called on to expunge at any time. We can't rely on the caller   * to always know to rethread */  mx_update_tables (idata->ctx, 0);  mutt_sort_headers (idata->ctx, 1);}