aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/tag.c b/tag.c
index 14327415..6595c9d0 100644
--- a/tag.c
+++ b/tag.c
@@ -1,4 +1,4 @@
-/* $Id: tag.c,v 1.30 2020/03/21 00:17:31 schwarze Exp $ */
+/* $Id: tag.c,v 1.31 2020/04/02 22:12:55 schwarze Exp $ */
/*
* Copyright (c) 2015,2016,2018,2019,2020 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -176,16 +176,8 @@ tag_put(const char *s, int prio, struct roff_node *n)
}
}
-enum tag_result
-tag_check(const char *test_tag)
+int
+tag_exists(const char *tag)
{
- unsigned int slot;
-
- if (ohash_first(&tag_data, &slot) == NULL)
- return TAG_EMPTY;
- else if (test_tag != NULL && ohash_find(&tag_data,
- ohash_qlookup(&tag_data, test_tag)) == NULL)
- return TAG_MISS;
- else
- return TAG_OK;
+ return ohash_find(&tag_data, ohash_qlookup(&tag_data, tag)) != NULL;
}