X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sort.h;h=d4f924141927ad8f6a0d5477de58bf3763c95af9;hp=87af0592865f12e3cf13025ecfafa453a069bc57;hb=00f34116b32751764d42f81159c292d850c74bac;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/sort.h b/sort.h index 87af059..d4f9241 100644 --- a/sort.h +++ b/sort.h @@ -1,54 +1,50 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-2000 Michael R. Elkins - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - */ - -#define SORT_DATE 1 /* the date the mail was sent. */ + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. + */ + +#ifndef MUTT_SORT_H +#define MUTT_SORT_H + +#define SORT_DATE 1 /* the date the mail was sent. */ #define SORT_SIZE 2 #define SORT_SUBJECT 3 +#define SORT_ALPHA 3 /* makedoc.c requires this */ #define SORT_FROM 4 -#define SORT_ORDER 5 /* the order the messages appear in the mailbox. */ +#define SORT_ORDER 5 /* the order the messages appear in the mailbox. */ #define SORT_THREADS 6 -#define SORT_RECEIVED 7 /* when the message were delivered locally */ +#define SORT_RECEIVED 7 /* when the message were delivered locally */ #define SORT_TO 8 #define SORT_SCORE 9 #define SORT_ALIAS 10 #define SORT_ADDRESS 11 #define SORT_KEYID 12 #define SORT_TRUST 13 -#define SORT_MASK 0xf -#define SORT_REVERSE (1<<4) -#define SORT_LAST (1<<5) +#define SORT_SPAM 14 +/* dgc: Sort & SortAux are shorts, so I'm bumping these bitflags up from + * bits 4 & 5 to bits 8 & 9 to make room for more sort keys in the future. */ +#define SORT_MASK 0xff +#define SORT_REVERSE (1<<8) +#define SORT_LAST (1<<9) typedef int sort_t (const void *, const void *); sort_t *mutt_get_sort_func (int); -void mutt_clear_threads (CONTEXT *); void mutt_sort_headers (CONTEXT *, int); -void mutt_sort_threads (CONTEXT *, int); int mutt_select_sort (int); -THREAD *mutt_sort_subthreads (THREAD *, int); WHERE short BrowserSort INITVAL (SORT_SUBJECT); WHERE short Sort INITVAL (SORT_DATE); -WHERE short SortAux INITVAL (SORT_DATE); /* auxiallary sorting method */ +WHERE short SortAux INITVAL (SORT_DATE); /* auxiallary sorting method */ WHERE short SortAlias INITVAL (SORT_ALIAS); /* FIXME: This one does not belong to here */ WHERE short PgpSortKeys INITVAL (SORT_ADDRESS); -#include "mapping.h" extern const struct mapping_t SortMethods[]; + +#endif