X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=score.c;h=7bf381192fd26dc663fdcfaa4f16244682f8afea;hp=6f58ba16d553e906124099155d8b29ff2005771c;hb=ec80e2f8441235f2482ac2d72cf07c77e84f603a;hpb=9233c1f8fefc6ecfe015682f532a7f1ff5038143 diff --git a/score.c b/score.c index 6f58ba1..7bf3811 100644 --- 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; - -score_t *Score = NULL; - 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_SLIST(score_t, score, score_delete); +static score_t *Score = NULL; + 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; - if (*pc == '=') { - (*last)->exact = 1; - pc++; - } + pc += (*last)->exact = (*pc == '='); (*last)->val = atoi(pc); set_option(OPTNEEDRESCORE); return 0;