bug in indexing code
fix warning messages for write.c git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1626 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
8a7745bff6
commit
9bb06c4c7e
11
C/index.c
11
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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -16,11 +16,16 @@
|
||||
|
||||
<h2>Yap-5.1.2:</h2>
|
||||
<ul>
|
||||
<li> FIXED: recusive indexing over unbound compound terms was broken
|
||||
(obs Ricardo Lopes).</li>
|
||||
<li> FIXED: toplevel_print_options and debugger_print_options was
|
||||
broken and undocumented (obs Ashwin Srinivasan).</li>
|
||||
<li> NEW: lock streams while using them (concurrent writing is still allowed).</li>
|
||||
<li> FIXED: make current_op only walk over atoms.</li>
|
||||
<li> FIXED: memory corruption when copying consult stack (obs Paulo Moura).</li>
|
||||
<li> FIXED: get rid of some silly locks.</li>
|
||||
<li> FIXED: don't compare block top with <= (obs Paulo Moura).</li>
|
||||
>>>>>>> 1.66
|
||||
<li> FIXED: ! was not pruning right in p_execute_clause (obs Nicos
|
||||
Angelopoulos).</li>
|
||||
<li> FIXED: system/1 and shell/1 should check return code (obs Nicos
|
||||
|
Reference in New Issue
Block a user