From: David S. W. <dw...@us...> - 2010-02-17 16:05:21
|
Update of /cvsroot/xsb/XSB/examples/c_calling_XSB In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8498 Modified Files: cregs_thread.c edb.P Log Message: Added another test to the test. (Uses a 0-ary structure symbol.) Index: cregs_thread.c =================================================================== RCS file: /cvsroot/xsb/XSB/examples/c_calling_XSB/cregs_thread.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cregs_thread.c 3 Apr 2007 10:52:15 -0000 1.1 +++ cregs_thread.c 17 Feb 2010 16:05:11 -0000 1.2 @@ -105,8 +105,15 @@ if (rcr == XSB_ERROR) fprintf(stderr,"++Query Error r: %s/%s\n",xsb_get_error_type(r_th),xsb_get_error_message(r_th)); + c2p_functor(p_th,"versionMessage", 0, reg_term(p_th, 1)); + if (XSB_SUCCESS != (rcp = xsb_command(p_th))) + fprintf(stderr,"### Error running versionMessage: result code = %d %s/%s ###\n", rcp, xsb_get_error_type(p_th), xsb_get_error_message(p_th)); + + // xsb_kill_thread(r_th); xsb_close(xsb_get_main_thread()); /* Close connection */ return(0); } + + Index: edb.P =================================================================== RCS file: /cvsroot/xsb/XSB/examples/c_calling_XSB/edb.P,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- edb.P 3 Apr 2007 10:49:52 -0000 1.4 +++ edb.P 17 Feb 2010 16:05:11 -0000 1.5 @@ -1,3 +1,5 @@ +:- compiler_options([xpp_on]). +#define MODELLERVERSION 0.1216 p(a,b,c). p(1,2,3). @@ -51,3 +53,10 @@ rregs_err(4,5,6):- functor(_,_,_). rregs_err(7,8,9). rregs_err(10,11,12). + +% +% versionMessage +% +versionMessage :- + writeln('*** Modeller '). + |