mutt_error ("Mailbox is read-only.");
mutt_error _("Mailbox is read-only.");
int mx_sync_mailbox (CONTEXT *ctx){  int rc, i;  if (ctx->dontwrite)  {    char buf[STRING], tmp[STRING];    if (km_expand_key (buf, sizeof(buf),                       km_find_func (MENU_MAIN, OP_TOGGLE_WRITE)))      snprintf (tmp, sizeof(tmp), " Press '%s' to toggle write", buf);    else      strfcpy (tmp, "Use 'toggle-write' to re-enable write!", sizeof(tmp));    mutt_error ("Mailbox is marked unwritable. %s", tmp);    return -1;  }  else if (ctx->readonly)  {    mutt_error ("Mailbox is read-only.");    return -1;  }  if (!ctx->changed && !ctx->deleted)  {    mutt_message ("Mailbox is unchanged.");    return (0);  }  if (ctx->deleted)  {    char buf[SHORT_STRING];    snprintf (buf, sizeof (buf), "Purge %d deleted message%s?",	      ctx->deleted, ctx->deleted == 1 ? "" : "s");    if ((rc = query_quadoption (OPT_DELETE, buf)) < 0)      return (-1);    else if (rc == M_NO)    {      if (!ctx->changed)	return 0; /* nothing to do! */      for (i = 0 ; i < ctx->msgcount ; i++)	ctx->hdrs[i]->deleted = 0;      ctx->deleted = 0;    }  }  if ((rc = sync_mailbox (ctx)) == 0)  {    mutt_message ("%d kept, %d deleted.", ctx->msgcount - ctx->deleted,		  ctx->deleted);    sleep (1); /* allow the user time to read the message */    if (ctx->msgcount == ctx->deleted &&	(ctx->magic == M_MBOX || ctx->magic == M_MMDF) &&	!mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))    {      unlink (ctx->path);      mx_fastclose_mailbox (ctx);      return 0;    }    mx_update_tables(ctx, 1);    set_option (OPTSORTCOLLAPSE);    mutt_sort_headers (ctx, 1); /* rethread from scratch */    unset_option (OPTSORTCOLLAPSE);  }  return (rc);}