Add helper functions to ensure we have sane tag lists

There should never be empty or duplicate tags on those lists.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-10 09:39:51 -07:00
parent 634df1a337
commit a8a8bcd86a
3 changed files with 29 additions and 2 deletions

3
dive.h
View file

@ -197,6 +197,9 @@ struct divetag *taglist_add_tag(struct tag_entry **tag_list, const char *tag);
*/
int taglist_get_tagstring(struct tag_entry *tag_list, char *buffer, int len);
/* cleans up a list: removes empty tags and duplicates */
void taglist_cleanup(struct tag_entry **tag_list);
void taglist_init_global();
void taglist_free(struct tag_entry *tag_list);