321 |
{ |
{ |
322 |
struct logrel_term *term; |
struct logrel_term *term; |
323 |
unsigned long pos; |
unsigned long pos; |
324 |
if ((pos = gl_search(g_logrelation_bvar_list,i,(CmpFunc)CmpP))){ |
if (0 != (pos = gl_search(g_logrelation_bvar_list,i,(CmpFunc)CmpP))){ |
325 |
/* find boolean var if already on logical relations var list */ |
/* find boolean var if already on logical relations var list */ |
326 |
term = POOL_ALLOCLOGTERM; |
term = POOL_ALLOCLOGTERM; |
327 |
assert(term!=NULL); |
assert(term!=NULL); |
367 |
{ |
{ |
368 |
struct logrel_term *term; |
struct logrel_term *term; |
369 |
unsigned long pos; |
unsigned long pos; |
370 |
if ((pos = gl_search(g_logrelation_satrel_list,inst,(CmpFunc)CmpP))){ |
if (0 != (pos = gl_search(g_logrelation_satrel_list,inst,(CmpFunc)CmpP))){ |
371 |
/* find log/relation if already on logical relations satrel list */ |
/* find log/relation if already on logical relations satrel list */ |
372 |
term = POOL_ALLOCLOGTERM; |
term = POOL_ALLOCLOGTERM; |
373 |
assert(term!=NULL); |
assert(term!=NULL); |
509 |
break; |
break; |
510 |
case e_var: |
case e_var: |
511 |
if (GetEvaluationForTable()!= NULL && |
if (GetEvaluationForTable()!= NULL && |
512 |
(str = SimpleNameIdPtr(ExprName(start)))&& |
(NULL != (str = SimpleNameIdPtr(ExprName(start)))) && |
513 |
(fvp=FindForVar(GetEvaluationForTable(),str))){ |
(NULL != (fvp=FindForVar(GetEvaluationForTable(),str)))){ |
514 |
if (GetForKind(fvp)==f_integer){ |
if (GetForKind(fvp)==f_integer){ |
515 |
term = CreateLogIntegerTerm(GetForInteger(fvp)); |
term = CreateLogIntegerTerm(GetForInteger(fvp)); |
516 |
AppendLogTermBuf(term); |
AppendLogTermBuf(term); |
1021 |
register struct Instance *ptr; |
register struct Instance *ptr; |
1022 |
register unsigned long c; |
register unsigned long c; |
1023 |
for(c=gl_length(l);c>=1;c--) |
for(c=gl_length(l);c>=1;c--) |
1024 |
if ((ptr = (struct Instance *)gl_fetch(l,c))) |
if (NULL != (ptr = (struct Instance *)gl_fetch(l,c))) |
1025 |
RemoveLogRel(ptr,inst); |
RemoveLogRel(ptr,inst); |
1026 |
gl_destroy(l); |
gl_destroy(l); |
1027 |
} |
} |
1031 |
register struct Instance *ptr; |
register struct Instance *ptr; |
1032 |
register unsigned long c; |
register unsigned long c; |
1033 |
for(c=gl_length(l);c>=1;c--) |
for(c=gl_length(l);c>=1;c--) |
1034 |
if ((ptr = (struct Instance *)gl_fetch(l,c))) |
if (NULL != (ptr = (struct Instance *)gl_fetch(l,c))) |
1035 |
RemoveLogRel(ptr,inst); |
RemoveLogRel(ptr,inst); |
1036 |
gl_destroy(l); |
gl_destroy(l); |
1037 |
} |
} |
1164 |
if (old==new) return; |
if (old==new) return; |
1165 |
|
|
1166 |
if (new){ |
if (new){ |
1167 |
if ((pos = gl_search(relorvar,old,(CmpFunc)CmpP))) { |
if (0 != (pos = gl_search(relorvar,old,(CmpFunc)CmpP))) { |
1168 |
if ((other = gl_search(relorvar,new,(CmpFunc)CmpP))){ |
if (0 != (other = gl_search(relorvar,new,(CmpFunc)CmpP))){ |
1169 |
gl_store(relorvar,pos,(VOIDPTR)new); /* case 3 */ |
gl_store(relorvar,pos,(VOIDPTR)new); /* case 3 */ |
1170 |
if (new == NULL) { |
if (new == NULL) { |
1171 |
inst = old; |
inst = old; |
1198 |
} |
} |
1199 |
} |
} |
1200 |
else /* case 4 */ |
else /* case 4 */ |
1201 |
if ((pos = gl_search(relorvar,old,(CmpFunc)CmpP))) |
if (0 != (pos = gl_search(relorvar,old,(CmpFunc)CmpP))) |
1202 |
gl_store(relorvar,pos,(VOIDPTR)new); |
gl_store(relorvar,pos,(VOIDPTR)new); |
1203 |
} |
} |
1204 |
|
|
1231 |
struct Instance *inst; |
struct Instance *inst; |
1232 |
struct for_var_t *fvp; |
struct for_var_t *fvp; |
1233 |
enum find_errors err; |
enum find_errors err; |
1234 |
if((str = SimpleNameIdPtr(name))){ |
if(NULL != (str = SimpleNameIdPtr(name))){ |
1235 |
if (TempExists(str)) { |
if (TempExists(str)) { |
1236 |
if (ValueKind(TempValue(str))==integer_value) { |
if (ValueKind(TempValue(str))==integer_value) { |
1237 |
return 1; |
return 1; |
1240 |
} |
} |
1241 |
} |
} |
1242 |
if (GetEvaluationForTable() != NULL && |
if (GetEvaluationForTable() != NULL && |
1243 |
(fvp=FindForVar(GetEvaluationForTable(),str)) ) { |
(NULL != (fvp=FindForVar(GetEvaluationForTable(),str))) ) { |
1244 |
if (GetForKind(fvp)==f_integer) { |
if (GetForKind(fvp)==f_integer) { |
1245 |
return 1; |
return 1; |
1246 |
} else { |
} else { |