|
|
@ -1,7 +1,7 @@ |
|
|
|
/* rule based checks if given TIFF is a specific baseline TIFF |
|
|
|
* |
|
|
|
* |
|
|
|
* author: Andreas Romeyke, 2015 |
|
|
|
* licensed under conditions of libtiff |
|
|
|
* licensed under conditions of libtiff |
|
|
|
* (see http://libtiff.maptools.org/misc.html) |
|
|
|
* |
|
|
|
*/ |
|
|
@ -62,27 +62,28 @@ typedef enum { |
|
|
|
fc_dummy |
|
|
|
} function_t; |
|
|
|
|
|
|
|
#define INTERNALSTACKDEPTH 10 |
|
|
|
#define INTERNALSTACKDEPTH 8 |
|
|
|
typedef struct internal_entry_s { |
|
|
|
int lineno; |
|
|
|
bool_t is_precondition; |
|
|
|
tag_t tag; |
|
|
|
function_t function; |
|
|
|
short int i_stackp; |
|
|
|
short int val_stackp; |
|
|
|
short int regex_stackp; |
|
|
|
unsigned int i_stack[INTERNALSTACKDEPTH]; |
|
|
|
values_t val_stack[INTERNALSTACKDEPTH]; |
|
|
|
char * regex_stack[INTERNALSTACKDEPTH]; |
|
|
|
unsigned int i_stack[INTERNALSTACKDEPTH]; |
|
|
|
int i_stackp; |
|
|
|
int val_stackp; |
|
|
|
int regex_stackp; |
|
|
|
} internal_entry_t; |
|
|
|
|
|
|
|
typedef struct full_res_s { |
|
|
|
int lineno; |
|
|
|
tag_t tag; |
|
|
|
function_t function; |
|
|
|
returncode_t returncode; |
|
|
|
tag_t tag; |
|
|
|
char * expected_value; |
|
|
|
char * found_value; |
|
|
|
returncode_t returncode; |
|
|
|
|
|
|
|
} full_res_t; |
|
|
|
|
|
|
|
typedef struct parser_state_s { |
|
|
@ -91,25 +92,25 @@ typedef struct parser_state_s { |
|
|
|
int valuelist; |
|
|
|
tag_t tag; |
|
|
|
tag_t tagref; |
|
|
|
values_t val_stack[MAXSTACKDEPTH]; |
|
|
|
char * regex_stack[MAXSTACKDEPTH]; |
|
|
|
reference_t any_reference; |
|
|
|
requirements_t req; |
|
|
|
unsigned int i_stack[MAXSTACKDEPTH]; |
|
|
|
int i_stackp; |
|
|
|
int val_stackp; |
|
|
|
int regex_stackp; |
|
|
|
int called_tags[MAXTAGS]; |
|
|
|
int mode; |
|
|
|
int logical_elements; |
|
|
|
short int i_stackp; |
|
|
|
short int val_stackp; |
|
|
|
FILE * stream; |
|
|
|
reference_t any_reference; |
|
|
|
const char * regex_string; |
|
|
|
int includedepth; |
|
|
|
full_res_t result_stack[MAXRESULT]; |
|
|
|
int result_stackp; |
|
|
|
int exe_stackp; |
|
|
|
internal_entry_t exe_stack[MAXSTACKDEPTH]; |
|
|
|
int mode; |
|
|
|
bool_t within_logical_or; |
|
|
|
int logical_elements; |
|
|
|
short int regex_stackp; |
|
|
|
int called_tags[MAXTAGS]; |
|
|
|
full_res_t result_stack[MAXRESULT]; |
|
|
|
values_t val_stack[MAXSTACKDEPTH]; |
|
|
|
char * regex_stack[MAXSTACKDEPTH]; |
|
|
|
unsigned int i_stack[MAXSTACKDEPTH]; |
|
|
|
internal_entry_t exe_stack[MAXSTACKDEPTH]; |
|
|
|
} parser_state_t; |
|
|
|
|
|
|
|
static void _helper_push_result(full_res_t res); |
|
|
|