From: Richard Russon Date: Thu, 16 Nov 2017 02:22:46 +0000 (+0000) Subject: rename list functions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79662908b6f762212eb086b10cb509d96f6b4310;p=neomutt rename list functions --- diff --git a/mbox.c b/mbox.c index e4be2f2c3..17c3830cc 100644 --- a/mbox.c +++ b/mbox.c @@ -582,7 +582,7 @@ static int strict_cmp_envelopes(const struct Envelope *e1, const struct Envelope { if ((mutt_strcmp(e1->message_id, e2->message_id) != 0) || (mutt_strcmp(e1->subject, e2->subject) != 0) || - !strict_cmp_stailq(&e1->references, &e2->references) || + !mutt_list_compare(&e1->references, &e2->references) || !strict_addrcmp(e1->from, e2->from) || !strict_addrcmp(e1->sender, e2->sender) || !strict_addrcmp(e1->reply_to, e2->reply_to) || !strict_addrcmp(e1->to, e2->to) || !strict_addrcmp(e1->cc, e2->cc) || diff --git a/mutt/list.c b/mutt/list.c index ae4631eff..5885c7b22 100644 --- a/mutt/list.c +++ b/mutt/list.c @@ -29,13 +29,13 @@ * | Function | Description * | :----------------------- | :----------------------------------------- * | mutt_list_clear() | Free a list, but NOT its strings + * | mutt_list_compare() | Compare two string lists * | mutt_list_find() | Find a string in a List * | mutt_list_free() | Free a List AND its strings * | mutt_list_insert_after() | Insert a string after a given ListNode * | mutt_list_insert_head() | Insert a string at the beginning of a List * | mutt_list_insert_tail() | Append a string to the end of a List * | mutt_list_match() | Is the string in the list (see notes) - * | strict_cmp_stailq() | Compare two string lists */ #include "config.h" @@ -166,7 +166,7 @@ bool mutt_list_match(const char *s, struct ListHead *h) } /** - * strict_cmp_stailq - Compare two string lists + * mutt_list_compare - Compare two string lists * @param ah First string list * @param bh Second string list * @retval bool True if lists are identical @@ -174,7 +174,7 @@ bool mutt_list_match(const char *s, struct ListHead *h) * To be identical, the lists must both be the same length and contain the same * strings. Two empty lists are identical. */ -int strict_cmp_stailq(const struct ListHead *ah, const struct ListHead *bh) +int mutt_list_compare(const struct ListHead *ah, const struct ListHead *bh) { struct ListNode *a = STAILQ_FIRST(ah); struct ListNode *b = STAILQ_FIRST(bh); diff --git a/mutt/list.h b/mutt/list.h index 54d3f4a9f..2f47116ff 100644 --- a/mutt/list.h +++ b/mutt/list.h @@ -46,12 +46,12 @@ struct ListNode STAILQ_HEAD(ListHead, ListNode); void mutt_list_clear(struct ListHead *h); +int mutt_list_compare(const struct ListHead *ah, const struct ListHead *bh); struct ListNode *mutt_list_find(struct ListHead *h, const char *data); void mutt_list_free(struct ListHead *h); struct ListNode *mutt_list_insert_after(struct ListHead *h, struct ListNode *n, char *s); struct ListNode *mutt_list_insert_head(struct ListHead *h, char *s); struct ListNode *mutt_list_insert_tail(struct ListHead *h, char *s); bool mutt_list_match(const char *s, struct ListHead *h); -int strict_cmp_stailq(const struct ListHead *ah, const struct ListHead *bh); #endif /* _MUTT_LIST_H */