=================================================================== RCS file: /cvs/mandoc/tag.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -p -r1.30 -r1.31 --- mandoc/tag.c 2020/03/21 00:17:31 1.30 +++ mandoc/tag.c 2020/04/02 22:12:55 1.31 @@ -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 * @@ -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; }