WHERE string_list_t *AttachExclude INITVAL(0);
WHERE string_list_t *InlineAllow INITVAL(0);
WHERE string_list_t *InlineExclude INITVAL(0);
-WHERE string_list_t *HeaderOrderList INITVAL (0);
-WHERE string_list_t *Ignore INITVAL (0);
-WHERE string_list_t *UnIgnore INITVAL (0);
/* bit vector for boolean variables */
WHERE unsigned char Options[(OPTMAX + 7) / 8];
/* not reached */
}
-static int parse_unignore (BUFFER * buf, BUFFER * s,
- unsigned long data __attribute__ ((unused)),
- BUFFER * err __attribute__ ((unused)))
-{
- do {
- mutt_extract_token (buf, s, 0);
-
- /* don't add "*" to the unignore list */
- if (m_strcmp(buf->data, "*")) {
- string_list_add(&UnIgnore, buf->data);
- string_list_remove(&Ignore, buf->data);
- } else {
- string_list_wipe(&Ignore);
- }
- } while (MoreArgs (s));
-
- return 0;
-}
-
-static int parse_ignore (BUFFER * buf, BUFFER * s,
- unsigned long data __attribute__ ((unused)),
- BUFFER * err __attribute__ ((unused)))
-{
- do {
- mutt_extract_token (buf, s, 0);
- if (m_strcmp(buf->data, "*")) {
- string_list_remove(&UnIgnore, buf->data);
- } else {
- string_list_wipe(&UnIgnore);
- }
- string_list_add(&Ignore, buf->data);
- } while (MoreArgs(s));
- return 0;
-}
-
-static int parse_list(BUFFER * buf, BUFFER * s, unsigned long data,
- BUFFER * err __attribute__ ((unused)))
-{
- do {
- mutt_extract_token (buf, s, 0);
- string_list_add ((string_list_t **) data, buf->data);
- } while (MoreArgs(s));
- return 0;
-}
-
-static int parse_unlist (BUFFER * buf, BUFFER * s, unsigned long data,
- BUFFER * err __attribute__ ((unused)))
-{
- do {
- mutt_extract_token (buf, s, 0);
- /*
- * Check for deletion of entire list
- */
- if (!m_strcmp(buf->data, "*")) {
- string_list_wipe((string_list_t **) data);
- break;
- }
- string_list_remove((string_list_t **) data, buf->data);
- }
- while (MoreArgs (s));
-
- return 0;
-}
-
/* always wise to do what someone else did before */
static void _attachments_clean (void) {
int i;
/* functions used to parse commands in a rc file */
-static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
-static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_attachments (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unattachments (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
{"unscore", mutt_parse_unscore, 0},
{"alias", parse_alias, 0},
{"attachments", parse_attachments, 0 },
- {"ignore", parse_ignore, 0},
- {"hdr_order", parse_list, UL &HeaderOrderList},
{"my_hdr", parse_my_hdr, 0},
{"reset", parse_set, M_SET_RESET},
{"set", parse_set, 0},
{"source", parse_source, 0},
{"unalias", parse_unalias, 0},
{"unattachments", parse_unattachments, 0},
- {"unignore", parse_unignore, 0},
- {"unhdr_order", parse_unlist, UL &HeaderOrderList},
{"unmy_hdr", parse_unmy_hdr, 0},
{NULL, NULL, 0}
};
rx_t *SpamList = NULL, *NoSpamList = NULL;
string_list_t *AutoViewList, *AlternativeOrderList, *MimeLookupList;
+string_list_t *Ignore, *UnIgnore, *HeaderOrderList;
static char *mailcap_init(void)
{
}
RETURN();
};
+
+ void hdr_order(string_t s) {
+ string_list_add(&HeaderOrderList, s);
+ RETURN();
+ };
+ void unhdr_order(string_t s) {
+ if (m_strcmp(s, "*")) {
+ string_list_remove(&HeaderOrderList, s);
+ } else {
+ string_list_wipe(&HeaderOrderList);
+ }
+ RETURN();
+ };
+
+ void ignore(string_t s) {
+ if (m_strcmp(s, "*")) {
+ string_list_remove(&UnIgnore, s);
+ } else {
+ string_list_wipe(&UnIgnore);
+ }
+ string_list_add(&Ignore, s);
+ };
+ void unignore(string_t s) {
+ if (m_strcmp(s, "*")) {
+ string_list_add(&UnIgnore, s);
+ string_list_remove(&Ignore, s);
+ } else {
+ string_list_wipe(&Ignore);
+ }
+ };
};
/****************************************************************************/
extern const char *BodyEncodings[];
extern rx_t *SpamList, *NoSpamList;
-extern string_list_t *AutoViewList;
extern string_list_t *AlternativeOrderList;
+extern string_list_t *AutoViewList;
+extern string_list_t *HeaderOrderList;
+extern string_list_t *Ignore;
extern string_list_t *MimeLookupList;
+extern string_list_t *UnIgnore;
/* MIME encoding/decoding global vars */