diff --git a/core/tag.c b/core/tag.c index 66dcfcef8..bf8327182 100644 --- a/core/tag.c +++ b/core/tag.c @@ -181,25 +181,3 @@ void taglist_init_global() for (i = 0; i < sizeof(default_tags) / sizeof(char *); i++) taglist_add_tag(&g_tag_list, default_tags[i]); } - -bool taglist_contains(struct tag_entry *tag_list, const char *tag) -{ - while (tag_list) { - if (same_string(tag_list->tag->name, tag)) - return true; - tag_list = tag_list->next; - } - return false; -} - -struct tag_entry *taglist_added(struct tag_entry *original_list, struct tag_entry *new_list) -{ - struct tag_entry *added_list = NULL; - while (new_list) { - if (!taglist_contains(original_list, new_list->tag->name)) - taglist_add_tag(&added_list, new_list->tag->name); - new_list = new_list->next; - } - return added_list; -} - diff --git a/core/tag.h b/core/tag.h index 1f50dc920..bd2642278 100644 --- a/core/tag.h +++ b/core/tag.h @@ -35,7 +35,6 @@ struct tag_entry { extern struct tag_entry *g_tag_list; struct divetag *taglist_add_tag(struct tag_entry **tag_list, const char *tag); -struct tag_entry *taglist_added(struct tag_entry *original_list, struct tag_entry *new_list); /* * Writes all divetags form tag_list into internally allocated buffer @@ -52,7 +51,6 @@ void taglist_cleanup(struct tag_entry **tag_list); void taglist_init_global(); void taglist_free(struct tag_entry *tag_list); struct tag_entry *taglist_copy(struct tag_entry *s); -bool taglist_contains(struct tag_entry *tag_list, const char *tag); void taglist_merge(struct tag_entry **dst, struct tag_entry *src1, struct tag_entry *src2); #ifdef __cplusplus