From: David S. W. <dw...@us...> - 2004-07-16 16:24:48
|
Update of /cvsroot/xsb/XSB/emu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15037 Modified Files: io_builtins_xsb.c builtin.c Log Message: Changed several xsb_exit's to xsb_abort's to give control back to user as seems appropriate. Index: io_builtins_xsb.c =================================================================== RCS file: /cvsroot/xsb/XSB/emu/io_builtins_xsb.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- io_builtins_xsb.c 14 Jul 2004 15:59:01 -0000 1.36 +++ io_builtins_xsb.c 16 Jul 2004 16:24:32 -0000 1.37 @@ -723,13 +723,13 @@ #define expand_opstk {\ opstk_size = opstk_size+opstk_size;\ opstk = (struct opstktype *)realloc(opstk,opstk_size*sizeof(struct opstktype));\ - if (!opstk) xsb_exit("Out of space for read_canonical stacks");\ + if (!opstk) xsb_abort("[READ_CANONICAL] Out of space for operand stack");\ /*printf("RC opstk expanded to %d\n",opstk_size);*/ \ } #define expand_funstk {\ funstk_size = funstk_size+funstk_size;\ funstk = (struct funstktype *)realloc(funstk,funstk_size*sizeof(struct funstktype));\ - if (!funstk) xsb_exit("Out of space for read_canonical stacks");\ + if (!funstk) xsb_abort("[READ CANONICAL] Out of space for function stack");\ /*printf("RC funstk expanded to %d\n",funstk_size);*/ \ } Index: builtin.c =================================================================== RCS file: /cvsroot/xsb/XSB/emu/builtin.c,v retrieving revision 1.180 retrieving revision 1.181 diff -u -r1.180 -r1.181 --- builtin.c 10 Jul 2004 21:04:28 -0000 1.180 +++ builtin.c 16 Jul 2004 16:24:33 -0000 1.181 @@ -477,7 +477,7 @@ /* index position which should be fixed one fine day! */ value = (Cell)(isnil(term) ? 0 : string_val(term)); break; - default: xsb_exit("Indexing on illegal argument"); + default: xsb_abort("[term_hash/3] Indexing on illegal argument"); value = 0; break; } @@ -893,7 +893,7 @@ TIFptr tif; tif = get_tip(psc); if ( IsNULL(tif) ) - xsb_abort("[abolish_table] Attempt to delete untabled predicate (%s/%d)\n", + xsb_abort("[abolish_table_pred] Attempt to delete untabled predicate (%s/%d)\n", get_name(psc), get_arity(psc)); if (IsVariantPredicate(tif) && IsNULL(TIF_CallTrie(tif))) @@ -914,7 +914,7 @@ for ( csf = top_of_complstk; csf != COMPLSTACKBOTTOM; csf = csf + COMPLFRAMESIZE ) if ( ! is_completed(compl_subgoal_ptr(csf)) ) - xsb_abort("Illegal table operation" + xsb_abort("[abolish_all_tables/0] Illegal table operation" "\n\t Cannot abolish incomplete tables"); for ( pTIF = tif_list.first; IsNonNULL(pTIF); pTIF = TIF_NextTIF(pTIF) ) { @@ -1849,7 +1849,7 @@ #include "odbc_xsb_i.h" #else case ODBC_EXEC_QUERY: { - xsb_exit("XSB not compiled with ODBC support.\nRecompile using the option --with-odbc.\n"); + xsb_abort("[ODBC] XSB not compiled with ODBC support.\nRecompile using the option --with-odbc.\n"); } #endif @@ -2470,7 +2470,7 @@ } default: - xsb_exit("Builtin #%d is not implemented", number); + xsb_abort("Builtin #%d is not implemented", number); break; } /* switch */ |