[sword-cvs] sword/src/utilfuns ftplib.c, NONE, 1.1 Makefile.am, 1.10, 1.11

sword at www.crosswire.org sword at www.crosswire.org
Tue May 18 12:20:20 MST 2004


Committed by: dglassey

Update of /cvs/core/sword/src/utilfuns
In directory www:/tmp/cvs-serv16407/src/utilfuns

Modified Files:
	Makefile.am 
Added Files:
	ftplib.c 
Log Message:

allow installmgr to use external libcurl, external ftplib or internal ftplib
ftplib support appears to work but still needs testing
remove redundant target platform part of configure


--- NEW FILE: ftplib.c ---
/***************************************************************************/
/* ftplib.c - callable ftp access routines           */
/* Copyright (C) 1996-2000 Thomas Pfau, pfau at cnj.digex.net       */
/*  73 Catherine Street, South Bound Brook, NJ, 08880      */
/*                     */
/* This library 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.    */
/*                     */
/* This library 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 this progam; if not, write to the        */
/* Free Software Foundation, Inc., 59 Temple Place - Suite 330,      */
/* Boston, MA 02111-1307, USA.               */
[...1307 lines suppressed...]
    sprintf(cmd,"DELE %s",fnm);
    if (!FtpSendCmd(cmd,'2', nControl))
        return 0;
    return 1;
}

/*
 * FtpQuit - disconnect from remote
 *
 * return 1 if successful, 0 otherwise
 */
GLOBALDEF void FtpQuit(netbuf *nControl)
{
    if (nControl->dir != FTPLIB_CONTROL)
        return;
    FtpSendCmd("QUIT",'2',nControl);
    net_close(nControl->handle);
    free(nControl->buf);
    free(nControl);
}

Index: Makefile.am
===================================================================
RCS file: /cvs/core/sword/src/utilfuns/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Makefile.am	8 Jul 2003 13:19:41 -0000	1.10
+++ Makefile.am	18 May 2004 19:20:17 -0000	1.11
@@ -10,13 +10,20 @@
 libsword_la_SOURCES += $(utilfunsdir)/swbuf.cpp
 libsword_la_SOURCES += $(utilfunsdir)/ftpparse.c
 
+if INTERNALFTPLIB
+ftpsrc = $(utilfunsdir)/ftplib.c
+else
+ftpsrc =
+endif
+
 if ZLIB
 UNTGZ = $(utilfunsdir)/zlib/untgz.c
 else
 UNTGZ =
 endif
-libsword_la_SOURCES += $(UNTGZ)
 
+libsword_la_SOURCES += $(UNTGZ) 
+libsword_la_SOURCES += $(ftpsrc)
 
 if MINGW
 SWREGEX = $(utilfunsdir)/regex.c



More information about the sword-cvs mailing list