mvprintw (LINES - 1, 0, reverse ? _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") : _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ")); ch = mutt_getch (); if (ch.ch == -1 || CI_is_return (ch.ch)) { Sort = method; CLEARLINE (LINES-1); return (-1); } switch (ch.ch) { case 'c': Sort = SORT_SCORE; break; case 'd': Sort = SORT_DATE; break; case 'f': Sort = SORT_FROM; break; case 'o': Sort = SORT_TO; break; case 'r': Sort = SORT_RECEIVED; break; case 's': Sort = SORT_SUBJECT; break; case 't': Sort = SORT_THREADS; break; case 'u': Sort = SORT_ORDER; break; case 'z': Sort = SORT_SIZE; break; default: BEEP (); break; }
case -1:  return -1;  case 1:  Sort = SORT_DATE; break;  case 2:  Sort = SORT_FROM; break;  case 3:  Sort = SORT_RECEIVED; break;  case 4:  Sort = SORT_SUBJECT; break;  case 5:  Sort = SORT_TO; break;  case 6:  Sort = SORT_THREADS; break;  case 7:  Sort = SORT_ORDER; break;  case 8:  Sort = SORT_SIZE; break;  case 9:  Sort = SORT_SCORE; break;
int mutt_select_sort (int reverse){  int method = Sort; /* save the current method in case of abort */  event_t ch;  Sort = 0;  while (!Sort)  {    mvprintw (LINES - 1, 0,    reverse ?_("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") :_("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "));    ch = mutt_getch ();    if (ch.ch == -1 || CI_is_return (ch.ch))    {      Sort = method;      CLEARLINE (LINES-1);      return (-1);    }    switch (ch.ch)    {      case 'c':	Sort = SORT_SCORE;	break;      case 'd':	Sort = SORT_DATE;	break;      case 'f':	Sort = SORT_FROM;	break;      case 'o':	Sort = SORT_TO;	break;      case 'r':	Sort = SORT_RECEIVED;	break;      case 's':	Sort = SORT_SUBJECT;	break;      case 't':	Sort = SORT_THREADS;	break;      case 'u':	Sort = SORT_ORDER;	break;      case 'z':	Sort = SORT_SIZE;	break;      default:	BEEP ();	break;    }  }  CLEARLINE (LINES-1);  if (reverse)    Sort |= SORT_REVERSE;  return (Sort != method ? 0 : -1); /* no need to resort if it's the same */}