Debian Codegraph @

src/lib/tagrules/check_notag.c

raw
1 /* 'checkit_tiff' is a conformance checker for baseline TIFFs
2 *
3 * author: Andreas Romeyke, 2015-2022
4 * licensed under conditions of libtiff
5 * (see http://libtiff.maptools.org/misc.html)
6 *
7 */
8
9 #include "check.h"
10 #include "check_helper.h"
11 #include "ctstring.h"
12 /* #define DEBUG */
13
14 /* checks if TIF does not have a specified tag,
15 * needed only for checks to ensure whitelist */
16 ret_t check_notag(ctiff_t * ctif, tag_t tag) {
17 GET_EMPTY_RET(ret);
18 TIFP_CHECK( ctif, ret);
19 if (no_index_found == TIFFGetRawTagListIndex(ctif->ifd0, tag)) {
20 ret.returncode = is_valid;
21 } else {
22 ret = set_value_found_ret_formatted_with_returncode(&ret, tagerror_not_white_listed, "tag %i exists", tag);
23 }
24 return ret;
25 }
26 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 smarttab expandtab :*/