unset_option(OPTSORTCOLLAPSE);
int mh_sync_mailbox (CONTEXT * ctx){  char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX];  int i, rc = 0;    i = mh_check_mailbox(ctx, NULL);#if 0  if(i == M_REOPENED || i == M_NEW_MAIL)  {    set_option(OPTSORTCOLLAPSE);    mutt_sort_headers(ctx, (i == M_REOPENED));    unset_option(OPTSORTCOLLAPSE);  }#endif  if(i == M_REOPENED || i == M_NEW_MAIL || i < 0)    return i;  for (i = 0; i < ctx->msgcount; i++)  {    if (ctx->hdrs[i]->deleted)    {      snprintf (path, sizeof (path), "%s/%s", ctx->path, ctx->hdrs[i]->path);      if (ctx->magic == M_MAILDIR || (option (OPTMHPURGE) && ctx->magic == M_MH))	unlink (path);      else if (ctx->magic == M_MH)      {	/* MH just moves files out of the way when you delete them */	if(*ctx->hdrs[i]->path != ',')	{	  snprintf (tmp, sizeof (tmp), "%s/,%s", ctx->path, ctx->hdrs[i]->path);	  unlink (tmp);	  rename (path, tmp);	}	        }    }    else if (ctx->hdrs[i]->changed || ctx->hdrs[i]->attach_del)    {      if (ctx->magic == M_MAILDIR)	maildir_sync_message (ctx, i);      else      {	/* FOO - seems ok to ignore errors, but might want to warn... */	mh_sync_message (ctx, i);      }    }  }  maildir_update_mtime(ctx);  return (rc);}