if (def >= 0) { addstr ((char *) (def ? yes : no)); mutt_refresh (); }
int mutt_yesorno (const char *msg, int def){  event_t ch;  unsigned char *yes = (unsigned char *) _("yes");  unsigned char *no = (unsigned char *) _("no");#ifdef HAVE_LANGINFO_YESEXPR  regex_t reyes;  regex_t reno;  int reyes_ok = ! regcomp (& reyes, nl_langinfo (YESEXPR), REG_NOSUB);  int reno_ok = ! regcomp (& reno, nl_langinfo (NOEXPR), REG_NOSUB);  char answer[2];  answer[1] = 0;#endif  CLEARLINE(LINES-1);  printw ("%s ([%s]/%s): ", msg, def ? yes : no, def ? no : yes);  FOREVER  {    mutt_refresh ();    ch = mutt_getch ();    if (ch.ch == -1)      return (-1);    if (CI_is_return (ch.ch))      break;#ifdef HAVE_LANGINFO_YESEXPR    answer[0] = ch.ch;    if (reyes_ok ? 	(regexec (& reyes, answer, 0, 0, 0) == 0) :#else    if (#endif	(tolower (ch.ch) == 'y'))    {      def = 1;      break;    }    else if (#ifdef HAVE_LANGINFO_YESEXPR	     reno_ok ?	     (regexec (& reno, answer, 0, 0, 0) == 0) :#endif	     (tolower (ch.ch) == 'n'))    {      def = 0;      break;    }    else    {      BEEP();    }  }  addstr ((char *) (def ? yes : no));  mutt_refresh ();#ifdef HAVE_LANGINFO_YESEXPR      if (reyes_ok)    regfree (& reyes);  if (reno_ok)    regfree (& reno);#endif  return (def);}