mirror of
https://github.com/GNOME/libxml2.git
synced 2025-05-08 21:07:54 +08:00
ftp: Remove FTP support
Remove the built-in FTP client. If you configure --with-legacy, old symbols are retained for ABI compatibility.
This commit is contained in:
parent
5238404325
commit
dba1ed85a3
@ -1,7 +1,7 @@
|
|||||||
.test:
|
.test:
|
||||||
image: registry.gitlab.gnome.org/gnome/libxml2
|
image: registry.gitlab.gnome.org/gnome/libxml2
|
||||||
variables:
|
variables:
|
||||||
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
|
BASE_CONFIG: "--with-legacy --with-xptr-locs"
|
||||||
before_script:
|
before_script:
|
||||||
- rm -rf libxml2-build
|
- rm -rf libxml2-build
|
||||||
- mkdir libxml2-build
|
- mkdir libxml2-build
|
||||||
@ -72,7 +72,7 @@ clang:msan:
|
|||||||
tags:
|
tags:
|
||||||
- win32-ps
|
- win32-ps
|
||||||
variables:
|
variables:
|
||||||
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
|
BASE_CONFIG: "--with-legacy --with-xptr-locs"
|
||||||
# Disabled for now, see #658
|
# Disabled for now, see #658
|
||||||
CONFIG: "--without-python"
|
CONFIG: "--without-python"
|
||||||
CHERE_INVOKING: "yes"
|
CHERE_INVOKING: "yes"
|
||||||
|
@ -29,7 +29,6 @@ option(LIBXML2_WITH_C14N "Add the Canonicalization support" ON)
|
|||||||
option(LIBXML2_WITH_CATALOG "Add the Catalog support" ON)
|
option(LIBXML2_WITH_CATALOG "Add the Catalog support" ON)
|
||||||
option(LIBXML2_WITH_DEBUG "Add the debugging module" ON)
|
option(LIBXML2_WITH_DEBUG "Add the debugging module" ON)
|
||||||
set(LIBXML2_WITH_EXPR ON)
|
set(LIBXML2_WITH_EXPR ON)
|
||||||
option(LIBXML2_WITH_FTP "Add the FTP support" OFF)
|
|
||||||
option(LIBXML2_WITH_HTML "Add the HTML support" ON)
|
option(LIBXML2_WITH_HTML "Add the HTML support" ON)
|
||||||
option(LIBXML2_WITH_HTTP "Add the HTTP support" OFF)
|
option(LIBXML2_WITH_HTTP "Add the HTTP support" OFF)
|
||||||
option(LIBXML2_WITH_ICONV "Add ICONV support" ON)
|
option(LIBXML2_WITH_ICONV "Add ICONV support" ON)
|
||||||
@ -72,7 +71,7 @@ if(LIBXML2_WITH_PYTHON)
|
|||||||
CACHE PATH "Python bindings install directory")
|
CACHE PATH "Python bindings install directory")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_XPTR_LOCS WITH_ZLIB)
|
foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_XPTR_LOCS WITH_ZLIB)
|
||||||
if(LIBXML2_${VARIABLE})
|
if(LIBXML2_${VARIABLE})
|
||||||
set(${VARIABLE} 1)
|
set(${VARIABLE} 1)
|
||||||
else()
|
else()
|
||||||
@ -274,7 +273,6 @@ set(
|
|||||||
HTMLtree.c
|
HTMLtree.c
|
||||||
legacy.c
|
legacy.c
|
||||||
list.c
|
list.c
|
||||||
nanoftp.c
|
|
||||||
nanohttp.c
|
nanohttp.c
|
||||||
parser.c
|
parser.c
|
||||||
parserInternals.c
|
parserInternals.c
|
||||||
|
@ -55,9 +55,6 @@ endif
|
|||||||
if WITH_DEBUG_SOURCES
|
if WITH_DEBUG_SOURCES
|
||||||
libxml2_la_SOURCES += debugXML.c
|
libxml2_la_SOURCES += debugXML.c
|
||||||
endif
|
endif
|
||||||
if WITH_FTP_SOURCES
|
|
||||||
libxml2_la_SOURCES += nanoftp.c
|
|
||||||
endif
|
|
||||||
if WITH_HTML_SOURCES
|
if WITH_HTML_SOURCES
|
||||||
libxml2_la_SOURCES += HTMLparser.c HTMLtree.c
|
libxml2_la_SOURCES += HTMLparser.c HTMLtree.c
|
||||||
endif
|
endif
|
||||||
|
13
configure.ac
13
configure.ac
@ -69,8 +69,6 @@ AC_ARG_WITH(catalog,
|
|||||||
[ --with-catalog XML Catalogs support (on)])
|
[ --with-catalog XML Catalogs support (on)])
|
||||||
AC_ARG_WITH(debug,
|
AC_ARG_WITH(debug,
|
||||||
[ --with-debug debugging module and shell (on)])
|
[ --with-debug debugging module and shell (on)])
|
||||||
AC_ARG_WITH(ftp,
|
|
||||||
[ --with-ftp FTP support (off)])
|
|
||||||
AC_ARG_WITH(history,
|
AC_ARG_WITH(history,
|
||||||
[ --with-history history support for shell (off)])
|
[ --with-history history support for shell (off)])
|
||||||
AC_ARG_WITH(readline,
|
AC_ARG_WITH(readline,
|
||||||
@ -320,7 +318,7 @@ AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
|
|||||||
dnl
|
dnl
|
||||||
dnl Checks for inet libraries
|
dnl Checks for inet libraries
|
||||||
dnl
|
dnl
|
||||||
if test "$with_http" = "yes" || test "$with_ftp" = "yes"; then
|
if test "$with_http" = "yes"; then
|
||||||
AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h netdb.h])
|
AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h netdb.h])
|
||||||
AC_CHECK_HEADERS([sys/select.h poll.h])
|
AC_CHECK_HEADERS([sys/select.h poll.h])
|
||||||
|
|
||||||
@ -519,15 +517,6 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(WITH_TREE)
|
AC_SUBST(WITH_TREE)
|
||||||
|
|
||||||
if test "$with_ftp" != "yes" ; then
|
|
||||||
WITH_FTP=0
|
|
||||||
else
|
|
||||||
echo Enabling FTP support
|
|
||||||
WITH_FTP=1
|
|
||||||
fi
|
|
||||||
AC_SUBST(WITH_FTP)
|
|
||||||
AM_CONDITIONAL(WITH_FTP_SOURCES, test "$WITH_FTP" = "1")
|
|
||||||
|
|
||||||
if test "$with_http" != "yes" ; then
|
if test "$with_http" != "yes" ; then
|
||||||
WITH_HTTP=0
|
WITH_HTTP=0
|
||||||
else
|
else
|
||||||
|
16
gentest.py
16
gentest.py
@ -20,7 +20,7 @@ else:
|
|||||||
# Modules we want to skip in API test
|
# Modules we want to skip in API test
|
||||||
#
|
#
|
||||||
skipped_modules = [ "SAX", "xlink", "threads", "globals",
|
skipped_modules = [ "SAX", "xlink", "threads", "globals",
|
||||||
"xmlmemory", "xmlversion", "xmlexports",
|
"xmlmemory", "xmlversion", "xmlexports", "nanoftp",
|
||||||
]
|
]
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -104,8 +104,8 @@ skipped_functions = [
|
|||||||
"xmlReaderNewFd", "xmlReaderForFd",
|
"xmlReaderNewFd", "xmlReaderForFd",
|
||||||
"xmlIORead", "xmlReadIO", "xmlCtxtReadIO",
|
"xmlIORead", "xmlReadIO", "xmlCtxtReadIO",
|
||||||
"htmlIORead", "htmlReadIO", "htmlCtxtReadIO",
|
"htmlIORead", "htmlReadIO", "htmlCtxtReadIO",
|
||||||
"xmlReaderNewIO", "xmlBufferDump", "xmlNanoFTPConnect",
|
"xmlReaderNewIO", "xmlBufferDump",
|
||||||
"xmlNanoFTPConnectTo", "xmlNanoHTTPMethod", "xmlNanoHTTPMethodRedir",
|
"xmlNanoHTTPMethod", "xmlNanoHTTPMethodRedir",
|
||||||
# Complex I/O APIs
|
# Complex I/O APIs
|
||||||
"xmlCreateIOParserCtxt", "xmlParserInputBufferCreateIO",
|
"xmlCreateIOParserCtxt", "xmlParserInputBufferCreateIO",
|
||||||
"xmlRegisterInputCallbacks", "xmlReaderForIO",
|
"xmlRegisterInputCallbacks", "xmlReaderForIO",
|
||||||
@ -122,7 +122,7 @@ skipped_functions = [
|
|||||||
"xmlTextReaderReadInnerXml", "xmlTextReaderReadOuterXml",
|
"xmlTextReaderReadInnerXml", "xmlTextReaderReadOuterXml",
|
||||||
"xmlTextReaderReadString",
|
"xmlTextReaderReadString",
|
||||||
# destructor
|
# destructor
|
||||||
"xmlListDelete", "xmlOutputBufferClose", "xmlNanoFTPClose", "xmlNanoHTTPClose",
|
"xmlListDelete", "xmlOutputBufferClose", "xmlNanoHTTPClose",
|
||||||
# deprecated
|
# deprecated
|
||||||
"xmlCatalogGetPublic", "xmlCatalogGetSystem", "xmlEncodeEntities",
|
"xmlCatalogGetPublic", "xmlCatalogGetSystem", "xmlEncodeEntities",
|
||||||
"xmlNewGlobalNs", "xmlHandleEntity", "xmlNamespaceParseNCName",
|
"xmlNewGlobalNs", "xmlHandleEntity", "xmlNamespaceParseNCName",
|
||||||
@ -169,7 +169,7 @@ skipped_functions = [
|
|||||||
# and hence generate errors on memory allocation tests
|
# and hence generate errors on memory allocation tests
|
||||||
#
|
#
|
||||||
skipped_memcheck = [ "xmlLoadCatalog", "xmlAddEncodingAlias",
|
skipped_memcheck = [ "xmlLoadCatalog", "xmlAddEncodingAlias",
|
||||||
"xmlSchemaInitTypes", "xmlNanoFTPProxy", "xmlNanoFTPScanProxy",
|
"xmlSchemaInitTypes",
|
||||||
"xmlNanoHTTPScanProxy", "xmlResetLastError", "xmlCatalogConvert",
|
"xmlNanoHTTPScanProxy", "xmlResetLastError", "xmlCatalogConvert",
|
||||||
"xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
|
"xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
|
||||||
"xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
|
"xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
|
||||||
@ -346,12 +346,6 @@ def type_convert(str, name, info, module, function, pos):
|
|||||||
return('fileoutput')
|
return('fileoutput')
|
||||||
return('filepath')
|
return('filepath')
|
||||||
if res == 'void_ptr':
|
if res == 'void_ptr':
|
||||||
if module == 'nanoftp' and name == 'ctx':
|
|
||||||
return('xmlNanoFTPCtxtPtr')
|
|
||||||
if function == 'xmlNanoFTPNewCtxt' or \
|
|
||||||
function == 'xmlNanoFTPConnectTo' or \
|
|
||||||
function == 'xmlNanoFTPOpen':
|
|
||||||
return('xmlNanoFTPCtxtPtr')
|
|
||||||
if module == 'nanohttp' and name == 'ctx':
|
if module == 'nanohttp' and name == 'ctx':
|
||||||
return('xmlNanoHTTPCtxtPtr')
|
return('xmlNanoHTTPCtxtPtr')
|
||||||
if function == 'xmlNanoHTTPMethod' or \
|
if function == 'xmlNanoHTTPMethod' or \
|
||||||
|
@ -7,7 +7,6 @@ xmlversion_h.set('LIBXML_VERSION_EXTRA', v_extra)
|
|||||||
xmlversion_h.set10('WITH_C14N', want_c14n)
|
xmlversion_h.set10('WITH_C14N', want_c14n)
|
||||||
xmlversion_h.set10('WITH_CATALOG', want_catalog)
|
xmlversion_h.set10('WITH_CATALOG', want_catalog)
|
||||||
xmlversion_h.set10('WITH_DEBUG', want_debug)
|
xmlversion_h.set10('WITH_DEBUG', want_debug)
|
||||||
xmlversion_h.set10('WITH_FTP', want_ftp)
|
|
||||||
xmlversion_h.set10('WITH_HTML', want_html)
|
xmlversion_h.set10('WITH_HTML', want_html)
|
||||||
xmlversion_h.set10('WITH_HTTP', want_http)
|
xmlversion_h.set10('WITH_HTTP', want_http)
|
||||||
xmlversion_h.set10('WITH_ICONV', iconv_dep.found())
|
xmlversion_h.set10('WITH_ICONV', iconv_dep.found())
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Summary: minimal FTP implementation
|
* Summary: Removed legacy symbols for an outdated FTP client
|
||||||
* Description: minimal FTP implementation allowing to fetch resources
|
|
||||||
* like external subset. This module is DEPRECATED, do not
|
|
||||||
* use any of its functions.
|
|
||||||
*
|
*
|
||||||
* Copy: See Copyright for the status of this software.
|
* Copy: See Copyright for the status of this software.
|
||||||
*
|
*
|
||||||
@ -11,176 +8,4 @@
|
|||||||
|
|
||||||
#ifndef __NANO_FTP_H__
|
#ifndef __NANO_FTP_H__
|
||||||
#define __NANO_FTP_H__
|
#define __NANO_FTP_H__
|
||||||
|
|
||||||
#include <libxml/xmlversion.h>
|
|
||||||
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
|
|
||||||
/* Needed for portability to Windows 64 bits */
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#include <winsock2.h>
|
|
||||||
#else
|
|
||||||
/**
|
|
||||||
* SOCKET:
|
|
||||||
*
|
|
||||||
* macro used to provide portability of code to windows sockets
|
|
||||||
*/
|
|
||||||
#define SOCKET int
|
|
||||||
/**
|
|
||||||
* INVALID_SOCKET:
|
|
||||||
*
|
|
||||||
* macro used to provide portability of code to windows sockets
|
|
||||||
* the value to be used when the socket is not valid
|
|
||||||
*/
|
|
||||||
#undef INVALID_SOCKET
|
|
||||||
#define INVALID_SOCKET (-1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ftpListCallback:
|
|
||||||
* @userData: user provided data for the callback
|
|
||||||
* @filename: the file name (including "->" when links are shown)
|
|
||||||
* @attrib: the attribute string
|
|
||||||
* @owner: the owner string
|
|
||||||
* @group: the group string
|
|
||||||
* @size: the file size
|
|
||||||
* @links: the link count
|
|
||||||
* @year: the year
|
|
||||||
* @month: the month
|
|
||||||
* @day: the day
|
|
||||||
* @hour: the hour
|
|
||||||
* @minute: the minute
|
|
||||||
*
|
|
||||||
* A callback for the xmlNanoFTPList command.
|
|
||||||
* Note that only one of year and day:minute are specified.
|
|
||||||
*/
|
|
||||||
typedef void (*ftpListCallback) (void *userData,
|
|
||||||
const char *filename, const char *attrib,
|
|
||||||
const char *owner, const char *group,
|
|
||||||
unsigned long size, int links, int year,
|
|
||||||
const char *month, int day, int hour,
|
|
||||||
int minute);
|
|
||||||
/**
|
|
||||||
* ftpDataCallback:
|
|
||||||
* @userData: the user provided context
|
|
||||||
* @data: the data received
|
|
||||||
* @len: its size in bytes
|
|
||||||
*
|
|
||||||
* A callback for the xmlNanoFTPGet command.
|
|
||||||
*/
|
|
||||||
typedef void (*ftpDataCallback) (void *userData,
|
|
||||||
const char *data,
|
|
||||||
int len);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Init
|
|
||||||
*/
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void
|
|
||||||
xmlNanoFTPInit (void);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void
|
|
||||||
xmlNanoFTPCleanup (void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Creating/freeing contexts.
|
|
||||||
*/
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void *
|
|
||||||
xmlNanoFTPNewCtxt (const char *URL);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void
|
|
||||||
xmlNanoFTPFreeCtxt (void * ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void *
|
|
||||||
xmlNanoFTPConnectTo (const char *server,
|
|
||||||
int port);
|
|
||||||
/*
|
|
||||||
* Opening/closing session connections.
|
|
||||||
*/
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void *
|
|
||||||
xmlNanoFTPOpen (const char *URL);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPConnect (void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPClose (void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPQuit (void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void
|
|
||||||
xmlNanoFTPScanProxy (const char *URL);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void
|
|
||||||
xmlNanoFTPProxy (const char *host,
|
|
||||||
int port,
|
|
||||||
const char *user,
|
|
||||||
const char *passwd,
|
|
||||||
int type);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPUpdateURL (void *ctx,
|
|
||||||
const char *URL);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Rather internal commands.
|
|
||||||
*/
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPGetResponse (void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPCheckResponse (void *ctx);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CD/DIR/GET handlers.
|
|
||||||
*/
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPCwd (void *ctx,
|
|
||||||
const char *directory);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPDele (void *ctx,
|
|
||||||
const char *file);
|
|
||||||
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN SOCKET
|
|
||||||
xmlNanoFTPGetConnection (void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPCloseConnection(void *ctx);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPList (void *ctx,
|
|
||||||
ftpListCallback callback,
|
|
||||||
void *userData,
|
|
||||||
const char *filename);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN SOCKET
|
|
||||||
xmlNanoFTPGetSocket (void *ctx,
|
|
||||||
const char *filename);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPGet (void *ctx,
|
|
||||||
ftpDataCallback callback,
|
|
||||||
void *userData,
|
|
||||||
const char *filename);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlNanoFTPRead (void *ctx,
|
|
||||||
void *dest,
|
|
||||||
int len);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
|
|
||||||
#endif /* __NANO_FTP_H__ */
|
#endif /* __NANO_FTP_H__ */
|
||||||
|
@ -392,26 +392,6 @@ XMLPUBFUN int
|
|||||||
xmlIOHTTPClose (void * context);
|
xmlIOHTTPClose (void * context);
|
||||||
#endif /* LIBXML_HTTP_ENABLED */
|
#endif /* LIBXML_HTTP_ENABLED */
|
||||||
|
|
||||||
/**
|
|
||||||
* Default 'ftp://' protocol callbacks
|
|
||||||
*/
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlIOFTPMatch (const char *filename);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN void *
|
|
||||||
xmlIOFTPOpen (const char *filename);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlIOFTPRead (void * context,
|
|
||||||
char * buffer,
|
|
||||||
int len);
|
|
||||||
XML_DEPRECATED
|
|
||||||
XMLPUBFUN int
|
|
||||||
xmlIOFTPClose (void * context);
|
|
||||||
#endif /* defined(LIBXML_FTP_ENABLED) */
|
|
||||||
|
|
||||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||||
xmlParserInputBufferCreateFilenameDefault(
|
xmlParserInputBufferCreateFilenameDefault(
|
||||||
xmlParserInputBufferCreateFilenameFunc func);
|
xmlParserInputBufferCreateFilenameFunc func);
|
||||||
|
@ -127,15 +127,6 @@
|
|||||||
#define LIBXML_SAX1_ENABLED
|
#define LIBXML_SAX1_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* LIBXML_FTP_ENABLED:
|
|
||||||
*
|
|
||||||
* Whether the FTP support is configured in
|
|
||||||
*/
|
|
||||||
#if @WITH_FTP@
|
|
||||||
#define LIBXML_FTP_ENABLED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_HTTP_ENABLED:
|
* LIBXML_HTTP_ENABLED:
|
||||||
*
|
*
|
||||||
|
6
legacy.c
6
legacy.c
@ -1354,10 +1354,6 @@ cdataBlock(void *ctx, const xmlChar * value, int len)
|
|||||||
* nanoftp.h
|
* nanoftp.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBXML_FTP_ENABLED
|
|
||||||
|
|
||||||
#include <libxml/nanoftp.h>
|
|
||||||
|
|
||||||
/** DOC_DISABLE */
|
/** DOC_DISABLE */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -1597,8 +1593,6 @@ xmlIOFTPClose(void *context ATTRIBUTE_UNUSED) {
|
|||||||
|
|
||||||
/** DOC_ENABLE */
|
/** DOC_ENABLE */
|
||||||
|
|
||||||
#endif /* #ifndef LIBXML_FTP_ENABLED */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xpointer.h
|
* xpointer.h
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,6 @@ cc = meson.get_compiler('c')
|
|||||||
want_c14n = get_option('c14n')
|
want_c14n = get_option('c14n')
|
||||||
want_catalog = get_option('catalog')
|
want_catalog = get_option('catalog')
|
||||||
want_debug = get_option('debuging')
|
want_debug = get_option('debuging')
|
||||||
want_ftp = get_option('ftp')
|
|
||||||
want_history = get_option('history')
|
want_history = get_option('history')
|
||||||
want_html = get_option('html')
|
want_html = get_option('html')
|
||||||
want_http = get_option('http')
|
want_http = get_option('http')
|
||||||
@ -469,7 +468,7 @@ if sys_windows == true
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
### inet
|
### inet
|
||||||
if want_http == true or want_ftp == true
|
if want_http == true
|
||||||
if sys_windows == true
|
if sys_windows == true
|
||||||
ws2_dep = cc.find_library('ws2_32', required: true)
|
ws2_dep = cc.find_library('ws2_32', required: true)
|
||||||
xml_deps += ws2_dep
|
xml_deps += ws2_dep
|
||||||
@ -639,7 +638,6 @@ xml_opt_src = [
|
|||||||
[want_c14n, ['c14n.c']],
|
[want_c14n, ['c14n.c']],
|
||||||
[want_catalog, ['catalog.c']],
|
[want_catalog, ['catalog.c']],
|
||||||
[want_debug, ['debugXML.c']],
|
[want_debug, ['debugXML.c']],
|
||||||
[want_ftp, ['nanoftp.c']],
|
|
||||||
[want_html, ['HTMLparser.c', 'HTMLtree.c']],
|
[want_html, ['HTMLparser.c', 'HTMLtree.c']],
|
||||||
[want_http, ['nanohttp.c']],
|
[want_http, ['nanohttp.c']],
|
||||||
[want_legacy, ['legacy.c']],
|
[want_legacy, ['legacy.c']],
|
||||||
@ -806,7 +804,6 @@ summary(
|
|||||||
'c14n': want_c14n,
|
'c14n': want_c14n,
|
||||||
'catalog': want_catalog,
|
'catalog': want_catalog,
|
||||||
'debug': want_debug,
|
'debug': want_debug,
|
||||||
'ftp': want_ftp,
|
|
||||||
'history': want_history,
|
'history': want_history,
|
||||||
'html': want_html,
|
'html': want_html,
|
||||||
'http': want_http,
|
'http': want_http,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
# [X] c14n
|
# [X] c14n
|
||||||
# [X] catalog
|
# [X] catalog
|
||||||
# [X] debugging
|
# [X] debugging
|
||||||
# [X] ftp - not minimum
|
|
||||||
# [X] history
|
# [X] history
|
||||||
# [X] html
|
# [X] html
|
||||||
# [X] http
|
# [X] http
|
||||||
@ -59,12 +58,6 @@ option('debuging',
|
|||||||
description: 'Debugging module and shell'
|
description: 'Debugging module and shell'
|
||||||
)
|
)
|
||||||
|
|
||||||
option('ftp',
|
|
||||||
type: 'boolean',
|
|
||||||
value: false,
|
|
||||||
description: 'FTP support'
|
|
||||||
)
|
|
||||||
|
|
||||||
option('history',
|
option('history',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: false,
|
value: false,
|
||||||
|
8
parser.c
8
parser.c
@ -563,12 +563,6 @@ xmlHasFeature(xmlFeature feature)
|
|||||||
return(1);
|
return(1);
|
||||||
#else
|
#else
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
|
||||||
case XML_WITH_FTP:
|
|
||||||
#ifdef LIBXML_FTP_ENABLED
|
|
||||||
return(1);
|
|
||||||
#else
|
|
||||||
return(0);
|
|
||||||
#endif
|
#endif
|
||||||
case XML_WITH_HTTP:
|
case XML_WITH_HTTP:
|
||||||
#ifdef LIBXML_HTTP_ENABLED
|
#ifdef LIBXML_HTTP_ENABLED
|
||||||
@ -13531,7 +13525,7 @@ xmlCtxtSetOptionsInternal(xmlParserCtxtPtr ctxt, int options, int keepMask)
|
|||||||
*
|
*
|
||||||
* XML_PARSE_NONET
|
* XML_PARSE_NONET
|
||||||
*
|
*
|
||||||
* Disable network access with the builtin HTTP and FTP clients.
|
* Disable network access with the builtin HTTP client.
|
||||||
*
|
*
|
||||||
* XML_PARSE_NODICT
|
* XML_PARSE_NODICT
|
||||||
*
|
*
|
||||||
|
@ -2288,8 +2288,7 @@ xmlDefaultExternalEntityLoader(const char *url, const char *ID,
|
|||||||
|
|
||||||
if ((ctxt != NULL) &&
|
if ((ctxt != NULL) &&
|
||||||
(ctxt->options & XML_PARSE_NONET) &&
|
(ctxt->options & XML_PARSE_NONET) &&
|
||||||
((xmlStrncasecmp(BAD_CAST url, BAD_CAST "ftp://", 6) == 0) ||
|
(xmlStrncasecmp(BAD_CAST url, BAD_CAST "http://", 7) == 0)) {
|
||||||
(xmlStrncasecmp(BAD_CAST url, BAD_CAST "http://", 7) == 0))) {
|
|
||||||
xmlCtxtErrIO(ctxt, XML_IO_NETWORK_ATTEMPT, url);
|
xmlCtxtErrIO(ctxt, XML_IO_NETWORK_ATTEMPT, url);
|
||||||
} else {
|
} else {
|
||||||
input = xmlNewInputFromFile(ctxt, url);
|
input = xmlNewInputFromFile(ctxt, url);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include <libxml/parserInternals.h>
|
#include <libxml/parserInternals.h>
|
||||||
#include <libxml/catalog.h>
|
#include <libxml/catalog.h>
|
||||||
#include <libxml/threads.h>
|
#include <libxml/threads.h>
|
||||||
#include <libxml/nanoftp.h>
|
|
||||||
#include <libxml/nanohttp.h>
|
#include <libxml/nanohttp.h>
|
||||||
#include <libxml/uri.h>
|
#include <libxml/uri.h>
|
||||||
#include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
|
157
testapi.c
157
testapi.c
@ -183,7 +183,6 @@ int main(int argc, char **argv) {
|
|||||||
#include <libxml/entities.h>
|
#include <libxml/entities.h>
|
||||||
#include <libxml/hash.h>
|
#include <libxml/hash.h>
|
||||||
#include <libxml/list.h>
|
#include <libxml/list.h>
|
||||||
#include <libxml/nanoftp.h>
|
|
||||||
#include <libxml/nanohttp.h>
|
#include <libxml/nanohttp.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/parserInternals.h>
|
#include <libxml/parserInternals.h>
|
||||||
@ -28533,156 +28532,6 @@ test_xmlFileRead(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
test_xmlIOFTPClose(void) {
|
|
||||||
int test_ret = 0;
|
|
||||||
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
int mem_base;
|
|
||||||
int ret_val;
|
|
||||||
void * context; /* the I/O context */
|
|
||||||
int n_context;
|
|
||||||
|
|
||||||
for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
|
|
||||||
mem_base = xmlMemBlocks();
|
|
||||||
context = gen_void_ptr(n_context, 0);
|
|
||||||
|
|
||||||
ret_val = xmlIOFTPClose(context);
|
|
||||||
desret_int(ret_val);
|
|
||||||
call_tests++;
|
|
||||||
des_void_ptr(n_context, context, 0);
|
|
||||||
xmlResetLastError();
|
|
||||||
if (mem_base != xmlMemBlocks()) {
|
|
||||||
printf("Leak of %d blocks found in xmlIOFTPClose",
|
|
||||||
xmlMemBlocks() - mem_base);
|
|
||||||
test_ret++;
|
|
||||||
printf(" %d", n_context);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function_tests++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(test_ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
test_xmlIOFTPMatch(void) {
|
|
||||||
int test_ret = 0;
|
|
||||||
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
int mem_base;
|
|
||||||
int ret_val;
|
|
||||||
const char * filename; /* the URI for matching */
|
|
||||||
int n_filename;
|
|
||||||
|
|
||||||
for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
|
|
||||||
mem_base = xmlMemBlocks();
|
|
||||||
filename = gen_filepath(n_filename, 0);
|
|
||||||
|
|
||||||
ret_val = xmlIOFTPMatch(filename);
|
|
||||||
desret_int(ret_val);
|
|
||||||
call_tests++;
|
|
||||||
des_filepath(n_filename, filename, 0);
|
|
||||||
xmlResetLastError();
|
|
||||||
if (mem_base != xmlMemBlocks()) {
|
|
||||||
printf("Leak of %d blocks found in xmlIOFTPMatch",
|
|
||||||
xmlMemBlocks() - mem_base);
|
|
||||||
test_ret++;
|
|
||||||
printf(" %d", n_filename);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function_tests++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(test_ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
test_xmlIOFTPOpen(void) {
|
|
||||||
int test_ret = 0;
|
|
||||||
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
int mem_base;
|
|
||||||
void * ret_val;
|
|
||||||
const char * filename; /* the URI for matching */
|
|
||||||
int n_filename;
|
|
||||||
|
|
||||||
for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
|
|
||||||
mem_base = xmlMemBlocks();
|
|
||||||
filename = gen_filepath(n_filename, 0);
|
|
||||||
|
|
||||||
ret_val = xmlIOFTPOpen(filename);
|
|
||||||
desret_void_ptr(ret_val);
|
|
||||||
call_tests++;
|
|
||||||
des_filepath(n_filename, filename, 0);
|
|
||||||
xmlResetLastError();
|
|
||||||
if (mem_base != xmlMemBlocks()) {
|
|
||||||
printf("Leak of %d blocks found in xmlIOFTPOpen",
|
|
||||||
xmlMemBlocks() - mem_base);
|
|
||||||
test_ret++;
|
|
||||||
printf(" %d", n_filename);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function_tests++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(test_ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
test_xmlIOFTPRead(void) {
|
|
||||||
int test_ret = 0;
|
|
||||||
|
|
||||||
#if defined(LIBXML_FTP_ENABLED)
|
|
||||||
int mem_base;
|
|
||||||
int ret_val;
|
|
||||||
void * context; /* the I/O context */
|
|
||||||
int n_context;
|
|
||||||
char * buffer; /* where to drop data */
|
|
||||||
int n_buffer;
|
|
||||||
int len; /* number of bytes to write */
|
|
||||||
int n_len;
|
|
||||||
|
|
||||||
for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
|
|
||||||
for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
|
|
||||||
for (n_len = 0;n_len < gen_nb_int;n_len++) {
|
|
||||||
mem_base = xmlMemBlocks();
|
|
||||||
context = gen_void_ptr(n_context, 0);
|
|
||||||
buffer = gen_char_ptr(n_buffer, 1);
|
|
||||||
len = gen_int(n_len, 2);
|
|
||||||
|
|
||||||
ret_val = xmlIOFTPRead(context, buffer, len);
|
|
||||||
desret_int(ret_val);
|
|
||||||
call_tests++;
|
|
||||||
des_void_ptr(n_context, context, 0);
|
|
||||||
des_char_ptr(n_buffer, buffer, 1);
|
|
||||||
des_int(n_len, len, 2);
|
|
||||||
xmlResetLastError();
|
|
||||||
if (mem_base != xmlMemBlocks()) {
|
|
||||||
printf("Leak of %d blocks found in xmlIOFTPRead",
|
|
||||||
xmlMemBlocks() - mem_base);
|
|
||||||
test_ret++;
|
|
||||||
printf(" %d", n_context);
|
|
||||||
printf(" %d", n_buffer);
|
|
||||||
printf(" %d", n_len);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function_tests++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(test_ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
test_xmlIOHTTPClose(void) {
|
test_xmlIOHTTPClose(void) {
|
||||||
int test_ret = 0;
|
int test_ret = 0;
|
||||||
@ -29783,7 +29632,7 @@ static int
|
|||||||
test_xmlIO(void) {
|
test_xmlIO(void) {
|
||||||
int test_ret = 0;
|
int test_ret = 0;
|
||||||
|
|
||||||
if (quiet == 0) printf("Testing xmlIO : 41 of 55 functions ...\n");
|
if (quiet == 0) printf("Testing xmlIO : 37 of 51 functions ...\n");
|
||||||
test_ret += test_xmlAllocOutputBuffer();
|
test_ret += test_xmlAllocOutputBuffer();
|
||||||
test_ret += test_xmlAllocParserInputBuffer();
|
test_ret += test_xmlAllocParserInputBuffer();
|
||||||
test_ret += test_xmlCheckFilename();
|
test_ret += test_xmlCheckFilename();
|
||||||
@ -29794,10 +29643,6 @@ test_xmlIO(void) {
|
|||||||
test_ret += test_xmlFileMatch();
|
test_ret += test_xmlFileMatch();
|
||||||
test_ret += test_xmlFileOpen();
|
test_ret += test_xmlFileOpen();
|
||||||
test_ret += test_xmlFileRead();
|
test_ret += test_xmlFileRead();
|
||||||
test_ret += test_xmlIOFTPClose();
|
|
||||||
test_ret += test_xmlIOFTPMatch();
|
|
||||||
test_ret += test_xmlIOFTPOpen();
|
|
||||||
test_ret += test_xmlIOFTPRead();
|
|
||||||
test_ret += test_xmlIOHTTPClose();
|
test_ret += test_xmlIOHTTPClose();
|
||||||
test_ret += test_xmlIOHTTPMatch();
|
test_ret += test_xmlIOHTTPMatch();
|
||||||
test_ret += test_xmlIOHTTPOpen();
|
test_ret += test_xmlIOHTTPOpen();
|
||||||
|
@ -77,7 +77,7 @@ LIBS = $(LIBS) cw32i.lib
|
|||||||
!else
|
!else
|
||||||
LIBS = $(LIBS) cw32.lib
|
LIBS = $(LIBS) cw32.lib
|
||||||
!endif
|
!endif
|
||||||
!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
|
!if "$(WITH_HTTP)" == "1"
|
||||||
LIBS = $(LIBS) wsock32.lib ws2_32.lib
|
LIBS = $(LIBS) wsock32.lib ws2_32.lib
|
||||||
!endif
|
!endif
|
||||||
!if "$(WITH_ICONV)" == "1"
|
!if "$(WITH_ICONV)" == "1"
|
||||||
@ -125,7 +125,6 @@ XML_OBJS = $(XML_INTDIR)\buf.obj\
|
|||||||
$(XML_INTDIR)\HTMLtree.obj\
|
$(XML_INTDIR)\HTMLtree.obj\
|
||||||
$(XML_INTDIR)\legacy.obj\
|
$(XML_INTDIR)\legacy.obj\
|
||||||
$(XML_INTDIR)\list.obj\
|
$(XML_INTDIR)\list.obj\
|
||||||
$(XML_INTDIR)\nanoftp.obj\
|
|
||||||
$(XML_INTDIR)\nanohttp.obj\
|
$(XML_INTDIR)\nanohttp.obj\
|
||||||
$(XML_INTDIR)\parser.obj\
|
$(XML_INTDIR)\parser.obj\
|
||||||
$(XML_INTDIR)\parserInternals.obj\
|
$(XML_INTDIR)\parserInternals.obj\
|
||||||
@ -170,7 +169,6 @@ XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\
|
|||||||
$(XML_INTDIR_A)\HTMLtree.obj\
|
$(XML_INTDIR_A)\HTMLtree.obj\
|
||||||
$(XML_INTDIR_A)\legacy.obj\
|
$(XML_INTDIR_A)\legacy.obj\
|
||||||
$(XML_INTDIR_A)\list.obj\
|
$(XML_INTDIR_A)\list.obj\
|
||||||
$(XML_INTDIR_A)\nanoftp.obj\
|
|
||||||
$(XML_INTDIR_A)\nanohttp.obj\
|
$(XML_INTDIR_A)\nanohttp.obj\
|
||||||
$(XML_INTDIR_A)\parser.obj\
|
$(XML_INTDIR_A)\parser.obj\
|
||||||
$(XML_INTDIR_A)\parserInternals.obj\
|
$(XML_INTDIR_A)\parserInternals.obj\
|
||||||
|
@ -52,9 +52,6 @@ LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
|
|||||||
LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
|
LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
|
||||||
LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
|
LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
|
||||||
LIBS =
|
LIBS =
|
||||||
ifeq ($(WITH_FTP),1)
|
|
||||||
LIBS += -lwsock32 -lws2_32
|
|
||||||
endif
|
|
||||||
ifeq ($(WITH_HTTP),1)
|
ifeq ($(WITH_HTTP),1)
|
||||||
LIBS += -lwsock32 -lws2_32
|
LIBS += -lwsock32 -lws2_32
|
||||||
endif
|
endif
|
||||||
@ -108,7 +105,6 @@ XML_OBJS = $(XML_INTDIR)/buf.o\
|
|||||||
$(XML_INTDIR)/HTMLtree.o\
|
$(XML_INTDIR)/HTMLtree.o\
|
||||||
$(XML_INTDIR)/legacy.o\
|
$(XML_INTDIR)/legacy.o\
|
||||||
$(XML_INTDIR)/list.o\
|
$(XML_INTDIR)/list.o\
|
||||||
$(XML_INTDIR)/nanoftp.o\
|
|
||||||
$(XML_INTDIR)/nanohttp.o\
|
$(XML_INTDIR)/nanohttp.o\
|
||||||
$(XML_INTDIR)/parser.o\
|
$(XML_INTDIR)/parser.o\
|
||||||
$(XML_INTDIR)/parserInternals.o\
|
$(XML_INTDIR)/parserInternals.o\
|
||||||
@ -155,7 +151,6 @@ XML_OBJS_A = $(XML_INTDIR_A)/buf.o\
|
|||||||
$(XML_INTDIR_A)/HTMLtree.o\
|
$(XML_INTDIR_A)/HTMLtree.o\
|
||||||
$(XML_INTDIR_A)/legacy.o\
|
$(XML_INTDIR_A)/legacy.o\
|
||||||
$(XML_INTDIR_A)/list.o\
|
$(XML_INTDIR_A)/list.o\
|
||||||
$(XML_INTDIR_A)/nanoftp.o\
|
|
||||||
$(XML_INTDIR_A)/nanohttp.o\
|
$(XML_INTDIR_A)/nanohttp.o\
|
||||||
$(XML_INTDIR_A)/parser.o\
|
$(XML_INTDIR_A)/parser.o\
|
||||||
$(XML_INTDIR_A)/parserInternals.o\
|
$(XML_INTDIR_A)/parserInternals.o\
|
||||||
|
@ -54,7 +54,7 @@ LD = link.exe
|
|||||||
LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
|
LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
|
||||||
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
|
||||||
LIBS =
|
LIBS =
|
||||||
!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
|
!if "$(WITH_HTTP)" == "1"
|
||||||
LIBS = $(LIBS) wsock32.lib ws2_32.lib
|
LIBS = $(LIBS) wsock32.lib ws2_32.lib
|
||||||
!endif
|
!endif
|
||||||
!if "$(WITH_ICONV)" == "1"
|
!if "$(WITH_ICONV)" == "1"
|
||||||
@ -118,7 +118,6 @@ XML_OBJS = $(XML_INTDIR)\buf.obj\
|
|||||||
$(XML_INTDIR)\HTMLtree.obj\
|
$(XML_INTDIR)\HTMLtree.obj\
|
||||||
$(XML_INTDIR)\legacy.obj\
|
$(XML_INTDIR)\legacy.obj\
|
||||||
$(XML_INTDIR)\list.obj\
|
$(XML_INTDIR)\list.obj\
|
||||||
$(XML_INTDIR)\nanoftp.obj\
|
|
||||||
$(XML_INTDIR)\nanohttp.obj\
|
$(XML_INTDIR)\nanohttp.obj\
|
||||||
$(XML_INTDIR)\parser.obj\
|
$(XML_INTDIR)\parser.obj\
|
||||||
$(XML_INTDIR)\parserInternals.obj\
|
$(XML_INTDIR)\parserInternals.obj\
|
||||||
@ -163,7 +162,6 @@ XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\
|
|||||||
$(XML_INTDIR_A)\HTMLtree.obj\
|
$(XML_INTDIR_A)\HTMLtree.obj\
|
||||||
$(XML_INTDIR_A)\legacy.obj\
|
$(XML_INTDIR_A)\legacy.obj\
|
||||||
$(XML_INTDIR_A)\list.obj\
|
$(XML_INTDIR_A)\list.obj\
|
||||||
$(XML_INTDIR_A)\nanoftp.obj\
|
|
||||||
$(XML_INTDIR_A)\nanohttp.obj\
|
$(XML_INTDIR_A)\nanohttp.obj\
|
||||||
$(XML_INTDIR_A)\parser.obj\
|
$(XML_INTDIR_A)\parser.obj\
|
||||||
$(XML_INTDIR_A)\parserInternals.obj\
|
$(XML_INTDIR_A)\parserInternals.obj\
|
||||||
@ -208,7 +206,6 @@ XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\buf.obj\
|
|||||||
$(XML_INTDIR_A_DLL)\HTMLtree.obj\
|
$(XML_INTDIR_A_DLL)\HTMLtree.obj\
|
||||||
$(XML_INTDIR_A_DLL)\legacy.obj\
|
$(XML_INTDIR_A_DLL)\legacy.obj\
|
||||||
$(XML_INTDIR_A_DLL)\list.obj\
|
$(XML_INTDIR_A_DLL)\list.obj\
|
||||||
$(XML_INTDIR_A_DLL)\nanoftp.obj\
|
|
||||||
$(XML_INTDIR_A_DLL)\nanohttp.obj\
|
$(XML_INTDIR_A_DLL)\nanohttp.obj\
|
||||||
$(XML_INTDIR_A_DLL)\parser.obj\
|
$(XML_INTDIR_A_DLL)\parser.obj\
|
||||||
$(XML_INTDIR_A_DLL)\parserInternals.obj\
|
$(XML_INTDIR_A_DLL)\parserInternals.obj\
|
||||||
|
@ -29,7 +29,6 @@ var verCvs;
|
|||||||
var useCvsVer = true;
|
var useCvsVer = true;
|
||||||
/* Libxml features. */
|
/* Libxml features. */
|
||||||
var withThreads = "native";
|
var withThreads = "native";
|
||||||
var withFtp = true;
|
|
||||||
var withHttp = true;
|
var withHttp = true;
|
||||||
var withHtml = true;
|
var withHtml = true;
|
||||||
var withC14n = true;
|
var withC14n = true;
|
||||||
@ -112,7 +111,6 @@ function usage()
|
|||||||
txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
|
txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
|
||||||
txt += "\nXML processor options, default value given in parentheses:\n\n";
|
txt += "\nXML processor options, default value given in parentheses:\n\n";
|
||||||
txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
|
txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
|
||||||
txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n";
|
|
||||||
txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
|
txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
|
||||||
txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
|
txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
|
||||||
txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
|
txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
|
||||||
@ -206,7 +204,6 @@ function discoverVersion()
|
|||||||
vf.WriteLine("XML_SRCDIR=" + srcDirXml);
|
vf.WriteLine("XML_SRCDIR=" + srcDirXml);
|
||||||
vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
|
vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
|
||||||
vf.WriteLine("WITH_THREADS=" + withThreads);
|
vf.WriteLine("WITH_THREADS=" + withThreads);
|
||||||
vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
|
|
||||||
vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
|
vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
|
||||||
vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
|
vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
|
||||||
vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
|
vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
|
||||||
@ -294,8 +291,6 @@ function configureLibxml()
|
|||||||
of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
|
of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
|
||||||
} else if (s.search(/\@WITH_THREAD_ALLOC\@/) != -1) {
|
} else if (s.search(/\@WITH_THREAD_ALLOC\@/) != -1) {
|
||||||
of.WriteLine(s.replace(/\@WITH_THREAD_ALLOC\@/, "0"));
|
of.WriteLine(s.replace(/\@WITH_THREAD_ALLOC\@/, "0"));
|
||||||
} else if (s.search(/\@WITH_FTP\@/) != -1) {
|
|
||||||
of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
|
|
||||||
} else if (s.search(/\@WITH_HTTP\@/) != -1) {
|
} else if (s.search(/\@WITH_HTTP\@/) != -1) {
|
||||||
of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
|
of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
|
||||||
} else if (s.search(/\@WITH_HTML\@/) != -1) {
|
} else if (s.search(/\@WITH_HTML\@/) != -1) {
|
||||||
@ -443,8 +438,6 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
|
|||||||
if (opt.length > 0) {
|
if (opt.length > 0) {
|
||||||
if (opt == "threads")
|
if (opt == "threads")
|
||||||
withThreads = arg.substring(opt.length + 1, arg.length);
|
withThreads = arg.substring(opt.length + 1, arg.length);
|
||||||
else if (opt == "ftp")
|
|
||||||
withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
|
|
||||||
else if (opt == "http")
|
else if (opt == "http")
|
||||||
withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
|
withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
|
||||||
else if (opt == "html")
|
else if (opt == "html")
|
||||||
@ -634,7 +627,6 @@ WScript.Echo("Created config.h.");
|
|||||||
var txtOut = "\nXML processor configuration\n";
|
var txtOut = "\nXML processor configuration\n";
|
||||||
txtOut += "---------------------------\n";
|
txtOut += "---------------------------\n";
|
||||||
txtOut += " Thread safety: " + withThreads + "\n";
|
txtOut += " Thread safety: " + withThreads + "\n";
|
||||||
txtOut += " FTP client: " + boolToStr(withFtp) + "\n";
|
|
||||||
txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
|
txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
|
||||||
txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
|
txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
|
||||||
txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
|
txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
|
||||||
|
88
xmlIO.c
88
xmlIO.c
@ -40,7 +40,6 @@
|
|||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libxml/uri.h>
|
#include <libxml/uri.h>
|
||||||
#include <libxml/nanohttp.h>
|
#include <libxml/nanohttp.h>
|
||||||
#include <libxml/nanoftp.h>
|
|
||||||
#include <libxml/parserInternals.h>
|
#include <libxml/parserInternals.h>
|
||||||
#include <libxml/xmlerror.h>
|
#include <libxml/xmlerror.h>
|
||||||
#ifdef LIBXML_CATALOG_ENABLED
|
#ifdef LIBXML_CATALOG_ENABLED
|
||||||
@ -1013,78 +1012,6 @@ xmlIOHTTPClose (void * context) {
|
|||||||
}
|
}
|
||||||
#endif /* LIBXML_HTTP_ENABLED */
|
#endif /* LIBXML_HTTP_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_FTP_ENABLED
|
|
||||||
/************************************************************************
|
|
||||||
* *
|
|
||||||
* I/O for FTP file accesses *
|
|
||||||
* *
|
|
||||||
************************************************************************/
|
|
||||||
/**
|
|
||||||
* xmlIOFTPMatch:
|
|
||||||
* @filename: the URI for matching
|
|
||||||
*
|
|
||||||
* DEPRECATED: Internal function, don't use.
|
|
||||||
*
|
|
||||||
* check if the URI matches an FTP one
|
|
||||||
*
|
|
||||||
* Returns 1 if matches, 0 otherwise
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
xmlIOFTPMatch (const char *filename) {
|
|
||||||
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "ftp://", 6))
|
|
||||||
return(1);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlIOFTPOpen:
|
|
||||||
* @filename: the URI for matching
|
|
||||||
*
|
|
||||||
* DEPRECATED: Internal function, don't use.
|
|
||||||
*
|
|
||||||
* open an FTP I/O channel
|
|
||||||
*
|
|
||||||
* Returns an I/O context or NULL in case of error
|
|
||||||
*/
|
|
||||||
void *
|
|
||||||
xmlIOFTPOpen (const char *filename) {
|
|
||||||
return(xmlNanoFTPOpen(filename));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlIOFTPRead:
|
|
||||||
* @context: the I/O context
|
|
||||||
* @buffer: where to drop data
|
|
||||||
* @len: number of bytes to write
|
|
||||||
*
|
|
||||||
* DEPRECATED: Internal function, don't use.
|
|
||||||
*
|
|
||||||
* Read @len bytes to @buffer from the I/O channel.
|
|
||||||
*
|
|
||||||
* Returns the number of bytes written
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
xmlIOFTPRead(void * context, char * buffer, int len) {
|
|
||||||
if ((buffer == NULL) || (len < 0)) return(-1);
|
|
||||||
return(xmlNanoFTPRead(context, &buffer[0], len));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlIOFTPClose:
|
|
||||||
* @context: the I/O context
|
|
||||||
*
|
|
||||||
* DEPRECATED: Internal function, don't use.
|
|
||||||
*
|
|
||||||
* Close an FTP I/O channel
|
|
||||||
*
|
|
||||||
* Returns 0
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
xmlIOFTPClose (void * context) {
|
|
||||||
return ( xmlNanoFTPClose(context) );
|
|
||||||
}
|
|
||||||
#endif /* LIBXML_FTP_ENABLED */
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Input/output buffers *
|
* Input/output buffers *
|
||||||
@ -1113,21 +1040,6 @@ xmlInputDefaultOpen(xmlParserInputBufferPtr buf, const char *filename,
|
|||||||
/* Avoid unused variable warning */
|
/* Avoid unused variable warning */
|
||||||
(void) flags;
|
(void) flags;
|
||||||
|
|
||||||
#ifdef LIBXML_FTP_ENABLED
|
|
||||||
if (xmlIOFTPMatch(filename)) {
|
|
||||||
if ((flags & XML_INPUT_NETWORK) == 0)
|
|
||||||
return(XML_IO_NETWORK_ATTEMPT);
|
|
||||||
|
|
||||||
buf->context = xmlIOFTPOpen(filename);
|
|
||||||
|
|
||||||
if (buf->context != NULL) {
|
|
||||||
buf->readcallback = xmlIOFTPRead;
|
|
||||||
buf->closecallback = xmlIOFTPClose;
|
|
||||||
return(XML_ERR_OK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* LIBXML_FTP_ENABLED */
|
|
||||||
|
|
||||||
#ifdef LIBXML_HTTP_ENABLED
|
#ifdef LIBXML_HTTP_ENABLED
|
||||||
if (xmlIOHTTPMatch(filename)) {
|
if (xmlIOHTTPMatch(filename)) {
|
||||||
if ((flags & XML_INPUT_NETWORK) == 0)
|
if ((flags & XML_INPUT_NETWORK) == 0)
|
||||||
|
@ -2882,7 +2882,6 @@ static void showVersion(const char *name) {
|
|||||||
if (xmlHasFeature(XML_WITH_PATTERN)) fprintf(ERR_STREAM, "Patterns ");
|
if (xmlHasFeature(XML_WITH_PATTERN)) fprintf(ERR_STREAM, "Patterns ");
|
||||||
if (xmlHasFeature(XML_WITH_WRITER)) fprintf(ERR_STREAM, "Writer ");
|
if (xmlHasFeature(XML_WITH_WRITER)) fprintf(ERR_STREAM, "Writer ");
|
||||||
if (xmlHasFeature(XML_WITH_SAX1)) fprintf(ERR_STREAM, "SAXv1 ");
|
if (xmlHasFeature(XML_WITH_SAX1)) fprintf(ERR_STREAM, "SAXv1 ");
|
||||||
if (xmlHasFeature(XML_WITH_FTP)) fprintf(ERR_STREAM, "FTP ");
|
|
||||||
if (xmlHasFeature(XML_WITH_HTTP)) fprintf(ERR_STREAM, "HTTP ");
|
if (xmlHasFeature(XML_WITH_HTTP)) fprintf(ERR_STREAM, "HTTP ");
|
||||||
if (xmlHasFeature(XML_WITH_VALID)) fprintf(ERR_STREAM, "DTDValid ");
|
if (xmlHasFeature(XML_WITH_VALID)) fprintf(ERR_STREAM, "DTDValid ");
|
||||||
if (xmlHasFeature(XML_WITH_HTML)) fprintf(ERR_STREAM, "HTML ");
|
if (xmlHasFeature(XML_WITH_HTML)) fprintf(ERR_STREAM, "HTML ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user