Browse Source

- fixed tag marking

- fixed init
- use unsigned int instead int
development
Andreas Romeyke 10 months ago
parent
commit
dfefe09669
  1. 20
      src/parser/config_parser.c

20
src/parser/config_parser.c

@ -530,7 +530,7 @@ void execute_plan (ctiff_t * ctif) {
int precondition_result=is_valid;
bool_t last_run_was_a_precondition=false;
function_t precondition_function=fc_true;
for (int i = MINTAGS; i<MAXTAGS; i++) { /* mark all tags as "unprocessed" */
for (unsigned int i = MINTAGS; i<MAXTAGS; i++) { /* mark all tags as "unprocessed" */
parser_state.called_tags[i]=false;
}
#ifdef EXE_DEBUG
@ -591,15 +591,15 @@ void execute_plan (ctiff_t * ctif) {
#endif
#ifndef NOTAGCHECK
for (tag_t i = MAXTAGS; i>=MINTAGS; i--) {
for (unsigned int i = MINTAGS; i< MAXTAGS; i++) {
if (false==parser_state.called_tags[i]) {
ret_t res = check_notag(ctif, i);
ret_t res = check_notag(ctif, (tag_t) i);
if (res.returncode == tag_exist) {
#ifdef EXE_DEBUG
printf("checking %i -> res=%s (%i)\n", i, get_parser_error_description(res.returncode), res.returncode);
#endif
full_res_t full;
full.tag = i;
full.tag = (tag_t) i;
full.function=fc_notag;
full.lineno=-1;
full.returncode=res.returncode;
@ -758,8 +758,8 @@ internal_entry_t prepare_internal_entry() {
break;
case ntupel_ref:
{
int c = i_pop();
for (int i = 0; i<c; i++) {
unsigned int c = i_pop();
for (unsigned int i = 0; i<c; i++) {
exe_i_push(&p, i_pop() );
}
exe_i_push(&p, c);
@ -790,8 +790,8 @@ void build_functional_structure__ntupel(internal_entry_t * e_p) {
#ifdef RULE_DEBUG
printf("ntupel found\n");
#endif
int c = i_pop();
for (int i = 0; i<c; i++) {
unsigned int c = i_pop();
for (unsigned int i = 0; i<c; i++) {
exe_i_push(e_p, i_pop() );
}
exe_i_push(e_p, c);
@ -1145,13 +1145,13 @@ void reset_parser_state() {
parser_state.req=0;
parser_state.result_stackp=0;
parser_state.tag=0;
parser_state.tagref=-1;
parser_state.tagref=0;
parser_state.val_stackp=0;
parser_state.valuelist=0;
parser_state.mode=0;
parser_state.within_logical_or=false;
parser_state.logical_elements=0;
for (int i=0; i<MAXTAGS; i++) {
for (unsigned int i=0; i<MAXTAGS; i++) {
parser_state.called_tags[i]= false;
}

Loading…
Cancel
Save