diff --git a/C/index.c b/C/index.c index 25c0b0d98..0eb8a496d 100644 --- a/C/index.c +++ b/C/index.c @@ -11,8 +11,11 @@ * File: index.c * * comments: Indexing a Prolog predicate * * * -* Last rev: $Date: 2006-04-27 17:04:08 $,$Author: vsc $ * +* Last rev: $Date: 2006-05-02 16:39:06 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.165 2006/04/27 17:04:08 vsc +* don't use <= to compare with block top (libc may not have block header). +* * Revision 1.164 2006/04/27 14:10:36 rslopes * *** empty log message *** * @@ -2781,7 +2784,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) clause->Tag = (CELL)NULL; return; } - argno--; + argno = 2; cl = NEXTOP(cl,xy); break; case _unify_l_x_var: @@ -2942,7 +2945,8 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno) clause->u.WorkPC = NEXTOP(cl,of); return; } - argno--; + /* must skip next n arguments */ + argno += cl->u.of.a-1; case _unify_l_struc_write: case _unify_struct_write: cl = NEXTOP(cl,of); @@ -4025,7 +4029,6 @@ do_nonvar_group(GroupDef *grp, Term t, UInt compound_term, CELL *sreg, UInt arit type_sw->ConstEntry = type_sw->FuncEntry = type_sw->PairEntry = - type_sw->VarEntry = nxtlbl; type_sw->VarEntry = do_var_entries(grp, t, cint, argno, first, clleft, nxtlbl); grp->LastClause = cls_move(grp->FirstClause, ap, grp->LastClause, compound_term, argno, last_arg); diff --git a/C/write.c b/C/write.c index e42f5f367..93c75a8e8 100644 --- a/C/write.c +++ b/C/write.c @@ -147,12 +147,10 @@ wrputref(CODEADDR ref, int Quote_illegal, wrf writech) /* writes a data base r putAtom(AtomDBRef, Quote_illegal, writech); #if SHORT_INTS sprintf(s, "(0x%p,0)", ref); -#else -#ifdef linux +#elif __linux__ sprintf(s, "(%p,0)", ref); #else sprintf(s, "(0x%p,0)", ref); -#endif #endif wrputs(s, writech); lastw = alphanum; @@ -456,8 +454,8 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb) MP_INT *big = Yap_BigIntOfTerm(t); char *s = (char *)TR; if (s+2+mpz_sizeinbase(big, 10) >= Yap_TrailTop) { - s = H; - if (s+2+mpz_sizeinbase(big, 10) >= ASP) { + s = (char *)H; + if (s+2+mpz_sizeinbase(big, 10) >= (char *)ASP) { return; } } diff --git a/changes-5.1.html b/changes-5.1.html index 5726a95ab..55da93146 100644 --- a/changes-5.1.html +++ b/changes-5.1.html @@ -16,11 +16,16 @@

Yap-5.1.2: