2 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
19 #define SORT_DATE 1 /* the date the mail was sent. */
21 #define SORT_SUBJECT 3
23 #define SORT_ORDER 5 /* the order the messages appear in the mailbox. */
24 #define SORT_THREADS 6
25 #define SORT_RECEIVED 7 /* when the message were delivered locally */
29 #define SORT_ADDRESS 11
33 #define SORT_REVERSE (1<<4)
34 #define SORT_LAST (1<<5)
36 typedef int sort_t (const void *, const void *);
37 sort_t *mutt_get_sort_func (int);
39 void mutt_clear_threads (CONTEXT *);
40 void mutt_sort_headers (CONTEXT *, int);
41 void mutt_sort_threads (CONTEXT *, int);
42 int mutt_select_sort (int);
43 THREAD *mutt_sort_subthreads (THREAD *, int);
45 WHERE short BrowserSort INITVAL (SORT_SUBJECT);
46 WHERE short Sort INITVAL (SORT_DATE);
47 WHERE short SortAux INITVAL (SORT_DATE); /* auxiallary sorting method */
48 WHERE short SortAlias INITVAL (SORT_ALIAS);
50 /* FIXME: This one does not belong to here */
51 WHERE short PgpSortKeys INITVAL (SORT_ADDRESS);
54 extern const struct mapping_t SortMethods[];