From 3c67550975817dc3e2b066fa604937250836384e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa=20II?= Date: Mon, 15 Mar 2010 16:20:47 +0000 Subject: [PATCH] fix stupid use of ++ within macro. --- C/utilpreds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C/utilpreds.c b/C/utilpreds.c index ec9439430..0bb469703 100644 --- a/C/utilpreds.c +++ b/C/utilpreds.c @@ -71,6 +71,7 @@ clean_dirty_tr(tr_fr_ptr TR0) { } } +int show; static int copy_complex_term(CELL *pt0, CELL *pt0_end, int share, int newattvs, CELL *ptf, CELL *HLow) @@ -91,6 +92,7 @@ copy_complex_term(CELL *pt0, CELL *pt0_end, int share, int newattvs, CELL *ptf, register CELL d0; register CELL *ptd0; ++ pt0; + if (show) fprintf(stderr,"pt0=%p\n",pt0); ptd0 = pt0; d0 = *ptd0; deref_head(d0, copy_term_unk); @@ -142,6 +144,7 @@ copy_complex_term(CELL *pt0, CELL *pt0_end, int share, int newattvs, CELL *ptf, register CELL *ap2; /* store the terms to visit */ ap2 = RepAppl(d0); + if (show) fprintf(stderr,"d0=%lx %p %lx\n",d0,ap2,*ap2); if (ap2 >= HB && ap2 <= H) { /* If this is newer than the current term, just reuse */ *ptf++ = d0; @@ -275,7 +278,8 @@ copy_complex_term(CELL *pt0, CELL *pt0_end, int share, int newattvs, CELL *ptf, goto trail_overflow; } } - Bind(ptd0, (CELL)ptf++); + Bind(ptd0, (CELL)ptf); + ptf++; #ifdef COROUTINING } #endif