projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify include
[apps/madmutt.git]
/
score.c
diff --git
a/score.c
b/score.c
index
6f58ba1
..
7bf3811
100644
(file)
--- a/
score.c
+++ b/
score.c
@@
-20,9
+20,6
@@
typedef struct score_t {
int exact; /* if this rule matches, don't evaluate any more */
struct score_t *next;
} score_t;
int exact; /* if this rule matches, don't evaluate any more */
struct score_t *next;
} score_t;
-
-score_t *Score = NULL;
-
DO_INIT(score_t, score);
static void score_wipe(score_t *sc)
{
DO_INIT(score_t, score);
static void score_wipe(score_t *sc)
{
@@
-31,9
+28,10
@@
static void score_wipe(score_t *sc)
}
DO_NEW(score_t, score);
DO_DELETE(score_t, score);
}
DO_NEW(score_t, score);
DO_DELETE(score_t, score);
-
DO_SLIST(score_t, score, score_delete);
DO_SLIST(score_t, score, score_delete);
+static score_t *Score = NULL;
+
void mutt_check_rescore (CONTEXT * ctx)
{
int i;
void mutt_check_rescore (CONTEXT * ctx)
{
int i;
@@
-96,10
+94,7
@@
int mutt_parse_score (BUFFER * buf, BUFFER * s,
(*last)->str = pattern;
}
pc = buf->data;
(*last)->str = pattern;
}
pc = buf->data;
- if (*pc == '=') {
- (*last)->exact = 1;
- pc++;
- }
+ pc += (*last)->exact = (*pc == '=');
(*last)->val = atoi(pc);
set_option(OPTNEEDRESCORE);
return 0;
(*last)->val = atoi(pc);
set_option(OPTNEEDRESCORE);
return 0;