From: Michael K. <ki...@us...> - 2010-12-19 04:57:16
|
Update of /cvsroot/xsb/XSB/packages/curl/cc In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1972/packages/curl/cc Modified Files: NMakefile.mak curl2pl.c load_page.c Added Files: load_page.h Log Message: fixes to curl, sgml, xpath --- NEW FILE: load_page.h --- /* ** File: packages/curl/cc/load_page.h ** Author: Aneesh Ali ** Contact: xsb...@cs... ** ** Copyright (C) The Research Foundation of SUNY, 2010 ** ** XSB is free software; you can redistribute it and/or modify it under the ** terms of the GNU Library General Public License as published by the Free ** Software Foundation; either version 2 of the License, or (at your option) ** any later version. ** ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ** FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for ** more details. ** ** You should have received a copy of the GNU Library General Public License ** along with XSB; if not, write to the Free Software Foundation, ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ** */ #include "common.h" char * load_page (char *source, curl_opt options, curl_ret *ret_vals); void * encode (char *url, char **dir, char **file, char **suffix); curl_opt init_options(); Index: NMakefile.mak =================================================================== RCS file: /cvsroot/xsb/XSB/packages/curl/cc/NMakefile.mak,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- NMakefile.mak 18 Aug 2010 03:10:32 -0000 1.2 +++ NMakefile.mak 19 Dec 2010 04:57:07 -0000 1.3 @@ -23,6 +23,7 @@ XSBDIR=..\..\.. MYPROGRAM=curl2pl +HPROGRAM=load_page CPP=cl.exe OUTDIR=$(XSBDIR)\config\x86-pc-windows\bin @@ -41,8 +42,12 @@ /D "WIN_NT" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" \ /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /c +SOURCE=load_page.c +"$(INTDIR)\$(HPROGRAM).obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + -SOURCE=error.c load_page.c curl2pl.c +SOURCE=error.c curl2pl.c "$(INTDIR)\$(MYPROGRAM).obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) @@ -54,7 +59,7 @@ /machine:I386 /out:"$(OUTDIR)\$(MYPROGRAM).dll" \ /libpath:"$(XSBDIR)\config\x86-pc-windows\bin" \ /libpath:.\bin -LINK32_OBJS= "$(INTDIR)\$(MYPROGRAM).obj" +LINK32_OBJS= "$(INTDIR)\$(HPROGRAM).obj" "$(INTDIR)\$(MYPROGRAM).obj" "$(OUTDIR)\$(MYPROGRAM).dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< Index: curl2pl.c =================================================================== RCS file: /cvsroot/xsb/XSB/packages/curl/cc/curl2pl.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- curl2pl.c 14 Dec 2010 22:32:29 -0000 1.11 +++ curl2pl.c 19 Dec 2010 04:57:07 -0000 1.12 @@ -31,7 +31,7 @@ #include <stdio.h> #include <string.h> #include <assert.h> -#include "load_page.c" +#include "load_page.h" #include "error_term.h" #include "error.c" @@ -39,13 +39,17 @@ #include <sys/stat.h> #endif +extern char * load_page (char *source, curl_opt options, curl_ret *ret_vals); +extern void * encode (char *url, char **dir, char **file, char **suffix); +extern curl_opt init_options(); + /** * Allocate error term on C side * Input : Prolog variable * Output : none **/ -DllExport int call_conv pl_allocate_error_term() +DllExport int call_conv curl_allocate_error_term() { global_error_term = reg_term(1); global_warning_term = reg_term(2); @@ -56,7 +60,7 @@ * Remove uninstantiated terms in the warning list at end * Input : Warning term **/ -DllExport int call_conv pl_finalize_warn() +DllExport int call_conv curl_finalize_warn() { /*Temporary prolog term to iterate over the warnings list*/ prolog_term tmp; Index: load_page.c =================================================================== RCS file: /cvsroot/xsb/XSB/packages/curl/cc/load_page.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- load_page.c 14 Dec 2010 22:32:29 -0000 1.8 +++ load_page.c 19 Dec 2010 04:57:07 -0000 1.9 @@ -23,8 +23,9 @@ #include <stdio.h> #include <string.h> +#include <stdlib.h> #include <curl/curl.h> -#include "common.h" +#include "load_page.h" struct result_t { |