Browse Source

- check_tag_has_some_of_these_values() ues unsigned count now

development
Andreas Romeyke 10 months ago
parent
commit
28435a0ea4
  1. 3
      src/headers/check.h
  2. 10
      src/tagrules/check_tag_has_some_of_these_values.c

3
src/headers/check.h

@ -224,7 +224,6 @@ typedef struct mem_map_s {
} mem_map_t;
#define MAXSTRLEN 1024
#define EXPECTSTRLEN 500
#define VALUESTRLEN 500
#define TIFFAILSTRLEN (EXPECTSTRLEN + VALUESTRLEN)
@ -261,7 +260,7 @@ char* frac2str(int d, int n);
char* range2str(int d, int n);
off_t ct_seek(ctiff_t * ctif, off_t pos, int whence);
ssize_t ct_read(ctiff_t * ctif, void *buf, size_t count);
ret_t check_tag_has_some_of_these_values( ctiff_t * ctif, tag_t tag, int count, const unsigned int * values);
ret_t check_tag_has_some_of_these_values( ctiff_t * ctif, tag_t tag, unsigned int count, const unsigned int * values);
ret_t check_tag_has_valuelist( ctiff_t * ctif, tag_t tag, unsigned int count, const unsigned int * values);
ret_t check_tag_has_value_in_range(ctiff_t * ctif, tag_t tag, unsigned int a, unsigned int b);
ret_t check_tag_has_value(ctiff_t * ctif, tag_t tag, unsigned int value);

10
src/tagrules/check_tag_has_some_of_these_values.c

@ -8,12 +8,12 @@
#include "check.h"
#include "check_helper.h"
#include <string.h>
/*
#define DEBUG
*/
ret_t check_tag_has_some_of_these_values(ctiff_t * ctif, tag_t tag, int count, const unsigned int * values) {
ret_t check_tag_has_some_of_these_values(ctiff_t * ctif, tag_t tag, unsigned int count, const unsigned int * values) {
GET_EMPTY_RET(ret);
TIFP_CHECK( ctif, ret);
ret=check_tag_quiet(ctif, tag);
@ -26,7 +26,7 @@ ret_t check_tag_has_some_of_these_values(ctiff_t * ctif, tag_t tag, int count, c
case TIFF_LONG: {
p = values;
ret_t tmp_res;
for (int i=0; i< count; i++) {
for (unsigned int i=0; i< count; i++) {
#ifdef DEBUG
printf("### value = %u", *p);
#endif
@ -50,7 +50,7 @@ ret_t check_tag_has_some_of_these_values(ctiff_t * ctif, tag_t tag, int count, c
case TIFF_SHORT: {
p = values;
ret_t tmp_res;
for (int i=0; i< count; i++) {
for (unsigned int i=0; i< count; i++) {
#ifdef DEBUG
printf("### value = %u", *p);
#endif
@ -74,7 +74,7 @@ ret_t check_tag_has_some_of_these_values(ctiff_t * ctif, tag_t tag, int count, c
case TIFF_RATIONAL: {
p = values;
ret_t tmp_res;
for (int i=0; i< count; i++) {
for (unsigned int i=0; i< count; i++) {
#ifdef DEBUG
printf("### value = %u", *p);
#endif

Loading…
Cancel
Save