- SCORE *tmp, *last = NULL;
-
- while (MoreArgs (s)) {
- mutt_extract_token (buf, s, 0);
- if (!str_cmp ("*", buf->data)) {
- for (tmp = Score; tmp;) {
- last = tmp;
- tmp = tmp->next;
- mutt_pattern_free (&last->pat);
- p_delete(&last);
- }
- Score = NULL;
- }
- else {
- for (tmp = Score; tmp; last = tmp, tmp = tmp->next) {
- if (!str_cmp (buf->data, tmp->str)) {
- if (last)
- last->next = tmp->next;
- else
- Score = tmp->next;
- mutt_pattern_free (&tmp->pat);
- p_delete(&tmp);
- /* there should only be one score per pattern, so we can stop here */
- break;
+ while (MoreArgs(s)) {
+ mutt_extract_token(buf, s, 0);
+ if (!m_strcmp("*", buf->data)) {
+ score_list_wipe(&Score);
+ } else {
+ score_t **last;
+
+ for (last = &Score; *last; last = &(*last)->next) {
+ if (!m_strcmp(buf->data, (*last)->str)) {
+ score_t *tmp = score_list_pop(last);
+ score_delete(&tmp);
+ break;
+ }
+ }