fix bad casts
This commit is contained in:
parent
d024e9f0ae
commit
4e90d68748
19
C/index.c
19
C/index.c
@ -2430,18 +2430,15 @@ count_consts(GroupDef *grp)
|
||||
static UInt
|
||||
count_blobs(GroupDef *grp)
|
||||
{
|
||||
Term current = MkAtomTerm(AtomFoundVar);
|
||||
UInt i = 0;
|
||||
ClauseDef *cl = grp->FirstClause;
|
||||
UInt i = 1;
|
||||
ClauseDef *cl = grp->FirstClause+1;
|
||||
Term current = grp->FirstClause->Tag;
|
||||
|
||||
while (TRUE) {
|
||||
while (cl <= grp->LastClause) {
|
||||
if (current != cl->Tag) {
|
||||
i++;
|
||||
current = cl->Tag;
|
||||
}
|
||||
if (cl == grp->LastClause) {
|
||||
return i;
|
||||
}
|
||||
cl++;
|
||||
}
|
||||
return i;
|
||||
@ -2653,9 +2650,13 @@ do_consts(GroupDef *grp, Term t, struct intermediates *cint, int compound_term,
|
||||
return lbl;
|
||||
}
|
||||
|
||||
int vsc_n;
|
||||
|
||||
static void
|
||||
do_blobs(GroupDef *grp, Term t, struct intermediates *cint, UInt argno, int first, UInt nxtlbl, int clleft, CELL *top)
|
||||
{
|
||||
vsc_n++;
|
||||
if (vsc_n == 112205) jmp_deb(1);
|
||||
COUNT n;
|
||||
ClauseDef *min = grp->FirstClause;
|
||||
COUNT i;
|
||||
@ -3224,7 +3225,7 @@ do_dbref_index(ClauseDef *min, ClauseDef* max, Term t, struct intermediates *cin
|
||||
Yap_emit(label_op, labl, Zero, cint);
|
||||
Yap_emit(index_dbref_op, Zero, Zero, cint);
|
||||
sort_group(group,(CELL *)(group+1),cint);
|
||||
do_blobs(group, t, cint, argno, first, fail_l, clleft, (CELL *)group+1);
|
||||
do_blobs(group, t, cint, argno, first, fail_l, clleft, (CELL *)(group+1));
|
||||
return labl;
|
||||
}
|
||||
}
|
||||
@ -3261,7 +3262,7 @@ do_blob_index(ClauseDef *min, ClauseDef* max, Term t, struct intermediates *cint
|
||||
else
|
||||
Yap_emit(index_long_op, Zero, Zero, cint);
|
||||
sort_group(group,(CELL *)(group+1),cint);
|
||||
do_blobs(group, t, cint, argno, first, fail_l, clleft, (CELL *)group+1);
|
||||
do_blobs(group, t, cint, argno, first, fail_l, clleft, (CELL *)(group+1));
|
||||
return labl;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user