int mutt_messages_in_thread (HEADER *hdr, int flag)
int mutt_messages_in_thread (CONTEXT *ctx, HEADER *hdr, int flag)
int mutt_messages_in_thread (HEADER *hdr, int flag){  THREAD *threads[2];  int i;  if ((Sort & SORT_MASK) != SORT_THREADS)    return (1);  threads[0] = hdr->thread;  while (threads[0]->parent)    threads[0] = threads[0]->parent;  while (threads[0]->prev)    threads[0] = threads[0]->prev;  if (flag)    threads[1] = hdr->thread;  else    threads[1] = threads[0]->next;  for (i = 0; i < flag ? 1 : 2; i++)  {    while (!threads[i]->message)      threads[i] = threads[i]->child;  }   return (((Sort & SORT_REVERSE ? -1 : 1)	   * threads[1]->message->msgno - threads[0]->message->msgno) + (flag ? 1 : 0));}