--- XSB.orig/emu/biassert.c 2006-07-26 02:18:41.000000000 +1200 +++ XSB/emu/biassert.c 2007-02-03 13:42:01.000000000 +1300 @@ -2783,16 +2783,16 @@ /* remove it from index chains */ for( i = NI; i >= 1; i-- ) { IP = ClRefIndPtr(Clause, i); - if (cell_opcode(IP) == dynnoop) /* deleting last in bucket */ + if (cell_opcode(IP) == dynnoop) { /* deleting last in bucket */ sob = (SOBRef)IndRefNext(IP); /* so get SOB addr */ + xsb_dbgmsg((LOG_RETRACT, + "SOB(%d) - hash size %d - %d clauses", + i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) )); + xsb_dbgmsg((LOG_RETRACT, + "Addr %p : prev %p : next %p", + sob, ClRefNext(sob), ClRefPrev(sob) )); + } else sob = NULL; - - xsb_dbgmsg((LOG_RETRACT, - "SOB(%d) - hash size %d - %d clauses", - i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) )); - xsb_dbgmsg((LOG_RETRACT, - "Addr %p : prev %p : next %p", - sob, ClRefNext(sob), ClRefPrev(sob) )); delete_from_hashchain(Clause,i,NI) ; if (sob && --ClRefNumNonemptyBuckets(sob) == 0) { /* if emptied bucket, decrement count; if all empty, reclaim SOB */ --- XSB.orig/emu/complete_local.h 2005-11-18 12:24:24.000000000 +1300 +++ XSB/emu/complete_local.h 2007-01-30 21:24:09.000000000 +1300 @@ -144,7 +144,7 @@ if (tcp_ptcp(subg_cp_ptr(prof_compl_subg)) != NULL ) { print_sdg_edge(sdg_check_num,2, - tcp_ptcp(subg_cp_ptr(prof_compl_subg)), + (VariantSF)tcp_ptcp(subg_cp_ptr(prof_compl_subg)), prof_compl_subg); } else { } @@ -152,7 +152,7 @@ nsf = subg_asf_list_ptr(prof_compl_subg); while (nsf != NULL) { - print_sdg_edge(sdg_check_num,1,nlcp_ptcp(nsf),prof_compl_subg); + print_sdg_edge(sdg_check_num,1,(VariantSF)nlcp_ptcp(nsf),prof_compl_subg); nsf = nlcp_prevlookup(nsf); } @@ -160,7 +160,7 @@ nsf = subg_compl_susp_ptr(prof_compl_subg); while (nsf != NULL) { - print_sdg_edge(sdg_check_num,-1,csf_ptcp(nsf),prof_compl_subg); + print_sdg_edge(sdg_check_num,-1,(VariantSF)csf_ptcp(nsf),prof_compl_subg); nsf = csf_prevcsf(nsf); } --- XSB.orig/emu/debug_xsb.c 2006-07-15 04:49:36.000000000 +1200 +++ XSB/emu/debug_xsb.c 2007-01-30 21:20:41.000000000 +1300 @@ -283,7 +283,7 @@ fprintf(where,"choicepoint(address(%p),unknown_psc).\n", cpf); } -#endif CP_DEBUG +#endif /* CP_DEBUG */ /*-------------------------------------------*/ @@ -423,7 +423,7 @@ alt_printnum++ ; where = fopen(buf,"w") ; if (! where) - { xsb_dbgmsg((LOG_GC, "could not open CP%d", printnum)); + { xsb_dbgmsg((LOG_GC, "could not open CP%d", alt_printnum)); return; } @@ -741,6 +741,22 @@ } } +/* + * Tries to make the interface more robust by cleaning-up any extra user + * input supplied to a prompt. Place a call to this function after any + * input scan which doesn't take the whole input line (ie. which isn't a + * `scanf("%s", &array);'). + */ +static void skip_to_nl(void) +{ + char c; + + do { + c = getchar(); + } while (c != '\n'); +} + + void print_tables(void) { int i = 0; @@ -886,23 +902,6 @@ fprintf(stddbg, "\n"); } -/*--------------------------------------------------------------------------*/ - -/* - * Tries to make the interface more robust by cleaning-up any extra user - * input supplied to a prompt. Place a call to this function after any - * input scan which doesn't take the whole input line (ie. which isn't a - * `scanf("%s", &array);'). - */ -static void skip_to_nl(void) -{ - char c; - - do { - c = getchar(); - } while (c != '\n'); -} - /*----- For table debugging --------------------------------------------*/ static char *compl_stk_frame_field[] = {