summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 09:39:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 09:42:28 -0700
commita8a8bcd86a01e006b3f45ce916ad626fe3efe70c (patch)
tree149eacc38486fc52524e5efef3ab48be270df99c /dive.h
parent634df1a337f61f2b7fa7cb6195ac680411c620e2 (diff)
downloadsubsurface-a8a8bcd86a01e006b3f45ce916ad626fe3efe70c.tar.gz
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>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 60693f2a1..ef57e2964 100644
--- a/dive.h
+++ b/dive.h
@@ -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);