Updated libxml.
Change-Id: I4f2315f10227e6b8c2545b81ea1adcf388c37cee
This commit is contained in:
parent
1fbc410489
commit
f169bccdc9
|
@ -4,7 +4,7 @@
|
|||
|
||||
# Define an "os_include" variable that points at the OS-specific generated
|
||||
# headers. These were generated by running the configure script offline.
|
||||
if (is_linux || is_android) {
|
||||
if (is_linux || is_android || is_nacl) {
|
||||
os_include = "linux"
|
||||
} else if (is_mac || is_ios) {
|
||||
os_include = "mac"
|
||||
|
@ -24,36 +24,92 @@ config("libxml_config") {
|
|||
]
|
||||
}
|
||||
|
||||
config("libxml_warnings") {
|
||||
if (is_win) {
|
||||
cflags_c = [
|
||||
"/wd4018", # Signed/unsigned mismatch in comparison.
|
||||
"/wd4267", # TODO(brucedawson): http://crbug.com/554200 fix C4267
|
||||
"/wd4311", # and C4311 warnings.
|
||||
]
|
||||
}
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
# libxml passes `const unsigned char*` through `const char*`.
|
||||
"-Wno-pointer-sign",
|
||||
|
||||
# pattern.c and uri.c both have an intentional `for (...);` /
|
||||
# `while(...);` loop. I submitted a patch to move the `'` to its own
|
||||
# line, but until that's landed suppress the warning:
|
||||
"-Wno-empty-body",
|
||||
|
||||
# debugXML.c compares array 'arg' to NULL.
|
||||
"-Wno-tautological-pointer-compare",
|
||||
|
||||
# threads.c attempts to forward declare a pthread_equal which doesn't
|
||||
# match the prototype in pthreads.h
|
||||
"-Wno-ignored-attributes",
|
||||
|
||||
# libxml casts from int to long to void*.
|
||||
"-Wno-int-to-void-pointer-cast",
|
||||
|
||||
# libxml passes a volatile LPCRITICAL_SECTION* to a function expecting
|
||||
# a void* volatile*.
|
||||
"-Wno-incompatible-pointer-types",
|
||||
|
||||
# trio_is_special_quantity and trio_is_negative are only
|
||||
# used with certain preprocessor defines set.
|
||||
"-Wno-unused-function",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
static_library("libxml") {
|
||||
output_name = "libxml2"
|
||||
sources = [
|
||||
"chromium/libxml_utils.h",
|
||||
"chromium/libxml_utils.cc",
|
||||
"chromium/libxml_utils.h",
|
||||
"linux/config.h",
|
||||
"linux/include/libxml/xmlversion.h",
|
||||
"mac/config.h",
|
||||
"mac/include/libxml/xmlversion.h",
|
||||
"src/DOCBparser.c",
|
||||
"src/HTMLparser.c",
|
||||
"src/HTMLtree.c",
|
||||
"src/SAX.c",
|
||||
"src/SAX2.c",
|
||||
"src/buf.c",
|
||||
"src/buf.h",
|
||||
"src/c14n.c",
|
||||
"src/catalog.c",
|
||||
"src/chvalid.c",
|
||||
"src/debugXML.c",
|
||||
"src/dict.c",
|
||||
"src/elfgcchack.h",
|
||||
"src/enc.h",
|
||||
"src/encoding.c",
|
||||
"src/entities.c",
|
||||
"src/error.c",
|
||||
"src/globals.c",
|
||||
"src/hash.c",
|
||||
"src/include/libxml/DOCBparser.h",
|
||||
"src/include/libxml/HTMLparser.h",
|
||||
"src/include/libxml/HTMLtree.h",
|
||||
"src/include/libxml/SAX.h",
|
||||
"src/include/libxml/SAX2.h",
|
||||
"src/include/libxml/c14n.h",
|
||||
"src/include/libxml/catalog.h",
|
||||
"src/include/libxml/chvalid.h",
|
||||
"src/include/libxml/debugXML.h",
|
||||
"src/include/libxml/dict.h",
|
||||
"src/include/libxml/DOCBparser.h",
|
||||
"src/include/libxml/encoding.h",
|
||||
"src/include/libxml/entities.h",
|
||||
"src/include/libxml/globals.h",
|
||||
"src/include/libxml/hash.h",
|
||||
"src/include/libxml/HTMLparser.h",
|
||||
"src/include/libxml/HTMLtree.h",
|
||||
"src/include/libxml/list.h",
|
||||
"src/include/libxml/nanoftp.h",
|
||||
"src/include/libxml/nanohttp.h",
|
||||
"src/include/libxml/parser.h",
|
||||
"src/include/libxml/parserInternals.h",
|
||||
"src/include/libxml/pattern.h",
|
||||
"src/include/libxml/relaxng.h",
|
||||
"src/include/libxml/SAX.h",
|
||||
"src/include/libxml/SAX2.h",
|
||||
"src/include/libxml/schemasInternals.h",
|
||||
"src/include/libxml/schematron.h",
|
||||
"src/include/libxml/threads.h",
|
||||
|
@ -62,10 +118,10 @@ static_library("libxml") {
|
|||
"src/include/libxml/valid.h",
|
||||
"src/include/libxml/xinclude.h",
|
||||
"src/include/libxml/xlink.h",
|
||||
"src/include/libxml/xmlIO.h",
|
||||
"src/include/libxml/xmlautomata.h",
|
||||
"src/include/libxml/xmlerror.h",
|
||||
"src/include/libxml/xmlexports.h",
|
||||
"src/include/libxml/xmlIO.h",
|
||||
"src/include/libxml/xmlmemory.h",
|
||||
"src/include/libxml/xmlmodule.h",
|
||||
"src/include/libxml/xmlreader.h",
|
||||
|
@ -81,35 +137,19 @@ static_library("libxml") {
|
|||
"src/include/libxml/xpointer.h",
|
||||
"src/include/win32config.h",
|
||||
"src/include/wsockcompat.h",
|
||||
"src/acconfig.h",
|
||||
"src/c14n.c",
|
||||
"src/catalog.c",
|
||||
"src/chvalid.c",
|
||||
"src/debugXML.c",
|
||||
"src/dict.c",
|
||||
"src/DOCBparser.c",
|
||||
"src/elfgcchack.h",
|
||||
"src/encoding.c",
|
||||
"src/entities.c",
|
||||
"src/error.c",
|
||||
"src/globals.c",
|
||||
"src/hash.c",
|
||||
"src/HTMLparser.c",
|
||||
"src/HTMLtree.c",
|
||||
"src/legacy.c",
|
||||
"src/libxml.h",
|
||||
"src/list.c",
|
||||
"src/nanoftp.c",
|
||||
"src/nanohttp.c",
|
||||
"src/parser.c",
|
||||
"src/parserInternals.c",
|
||||
"src/pattern.c",
|
||||
"src/relaxng.c",
|
||||
"src/SAX.c",
|
||||
"src/SAX2.c",
|
||||
"src/save.h",
|
||||
"src/schematron.c",
|
||||
"src/threads.c",
|
||||
"src/timsort.h",
|
||||
"src/tree.c",
|
||||
|
||||
#"src/trio.c",
|
||||
#"src/trio.h",
|
||||
#"src/triodef.h",
|
||||
|
@ -135,26 +175,30 @@ static_library("libxml") {
|
|||
"src/xmlwriter.c",
|
||||
"src/xpath.c",
|
||||
"src/xpointer.c",
|
||||
|
||||
#"src/xzlib.c",
|
||||
"src/xzlib.h",
|
||||
"win32/config.h",
|
||||
"win32/include/libxml/xmlversion.h",
|
||||
]
|
||||
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
configs += [
|
||||
"//build/config/compiler:no_chromium_code",
|
||||
|
||||
direct_dependent_configs = [ ":libxml_config" ]
|
||||
forward_dependent_configs_from = [ "//third_party/icu:icuuc" ]
|
||||
# Must be after no_chromium_code for warning flags to be ordered correctly.
|
||||
":libxml_warnings",
|
||||
]
|
||||
|
||||
deps = [
|
||||
public_configs = [ ":libxml_config" ]
|
||||
public_deps = [
|
||||
"//third_party/icu:icuuc",
|
||||
]
|
||||
deps = [
|
||||
"//third_party/zlib",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
cflags_c = [
|
||||
"/wd4101", # Unreferenced local variable.
|
||||
]
|
||||
} else if (is_mac || is_android) {
|
||||
if (is_mac || is_ios || is_android) {
|
||||
# http://www.xmlsoft.org/threads.html says that this is required when using
|
||||
# libxml from several threads, which can possibly happen in chrome. On
|
||||
# linux, this is picked up by transitivity from pkg-config output from
|
||||
|
@ -162,22 +206,5 @@ static_library("libxml") {
|
|||
defines = [ "_REENTRANT" ]
|
||||
}
|
||||
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
# libxml passes `const unsigned char*` through `const char*`.
|
||||
"-Wno-pointer-sign",
|
||||
|
||||
# pattern.c and uri.c both have an intentional `for (...);` /
|
||||
# `while(...);` loop. I submitted a patch to move the `'` to its own
|
||||
# line, but until that's landed suppress the warning:
|
||||
"-Wno-empty-body",
|
||||
|
||||
# debugXML.c compares array 'arg' to NULL.
|
||||
"-Wno-tautological-pointer-compare",
|
||||
]
|
||||
}
|
||||
|
||||
include_dirs = [
|
||||
"$os_include",
|
||||
]
|
||||
include_dirs = [ "$os_include" ]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
include_rules = [
|
||||
'+libxml',
|
||||
]
|
|
@ -0,0 +1,5 @@
|
|||
# There's no real owners here. If you're familiar with the code please send
|
||||
# a CL to add yourself here.
|
||||
cpu@chromium.org
|
||||
dominicc@chromium.org
|
||||
scottmg@chromium.org
|
|
@ -1,59 +1,55 @@
|
|||
Name: libxml
|
||||
URL: http://xmlsoft.org
|
||||
Version: 2.7.7
|
||||
Version: bdec2183f34b37ee89ae1d330c6ad2bb4d76605f
|
||||
License: MIT
|
||||
License File: src/Copyright
|
||||
Security Critical: yes
|
||||
|
||||
Description:
|
||||
The src/ directory contains a partial snapshot of the libxml library
|
||||
with the patches in the patches/ directories applied.
|
||||
See the files in that directory for discussion of their effects.
|
||||
|
||||
Current version: 2.7.7.
|
||||
libxml2 from libxml.org.
|
||||
|
||||
Modifications:
|
||||
- Converted to utf-8 with: vim +"argdo write ++enc=utf-8" *.c
|
||||
- Import XPath fix http://git.gnome.org/browse/libxml2/commit/?id=91d19754d46acd4a639a8b9e31f50f31c78f8c9c
|
||||
- Import follow-on for above commit: http://git.gnome.org/browse/libxml2/commit/?id=ea90b894146030c214a7df6d8375310174f134b9
|
||||
- Import additional XPath fix http://git.gnome.org/browse/libxml2/commit/?id=df83c17e5a2646bd923f75e5e507bc80d73c9722
|
||||
- Import follow-on fix for above commit: http://git.gnome.org/browse/libxml2/commit/?id=fec31bcd452e77c10579467ca87a785b41115de6
|
||||
- And a follow-on fix to the previous two fixes, committed upstream: http://git.gnome.org/browse/libxml2/commit/?id=f5048b3e71fc30ad096970b8df6e7af073bae4cb (slightly differently, but we can drop our local fix on the next roll).
|
||||
- Add a fix for handling of unknown namespaces, commit upstream is pending.
|
||||
- Add fixes for ending the parse properly if a SAX callback calls xmlStopParser(), commit upstream is pending.
|
||||
- Add fix for entities, commit upstream is http://git.gnome.org/browse/libxml2/commit/?id=5bd3c061823a8499b27422aee04ea20aae24f03e
|
||||
- Import UTF-8 fix from upstream: http://git.gnome.org/browse/libxml2/commit/?id=0795348aeb86648723bc391e4d02e20631c10bca
|
||||
- Import XPath fix http://git.gnome.org/browse/libxml2/commit/xpath.c?id=2ddecc23862bab1a9a9e51e097aefc92ec305e28
|
||||
- Merge clang warning fix http://git.gnome.org/browse/libxml2/commit/?id=aae48e64dfbf2b46b157a4c1857e30645116388f
|
||||
- Add a fix for proper escaping of xpointer expressions, commit upstream is pending.
|
||||
- Add helper classes in chromium/libxml_utils.cc and chromium/include/libxml/libxml_utils.h.
|
||||
- Add a tweak to limit problems caused by excessive strings and buffers.
|
||||
- Change the xmlNs struct a little bit, so it looks like it has no children
|
||||
if treated as a generic xmlNode object.
|
||||
- Fix pretty harmless use-after-free in generate-id function.
|
||||
- Merge a clang warning fix http://git.gnome.org/browse/libxml2/commit/?id=713434d2309da469d64b35e163ea6556dadccada
|
||||
- Import attribute normalization fix http://git.gnome.org/browse/libxml2/commit/?id=6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d
|
||||
- Merge a redundant comparison fix http://git.gnome.org/browse/libxml2/commit/?id=2af19f985b911b6dc6ada478ba8d201d2ddc9309
|
||||
- Merge a redundant comparisons fix https://git.gnome.org/browse/libxml2/commit/?id=eea38159be421dbafbee38f40e239f91734bc713
|
||||
- Merge XML_PARSER_EOF checks https://git.gnome.org/browse/libxml2/commit/?id=48b4cdde3483e054af8ea02e0cd7ee467b0e9a50 and https://git.gnome.org/browse/libxml2/commit/?id=e50ba8164eee06461c73cd8abb9b46aa0be81869
|
||||
- Add helper classes in chromium/libxml_utils.cc and
|
||||
chromium/include/libxml/libxml_utils.h.
|
||||
- Fix printf format specifiers, https://chromium.googlesource.com/chromium/src/+/d31995076e55f1aac2f935c53b585a90ece27a11
|
||||
- Add second workaround for VS 2015 Update 2 code-gen bug - crbug.com/599427
|
||||
- Apply patch contributed here: https://crbug.com/623378#c7
|
||||
- Apply patch contributed here: https://crbug.com/624011
|
||||
|
||||
To import a new snapshot of libxml:
|
||||
This import was generated by this script: https://goo.gl/72CTWf
|
||||
|
||||
- Visit http://xmlsoft.org/downloads.html and download the latest source
|
||||
distribution.
|
||||
- Copy the files into this directory, omitting files which have been omitted
|
||||
here. E.g.: for i in $(find . -type f); do cp ../libxml-newver/$i $i; done
|
||||
This should clobber all local changes to this directory.
|
||||
- Apply the patches in patches/ and fix any problems.
|
||||
UPDATE THOSE PATCHES OR EVAN WILL HUNT YOU DOWN.
|
||||
- On a Linux system,
|
||||
$ cd linux
|
||||
$ ../configure --without-iconv --without-ftp --without-http
|
||||
to generate config.h and include/libxml/xmlversion.h for Linux.
|
||||
- On a Mac,
|
||||
$ cd mac
|
||||
$ ../configure --without-iconv --without-ftp --without-http
|
||||
to generate config.h and include/libxml/xmlversion.h for Macs.
|
||||
- On Windows, run build/generate-win32-headers.bat to re-generate config.h and
|
||||
include/libxml/xmlversion.h for Windows builds.
|
||||
- Update this README to reflect the new version number.
|
||||
To import a new snapshot:
|
||||
|
||||
On Linux, get the latest tar, untar, and replace src/ with libxml2-X.Y.Z/.
|
||||
|
||||
Generate config.h, include/libxml/xmlversion.h, and xml2-config:
|
||||
|
||||
cd linux
|
||||
../src/configure --without-iconv --with-icu --without-ftp --without-http \
|
||||
--without-lzma
|
||||
cd ..
|
||||
Patch config.h to not define HAVE_RAND_R since we use this file on Android
|
||||
and it does not have it.
|
||||
|
||||
On a Mac, do the same in the mac/ subdir for config.h and
|
||||
include/libxml/xmlversion.h and copy those to the Linux box in mac/
|
||||
|
||||
On a Windows box:
|
||||
cd libxml2-2.9.2\win32
|
||||
cscript //E:jscript configure.js compiler=msvc iconv=no icu=yes ftp=no http=no
|
||||
Then copy VC10/config.h and include/libxml/xmlversion.h to win32/ on Linux.
|
||||
|
||||
Remove:
|
||||
src/doc/
|
||||
src/example/
|
||||
src/macos/libxml2.mcp.xml.sit.hqx
|
||||
src/os400/
|
||||
src/python/
|
||||
src/result/
|
||||
src/test/
|
||||
src/vms/
|
||||
src/win32/wince
|
||||
src/VxWorks/
|
||||
|
||||
Update BUILD.gn and libxml.gyp as necessary to add/remove files, etc.
|
||||
|
|
|
@ -51,7 +51,14 @@
|
|||
},
|
||||
}],
|
||||
['OS == "ios"', {
|
||||
'type': 'none',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'chromium/libxml_utils.h',
|
||||
'chromium/libxml_utils.cc',
|
||||
],
|
||||
'include_dirs': [
|
||||
'$(SDKROOT)/usr/include/libxml2',
|
||||
],
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'USE_SYSTEM_LIBXML',
|
||||
|
@ -61,10 +68,12 @@
|
|||
],
|
||||
},
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/usr/lib/libxml2.dylib',
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-lxml2',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
}, { # else: !use_system_libxml
|
||||
|
@ -89,8 +98,6 @@
|
|||
'src/include/libxml/HTMLparser.h',
|
||||
'src/include/libxml/HTMLtree.h',
|
||||
'src/include/libxml/list.h',
|
||||
'src/include/libxml/nanoftp.h',
|
||||
'src/include/libxml/nanohttp.h',
|
||||
'src/include/libxml/parser.h',
|
||||
'src/include/libxml/parserInternals.h',
|
||||
'src/include/libxml/pattern.h',
|
||||
|
@ -124,7 +131,8 @@
|
|||
'src/include/libxml/xpointer.h',
|
||||
'src/include/win32config.h',
|
||||
'src/include/wsockcompat.h',
|
||||
'src/acconfig.h',
|
||||
'src/buf.c',
|
||||
'src/buf.h',
|
||||
'src/c14n.c',
|
||||
'src/catalog.c',
|
||||
'src/chvalid.c',
|
||||
|
@ -132,6 +140,7 @@
|
|||
'src/dict.c',
|
||||
'src/DOCBparser.c',
|
||||
'src/elfgcchack.h',
|
||||
'src/enc.h',
|
||||
'src/encoding.c',
|
||||
'src/entities.c',
|
||||
'src/error.c',
|
||||
|
@ -142,16 +151,16 @@
|
|||
'src/legacy.c',
|
||||
'src/libxml.h',
|
||||
'src/list.c',
|
||||
'src/nanoftp.c',
|
||||
'src/nanohttp.c',
|
||||
'src/parser.c',
|
||||
'src/parserInternals.c',
|
||||
'src/pattern.c',
|
||||
'src/relaxng.c',
|
||||
'src/save.h',
|
||||
'src/SAX.c',
|
||||
'src/SAX2.c',
|
||||
'src/schematron.c',
|
||||
'src/threads.c',
|
||||
'src/timsort.h',
|
||||
'src/tree.c',
|
||||
#'src/trio.c',
|
||||
#'src/trio.h',
|
||||
|
@ -178,6 +187,8 @@
|
|||
'src/xmlwriter.c',
|
||||
'src/xpath.c',
|
||||
'src/xpointer.c',
|
||||
#'src/xzlib.c',
|
||||
'src/xzlib.h',
|
||||
'win32/config.h',
|
||||
'win32/include/libxml/xmlversion.h',
|
||||
],
|
||||
|
@ -201,6 +212,14 @@
|
|||
'-Wno-tautological-pointer-compare',
|
||||
# See http://crbug.com/138571#c8
|
||||
'-Wno-ignored-attributes',
|
||||
# libxml casts from int to long to void*.
|
||||
'-Wno-int-to-void-pointer-cast',
|
||||
# libxml passes a volatile LPCRITICAL_SECTION* to a function
|
||||
# expecting a void* volatile*.
|
||||
'-Wno-incompatible-pointer-types',
|
||||
# trio_is_special_quantity and trio_is_negative are only
|
||||
# used with certain preprocessor defines set.
|
||||
'-Wno-unused-function',
|
||||
],
|
||||
},
|
||||
'include_dirs': [
|
||||
|
@ -230,6 +249,7 @@
|
|||
'libraries': [
|
||||
# We need dl for dlopen() and friends.
|
||||
'-ldl',
|
||||
'-lm',
|
||||
],
|
||||
},
|
||||
}],
|
||||
|
@ -240,16 +260,19 @@
|
|||
['OS=="mac" or OS=="android"', {'defines': ['_REENTRANT']}],
|
||||
['OS=="win"', {
|
||||
'product_name': 'libxml2',
|
||||
# Disable unimportant 'unused variable' warning, and
|
||||
# signed/unsigned comparison warning. The signed/unsigned (4101)
|
||||
# is fixed upstream and can be removed eventually.
|
||||
# Disable unimportant 'unused variable' warning.
|
||||
# TODO(jschuh): http://crbug.com/167187 size_t -> int
|
||||
'msvs_disabled_warnings': [ 4018, 4101, 4267 ],
|
||||
# TODO(brucedawson): http://crbug.com/554200 fix C4311 warnings
|
||||
# C4311 is a VS 2015 64-bit warning for pointer truncation
|
||||
'msvs_disabled_warnings': [ 4018, 4267, 4311, ],
|
||||
}, { # else: OS!="win"
|
||||
'product_name': 'xml2',
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS == "ios"', {
|
||||
'toolsets': ['host', 'target'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,21 +1,8 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
#define PACKAGE "libxml2"
|
||||
#define VERSION "2.7.7"
|
||||
#define HAVE_LIBZ 1
|
||||
/* #undef HAVE_LIBM */
|
||||
#define HAVE_ISINF /**/
|
||||
#define HAVE_ISNAN /**/
|
||||
/* #undef HAVE_LIBHISTORY */
|
||||
/* #undef HAVE_LIBREADLINE */
|
||||
#define HAVE_LIBPTHREAD /**/
|
||||
#define HAVE_PTHREAD_H /**/
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if IPV6 support is there */
|
||||
#define SUPPORT_IP6 /**/
|
||||
|
||||
/* Define if getaddrinfo is there */
|
||||
#define HAVE_GETADDRINFO /**/
|
||||
/* Type cast for the gethostbyname() argument */
|
||||
#define GETHOSTBYNAME_ARG_CAST /**/
|
||||
|
||||
/* Define to 1 if you have the <ansidecl.h> header file. */
|
||||
/* #undef HAVE_ANSIDECL_H */
|
||||
|
@ -86,8 +73,8 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H_H */
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#define HAVE_ISASCII 1
|
||||
|
||||
/* Define if isinf is there */
|
||||
#define HAVE_ISINF /**/
|
||||
|
@ -101,6 +88,9 @@
|
|||
/* Define if history library is there (-lhistory) */
|
||||
/* #undef HAVE_LIBHISTORY */
|
||||
|
||||
/* Have compression library */
|
||||
/* #undef HAVE_LIBLZMA */
|
||||
|
||||
/* Define if pthread library is there (-lpthread) */
|
||||
#define HAVE_LIBPTHREAD /**/
|
||||
|
||||
|
@ -116,6 +106,9 @@
|
|||
/* Define to 1 if you have the `localtime' function. */
|
||||
#define HAVE_LOCALTIME 1
|
||||
|
||||
/* Define to 1 if you have the <lzma.h> header file. */
|
||||
/* #undef HAVE_LZMA_H */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
|
@ -125,6 +118,17 @@
|
|||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#define HAVE_MUNMAP 1
|
||||
|
||||
/* mmap() is no good without munmap() */
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
|
||||
# undef /**/ HAVE_MMAP
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <nan.h> header file. */
|
||||
/* #undef HAVE_NAN_H */
|
||||
|
||||
|
@ -146,6 +150,15 @@
|
|||
/* Define if <pthread.h> is there */
|
||||
#define HAVE_PTHREAD_H /**/
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define to 1 if you have the `rand' function. */
|
||||
#define HAVE_RAND 1
|
||||
|
||||
/* Define to 1 if you have the `rand_r' function. */
|
||||
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
#define HAVE_RESOLV_H 1
|
||||
|
||||
|
@ -164,6 +177,9 @@
|
|||
/* Define to 1 if you have the `sprintf' function. */
|
||||
#define HAVE_SPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `srand' function. */
|
||||
#define HAVE_SRAND 1
|
||||
|
||||
/* Define to 1 if you have the `sscanf' function. */
|
||||
#define HAVE_SSCANF 1
|
||||
|
||||
|
@ -226,6 +242,9 @@
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#define HAVE_TIME 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
|
@ -281,8 +300,8 @@
|
|||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#define PROTOTYPES 1
|
||||
/* Type cast for the send() function 2nd arg */
|
||||
#define SEND_ARG2_CAST /**/
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
@ -290,23 +309,26 @@
|
|||
/* Support for IPv6 */
|
||||
#define SUPPORT_IP6 /**/
|
||||
|
||||
/* Define if va_list is an array type */
|
||||
#define VA_LIST_IS_ARRAY 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.7.7"
|
||||
#define VERSION "2.9.4"
|
||||
|
||||
/* Determine what socket length (socklen_t) data type is */
|
||||
#define XML_SOCKLEN_T socklen_t
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
/* #undef _UINT32_T */
|
||||
|
||||
/* Using the Win32 Socket implementation */
|
||||
/* #undef _WINSOCKAPI_ */
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#define __PROTOTYPES 1
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
/* #undef snprintf */
|
||||
|
||||
/* ss_family is not defined here, use __ss_family instead */
|
||||
/* #undef ss_family */
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
/* #undef vsnprintf */
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef uint32_t */
|
||||
|
|
|
@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "2.7.7"
|
||||
#define LIBXML_DOTTED_VERSION "2.9.4"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION 20707
|
||||
#define LIBXML_VERSION 20904
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "20707"
|
||||
#define LIBXML_VERSION_STRING "20904"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
|
@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20707);
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20904);
|
||||
|
||||
#ifndef VMS
|
||||
#if 0
|
||||
|
@ -97,6 +97,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ALLOC_ENABLED:
|
||||
*
|
||||
* Whether the allocation hooks are per-thread
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_THREAD_ALLOC_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
|
@ -391,6 +400,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LZMA_ENABLED:
|
||||
*
|
||||
* Whether the Lzma support is compiled in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
|
@ -403,7 +421,11 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -413,7 +435,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
|
|
|
@ -58,7 +58,7 @@ while test $# -gt 0; do
|
|||
;;
|
||||
|
||||
--version)
|
||||
echo 2.7.7
|
||||
echo 2.9.4
|
||||
exit 0
|
||||
;;
|
||||
|
||||
|
@ -86,12 +86,12 @@ while test $# -gt 0; do
|
|||
then
|
||||
if [ "-L${libdir}" = "-L/usr/lib" -o "-L${libdir}" = "-L/usr/lib64" ]
|
||||
then
|
||||
echo -lxml2 -lz -lm
|
||||
echo -lxml2 -lz -licui18n -licuuc -licudata -lm -ldl
|
||||
else
|
||||
echo -L${libdir} -lxml2 -lz -lm
|
||||
echo -L${libdir} -lxml2 -lz -licui18n -licuuc -licudata -lm -ldl
|
||||
fi
|
||||
else
|
||||
echo -L${libdir} -lxml2 -lz -lm
|
||||
echo -L${libdir} -lxml2 -lz -licui18n -licuuc -licudata -lm -ldl
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -1,21 +1,8 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
#define PACKAGE "libxml2"
|
||||
#define VERSION "2.7.7"
|
||||
#define HAVE_LIBZ 1
|
||||
/* #undef HAVE_LIBM */
|
||||
#define HAVE_ISINF /**/
|
||||
#define HAVE_ISNAN /**/
|
||||
/* #undef HAVE_LIBHISTORY */
|
||||
/* #undef HAVE_LIBREADLINE */
|
||||
#define HAVE_LIBPTHREAD /**/
|
||||
#define HAVE_PTHREAD_H /**/
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if IPV6 support is there */
|
||||
#define SUPPORT_IP6 /**/
|
||||
|
||||
/* Define if getaddrinfo is there */
|
||||
#define HAVE_GETADDRINFO /**/
|
||||
/* Type cast for the gethostbyname() argument */
|
||||
#define GETHOSTBYNAME_ARG_CAST /**/
|
||||
|
||||
/* Define to 1 if you have the <ansidecl.h> header file. */
|
||||
/* #undef HAVE_ANSIDECL_H */
|
||||
|
@ -86,8 +73,8 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H_H */
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#define HAVE_ISASCII 1
|
||||
|
||||
/* Define if isinf is there */
|
||||
#define HAVE_ISINF /**/
|
||||
|
@ -101,6 +88,9 @@
|
|||
/* Define if history library is there (-lhistory) */
|
||||
/* #undef HAVE_LIBHISTORY */
|
||||
|
||||
/* Have compression library */
|
||||
/* #undef HAVE_LIBLZMA */
|
||||
|
||||
/* Define if pthread library is there (-lpthread) */
|
||||
#define HAVE_LIBPTHREAD /**/
|
||||
|
||||
|
@ -116,6 +106,9 @@
|
|||
/* Define to 1 if you have the `localtime' function. */
|
||||
#define HAVE_LOCALTIME 1
|
||||
|
||||
/* Define to 1 if you have the <lzma.h> header file. */
|
||||
/* #undef HAVE_LZMA_H */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
/* #undef HAVE_MALLOC_H */
|
||||
|
||||
|
@ -125,6 +118,17 @@
|
|||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#define HAVE_MUNMAP 1
|
||||
|
||||
/* mmap() is no good without munmap() */
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
|
||||
# undef /**/ HAVE_MMAP
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <nan.h> header file. */
|
||||
/* #undef HAVE_NAN_H */
|
||||
|
||||
|
@ -146,6 +150,15 @@
|
|||
/* Define if <pthread.h> is there */
|
||||
#define HAVE_PTHREAD_H /**/
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define to 1 if you have the `rand' function. */
|
||||
#define HAVE_RAND 1
|
||||
|
||||
/* Define to 1 if you have the `rand_r' function. */
|
||||
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
#define HAVE_RESOLV_H 1
|
||||
|
||||
|
@ -164,6 +177,9 @@
|
|||
/* Define to 1 if you have the `sprintf' function. */
|
||||
#define HAVE_SPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `srand' function. */
|
||||
#define HAVE_SRAND 1
|
||||
|
||||
/* Define to 1 if you have the `sscanf' function. */
|
||||
#define HAVE_SSCANF 1
|
||||
|
||||
|
@ -195,7 +211,7 @@
|
|||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strndup' function. */
|
||||
/* #undef HAVE_STRNDUP */
|
||||
#define HAVE_STRNDUP 1
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
|
@ -226,6 +242,9 @@
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#define HAVE_TIME 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
|
@ -256,8 +275,7 @@
|
|||
/* Define as const if the declaration of iconv() needs const. */
|
||||
/* #undef ICONV_CONST */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
|
@ -281,8 +299,8 @@
|
|||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#define PROTOTYPES 1
|
||||
/* Type cast for the send() function 2nd arg */
|
||||
#define SEND_ARG2_CAST /**/
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
@ -290,23 +308,26 @@
|
|||
/* Support for IPv6 */
|
||||
#define SUPPORT_IP6 /**/
|
||||
|
||||
/* Define if va_list is an array type */
|
||||
#define VA_LIST_IS_ARRAY 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.7.7"
|
||||
#define VERSION "2.9.4"
|
||||
|
||||
/* Determine what socket length (socklen_t) data type is */
|
||||
#define XML_SOCKLEN_T socklen_t
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
/* #undef _UINT32_T */
|
||||
|
||||
/* Using the Win32 Socket implementation */
|
||||
/* #undef _WINSOCKAPI_ */
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#define __PROTOTYPES 1
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
/* #undef snprintf */
|
||||
|
||||
/* ss_family is not defined here, use __ss_family instead */
|
||||
/* #undef ss_family */
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
/* #undef vsnprintf */
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef uint32_t */
|
||||
|
|
|
@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "2.7.7"
|
||||
#define LIBXML_DOTTED_VERSION "2.9.4"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION 20707
|
||||
#define LIBXML_VERSION 20904
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "20707"
|
||||
#define LIBXML_VERSION_STRING "20904"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
|
@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20707);
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20904);
|
||||
|
||||
#ifndef VMS
|
||||
#if 0
|
||||
|
@ -97,6 +97,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ALLOC_ENABLED:
|
||||
*
|
||||
* Whether the allocation hooks are per-thread
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_THREAD_ALLOC_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
|
@ -391,6 +400,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LZMA_ENABLED:
|
||||
*
|
||||
* Whether the Lzma support is compiled in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
|
@ -403,7 +421,11 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -413,7 +435,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
Except where otherwise noted in the source code (e.g. the files hash.c,
|
||||
list.c and the trio files, which are covered by a similar licence but
|
||||
with different Copyright notices) all the files are:
|
||||
|
||||
Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is fur-
|
||||
nished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -593,7 +593,7 @@ Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
|||
|
||||
Tue Apr 22 10:27:17 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* dict.c: improvement on the hashing of the dictionnary, with visible
|
||||
* dict.c: improvement on the hashing of the dictionary, with visible
|
||||
speed up as the number of strings in the hash increases, work from
|
||||
Stefan Behnel
|
||||
|
||||
|
@ -5017,7 +5017,7 @@ Mon Jan 24 00:47:41 CET 2005 Daniel Veillard <daniel@veillard.com>
|
|||
Sun Jan 23 23:54:39 CET 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* hash.c include/libxml/hash.h: added xmlHashCreateDict where
|
||||
the hash reuses the dictionnary for internal strings
|
||||
the hash reuses the dictionary for internal strings
|
||||
* entities.c valid.c parser.c: reuse that new API, leads to a decent
|
||||
speedup when parsing for example DocBook documents.
|
||||
|
||||
|
@ -5371,7 +5371,7 @@ Fri Nov 26 11:44:36 CET 2004 Daniel Veillard <daniel@veillard.com>
|
|||
Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* dict.c include/libxml/dict.h: added xmlDictExists() to the
|
||||
dictionnary interface.
|
||||
dictionary interface.
|
||||
* xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces
|
||||
from Rob Richards
|
||||
|
||||
|
@ -5697,7 +5697,7 @@ Tue Oct 26 23:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
|||
Tue Oct 26 18:09:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* debugXML.c include/libxml/xmlerror.h: added checking for names
|
||||
values and dictionnaries generates a tons of errors
|
||||
values and dictionaries generates a tons of errors
|
||||
* SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
|
||||
include/libxml/tree.h: fixing the errors in the regression tests
|
||||
|
||||
|
@ -7746,14 +7746,14 @@ Fri Jan 23 14:03:21 CET 2004 Daniel Veillard <daniel@veillard.com>
|
|||
make tests
|
||||
* xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to
|
||||
compile an XPath expression within a context, currently the goal
|
||||
is to be able to reuse the XSLT stylesheet dictionnary, but this
|
||||
is to be able to reuse the XSLT stylesheet dictionary, but this
|
||||
opens the door to others possible optimizations.
|
||||
* dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows
|
||||
to build a new dictionnary based on another read-only dictionnary.
|
||||
This is needed for XSLT to keep the stylesheet dictionnary read-only
|
||||
to build a new dictionary based on another read-only dictionary.
|
||||
This is needed for XSLT to keep the stylesheet dictionary read-only
|
||||
while being able to reuse the strings for the transformation
|
||||
dictionnary.
|
||||
* xinclude.c: fixed a dictionnar reference counting problem occuring
|
||||
dictionary.
|
||||
* xinclude.c: fixed a dictionary reference counting problem occuring
|
||||
when document parsing failed.
|
||||
* testSAX.c: adding option --repeat for timing 100times the parsing
|
||||
* doc/* : rebuilt all the docs
|
||||
|
@ -7806,7 +7806,7 @@ Mon Jan 12 17:22:57 CET 2004 Daniel Veillard <daniel@veillard.com>
|
|||
Thu Jan 8 17:57:50 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xmlschemas.c: removed a memory leak remaining from the switch
|
||||
to a dictionnary for string allocations c.f. #130891
|
||||
to a dictionary for string allocations c.f. #130891
|
||||
|
||||
Thu Jan 8 17:48:46 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
|
@ -7928,7 +7928,7 @@ Fri Jan 2 22:58:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
|||
Fri Jan 2 11:40:06 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* SAX2.c: found and fixed a bug misallocating some non
|
||||
blank text node strings from the dictionnary.
|
||||
blank text node strings from the dictionary.
|
||||
* xmlmemory.c: fixed a problem with the memory debug mutex
|
||||
release.
|
||||
|
||||
|
@ -8139,7 +8139,7 @@ Wed Dec 10 11:16:29 CET 2003 Daniel Veillard <daniel@veillard.com>
|
|||
|
||||
Tue Dec 9 23:50:23 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* entities.c: fixed an XML entites content serialization
|
||||
* entities.c: fixed an XML entities content serialization
|
||||
potentially triggered by XInclude, see #126817
|
||||
|
||||
Tue Dec 9 16:12:50 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
@ -9386,7 +9386,7 @@ Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
|||
|
||||
* parser.c: William's change allowed to spot a nasty bug in xmlDoRead
|
||||
if the result is not well formed that ctxt->myDoc is not NULL
|
||||
and uses the context dictionnary.
|
||||
and uses the context dictionary.
|
||||
|
||||
Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ Except where otherwise noted in the source code (e.g. the files hash.c,
|
|||
list.c and the trio files, which are covered by a similar licence but
|
||||
with different Copyright notices) all the files are:
|
||||
|
||||
Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved.
|
||||
Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -17,11 +17,7 @@ all copies or substantial portions of the Software.
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
|
||||
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
|
||||
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Daniel Veillard shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
ings in this Software without prior written authorization from him.
|
||||
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/uri.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "enc.h"
|
||||
|
||||
#define HTML_MAX_NAMELEN 1000
|
||||
#define HTML_PARSER_BIG_BUFFER_SIZE 1000
|
||||
#define HTML_PARSER_BUFFER_SIZE 100
|
||||
|
@ -102,7 +105,7 @@ htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
|
|||
*
|
||||
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||
{
|
||||
|
@ -129,7 +132,7 @@ htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
*
|
||||
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, int val)
|
||||
{
|
||||
|
@ -300,6 +303,7 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
|
|||
#define UPP(val) (toupper(ctxt->input->cur[(val)]))
|
||||
|
||||
#define CUR_PTR ctxt->input->cur
|
||||
#define BASE_PTR ctxt->input->base
|
||||
|
||||
#define SHRINK if ((ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
|
||||
(ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
|
||||
|
@ -727,7 +731,7 @@ static const char* const map_contents[] = { BLOCK, "area", NULL } ;
|
|||
static const char* const name_attr[] = { "name", NULL } ;
|
||||
static const char* const action_attr[] = { "action", NULL } ;
|
||||
static const char* const blockli_elt[] = { BLOCK, "li", NULL } ;
|
||||
static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", NULL } ;
|
||||
static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", "charset", NULL } ;
|
||||
static const char* const content_attr[] = { "content", NULL } ;
|
||||
static const char* const type_attr[] = { "type", NULL } ;
|
||||
static const char* const noframes_content[] = { "body", FLOW MODIFIER, NULL } ;
|
||||
|
@ -1080,9 +1084,9 @@ static const char * const htmlStartClose[] = {
|
|||
"menu", "p", "head", "ul", NULL,
|
||||
"p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", FONTSTYLE, NULL,
|
||||
"div", "p", "head", NULL,
|
||||
"noscript", "p", "head", NULL,
|
||||
"noscript", "p", NULL,
|
||||
"center", "font", "b", "i", "p", "head", NULL,
|
||||
"a", "a", NULL,
|
||||
"a", "a", "head", NULL,
|
||||
"caption", "p", NULL,
|
||||
"colgroup", "caption", "colgroup", "col", "p", NULL,
|
||||
"col", "caption", "col", "p", NULL,
|
||||
|
@ -1100,6 +1104,43 @@ static const char * const htmlStartClose[] = {
|
|||
"option", "option", NULL,
|
||||
"fieldset", "legend", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6",
|
||||
"pre", "listing", "xmp", "a", NULL,
|
||||
/* most tags in in FONTSTYLE, PHRASE and SPECIAL should close <head> */
|
||||
"tt", "head", NULL,
|
||||
"i", "head", NULL,
|
||||
"b", "head", NULL,
|
||||
"u", "head", NULL,
|
||||
"s", "head", NULL,
|
||||
"strike", "head", NULL,
|
||||
"big", "head", NULL,
|
||||
"small", "head", NULL,
|
||||
|
||||
"em", "head", NULL,
|
||||
"strong", "head", NULL,
|
||||
"dfn", "head", NULL,
|
||||
"code", "head", NULL,
|
||||
"samp", "head", NULL,
|
||||
"kbd", "head", NULL,
|
||||
"var", "head", NULL,
|
||||
"cite", "head", NULL,
|
||||
"abbr", "head", NULL,
|
||||
"acronym", "head", NULL,
|
||||
|
||||
/* "a" */
|
||||
"img", "head", NULL,
|
||||
/* "applet" */
|
||||
/* "embed" */
|
||||
/* "object" */
|
||||
"font", "head", NULL,
|
||||
/* "basefont" */
|
||||
"br", "head", NULL,
|
||||
/* "script" */
|
||||
"map", "head", NULL,
|
||||
"q", "head", NULL,
|
||||
"sub", "head", NULL,
|
||||
"sup", "head", NULL,
|
||||
"span", "head", NULL,
|
||||
"bdo", "head", NULL,
|
||||
"iframe", "head", NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -1137,7 +1178,7 @@ static const char *const htmlScriptAttributes[] = {
|
|||
"onfocus",
|
||||
"onblur",
|
||||
"onsubmit",
|
||||
"onrest",
|
||||
"onreset",
|
||||
"onchange",
|
||||
"onselect"
|
||||
};
|
||||
|
@ -2431,6 +2472,10 @@ htmlParseName(htmlParserCtxtPtr ctxt) {
|
|||
(*in == '_') || (*in == '-') ||
|
||||
(*in == ':') || (*in == '.'))
|
||||
in++;
|
||||
|
||||
if (in == ctxt->input->end)
|
||||
return(NULL);
|
||||
|
||||
if ((*in > 0) && (*in < 0x80)) {
|
||||
count = in - ctxt->input->cur;
|
||||
ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
|
||||
|
@ -2448,6 +2493,7 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
|
|||
int len = 0, l;
|
||||
int c;
|
||||
int count = 0;
|
||||
const xmlChar *base = ctxt->input->base;
|
||||
|
||||
/*
|
||||
* Handler for more complex cases
|
||||
|
@ -2473,7 +2519,18 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
|
|||
len += l;
|
||||
NEXTL(l);
|
||||
c = CUR_CHAR(l);
|
||||
if (ctxt->input->base != base) {
|
||||
/*
|
||||
* We changed encoding from an unknown encoding
|
||||
* Input buffer changed location, so we better start again
|
||||
*/
|
||||
return(htmlParseNameComplex(ctxt));
|
||||
}
|
||||
}
|
||||
|
||||
if (ctxt->input->base > ctxt->input->cur - len)
|
||||
return(NULL);
|
||||
|
||||
return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
|
||||
}
|
||||
|
||||
|
@ -2725,31 +2782,43 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) {
|
|||
|
||||
static xmlChar *
|
||||
htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
|
||||
const xmlChar *q;
|
||||
size_t len = 0, startPosition = 0;
|
||||
xmlChar *ret = NULL;
|
||||
|
||||
if (CUR == '"') {
|
||||
NEXT;
|
||||
q = CUR_PTR;
|
||||
while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
|
||||
|
||||
if (CUR_PTR < BASE_PTR)
|
||||
return(ret);
|
||||
startPosition = CUR_PTR - BASE_PTR;
|
||||
|
||||
while ((IS_CHAR_CH(CUR)) && (CUR != '"')) {
|
||||
NEXT;
|
||||
len++;
|
||||
}
|
||||
if (!IS_CHAR_CH(CUR)) {
|
||||
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
||||
"Unfinished SystemLiteral\n", NULL, NULL);
|
||||
} else {
|
||||
ret = xmlStrndup(q, CUR_PTR - q);
|
||||
ret = xmlStrndup((BASE_PTR+startPosition), len);
|
||||
NEXT;
|
||||
}
|
||||
} else if (CUR == '\'') {
|
||||
NEXT;
|
||||
q = CUR_PTR;
|
||||
while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
|
||||
|
||||
if (CUR_PTR < BASE_PTR)
|
||||
return(ret);
|
||||
startPosition = CUR_PTR - BASE_PTR;
|
||||
|
||||
while ((IS_CHAR_CH(CUR)) && (CUR != '\'')) {
|
||||
NEXT;
|
||||
len++;
|
||||
}
|
||||
if (!IS_CHAR_CH(CUR)) {
|
||||
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
||||
"Unfinished SystemLiteral\n", NULL, NULL);
|
||||
} else {
|
||||
ret = xmlStrndup(q, CUR_PTR - q);
|
||||
ret = xmlStrndup((BASE_PTR+startPosition), len);
|
||||
NEXT;
|
||||
}
|
||||
} else {
|
||||
|
@ -2773,32 +2842,47 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
|
|||
|
||||
static xmlChar *
|
||||
htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
|
||||
const xmlChar *q;
|
||||
size_t len = 0, startPosition = 0;
|
||||
xmlChar *ret = NULL;
|
||||
/*
|
||||
* Name ::= (Letter | '_') (NameChar)*
|
||||
*/
|
||||
if (CUR == '"') {
|
||||
NEXT;
|
||||
q = CUR_PTR;
|
||||
while (IS_PUBIDCHAR_CH(CUR)) NEXT;
|
||||
|
||||
if (CUR_PTR < BASE_PTR)
|
||||
return(ret);
|
||||
startPosition = CUR_PTR - BASE_PTR;
|
||||
|
||||
while (IS_PUBIDCHAR_CH(CUR)) {
|
||||
len++;
|
||||
NEXT;
|
||||
}
|
||||
|
||||
if (CUR != '"') {
|
||||
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
||||
"Unfinished PubidLiteral\n", NULL, NULL);
|
||||
} else {
|
||||
ret = xmlStrndup(q, CUR_PTR - q);
|
||||
ret = xmlStrndup((BASE_PTR + startPosition), len);
|
||||
NEXT;
|
||||
}
|
||||
} else if (CUR == '\'') {
|
||||
NEXT;
|
||||
q = CUR_PTR;
|
||||
while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\''))
|
||||
|
||||
if (CUR_PTR < BASE_PTR)
|
||||
return(ret);
|
||||
startPosition = CUR_PTR - BASE_PTR;
|
||||
|
||||
while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\'')){
|
||||
len++;
|
||||
NEXT;
|
||||
}
|
||||
|
||||
if (CUR != '\'') {
|
||||
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
||||
"Unfinished PubidLiteral\n", NULL, NULL);
|
||||
} else {
|
||||
ret = xmlStrndup(q, CUR_PTR - q);
|
||||
ret = xmlStrndup((BASE_PTR + startPosition), len);
|
||||
NEXT;
|
||||
}
|
||||
} else {
|
||||
|
@ -2889,8 +2973,10 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||
if ((!(IS_CHAR_CH(cur))) && (!((cur == 0) && (ctxt->progressive)))) {
|
||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Invalid char in CDATA 0x%X\n", cur);
|
||||
if (ctxt->input->cur < ctxt->input->end) {
|
||||
NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
|
||||
if (ctxt->sax->cdataBlock!= NULL) {
|
||||
|
@ -2906,8 +2992,9 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||
|
||||
|
||||
/**
|
||||
* htmlParseCharData:
|
||||
* htmlParseCharDataInternal:
|
||||
* @ctxt: an HTML parser context
|
||||
* @readahead: optional read ahead character in ascii range
|
||||
*
|
||||
* parse a CharData section.
|
||||
* if we are within a CDATA section ']]>' marks an end of section.
|
||||
|
@ -2916,12 +3003,15 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||
*/
|
||||
|
||||
static void
|
||||
htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
||||
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
|
||||
htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) {
|
||||
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 6];
|
||||
int nbchar = 0;
|
||||
int cur, l;
|
||||
int chunk = 0;
|
||||
|
||||
if (readahead)
|
||||
buf[nbchar++] = readahead;
|
||||
|
||||
SHRINK;
|
||||
cur = CUR_CHAR(l);
|
||||
while (((cur != '<') || (ctxt->token == '<')) &&
|
||||
|
@ -2939,9 +3029,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
|||
*/
|
||||
if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
|
||||
if (areBlanks(ctxt, buf, nbchar)) {
|
||||
if (ctxt->keepBlanks) {
|
||||
if (ctxt->sax->characters != NULL)
|
||||
ctxt->sax->characters(ctxt->userData, buf, nbchar);
|
||||
} else {
|
||||
if (ctxt->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(ctxt->userData,
|
||||
buf, nbchar);
|
||||
}
|
||||
} else {
|
||||
htmlCheckParagraph(ctxt);
|
||||
if (ctxt->sax->characters != NULL)
|
||||
|
@ -2972,8 +3067,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
|||
*/
|
||||
if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
|
||||
if (areBlanks(ctxt, buf, nbchar)) {
|
||||
if (ctxt->keepBlanks) {
|
||||
if (ctxt->sax->characters != NULL)
|
||||
ctxt->sax->characters(ctxt->userData, buf, nbchar);
|
||||
} else {
|
||||
if (ctxt->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(ctxt->userData, buf, nbchar);
|
||||
ctxt->sax->ignorableWhitespace(ctxt->userData,
|
||||
buf, nbchar);
|
||||
}
|
||||
} else {
|
||||
htmlCheckParagraph(ctxt);
|
||||
if (ctxt->sax->characters != NULL)
|
||||
|
@ -2989,6 +3090,21 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* htmlParseCharData:
|
||||
* @ctxt: an HTML parser context
|
||||
*
|
||||
* parse a CharData section.
|
||||
* if we are within a CDATA section ']]>' marks an end of section.
|
||||
*
|
||||
* [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
|
||||
*/
|
||||
|
||||
static void
|
||||
htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
||||
htmlParseCharDataInternal(ctxt, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* htmlParseExternalID:
|
||||
* @ctxt: an HTML parser context
|
||||
|
@ -3192,12 +3308,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
|
|||
ctxt->instate = state;
|
||||
return;
|
||||
}
|
||||
len = 0;
|
||||
buf[len] = 0;
|
||||
q = CUR_CHAR(ql);
|
||||
if (!IS_CHAR(q))
|
||||
goto unfinished;
|
||||
NEXTL(ql);
|
||||
r = CUR_CHAR(rl);
|
||||
if (!IS_CHAR(r))
|
||||
goto unfinished;
|
||||
NEXTL(rl);
|
||||
cur = CUR_CHAR(l);
|
||||
len = 0;
|
||||
while (IS_CHAR(cur) &&
|
||||
((cur != '>') ||
|
||||
(r != '-') || (q != '-'))) {
|
||||
|
@ -3228,18 +3349,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
|
|||
}
|
||||
}
|
||||
buf[len] = 0;
|
||||
if (!IS_CHAR(cur)) {
|
||||
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||
"Comment not terminated \n<!--%.50s\n", buf, NULL);
|
||||
xmlFree(buf);
|
||||
} else {
|
||||
if (IS_CHAR(cur)) {
|
||||
NEXT;
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
|
||||
(!ctxt->disableSAX))
|
||||
ctxt->sax->comment(ctxt->userData, buf);
|
||||
xmlFree(buf);
|
||||
}
|
||||
ctxt->instate = state;
|
||||
return;
|
||||
}
|
||||
|
||||
unfinished:
|
||||
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||
"Comment not terminated \n<!--%.50s\n", buf, NULL);
|
||||
xmlFree(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3275,7 +3398,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
|
|||
val = val * 16 + (CUR - 'A') + 10;
|
||||
else {
|
||||
htmlParseErr(ctxt, XML_ERR_INVALID_HEX_CHARREF,
|
||||
"htmlParseCharRef: missing semicolumn\n",
|
||||
"htmlParseCharRef: missing semicolon\n",
|
||||
NULL, NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -3290,7 +3413,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
|
|||
val = val * 10 + (CUR - '0');
|
||||
else {
|
||||
htmlParseErr(ctxt, XML_ERR_INVALID_DEC_CHARREF,
|
||||
"htmlParseCharRef: missing semicolumn\n",
|
||||
"htmlParseCharRef: missing semicolon\n",
|
||||
NULL, NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -3433,34 +3556,26 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
|
|||
}
|
||||
|
||||
/**
|
||||
* htmlCheckEncoding:
|
||||
* htmlCheckEncodingDirect:
|
||||
* @ctxt: an HTML parser context
|
||||
* @attvalue: the attribute value
|
||||
*
|
||||
* Checks an http-equiv attribute from a Meta tag to detect
|
||||
* Checks an attribute value to detect
|
||||
* the encoding
|
||||
* If a new encoding is detected the parser is switched to decode
|
||||
* it and pass UTF8
|
||||
*/
|
||||
static void
|
||||
htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
|
||||
const xmlChar *encoding;
|
||||
htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
|
||||
|
||||
if ((ctxt == NULL) || (attvalue == NULL))
|
||||
if ((ctxt == NULL) || (encoding == NULL) ||
|
||||
(ctxt->options & HTML_PARSE_IGNORE_ENC))
|
||||
return;
|
||||
|
||||
/* do not change encoding */
|
||||
if (ctxt->input->encoding != NULL)
|
||||
return;
|
||||
|
||||
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset=");
|
||||
if (encoding != NULL) {
|
||||
encoding += 8;
|
||||
} else {
|
||||
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset =");
|
||||
if (encoding != NULL)
|
||||
encoding += 9;
|
||||
}
|
||||
if (encoding != NULL) {
|
||||
xmlCharEncoding enc;
|
||||
xmlCharEncodingHandlerPtr handler;
|
||||
|
@ -3498,7 +3613,9 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
|
|||
xmlSwitchToEncoding(ctxt, handler);
|
||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
||||
} else {
|
||||
ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING;
|
||||
htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
|
||||
"htmlCheckEncoding: unknown encoding %s\n",
|
||||
encoding, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3513,23 +3630,50 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
|
|||
* convert as much as possible to the parser reading buffer.
|
||||
*/
|
||||
processed = ctxt->input->cur - ctxt->input->base;
|
||||
xmlBufferShrink(ctxt->input->buf->buffer, processed);
|
||||
nbchars = xmlCharEncInFunc(ctxt->input->buf->encoder,
|
||||
ctxt->input->buf->buffer,
|
||||
ctxt->input->buf->raw);
|
||||
xmlBufShrink(ctxt->input->buf->buffer, processed);
|
||||
nbchars = xmlCharEncInput(ctxt->input->buf, 1);
|
||||
if (nbchars < 0) {
|
||||
htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
|
||||
"htmlCheckEncoding: encoder error\n",
|
||||
NULL, NULL);
|
||||
}
|
||||
ctxt->input->base =
|
||||
ctxt->input->cur = ctxt->input->buf->buffer->content;
|
||||
ctxt->input->end =
|
||||
&ctxt->input->base[ctxt->input->buf->buffer->use];
|
||||
xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* htmlCheckEncoding:
|
||||
* @ctxt: an HTML parser context
|
||||
* @attvalue: the attribute value
|
||||
*
|
||||
* Checks an http-equiv attribute from a Meta tag to detect
|
||||
* the encoding
|
||||
* If a new encoding is detected the parser is switched to decode
|
||||
* it and pass UTF8
|
||||
*/
|
||||
static void
|
||||
htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
|
||||
const xmlChar *encoding;
|
||||
|
||||
if (!attvalue)
|
||||
return;
|
||||
|
||||
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset");
|
||||
if (encoding != NULL) {
|
||||
encoding += 7;
|
||||
}
|
||||
/*
|
||||
* skip blank
|
||||
*/
|
||||
if (encoding && IS_BLANK_CH(*encoding))
|
||||
encoding = xmlStrcasestr(attvalue, BAD_CAST"=");
|
||||
if (encoding && *encoding == '=') {
|
||||
encoding ++;
|
||||
htmlCheckEncodingDirect(ctxt, encoding);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* htmlCheckMeta:
|
||||
* @ctxt: an HTML parser context
|
||||
|
@ -3554,6 +3698,8 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
|
|||
if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"http-equiv"))
|
||||
&& (!xmlStrcasecmp(value, BAD_CAST"Content-Type")))
|
||||
http = 1;
|
||||
else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"charset")))
|
||||
htmlCheckEncodingDirect(ctxt, value);
|
||||
else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"content")))
|
||||
content = value;
|
||||
att = atts[i++];
|
||||
|
@ -3595,13 +3741,13 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||
int i;
|
||||
int discardtag = 0;
|
||||
|
||||
if (ctxt->instate == XML_PARSER_EOF)
|
||||
return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
||||
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||
"htmlParseStartTag: context error\n", NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
if (ctxt->instate == XML_PARSER_EOF)
|
||||
return(-1);
|
||||
if (CUR != '<') return -1;
|
||||
NEXT;
|
||||
|
||||
|
@ -3614,6 +3760,14 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||
htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
|
||||
"htmlParseStartTag: invalid element name\n",
|
||||
NULL, NULL);
|
||||
/* if recover preserve text on classic misconstructs */
|
||||
if ((ctxt->recovery) && ((IS_BLANK_CH(CUR)) || (CUR == '<') ||
|
||||
(CUR == '=') || (CUR == '>') || (((CUR >= '0') && (CUR <= '9'))))) {
|
||||
htmlParseCharDataInternal(ctxt, '<');
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
/* Dump the bogus tag like browsers do */
|
||||
while ((IS_CHAR_CH(CUR)) && (CUR != '>') &&
|
||||
(ctxt->instate != XML_PARSER_EOF))
|
||||
|
@ -3883,6 +4037,7 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt)
|
|||
if ((oldname != NULL) && (xmlStrEqual(oldname, name))) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
|
||||
ctxt->sax->endElement(ctxt->userData, name);
|
||||
htmlNodeInfoPop(ctxt);
|
||||
htmlnamePop(ctxt);
|
||||
ret = 1;
|
||||
} else {
|
||||
|
@ -4289,7 +4444,7 @@ static void
|
|||
htmlParseElementInternal(htmlParserCtxtPtr ctxt) {
|
||||
const xmlChar *name;
|
||||
const htmlElemDesc * info;
|
||||
htmlParserNodeInfo node_info;
|
||||
htmlParserNodeInfo node_info = { 0, };
|
||||
int failed;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
||||
|
@ -4670,7 +4825,7 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) {
|
|||
if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
|
||||
ctxt->sax->endDocument(ctxt->userData);
|
||||
|
||||
if (ctxt->myDoc != NULL) {
|
||||
if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL)) {
|
||||
dtd = xmlGetIntSubset(ctxt->myDoc);
|
||||
if (dtd == NULL)
|
||||
ctxt->myDoc->intSubset =
|
||||
|
@ -4875,9 +5030,7 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) {
|
|||
|
||||
input->filename = NULL;
|
||||
input->buf = buf;
|
||||
input->base = input->buf->buffer->content;
|
||||
input->cur = input->buf->buffer->content;
|
||||
input->end = &input->buf->buffer->content[input->buf->buffer->use];
|
||||
xmlBufResetInput(buf->buffer, input);
|
||||
|
||||
inputPush(ctxt, input);
|
||||
return(ctxt);
|
||||
|
@ -4994,8 +5147,8 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
|
|||
buf = in->base;
|
||||
len = in->length;
|
||||
} else {
|
||||
buf = in->buf->buffer->content;
|
||||
len = in->buf->buffer->use;
|
||||
buf = xmlBufContent(in->buf->buffer);
|
||||
len = xmlBufUse(in->buf->buffer);
|
||||
}
|
||||
|
||||
/* take into account the sequence length */
|
||||
|
@ -5121,8 +5274,8 @@ htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop,
|
|||
buf = in->base;
|
||||
len = in->length;
|
||||
} else {
|
||||
buf = in->buf->buffer->content;
|
||||
len = in->buf->buffer->use;
|
||||
buf = xmlBufContent(in->buf->buffer);
|
||||
len = xmlBufUse(in->buf->buffer);
|
||||
}
|
||||
|
||||
for (; base < len; base++) {
|
||||
|
@ -5171,6 +5324,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
int avail = 0;
|
||||
xmlChar cur, next;
|
||||
|
||||
htmlParserNodeInfo node_info;
|
||||
|
||||
#ifdef DEBUG_PUSH
|
||||
switch (ctxt->instate) {
|
||||
case XML_PARSER_EOF:
|
||||
|
@ -5231,7 +5386,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if (in->buf == NULL)
|
||||
avail = in->length - (in->cur - in->base);
|
||||
else
|
||||
avail = in->buf->buffer->use - (in->cur - in->base);
|
||||
avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
|
||||
if ((avail == 0) && (terminate)) {
|
||||
htmlAutoCloseOnEnd(ctxt);
|
||||
if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) {
|
||||
|
@ -5267,7 +5422,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if (in->buf == NULL)
|
||||
avail = in->length - (in->cur - in->base);
|
||||
else
|
||||
avail = in->buf->buffer->use - (in->cur - in->base);
|
||||
avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
|
||||
}
|
||||
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
|
||||
ctxt->sax->setDocumentLocator(ctxt->userData,
|
||||
|
@ -5309,11 +5464,24 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if (in->buf == NULL)
|
||||
avail = in->length - (in->cur - in->base);
|
||||
else
|
||||
avail = in->buf->buffer->use - (in->cur - in->base);
|
||||
if (avail < 2)
|
||||
avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
|
||||
/*
|
||||
* no chars in buffer
|
||||
*/
|
||||
if (avail < 1)
|
||||
goto done;
|
||||
cur = in->cur[0];
|
||||
/*
|
||||
* not enouth chars in buffer
|
||||
*/
|
||||
if (avail < 2) {
|
||||
if (!terminate)
|
||||
goto done;
|
||||
else
|
||||
next = ' ';
|
||||
} else {
|
||||
next = in->cur[1];
|
||||
}
|
||||
cur = in->cur[0];
|
||||
if ((cur == '<') && (next == '!') &&
|
||||
(in->cur[2] == '-') && (in->cur[3] == '-')) {
|
||||
if ((!terminate) &&
|
||||
|
@ -5369,7 +5537,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if (in->buf == NULL)
|
||||
avail = in->length - (in->cur - in->base);
|
||||
else
|
||||
avail = in->buf->buffer->use - (in->cur - in->base);
|
||||
avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
|
||||
if (avail < 2)
|
||||
goto done;
|
||||
cur = in->cur[0];
|
||||
|
@ -5410,7 +5578,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if (in->buf == NULL)
|
||||
avail = in->length - (in->cur - in->base);
|
||||
else
|
||||
avail = in->buf->buffer->use - (in->cur - in->base);
|
||||
avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
|
||||
if (avail < 1)
|
||||
goto done;
|
||||
cur = in->cur[0];
|
||||
|
@ -5463,8 +5631,22 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
int failed;
|
||||
const htmlElemDesc * info;
|
||||
|
||||
if (avail < 2)
|
||||
/*
|
||||
* no chars in buffer
|
||||
*/
|
||||
if (avail < 1)
|
||||
goto done;
|
||||
/*
|
||||
* not enouth chars in buffer
|
||||
*/
|
||||
if (avail < 2) {
|
||||
if (!terminate)
|
||||
goto done;
|
||||
else
|
||||
next = ' ';
|
||||
} else {
|
||||
next = in->cur[1];
|
||||
}
|
||||
cur = in->cur[0];
|
||||
if (cur != '<') {
|
||||
ctxt->instate = XML_PARSER_CONTENT;
|
||||
|
@ -5474,7 +5656,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
#endif
|
||||
break;
|
||||
}
|
||||
if (in->cur[1] == '/') {
|
||||
if (next == '/') {
|
||||
ctxt->instate = XML_PARSER_END_TAG;
|
||||
ctxt->checkIndex = 0;
|
||||
#ifdef DEBUG_PUSH
|
||||
|
@ -5487,6 +5669,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
(htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
|
||||
goto done;
|
||||
|
||||
/* Capture start position */
|
||||
if (ctxt->record_info) {
|
||||
node_info.begin_pos = ctxt->input->consumed +
|
||||
(CUR_PTR - ctxt->input->base);
|
||||
node_info.begin_line = ctxt->input->line;
|
||||
}
|
||||
|
||||
|
||||
failed = htmlParseStartTag(ctxt);
|
||||
name = ctxt->name;
|
||||
if ((failed == -1) ||
|
||||
|
@ -5536,6 +5726,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
htmlnamePop(ctxt);
|
||||
}
|
||||
|
||||
if (ctxt->record_info)
|
||||
htmlNodeInfoPush(ctxt, &node_info);
|
||||
|
||||
ctxt->instate = XML_PARSER_CONTENT;
|
||||
#ifdef DEBUG_PUSH
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
@ -5552,6 +5745,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
ctxt->sax->endElement(ctxt->userData, name);
|
||||
htmlnamePop(ctxt);
|
||||
}
|
||||
|
||||
if (ctxt->record_info)
|
||||
htmlNodeInfoPush(ctxt, &node_info);
|
||||
|
||||
ctxt->instate = XML_PARSER_CONTENT;
|
||||
#ifdef DEBUG_PUSH
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
@ -5579,14 +5776,20 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
if ((cur != '<') && (cur != '&')) {
|
||||
if (ctxt->sax != NULL) {
|
||||
if (IS_BLANK_CH(cur)) {
|
||||
if (ctxt->keepBlanks) {
|
||||
if (ctxt->sax->characters != NULL)
|
||||
ctxt->sax->characters(
|
||||
ctxt->userData, &in->cur[0], 1);
|
||||
} else {
|
||||
if (ctxt->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(
|
||||
ctxt->userData, &cur, 1);
|
||||
ctxt->userData, &in->cur[0], 1);
|
||||
}
|
||||
} else {
|
||||
htmlCheckParagraph(ctxt);
|
||||
if (ctxt->sax->characters != NULL)
|
||||
ctxt->sax->characters(
|
||||
ctxt->userData, &cur, 1);
|
||||
ctxt->userData, &in->cur[0], 1);
|
||||
}
|
||||
}
|
||||
ctxt->token = 0;
|
||||
|
@ -5609,7 +5812,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||
int idx;
|
||||
xmlChar val;
|
||||
|
||||
idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 1);
|
||||
idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 0);
|
||||
if (idx < 0)
|
||||
goto done;
|
||||
val = in->cur[idx + 2];
|
||||
|
@ -5866,7 +6069,7 @@ done:
|
|||
ctxt->sax->endDocument(ctxt->userData);
|
||||
}
|
||||
}
|
||||
if ((ctxt->myDoc != NULL) &&
|
||||
if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL) &&
|
||||
((terminate) || (ctxt->instate == XML_PARSER_EOF) ||
|
||||
(ctxt->instate == XML_PARSER_EPILOG))) {
|
||||
xmlDtdPtr dtd;
|
||||
|
@ -5904,8 +6107,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
|
|||
}
|
||||
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
|
||||
(ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
|
||||
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
|
||||
int cur = ctxt->input->cur - ctxt->input->base;
|
||||
size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
|
||||
size_t cur = ctxt->input->cur - ctxt->input->base;
|
||||
int res;
|
||||
|
||||
res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
|
||||
|
@ -5914,10 +6117,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
|
|||
ctxt->disableSAX = 1;
|
||||
return (XML_PARSER_EOF);
|
||||
}
|
||||
ctxt->input->base = ctxt->input->buf->buffer->content + base;
|
||||
ctxt->input->cur = ctxt->input->base + cur;
|
||||
ctxt->input->end =
|
||||
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
|
||||
xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
|
||||
#ifdef DEBUG_PUSH
|
||||
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
||||
#endif
|
||||
|
@ -5932,13 +6132,16 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
|
|||
if ((in->encoder != NULL) && (in->buffer != NULL) &&
|
||||
(in->raw != NULL)) {
|
||||
int nbchars;
|
||||
size_t base = xmlBufGetInputBase(in->buffer, ctxt->input);
|
||||
size_t current = ctxt->input->cur - ctxt->input->base;
|
||||
|
||||
nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw);
|
||||
nbchars = xmlCharEncInput(in, terminate);
|
||||
if (nbchars < 0) {
|
||||
htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
|
||||
"encoder error\n", NULL, NULL);
|
||||
return(XML_ERR_INVALID_ENCODING);
|
||||
}
|
||||
xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6032,24 +6235,18 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
|
|||
inputStream->filename = (char *)
|
||||
xmlCanonicPath((const xmlChar *) filename);
|
||||
inputStream->buf = buf;
|
||||
inputStream->base = inputStream->buf->buffer->content;
|
||||
inputStream->cur = inputStream->buf->buffer->content;
|
||||
inputStream->end =
|
||||
&inputStream->buf->buffer->content[inputStream->buf->buffer->use];
|
||||
xmlBufResetInput(buf->buffer, inputStream);
|
||||
|
||||
inputPush(ctxt, inputStream);
|
||||
|
||||
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
|
||||
(ctxt->input->buf != NULL)) {
|
||||
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
|
||||
int cur = ctxt->input->cur - ctxt->input->base;
|
||||
size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
|
||||
size_t cur = ctxt->input->cur - ctxt->input->base;
|
||||
|
||||
xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
|
||||
|
||||
ctxt->input->base = ctxt->input->buf->buffer->content + base;
|
||||
ctxt->input->cur = ctxt->input->base + cur;
|
||||
ctxt->input->end =
|
||||
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
|
||||
xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
|
||||
#ifdef DEBUG_PUSH
|
||||
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
||||
#endif
|
||||
|
@ -6169,7 +6366,10 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
|
|||
|
||||
/* set encoding */
|
||||
if (encoding) {
|
||||
content = xmlMallocAtomic (xmlStrlen(content_line) + strlen(encoding) + 1);
|
||||
size_t l = strlen(encoding);
|
||||
|
||||
if (l < 1000) {
|
||||
content = xmlMallocAtomic (xmlStrlen(content_line) + l + 1);
|
||||
if (content) {
|
||||
strcpy ((char *)content, (char *)content_line);
|
||||
strcat ((char *)content, (char *)encoding);
|
||||
|
@ -6177,6 +6377,7 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
|
|||
xmlFree (content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(ctxt);
|
||||
}
|
||||
|
@ -6380,7 +6581,7 @@ htmlNodeStatus(const htmlNodePtr node, int legacy) {
|
|||
* DICT_FREE:
|
||||
* @str: a string
|
||||
*
|
||||
* Free a string if it is not owned by the "dict" dictionnary in the
|
||||
* Free a string if it is not owned by the "dict" dictionary in the
|
||||
* current scope
|
||||
*/
|
||||
#define DICT_FREE(str) \
|
||||
|
@ -6451,6 +6652,7 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt)
|
|||
|
||||
ctxt->wellFormed = 1;
|
||||
ctxt->nsWellFormed = 1;
|
||||
ctxt->disableSAX = 0;
|
||||
ctxt->valid = 1;
|
||||
ctxt->vctxt.userData = ctxt;
|
||||
ctxt->vctxt.error = xmlParserValidityError;
|
||||
|
@ -6530,6 +6732,18 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
|
|||
ctxt->options |= XML_PARSE_HUGE;
|
||||
options -= XML_PARSE_HUGE;
|
||||
}
|
||||
if (options & HTML_PARSE_NODEFDTD) {
|
||||
ctxt->options |= HTML_PARSE_NODEFDTD;
|
||||
options -= HTML_PARSE_NODEFDTD;
|
||||
}
|
||||
if (options & HTML_PARSE_IGNORE_ENC) {
|
||||
ctxt->options |= HTML_PARSE_IGNORE_ENC;
|
||||
options -= HTML_PARSE_IGNORE_ENC;
|
||||
}
|
||||
if (options & HTML_PARSE_NOIMPLIED) {
|
||||
ctxt->options |= HTML_PARSE_NOIMPLIED;
|
||||
options -= HTML_PARSE_NOIMPLIED;
|
||||
}
|
||||
ctxt->dictNames = 0;
|
||||
return (options);
|
||||
}
|
||||
|
@ -6676,6 +6890,7 @@ htmlReadFd(int fd, const char *URL, const char *encoding, int options)
|
|||
|
||||
if (fd < 0)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
xmlInitParser();
|
||||
input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
|
||||
|
@ -6723,8 +6938,11 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
|
|||
|
||||
input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
|
||||
XML_CHAR_ENCODING_NONE);
|
||||
if (input == NULL)
|
||||
if (input == NULL) {
|
||||
if (ioclose != NULL)
|
||||
ioclose(ioctx);
|
||||
return (NULL);
|
||||
}
|
||||
ctxt = htmlNewParserCtxt();
|
||||
if (ctxt == NULL) {
|
||||
xmlFreeParserInputBuffer(input);
|
||||
|
@ -6763,6 +6981,7 @@ htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur,
|
|||
return (NULL);
|
||||
if (ctxt == NULL)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
htmlCtxtReset(ctxt);
|
||||
|
||||
|
@ -6796,6 +7015,7 @@ htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,
|
|||
return (NULL);
|
||||
if (ctxt == NULL)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
htmlCtxtReset(ctxt);
|
||||
|
||||
|
@ -6832,6 +7052,7 @@ htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size,
|
|||
return (NULL);
|
||||
if (buffer == NULL)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
htmlCtxtReset(ctxt);
|
||||
|
||||
|
@ -6874,6 +7095,7 @@ htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd,
|
|||
return (NULL);
|
||||
if (ctxt == NULL)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
htmlCtxtReset(ctxt);
|
||||
|
||||
|
@ -6918,13 +7140,17 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
|
|||
return (NULL);
|
||||
if (ctxt == NULL)
|
||||
return (NULL);
|
||||
xmlInitParser();
|
||||
|
||||
htmlCtxtReset(ctxt);
|
||||
|
||||
input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
|
||||
XML_CHAR_ENCODING_NONE);
|
||||
if (input == NULL)
|
||||
if (input == NULL) {
|
||||
if (ioclose != NULL)
|
||||
ioclose(ioctx);
|
||||
return (NULL);
|
||||
}
|
||||
stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
|
||||
if (stream == NULL) {
|
||||
xmlFreeParserInputBuffer(input);
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/uri.h>
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Getting/Setting encoding meta tags *
|
||||
|
@ -164,6 +166,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
|
|||
const xmlChar *content = NULL;
|
||||
char newcontent[100];
|
||||
|
||||
newcontent[0] = 0;
|
||||
|
||||
if (doc == NULL)
|
||||
return(-1);
|
||||
|
@ -278,8 +281,13 @@ create:
|
|||
xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent);
|
||||
}
|
||||
} else {
|
||||
/* remove the meta tag if NULL is passed */
|
||||
if (encoding == NULL) {
|
||||
xmlUnlinkNode(meta);
|
||||
xmlFreeNode(meta);
|
||||
}
|
||||
/* change the document only if there is a real encoding change */
|
||||
if (xmlStrcasestr(content, encoding) == NULL) {
|
||||
else if (xmlStrcasestr(content, encoding) == NULL) {
|
||||
xmlSetProp(meta, BAD_CAST"content", BAD_CAST newcontent);
|
||||
}
|
||||
}
|
||||
|
@ -385,13 +393,9 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
|
|||
* *
|
||||
************************************************************************/
|
||||
|
||||
static int
|
||||
htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
int format);
|
||||
|
||||
/**
|
||||
* htmlNodeDumpFormat:
|
||||
* @buf: the HTML buffer output
|
||||
* htmlBufNodeDumpFormat:
|
||||
* @buf: the xmlBufPtr output
|
||||
* @doc: the document
|
||||
* @cur: the current node
|
||||
* @format: should formatting spaces been added
|
||||
|
@ -400,10 +404,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
|||
*
|
||||
* Returns the number of byte written or -1 in case of error
|
||||
*/
|
||||
static int
|
||||
htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
static size_t
|
||||
htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
int format) {
|
||||
unsigned int use;
|
||||
size_t use;
|
||||
int ret;
|
||||
xmlOutputBufferPtr outbuf;
|
||||
|
||||
|
@ -426,10 +430,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
|||
outbuf->context = NULL;
|
||||
outbuf->written = 0;
|
||||
|
||||
use = buf->use;
|
||||
use = xmlBufUse(buf);
|
||||
htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format);
|
||||
xmlFree(outbuf);
|
||||
ret = buf->use - use;
|
||||
ret = xmlBufUse(buf) - use;
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
@ -446,9 +450,24 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
|||
*/
|
||||
int
|
||||
htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
xmlInitParser();
|
||||
xmlBufPtr buffer;
|
||||
size_t ret;
|
||||
|
||||
return(htmlNodeDumpFormat(buf, doc, cur, 1));
|
||||
if ((buf == NULL) || (cur == NULL))
|
||||
return(-1);
|
||||
|
||||
xmlInitParser();
|
||||
buffer = xmlBufFromBuffer(buf);
|
||||
if (buffer == NULL)
|
||||
return(-1);
|
||||
|
||||
ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
|
||||
|
||||
xmlBufBackToBuffer(buffer);
|
||||
|
||||
if (ret > INT_MAX)
|
||||
return(-1);
|
||||
return((int) ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -481,7 +500,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
|
|||
if (enc != XML_CHAR_ENCODING_UTF8) {
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL)
|
||||
return(-1);
|
||||
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,11 +581,9 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
|||
}
|
||||
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL) {
|
||||
*mem = NULL;
|
||||
*size = 0;
|
||||
return;
|
||||
}
|
||||
if (handler == NULL)
|
||||
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
|
||||
|
||||
} else {
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
}
|
||||
|
@ -591,11 +608,11 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
|||
|
||||
xmlOutputBufferFlush(buf);
|
||||
if (buf->conv != NULL) {
|
||||
*size = buf->conv->use;
|
||||
*mem = xmlStrndup(buf->conv->content, *size);
|
||||
*size = xmlBufUse(buf->conv);
|
||||
*mem = xmlStrndup(xmlBufContent(buf->conv), *size);
|
||||
} else {
|
||||
*size = buf->buffer->use;
|
||||
*mem = xmlStrndup(buf->buffer->content, *size);
|
||||
*size = xmlBufUse(buf->buffer);
|
||||
*mem = xmlStrndup(xmlBufContent(buf->buffer), *size);
|
||||
}
|
||||
(void)xmlOutputBufferClose(buf);
|
||||
}
|
||||
|
@ -646,14 +663,15 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
||||
if (cur->ExternalID != NULL) {
|
||||
xmlOutputBufferWriteString(buf, " PUBLIC ");
|
||||
xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID);
|
||||
xmlBufWriteQuotedString(buf->buffer, cur->ExternalID);
|
||||
if (cur->SystemID != NULL) {
|
||||
xmlOutputBufferWriteString(buf, " ");
|
||||
xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
|
||||
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
|
||||
}
|
||||
} else if (cur->SystemID != NULL) {
|
||||
} else if (cur->SystemID != NULL &&
|
||||
xmlStrcmp(cur->SystemID, BAD_CAST "about:legacy-compat")) {
|
||||
xmlOutputBufferWriteString(buf, " SYSTEM ");
|
||||
xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
|
||||
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
|
||||
}
|
||||
xmlOutputBufferWriteString(buf, ">\n");
|
||||
}
|
||||
|
@ -673,9 +691,10 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
|
|||
xmlChar *value;
|
||||
|
||||
/*
|
||||
* TODO: The html output method should not escape a & character
|
||||
* The html output method should not escape a & character
|
||||
* occurring in an attribute value immediately followed by
|
||||
* a { character (see Section B.7.1 of the HTML 4.0 Recommendation).
|
||||
* This is implemented in xmlEncodeEntitiesReentrant
|
||||
*/
|
||||
|
||||
if (cur == NULL) {
|
||||
|
@ -698,20 +717,51 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
|
|||
(!xmlStrcasecmp(cur->name, BAD_CAST "src")) ||
|
||||
((!xmlStrcasecmp(cur->name, BAD_CAST "name")) &&
|
||||
(!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) {
|
||||
xmlChar *escaped;
|
||||
xmlChar *tmp = value;
|
||||
/* xmlURIEscapeStr() escapes '"' so it can be safely used. */
|
||||
xmlBufCCat(buf->buffer, "\"");
|
||||
|
||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
||||
|
||||
/* URI Escape everything, except server side includes. */
|
||||
for ( ; ; ) {
|
||||
xmlChar *escaped;
|
||||
xmlChar endChar;
|
||||
xmlChar *end = NULL;
|
||||
xmlChar *start = (xmlChar *)xmlStrstr(tmp, BAD_CAST "<!--");
|
||||
if (start != NULL) {
|
||||
end = (xmlChar *)xmlStrstr(tmp, BAD_CAST "-->");
|
||||
if (end != NULL) {
|
||||
*start = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Escape the whole string, or until start (set to '\0'). */
|
||||
escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
|
||||
if (escaped != NULL) {
|
||||
xmlBufferWriteQuotedString(buf->buffer, escaped);
|
||||
xmlBufCat(buf->buffer, escaped);
|
||||
xmlFree(escaped);
|
||||
} else {
|
||||
xmlBufferWriteQuotedString(buf->buffer, value);
|
||||
xmlBufCat(buf->buffer, tmp);
|
||||
}
|
||||
|
||||
if (end == NULL) { /* Everything has been written. */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Do not escape anything within server side includes. */
|
||||
*start = '<'; /* Restore the first character of "<!--". */
|
||||
end += 3; /* strlen("-->") */
|
||||
endChar = *end;
|
||||
*end = '\0';
|
||||
xmlBufCat(buf->buffer, start);
|
||||
*end = endChar;
|
||||
tmp = end;
|
||||
}
|
||||
|
||||
xmlBufCCat(buf->buffer, "\"");
|
||||
} else {
|
||||
xmlBufferWriteQuotedString(buf->buffer, value);
|
||||
xmlBufWriteQuotedString(buf->buffer, value);
|
||||
}
|
||||
xmlFree(value);
|
||||
} else {
|
||||
|
@ -1061,7 +1111,7 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
|
|||
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL)
|
||||
return(-1);
|
||||
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
|
||||
} else {
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
}
|
||||
|
@ -1120,7 +1170,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL)
|
||||
return(-1);
|
||||
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1181,7 +1231,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
|
|||
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL)
|
||||
return(-1);
|
||||
htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
|
||||
}
|
||||
htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
|
||||
} else {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -12,8 +12,8 @@ without warranty of any kind.
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
|
@ -226,6 +226,11 @@ order to use an ANSI C compiler:
|
|||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
|
@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
|
|||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
@ -362,4 +368,3 @@ operates.
|
|||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# You may have to ajust to call the right compiler, or other oprions
|
||||
# for compiling and linking
|
||||
#
|
||||
|
||||
CFLAGS=`xml2-config --cflags`
|
||||
LIBS=`xml2-config --libs`
|
||||
THREADLIB= -lpthread
|
||||
EXEEXT=
|
||||
|
||||
all: runtest$(EXEEXT) runsuite$(EXEEXT) testapi$(EXEEXT) testchar$(EXEEXT)
|
||||
|
||||
clean:
|
||||
$(RM) runtest$(EXEEXT) runsuite$(EXEEXT) testapi$(EXEEXT)
|
||||
|
||||
check: do_runtest do_testchar do_testapi do_runsuite
|
||||
|
||||
runtest$(EXEEXT): runtest.c
|
||||
$(CC) -o runtest$(EXEEXT) $(CFLAGS) runtest.c $(LIBS) $(THREADLIB)
|
||||
|
||||
do_runtest: runtest$(EXEEXT)
|
||||
./runtest
|
||||
|
||||
runsuite$(EXEEXT): runsuite.c
|
||||
$(CC) -o runsuite$(EXEEXT) $(CFLAGS) runsuite.c $(LIBS)
|
||||
|
||||
do_runsuite: runsuite$(EXEEXT)
|
||||
./runsuite
|
||||
|
||||
testapi$(EXEEXT): testapi.c
|
||||
$(CC) -o testapi$(EXEEXT) $(CFLAGS) testapi.c $(LIBS)
|
||||
|
||||
do_testapi: testapi$(EXEEXT)
|
||||
./testapi
|
||||
|
||||
testchar$(EXEEXT): testchar.c
|
||||
$(CC) -o testchar$(EXEEXT) $(CFLAGS) testchar.c $(LIBS)
|
||||
|
||||
do_testchar: testchar$(EXEEXT)
|
||||
./testchar
|
||||
|
|
@ -4,17 +4,647 @@
|
|||
Note that this is automatically generated from the news webpage at:
|
||||
http://xmlsoft.org/news.html
|
||||
|
||||
Items not finished and worked on, get in touch with the list if you want
|
||||
to help those - More testing on RelaxNG
|
||||
- Finishing up XML
|
||||
Schemas
|
||||
|
||||
The change log at
|
||||
ChangeLog.html
|
||||
describes the recents commits
|
||||
to the SVN at
|
||||
http://svn.gnome.org/viewvc/libxml2/trunk/
|
||||
to the GIT at
|
||||
http://git.gnome.org/browse/libxml2/
|
||||
code base.Here is the list of public releases:
|
||||
2.9.2: Oct 16 2014:
|
||||
- Security:
|
||||
Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),
|
||||
CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)
|
||||
|
||||
- Bug Fixes:
|
||||
fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),
|
||||
xmlmemory: handle realloc properly (Yegor Yefremov),
|
||||
Python generator bug raised by the const change (Daniel Veillard),
|
||||
Windows Critical sections not released correctly (Daniel Veillard),
|
||||
Parser error on repeated recursive entity expansion containing < (Daniel Veillard),
|
||||
xpointer : fixing Null Pointers (Gaurav Gupta),
|
||||
Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),
|
||||
parser bug on misformed namespace attributes (Dennis Filder),
|
||||
Pointer dereferenced before null check (Daniel Veillard),
|
||||
Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),
|
||||
Possible overflow in HTMLParser.c (Daniel Veillard),
|
||||
python/tests/sync.py assumes Python dictionaries are ordered (John Beck),
|
||||
Fix Enum check and missing break (Gaurav Gupta),
|
||||
xmlIO: Handle error returns from dup() (Philip Withnall),
|
||||
Fix a problem properly saving URIs (Daniel Veillard),
|
||||
wrong error column in structured error when parsing attribute values (Juergen Keil),
|
||||
wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),
|
||||
no error column in structured error handler for xml schema validation errors (Juergen Keil),
|
||||
Couple of Missing Null checks (Gaurav Gupta),
|
||||
Add couple of missing Null checks (Daniel Veillard),
|
||||
xmlschemastypes: Fix potential array overflow (Philip Withnall),
|
||||
runtest: Fix a memory leak on parse failure (Philip Withnall),
|
||||
xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),
|
||||
xmlcatalog: Fix a memory leak on quit (Philip Withnall),
|
||||
HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),
|
||||
Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),
|
||||
Avoid Possible Null Pointer in trio.c (Gaurav Gupta),
|
||||
Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),
|
||||
XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),
|
||||
Fix various Missing Null checks (Gaurav Gupta),
|
||||
Fix a potential NULL dereference (Daniel Veillard),
|
||||
Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),
|
||||
Add a missing argument check (Gaurav Gupta),
|
||||
Adding a check in case of allocation error (Gaurav Gupta),
|
||||
xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),
|
||||
Adding some missing NULL checks (Gaurav),
|
||||
Fixes for xmlInitParserCtxt (Daniel Veillard),
|
||||
Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),
|
||||
erroneously ignores a validation error if no error callback set (Daniel Veillard),
|
||||
xmllint was not parsing the --c14n11 flag (Sérgio Batista),
|
||||
Avoid Possible null pointer dereference in memory debug mode (Gaurav),
|
||||
Avoid Double Null Check (Gaurav),
|
||||
Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),
|
||||
Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),
|
||||
Avoid a possible NULL pointer dereference (Gaurav),
|
||||
Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),
|
||||
Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),
|
||||
fixing a ptotential uninitialized access (Daniel Veillard),
|
||||
Fix an fd leak in an error case (Daniel Veillard),
|
||||
Missing initialization for the catalog module (Daniel Veillard),
|
||||
Handling of XPath function arguments in error case (Nick Wellnhofer),
|
||||
Fix a couple of missing NULL checks (Gaurav),
|
||||
Avoid a possibility of dangling encoding handler (Gaurav),
|
||||
Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),
|
||||
Fix a bug loading some compressed files (Mike Alexander),
|
||||
Fix XPath node comparison bug (Gaurav),
|
||||
Type mismatch in xmlschemas.c (Gaurav),
|
||||
Type mismatch in xmlschemastypes.c (Gaurav),
|
||||
Avoid a deadcode in catalog.c (Daniel Veillard),
|
||||
run close socket on Solaris, same as we do on other platforms (Denis Pauk),
|
||||
Fix pointer dereferenced before null check (Gaurav),
|
||||
Fix a potential NULL dereference in tree code (Daniel Veillard),
|
||||
Fix potential NULL pointer dereferences in regexp code (Gaurav),
|
||||
xmllint --pretty crashed without following numeric argument (Tim Galeckas),
|
||||
Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),
|
||||
Fix XPath '//' optimization with predicates (Nick Wellnhofer),
|
||||
Clear up a potential NULL dereference (Daniel Veillard),
|
||||
Fix a possible NULL dereference (Gaurav),
|
||||
Avoid crash if allocation fails (Daniel Veillard),
|
||||
Remove occasional leading space in XPath number formatting (Daniel Veillard),
|
||||
Fix handling of mmap errors (Daniel Veillard),
|
||||
Catch malloc error and exit accordingly (Daniel Veillard),
|
||||
missing else in xlink.c (Ami Fischman),
|
||||
Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),
|
||||
Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),
|
||||
properly quote the namespace uris written out during c14n (Aleksey Sanin),
|
||||
Remove premature XInclude check on URI being relative (Alexey Neyman),
|
||||
Fix missing break on last() function for attributes (dcb),
|
||||
Do not URI escape in server side includes (Romain Bondue),
|
||||
Fix an error in xmlCleanupParser (Alexander Pastukhov)
|
||||
|
||||
- Documentation:
|
||||
typo in error messages "colon are forbidden from..." (Daniel Veillard),
|
||||
Fix a link to James SAX documentation old page (Daniel Veillard),
|
||||
Fix typos in relaxng.c (Jan Pokorný),
|
||||
Fix a doc typo (Daniel Veillard),
|
||||
Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),
|
||||
Add limitations about encoding conversion (Daniel Veillard),
|
||||
Fix typos in xmlschemas{,types}.c (Jan Pokorný),
|
||||
Fix incorrect spelling entites->entities (Jan Pokorný),
|
||||
Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)
|
||||
|
||||
- Portability:
|
||||
AC_CONFIG_FILES and executable bit (Roumen Petrov),
|
||||
remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),
|
||||
fix some tabs mixing incompatible with python3 (Roumen Petrov),
|
||||
Visual Studio 14 CTP defines snprintf() (Francis Dupont),
|
||||
OS400: do not try to copy unexisting doc files (Patrick Monnerat),
|
||||
OS400: use either configure.ac or configure.in. (Patrick Monnerat),
|
||||
os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),
|
||||
OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),
|
||||
OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),
|
||||
OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),
|
||||
OS400: include in distribution tarball. (Patrick Monnerat),
|
||||
OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),
|
||||
OS400: Add compilation scripts. (Patrick Monnerat),
|
||||
OS400: ILE RPG language header files. (Patrick Monnerat),
|
||||
OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),
|
||||
OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat),
|
||||
OS400: Easy character transcoding support (Patrick Monnerat),
|
||||
OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),
|
||||
OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),
|
||||
Fix building when configuring without xpath and xptr (Daniel Veillard),
|
||||
configure: Add --with-python-install-dir (Jonas Eriksson),
|
||||
Fix compilation with minimum and xinclude. (Nicolas Le Cam),
|
||||
Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),
|
||||
Fix compilation with minimum and schematron. (Nicolas Le Cam),
|
||||
Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),
|
||||
Don't use xmlValidateName() when not available. (Nicolas Le Cam),
|
||||
Fix a portability issue on Windows (Longstreth Jon),
|
||||
Various portability patches for OpenVMS (Jacob (Jouk) Jansen),
|
||||
Use specific macros for portability to OS/400 (Patrick Monnerat),
|
||||
Add macros needed for OS/400 portability (Patrick Monnerat),
|
||||
Portability patch for fopen on OS/400 (Patrick Monnerat),
|
||||
Portability fixes for OS/400 (Patrick Monnerat),
|
||||
Improve va_list portability (Patrick Monnerat),
|
||||
Portability fix (Patrick Monnerat),
|
||||
Portability fix (Patrick Monnerat),
|
||||
Generic portability fix (Patrick Monnerat),
|
||||
Shortening lines in headers (Patrick Monnerat),
|
||||
build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),
|
||||
build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),
|
||||
fix some tabs mixing incompatible with python3 (Daniel Veillard),
|
||||
add additional defines checks for support "./configure --with-minimum" (Denis Pauk),
|
||||
Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),
|
||||
python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),
|
||||
python: Fix compiler warnings when building python3 bindings (Armin K),
|
||||
Fix for compilation with python 2.6.8 (Petr Sumbera)
|
||||
|
||||
- Improvements:
|
||||
win32/libxml2.def.src after rebuild in doc (Roumen Petrov),
|
||||
elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),
|
||||
elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),
|
||||
Provide cmake module (Samuel Martin),
|
||||
Fix a couple of issues raised by make dist (Daniel Veillard),
|
||||
Fix and add const qualifiers (Kurt Roeckx),
|
||||
Preparing for upcoming release of 2.9.2 (Daniel Veillard),
|
||||
Fix zlib and lzma libraries check via command line (Dmitriy),
|
||||
wrong error column in structured error when parsing end tag (Juergen Keil),
|
||||
doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),
|
||||
Add methods for python3 iterator (Ron Angeles),
|
||||
Support element node traversal in document fragments. (Kyle VanderBeek),
|
||||
xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),
|
||||
Added macros for argument casts (Eric Zurcher),
|
||||
adding init calls to xml and html Read parsing entry points (Daniel Veillard),
|
||||
Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),
|
||||
Implement choice for name classes on attributes (Shaun McCance),
|
||||
Two small namespace tweaks (Daniel Veillard),
|
||||
xmllint --memory should fail on empty files (Daniel Veillard),
|
||||
Cast encoding name to char pointer to match arg type (Nikolay Sivov)
|
||||
|
||||
- Cleanups:
|
||||
Removal of old configure.in (Daniel Veillard),
|
||||
Unreachable code in tree.c (Gaurav Gupta),
|
||||
Remove a couple of dead conditions (Gaurav Gupta),
|
||||
Avoid some dead code and cleanup in relaxng.c (Gaurav),
|
||||
Drop not needed checks (Denis Pauk),
|
||||
Fix a wrong test (Daniel Veillard)
|
||||
|
||||
|
||||
|
||||
2.9.1: Apr 19 2013:
|
||||
- Features:
|
||||
Support for Python3 (Daniel Veillard),
|
||||
Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)
|
||||
|
||||
- Documentation:
|
||||
Add documentation for xmllint --xpath (Daniel Veillard),
|
||||
Fix the URL of the SAX documentation from James (Daniel Veillard),
|
||||
Fix spelling of "length". (Michael Wood)
|
||||
|
||||
- Portability:
|
||||
Fix python bindings with versions older than 2.7 (Daniel Veillard),
|
||||
rebuild docs:Makefile.am (Roumen Petrov),
|
||||
elfgcchack.h after rebuild in doc (Roumen Petrov),
|
||||
elfgcchack for buf module (Roumen Petrov),
|
||||
Fix a uneeded and wrong extra link parameter (Daniel Veillard),
|
||||
Few cleanup patches for Windows (Denis Pauk),
|
||||
Fix rpmbuild --nocheck (Mark Salter),
|
||||
Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),
|
||||
Fix Broken multi-arch support in xml2-config (Daniel Veillard),
|
||||
Fix a portability issue for GCC < 3.4.0 (Daniel Veillard),
|
||||
Windows build fixes (Daniel Richard),
|
||||
Fix a thread portability problem (Friedrich Haubensak),
|
||||
Downgrade autoconf requirement to 2.63 (Daniel Veillard)
|
||||
|
||||
- Bug Fixes:
|
||||
Fix a linking error for python bindings (Daniel Veillard),
|
||||
Fix a couple of return without value (Jüri Aedla),
|
||||
Improve the hashing functions (Daniel Franke),
|
||||
Improve handling of xmlStopParser() (Daniel Veillard),
|
||||
Remove risk of lockup in dictionary initialization (Daniel Veillard),
|
||||
Activate detection of encoding in external subset (Daniel Veillard),
|
||||
Fix an output buffer flushing conversion bug (Mikhail Titov),
|
||||
Fix an old bug in xmlSchemaValidateOneElement (Csaba László),
|
||||
Fix configure cannot remove messages (Gilles Espinasse),
|
||||
fix schema validation in combination with xsi:nil (Daniel Veillard),
|
||||
xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),
|
||||
Fix a few problems with setEntityLoader (Alexey Neyman),
|
||||
Detect excessive entities expansion upon replacement (Daniel Veillard),
|
||||
Fix the flushing out of raw buffers on encoding conversions (Daniel,
|
||||
Veillard),
|
||||
Fix some buffer conversion issues (Daniel Veillard),
|
||||
When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,
|
||||
Veillard),
|
||||
Fix an error in the progressive DTD parsing code (Dan Winship),
|
||||
xmllint should not load DTD by default when using the reader (Daniel,
|
||||
Veillard),
|
||||
Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),
|
||||
Fix potential out of bound access (Daniel Veillard),
|
||||
Fix large parse of file from memory (Daniel Veillard),
|
||||
Fix a bug in the nsclean option of the parser (Daniel Veillard),
|
||||
Fix a regression in 2.9.0 breaking validation while streaming (Daniel,
|
||||
Veillard),
|
||||
Remove potential calls to exit() (Daniel Veillard)
|
||||
|
||||
- Improvements:
|
||||
Regenerated API, and testapi, rebuild documentation (Daniel Veillard),
|
||||
Fix tree iterators broken by 2to3 script (Daniel Veillard),
|
||||
update all tests for Python3 and Python2 (Daniel Veillard),
|
||||
A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),
|
||||
Fix compilation on Python3 (Daniel Veillard),
|
||||
Converting apibuild.py to python3 (Daniel Veillard),
|
||||
First pass at starting porting to python3 (Daniel Veillard),
|
||||
updated configure.in for python3 (Daniel Veillard),
|
||||
Add support for xpathRegisterVariable in Python (Shaun McCance),
|
||||
Added a regression tests from bug 694228 data (Daniel Veillard),
|
||||
Cache presence of '<' in entities content (Daniel Veillard),
|
||||
Avoid extra processing on entities (Daniel Veillard),
|
||||
Python binding for xmlRegisterInputCallback (Alexey Neyman),
|
||||
Python bindings: DOM casts everything to xmlNode (Alexey Neyman),
|
||||
Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),
|
||||
Adding streaming validation to runtest checks (Daniel Veillard),
|
||||
Add a --pushsmall option to xmllint (Daniel Veillard)
|
||||
|
||||
- Cleanups:
|
||||
Switched comment in file to UTF-8 encoding (Daniel Veillard),
|
||||
Extend gitignore (Daniel Veillard),
|
||||
Silent the new python test on input (Alexey Neyman),
|
||||
Cleanup of a duplicate test (Daniel Veillard),
|
||||
Cleanup on duplicate test expressions (Daniel Veillard),
|
||||
Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,
|
||||
Gansterer),
|
||||
Spec cleanups and a fix for multiarch support (Daniel Veillard),
|
||||
Silence a clang warning (Daniel Veillard),
|
||||
Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),
|
||||
rand_seed should be static in dict.c (Wouter Van Rooy),
|
||||
Fix typos in parser comments (Jan Pokorný)
|
||||
|
||||
|
||||
|
||||
2.9.0: Sep 11 2012:
|
||||
- Features:
|
||||
A few new API entry points,
|
||||
More resilient push parser mode,
|
||||
A lot of portability improvement,
|
||||
Faster XPath evaluation
|
||||
|
||||
- Documentation:
|
||||
xml2-config.1 markup error (Christian Weisgerber),
|
||||
libxml(3) manpage typo fix (John Bradshaw),
|
||||
More cleanups to the documentation part of libxml2 (Daniel Richard G)
|
||||
|
||||
- Portability:
|
||||
Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),
|
||||
fix builds not having stdint.h (Rob Richards),
|
||||
GetProcAddressA is available only on WinCE (Daniel Veillard),
|
||||
More updates and cleanups on autotools and Makefiles (Daniel Richard G),
|
||||
More changes for Win32 compilation (Eric Zurcher),
|
||||
Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),
|
||||
Bundles all generated files for python into the distribution (Daniel Richard G),
|
||||
Fix compiler warnings of wincecompat.c (Patrick Gansterer),
|
||||
Fix non __GNUC__ build (Patrick Gansterer),
|
||||
Fix windows unicode build (Patrick Gansterer),
|
||||
clean redefinition of {v}snprintf in C-source (Roumen Petrov),
|
||||
use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),
|
||||
fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),
|
||||
Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),
|
||||
Various "make distcheck" and portability fixups (Daniel Richard G),
|
||||
Fix compilation on older Visual Studio (Daniel Veillard)
|
||||
|
||||
- Bug Fixes:
|
||||
Change the XPath code to percolate allocation errors (Daniel Veillard),
|
||||
Fix reuse of xmlInitParser (Daniel Veillard),
|
||||
Fix potential crash on entities errors (Daniel Veillard),
|
||||
initialize var (Rob Richards),
|
||||
Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),
|
||||
Fix problem with specific and generic error handlers (Pietro Cerutti),
|
||||
Avoid a potential infinite recursion (Daniel Veillard),
|
||||
Fix an XSD error when generating internal automata (Daniel Veillard),
|
||||
Patch for xinclude of text using multibyte characters (Vitaly Ostanin),
|
||||
Fix a segfault on XSD validation on pattern error (Daniel Veillard),
|
||||
Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),
|
||||
Add a missing element check (Daniel Veillard),
|
||||
Adding various checks on node type though the API (Daniel Veillard),
|
||||
Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),
|
||||
Fix make dist to include new private header files (Daniel Veillard),
|
||||
More fixups on the push parser behaviour (Daniel Veillard),
|
||||
Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),
|
||||
Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),
|
||||
Fixup limits parser (Daniel Veillard),
|
||||
Do not fetch external parsed entities (Daniel Veillard),
|
||||
Fix an error in previous commit (Aron Xu),
|
||||
Fix entities local buffers size problems (Daniel Veillard),
|
||||
Fix parser local buffers size problems (Daniel Veillard),
|
||||
Fix a failure to report xmlreader parsing failures (Daniel Veillard)
|
||||
|
||||
- Improvements:
|
||||
Keep libxml2.syms when running "make distclean" (Daniel Veillard),
|
||||
Allow to set the quoting character of an xmlWriter (Csaba Raduly),
|
||||
Keep non-significant blanks node in HTML parser (Daniel Veillard),
|
||||
Add a forbidden variable error number and message to XPath (Daniel Veillard),
|
||||
Support long path names on WNT (Michael Stahl),
|
||||
Improve HTML escaping of attribute on output (Daniel Veillard),
|
||||
Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),
|
||||
Switching XPath node sorting to Timsort (Vojtech Fried),
|
||||
Optimizing '//' in XPath expressions (Nick Wellnhofer),
|
||||
Expose xmlBufShrink in the public tree API (Daniel Veillard),
|
||||
Visible HTML elements close the head tag (Conrad Irwin),
|
||||
Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),
|
||||
Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),
|
||||
minimize use of HAVE_CONFIG_H (Roumen Petrov),
|
||||
fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),
|
||||
Add support for big line numbers in error reporting (Daniel Veillard),
|
||||
Avoid using xmlBuffer for serialization (Daniel Veillard),
|
||||
Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),
|
||||
Provide new accessors for xmlOutputBuffer (Daniel Veillard),
|
||||
Improvements for old buffer compatibility (Daniel Veillard),
|
||||
Expand the limit test program (Daniel Veillard),
|
||||
Improve error reporting on parser errors (Daniel Veillard),
|
||||
Implement some default limits in the XPath module (Daniel Veillard),
|
||||
Introduce some default parser limits (Daniel Veillard),
|
||||
Cleanups and new limit APIs for dictionaries (Daniel Veillard),
|
||||
Fixup for buf.c (Daniel Veillard),
|
||||
Cleanup URI module memory allocation code (Daniel Veillard),
|
||||
Extend testlimits (Daniel Veillard),
|
||||
More avoid quadratic behaviour (Daniel Veillard),
|
||||
Impose a reasonable limit on PI size (Daniel Veillard),
|
||||
first version of testlimits new test (Daniel Veillard),
|
||||
Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),
|
||||
Impose a reasonable limit on comment size (Daniel Veillard),
|
||||
Impose a reasonable limit on attribute size (Daniel Veillard),
|
||||
Harden the buffer code and make it more compatible (Daniel Veillard),
|
||||
More cleanups for input/buffers code (Daniel Veillard),
|
||||
Cleanup function xmlBufResetInput(), to set input from Buffer (Daniel Veillard)
|
||||
Swicth the test program for characters to new input buffers (Daniel Veillard),
|
||||
Convert the HTML tree module to the new buffers (Daniel Veillard),
|
||||
Convert of the HTML parser to new input buffers (Daniel Veillard),
|
||||
Convert the writer to new output buffer and save APIs (Daniel Veillard),
|
||||
Convert XMLReader to the new input buffers (Daniel Veillard),
|
||||
New saving functions using xmlBuf and conversion (Daniel Veillard),
|
||||
Provide new xmlBuf based saving functions (Daniel Veillard),
|
||||
Convert XInclude to the new input buffers (Daniel Veillard),
|
||||
Convert catalog code to the new input buffers (Daniel Veillard),
|
||||
Convert C14N to the new Input buffer (Daniel Veillard),
|
||||
Convert xmlIO.c to the new input and output buffers (Daniel Veillard),
|
||||
Convert XML parser to the new input buffers (Daniel Veillard),
|
||||
Incompatible change to the Input and Output buffers (Daniel Veillard),
|
||||
Adding new encoding function to deal with the new structures (Daniel Veillard),
|
||||
Convert XPath to xmlBuf (Daniel Veillard),
|
||||
Adding a new buf module for buffers (Daniel Veillard),
|
||||
Memory error within SAX2 reuse common framework (Daniel Veillard),
|
||||
Fix xmllint --xpath node initialization (Daniel Veillard)
|
||||
|
||||
- Cleanups:
|
||||
Various cleanups to avoid compiler warnings (Daniel Veillard),
|
||||
Big space and tab cleanup (Daniel Veillard),
|
||||
Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),
|
||||
Second round of cleanups for LibXML2 docs/examples (Daniel Richard),
|
||||
Remove all .cvsignore as they are not used anymore (Daniel Veillard),
|
||||
Fix a Timsort function helper comment (Daniel Veillard),
|
||||
Small cleanup for valgrind target (Daniel Veillard),
|
||||
Patch for portability of latin characters in C files (Daniel Veillard),
|
||||
Cleanup some of the parser code (Daniel Veillard),
|
||||
Fix a variable name in comment (Daniel Veillard),
|
||||
Regenerated testapi.c (Daniel Veillard),
|
||||
Regenerating docs and API files (Daniel Veillard),
|
||||
Small cleanup of unused variables in test (Daniel Veillard),
|
||||
Expand .gitignore with more files (Daniel Veillard)
|
||||
|
||||
|
||||
|
||||
2.8.0: May 23 2012:
|
||||
- Features:
|
||||
add lzma compression support (Anders F Bjorklund)
|
||||
|
||||
- Documentation:
|
||||
xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä),
|
||||
Update README.tests (Daniel Veillard),
|
||||
URI handling code is not OOM resilient (Daniel Veillard),
|
||||
Fix an error in comment (Daniel Veillard),
|
||||
Fixed bug #617016 (Daniel Mustieles),
|
||||
Fixed two typos in the README document (Daniel Neel),
|
||||
add generated html files (Anders F Bjorklund),
|
||||
Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard),
|
||||
Improve documentation a bit (Daniel Veillard),
|
||||
Updated URL for lxml python bindings (Daniel Veillard)
|
||||
|
||||
- Portability:
|
||||
Restore code for Windows compilation (Daniel Veillard),
|
||||
Remove git error message during configure (Christian Dywan),
|
||||
xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer),
|
||||
remove a bashism in confgure.in (John Hein),
|
||||
undef ERROR if already defined (Patrick R. Gansterer),
|
||||
Fix library problems with mingw-w64 (Michael Cronenworth),
|
||||
fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards),
|
||||
prefer native threads on win32 (Sam Thursfield),
|
||||
Allow to compile with Visual Studio 2010 (Thomas Lemm),
|
||||
Fix mingw's snprintf configure check (Andoni Morales),
|
||||
fixed a 64bit big endian issue (Marcus Meissner),
|
||||
Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard),
|
||||
Fix windows build from lzma addition (Rob Richards),
|
||||
autogen: Only check for libtoolize (Colin Walters),
|
||||
Fix the Windows build files (Patrick von Reth),
|
||||
634846 Remove a linking option breaking Windows VC10 (Daniel Veillard),
|
||||
599241 fix an initialization problem on Win64 (Andrew W. Nosenko),
|
||||
fix win build (Rob Richards)
|
||||
|
||||
- Bug fixes:
|
||||
Part for rand_r checking missing (Daniel Veillard),
|
||||
Cleanup on randomization (Daniel Veillard),
|
||||
Fix undefined reference in python module (Pacho Ramos),
|
||||
Fix a race in xmlNewInputStream (Daniel Veillard),
|
||||
Fix weird streaming RelaxNG errors (Noam),
|
||||
Fix various bugs in new code raised by the API checking (Daniel Veillard),
|
||||
Fix various problems with "make dist" (Daniel Veillard),
|
||||
Fix a memory leak in the xzlib code (Daniel Veillard),
|
||||
HTML parser error with <noscript> in the <head> (Denis Pauk),
|
||||
XSD: optional element in complex type extension (Remi Gacogne),
|
||||
Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard),
|
||||
Fix a wrong return value in previous patch (Daniel Veillard),
|
||||
Fix an uninitialized variable use (Daniel Veillard),
|
||||
Fix a compilation problem with --minimum (Brandon Slack),
|
||||
Remove redundant and ungarded include of resolv.h (Daniel Veillard),
|
||||
xinclude with parse="text" does not use the entity loader (Shaun McCance),
|
||||
Allow to parse 1 byte HTML files (Denis Pauk),
|
||||
Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder),
|
||||
Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
|
||||
Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
|
||||
xmlParseNodeInContext problems with an empty document (Tim Elliott),
|
||||
HTML element position is not detected propperly (Pavel Andrejs),
|
||||
Fix an off by one pointer access (Jüri Aedla),
|
||||
Try to fix a problem with entities in SAX mode (Daniel Veillard),
|
||||
Fix a crash with xmllint --path on empty results (Daniel Veillard),
|
||||
Fixed bug #667946 (Daniel Mustieles),
|
||||
Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
|
||||
Fix a wrong enum type use in Schemas Types (Nico Weber),
|
||||
Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard),
|
||||
Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard),
|
||||
fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan),
|
||||
fix a pair of possible out of array char references (Daniel Veillard),
|
||||
Fix an allocation error when copying entities (Daniel Veillard),
|
||||
Make sure the parser returns when getting a Stop order (Chris Evans),
|
||||
Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng),
|
||||
Fix a schema type duration comparison overflow (Daniel Veillard),
|
||||
Fix an unimplemented part in RNG value validation (Daniel Veillard),
|
||||
Fix missing error status in XPath evaluation (Daniel Veillard),
|
||||
Hardening of XPath evaluation (Daniel Veillard),
|
||||
Fix an off by one error in encoding (Daniel Veillard),
|
||||
Fix RELAX NG include bug #655288 (Shaun McCance),
|
||||
Fix XSD validation bug #630130 (Toyoda Eizi),
|
||||
Fix some potential problems on reallocation failures (Chris Evans),
|
||||
__xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin),
|
||||
__xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin),
|
||||
Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards),
|
||||
Small fix for previous commit (Daniel Veillard),
|
||||
Fix a potential freeing error in XPath (Daniel Veillard),
|
||||
Fix a potential memory access error (Daniel Veillard),
|
||||
Reactivate the shared library versionning script (Daniel Veillard)
|
||||
|
||||
- Improvements:
|
||||
use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov),
|
||||
New symbols added for the next release (Daniel Veillard),
|
||||
xmlTextReader bails too quickly on error (Andy Lutomirski),
|
||||
Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin),
|
||||
Use buffers when constructing string node lists. (Conrad Irwin),
|
||||
Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
|
||||
wrong message for double hyphen in comment XML error (Bryan Henderson),
|
||||
Fix "make tst" to grab lzma lib too (Daniel Veillard),
|
||||
Add "whereis" command to xmllint shell (Ryan),
|
||||
Improve xmllint shell (Ryan),
|
||||
add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
|
||||
Add --system support to autogen.sh (Daniel Veillard),
|
||||
Add hash randomization to hash and dict structures (Daniel Veillard),
|
||||
included xzlib in dist (Anders F Bjorklund),
|
||||
move xz/lzma helpers to separate included files (Anders F Bjorklund),
|
||||
add generated devhelp files (Anders F Bjorklund),
|
||||
add XML_WITH_LZMA to api (Anders F Bjorklund),
|
||||
autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
|
||||
Improve the error report on undefined REFs (Daniel Veillard),
|
||||
Add exception for new W3C PI xml-model (Daniel Veillard),
|
||||
Add options to ignore the internal encoding (Daniel Veillard),
|
||||
testapi: use the right type for the check (Stefan Kost),
|
||||
various: handle return values of write calls (Stefan Kost),
|
||||
testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost),
|
||||
runxmlconf: update to latest testsuite version (Stefan Kost),
|
||||
configure: add -Wno-long-long to CFLAGS (Stefan Kost),
|
||||
configure: support silent automake rules if possible (Stefan Kost),
|
||||
xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost),
|
||||
__xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin),
|
||||
__xmlRaiseError: do cheap code check early (Dmitry V. Levin)
|
||||
|
||||
- Cleanups:
|
||||
Cleanups before 2.8.0-rc2 (Daniel Veillard),
|
||||
Avoid an extra operation (Daniel Veillard),
|
||||
Remove vestigial de-ANSI-fication support. (Javier Jardón),
|
||||
autogen.sh: Fix typo (Javier Jardón),
|
||||
Do not use unsigned but unsigned int (Daniel Veillard),
|
||||
Remove two references to u_short (Daniel Veillard),
|
||||
Fix -Wempty-body warning from clang (Nico Weber),
|
||||
Cleanups of lzma support (Daniel Veillard),
|
||||
Augment the list of ignored files (Daniel Veillard),
|
||||
python: remove unused variable (Stefan Kost),
|
||||
python: flag two unused args (Stefan Kost),
|
||||
configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
|
||||
xpath: remove unused variable (Stefan Kost)
|
||||
|
||||
|
||||
|
||||
2.7.8: Nov 4 2010:
|
||||
- Features:
|
||||
480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
|
||||
Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
|
||||
|
||||
- Documentation:
|
||||
Fix devhelp documentation installation (Mike Hommey),
|
||||
Fix web site encoding problems (Daniel Veillard),
|
||||
Fix a couple of typo in HTML parser error messages (Michael Day),
|
||||
Forgot to update the news page for 0.7.7 (Daniel Veillard)
|
||||
|
||||
- Portability:
|
||||
607273 Fix python detection on MSys/Windows (LRN),
|
||||
614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer),
|
||||
Fix compilation with Clang (Koop Mast),
|
||||
Fix Win32 build (Rob Richards)
|
||||
|
||||
- Bug Fixes:
|
||||
595789 fix a remaining potential Solaris problem (Daniel Veillard),
|
||||
617468 fix progressive HTML parsing with style using "'" (Denis Pauk),
|
||||
616478 Fix xmllint shell write command (Gwenn Kahz),
|
||||
614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile),
|
||||
627987 Fix XSD IDC errors in imported schemas (Jim Panetta),
|
||||
629325 XPath rounding errors first cleanup (Phil Shafer),
|
||||
630140 fix iso995x encoding error (Daniel Veillard),
|
||||
make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard),
|
||||
Fix a change of semantic on XPath preceding and following axis (Daniel Veillard),
|
||||
Fix a potential segfault due to weak symbols on pthreads (Mike Hommey),
|
||||
Fix a leak in XPath compilation (Daniel Veillard),
|
||||
Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard),
|
||||
Avoid a descriptor leak in catalog loading code (Carlo Bramini),
|
||||
Fix a small bug in XPath evaluation code (Marius Wachtler),
|
||||
Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
|
||||
Fix errors in XSD double validation check (Csaba Raduly),
|
||||
Fix handling of apos in URIs (Daniel Veillard),
|
||||
xmlTextReaderReadOuterXml should handle DTD (Rob Richards),
|
||||
Autogen.sh needs to create m4 directory (Rob Richards)
|
||||
|
||||
- Improvements:
|
||||
606592 update language ID parser to RFC 5646 (Daniel Veillard),
|
||||
Sort python generated stubs (Mike Hommey),
|
||||
Add an HTML parser option to avoid a default doctype (Daniel Veillard)
|
||||
|
||||
- Cleanups:
|
||||
618831 don't ship generated files in git (Adrian Bunk),
|
||||
Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk),
|
||||
Various cleanups on encoding handling (Daniel Veillard),
|
||||
Fix xmllint to use format=1 for default formatting (Adam Spragg),
|
||||
Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg),
|
||||
Cleanup encoding pointer comparison (Nikolay Sivov),
|
||||
Small code cleanup on previous patch (Daniel Veillard)
|
||||
|
||||
|
||||
|
||||
2.7.7: Mar 15 2010:
|
||||
- Improvements:
|
||||
Adding a --xpath option to xmllint (Daniel Veillard),
|
||||
Make HTML parser non-recursive (Eugene Pimenov)
|
||||
|
||||
- Portability:
|
||||
relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton),
|
||||
Fix build failure on Sparc solaris (Roumen Petrov),
|
||||
use autoreconf in autogen.sh (Daniel Veillard),
|
||||
Fix build with mingw (Roumen Petrov),
|
||||
Upgrade some of the configure and autogen (Daniel Veillard),
|
||||
Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards),
|
||||
Fix a const warning in xmlNodeSetBase (Martin Trappel),
|
||||
Fix python generator to not use deprecated xmllib (Daniel Veillard),
|
||||
Update some automake files (Daniel Veillard),
|
||||
598785 Fix nanohttp on Windows (spadix)
|
||||
|
||||
- Bug Fixes:
|
||||
libxml violates the zlib interface and crashes (Mark Adler),
|
||||
Fix broken escape behaviour in regexp ranges (Daniel Veillard),
|
||||
Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
|
||||
Fix detection of python linker flags (Daniel Macks),
|
||||
fix build error in libxml2/python (Paul Smith),
|
||||
ChunkParser: Incorrect decoding of small xml files (Raul Hudea),
|
||||
htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
|
||||
Fix a missing #ifdef (Daniel Veillard),
|
||||
Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
|
||||
xmlPreviousElementSibling mistake (François Delyon),
|
||||
608773 add a missing check in xmlGROW (Daniel Veillard),
|
||||
Fix xmlParseInNodeContext for HTML content (Daniel Veillard),
|
||||
Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards),
|
||||
Fix some missing commas in HTML element lists (Eugene Pimenov),
|
||||
Correct variable type to unsigned (Nikolay Sivov),
|
||||
Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard),
|
||||
Fix memory leak in xmlXPathEvalExpression() (Martin),
|
||||
Fix an init bug in global.c (Kai Henning),
|
||||
Fix xmlNodeSetBase() comment (Daniel Veillard),
|
||||
Fix broken escape behaviour in regexp ranges (Daniel Veillard),
|
||||
Don't give default HTML boolean attribute values in parser (Daniel Veillard),
|
||||
xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
|
||||
|
||||
- Cleanups:
|
||||
Cleanup a couple of weirdness in HTML parser (Eugene Pimenov)
|
||||
|
||||
|
||||
|
||||
2.7.6: Oct 6 2009:
|
||||
- Bug Fixes:
|
||||
Restore thread support in default configuration (Andrew W. Nosenko),
|
||||
|
@ -215,7 +845,7 @@ http://svn.gnome.org/viewvc/libxml2/trunk/
|
|||
- Improvement: switch parser to XML-1.0 5th edition, add parsing flags
|
||||
for old versions, switch URI parsing to RFC 3986,
|
||||
add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
|
||||
new hashing functions for dictionnaries (based on Stefan Behnel work),
|
||||
new hashing functions for dictionaries (based on Stefan Behnel work),
|
||||
improve handling of misplaced html/head/body in HTML parser, better
|
||||
regression test tools and code coverage display, better algorithms
|
||||
to detect various versions of the billion laughts attacks, make
|
||||
|
@ -601,7 +1231,7 @@ Do not use or package 2.6.25
|
|||
Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
|
||||
some gcc4 fixes, HP-UX portability fixes (Rick Jones).
|
||||
- bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
|
||||
xmlreader stopping on non-fatal errors, thread support for dictionnaries
|
||||
xmlreader stopping on non-fatal errors, thread support for dictionaries
|
||||
reference counting (Gary Coady), internal subset and push problem, URL
|
||||
saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
|
||||
fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
|
||||
|
@ -614,7 +1244,7 @@ Do not use or package 2.6.25
|
|||
Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
|
||||
(Rob Richards), Schemas decimal type fixes (William Brack),
|
||||
xmlByteConsumed static buffer (Ben Maurer).
|
||||
- improvement: speedup parsing comments and DTDs, dictionnary support for
|
||||
- improvement: speedup parsing comments and DTDs, dictionary support for
|
||||
hash tables, Schemas Identity constraints (Kasimier), streaming XPath
|
||||
subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
|
||||
values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
|
||||
|
@ -824,7 +1454,7 @@ Do not use or package 2.6.25
|
|||
URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
|
||||
XInclude and XPointer fixes for entities (William), XML parser bug
|
||||
reported by Holger Rauch, nanohttp fd leak (William), regexps char
|
||||
groups '-' handling (William), dictionnary reference counting problems,
|
||||
groups '-' handling (William), dictionary reference counting problems,
|
||||
do not close stderr.
|
||||
- performance patches from Petr Pajas
|
||||
- Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
|
||||
|
@ -852,7 +1482,7 @@ Do not use or package 2.6.25
|
|||
William) reported by Yuuichi Teranishi
|
||||
- bugfixes: make test and path issues, xmlWriter attribute serialization
|
||||
(William Brack), xmlWriter indentation (William), schemas validation
|
||||
(Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
|
||||
(Eric Haszlakiewicz), XInclude dictionaries issues (William and Oleg
|
||||
Paraschenko), XInclude empty fallback (William), HTML warnings (William),
|
||||
XPointer in XInclude (William), Python namespace serialization,
|
||||
isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
|
||||
|
@ -873,7 +1503,7 @@ Do not use or package 2.6.25
|
|||
|
||||
|
||||
2.6.5: Jan 25 2004:
|
||||
- Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
|
||||
- Bugfixes: dictionaries for schemas (William Brack), regexp segfault
|
||||
(William), xs:all problem (William), a number of XPointer bugfixes
|
||||
(William), xmllint error go to stderr, DTD validation problem with
|
||||
namespace, memory leak (William), SAX1 cleanup and minimal options fixes
|
||||
|
@ -885,14 +1515,14 @@ Do not use or package 2.6.25
|
|||
Fleck), doc (Sven Zimmerman), I/O example.
|
||||
- Python bindings: fixes (William), enum support (Stéphane Bidoul),
|
||||
structured error reporting (Stéphane Bidoul)
|
||||
- XInclude: various fixes for conformance, problem related to dictionnary
|
||||
- XInclude: various fixes for conformance, problem related to dictionary
|
||||
references (William & me), recursion (William)
|
||||
- xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
|
||||
Mickautsch),
|
||||
- xmlSchemas: normalizedString datatype (John Belmonte)
|
||||
- code cleanup for strings functions (William)
|
||||
- Windows: compiler patches (Mark Vakoc)
|
||||
- Parser optimizations, a few new XPath and dictionnary APIs for future
|
||||
- Parser optimizations, a few new XPath and dictionary APIs for future
|
||||
XSLT optimizations.
|
||||
|
||||
|
||||
|
@ -987,8 +1617,8 @@ Do not use or package 2.6.25
|
|||
of change
|
||||
- Increased the library modularity, far more options can be stripped out,
|
||||
a --with-minimum configuration will weight around 160KBytes
|
||||
- Use per parser and per document dictionnary, allocate names and small
|
||||
text nodes from the dictionnary
|
||||
- Use per parser and per document dictionary, allocate names and small
|
||||
text nodes from the dictionary
|
||||
- Switch to a SAX2 like parser rewrote most of the XML parser core,
|
||||
provides namespace resolution and defaulted attributes, minimize memory
|
||||
allocations and copies, namespace checking and specific error handling,
|
||||
|
@ -1035,7 +1665,7 @@ Do not use or package 2.6.25
|
|||
(William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
|
||||
error handling.
|
||||
- xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
|
||||
testing, --nodict for building without tree dictionnary, --nocdata to
|
||||
testing, --nodict for building without tree dictionary, --nocdata to
|
||||
replace CDATA by text, --nsclean to remove surperfluous namespace
|
||||
declarations
|
||||
- added xml2-config --libtool-libs option from Kevin P. Fleming
|
||||
|
@ -1325,7 +1955,8 @@ http://www.w3.org/TR/xmlschema-2/
|
|||
code, beware, all
|
||||
interfaces are likely to change, there is huge holes, it is clearly a work in
|
||||
progress and don't even think of putting this code in a production system,
|
||||
it's actually not compiled in by default. The real fixes are: - a couple of bugs or limitations introduced in 2.4.20
|
||||
it's actually not compiled in by default. The real fixes are:
|
||||
- a couple of bugs or limitations introduced in 2.4.20
|
||||
- patches for Borland C++ and MSC by Igor
|
||||
- some fixes on XPath strings and conformance patches by Richard
|
||||
Jinks
|
||||
|
@ -1567,7 +2198,8 @@ it's actually not compiled in by default. The real fixes are: - a couple of bu
|
|||
|
||||
|
||||
2.3.9: May 19 2001:
|
||||
Lots of bugfixes, and added a basic SGML catalog support: - HTML push bugfix #54891 and another patch from Jonas Borgström
|
||||
Lots of bugfixes, and added a basic SGML catalog support:
|
||||
- HTML push bugfix #54891 and another patch from Jonas Borgstrom
|
||||
- some serious speed optimization again
|
||||
- some documentation cleanups
|
||||
- trying to get better linking on Solaris (-R)
|
||||
|
@ -1809,6 +2441,7 @@ Lots of bugfixes, and added a basic SGML catalog support: - HTML push bugfix #
|
|||
about & charref parsing
|
||||
- 2.1.0 also ease the upgrade from libxml v1 to the recent version. it
|
||||
also contains numerous fixes and enhancements:
|
||||
|
||||
added xmlStopParser() to stop parsing
|
||||
improved a lot parsing speed when there is large CDATA blocs
|
||||
includes XPath patches provided by Picdar Technology
|
||||
|
@ -1817,6 +2450,7 @@ Lots of bugfixes, and added a basic SGML catalog support: - HTML push bugfix #
|
|||
output to a given encoding has been added/tested
|
||||
lot of various fixes
|
||||
|
||||
|
||||
- added xmlStopParser() to stop parsing
|
||||
- improved a lot parsing speed when there is large CDATA blocs
|
||||
- includes XPath patches provided by Picdar Technology
|
||||
|
@ -1865,6 +2499,7 @@ Lots of bugfixes, and added a basic SGML catalog support: - HTML push bugfix #
|
|||
upgrade page
|
||||
- Some interfaces may changes (especially a bit about encoding).
|
||||
- the updates includes:
|
||||
|
||||
fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
|
||||
handled now
|
||||
Better handling of entities, especially well-formedness checking
|
||||
|
@ -1874,6 +2509,7 @@ Lots of bugfixes, and added a basic SGML catalog support: - HTML push bugfix #
|
|||
change
|
||||
structures to accommodate DOM
|
||||
|
||||
|
||||
- fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
|
||||
handled now
|
||||
- Better handling of entities, especially well-formedness checking
|
||||
|
|
|
@ -31,7 +31,7 @@ The list archive is at:
|
|||
http://mail.gnome.org/archives/xml/
|
||||
|
||||
All technical answers asked privately will be automatically answered on
|
||||
the list and archived for public access unless pricacy is explicitely
|
||||
the list and archived for public access unless privacy is explicitly
|
||||
required and justified.
|
||||
|
||||
Daniel Veillard
|
||||
|
|
|
@ -14,17 +14,26 @@ program has a different testing purpose:
|
|||
|
||||
The command:
|
||||
|
||||
make check
|
||||
or
|
||||
make -f Makefile.tests check
|
||||
|
||||
should be sufficient on an Unix system to build and exercise the tests
|
||||
for the version of the library installed on the system. Note however
|
||||
that there isn't backward compatibility provided so if the installed
|
||||
version is older to the testsuite one, failing to compile or run the tests
|
||||
version is older than the testsuite one, failing to compile or run the tests
|
||||
is likely. In any event this won't work with an installed libxml2 older
|
||||
than 2.6.20.
|
||||
Building on other platfroms should be a matter of compiling the C files
|
||||
|
||||
Building on other platforms should be a matter of compiling the C files
|
||||
like any other program using libxml2, running the test should be done
|
||||
simply by launching the resulting executables.
|
||||
|
||||
Also note the availability of a "make valgrind" target which will run the
|
||||
above tests under valgrind to check for memory errors (but this relies
|
||||
on the availability of the valgrind command and take far more time to
|
||||
complete).
|
||||
|
||||
Daniel Veillard
|
||||
Thu Jul 24 2008
|
||||
Mon May 7 2012
|
||||
|
||||
|
|
|
@ -55,14 +55,31 @@
|
|||
* @ctxt: an XML validation parser context
|
||||
* @msg: a string to accompany the error message
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(2,0)
|
||||
xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
|
||||
xmlStructuredErrorFunc schannel = NULL;
|
||||
const char *str1 = "out of memory\n";
|
||||
|
||||
if (ctxt != NULL) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
ctxt->sax->error(ctxt->userData, "%s: out of memory\n", msg);
|
||||
ctxt->errNo = XML_ERR_NO_MEMORY;
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
|
||||
schannel = ctxt->sax->serror;
|
||||
__xmlRaiseError(schannel,
|
||||
ctxt->vctxt.error, ctxt->vctxt.userData,
|
||||
ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY,
|
||||
XML_ERR_ERROR, NULL, 0, (const char *) str1,
|
||||
NULL, NULL, 0, 0,
|
||||
msg, (const char *) str1, NULL);
|
||||
ctxt->errNo = XML_ERR_NO_MEMORY;
|
||||
ctxt->instate = XML_PARSER_EOF;
|
||||
ctxt->disableSAX = 1;
|
||||
} else {
|
||||
__xmlRaiseError(schannel,
|
||||
NULL, NULL,
|
||||
ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY,
|
||||
XML_ERR_ERROR, NULL, 0, (const char *) str1,
|
||||
NULL, NULL, 0, 0,
|
||||
msg, (const char *) str1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +93,7 @@ xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
|
|||
*
|
||||
* Handle a validation error
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const char *str1, const char *str2)
|
||||
{
|
||||
|
@ -116,7 +133,7 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
*
|
||||
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||
{
|
||||
|
@ -147,7 +164,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
*
|
||||
* Handle a parser warning
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1)
|
||||
{
|
||||
|
@ -172,7 +189,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
*
|
||||
* Handle a namespace error
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||
{
|
||||
|
@ -196,7 +213,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
*
|
||||
* Handle a namespace warning
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||
{
|
||||
|
@ -394,6 +411,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
|||
xmlParserInputPtr input = NULL;
|
||||
xmlCharEncoding enc;
|
||||
int oldcharset;
|
||||
const xmlChar *oldencoding;
|
||||
|
||||
/*
|
||||
* Ask the Entity resolver to load the damn thing
|
||||
|
@ -415,6 +433,8 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
|||
oldinputMax = ctxt->inputMax;
|
||||
oldinputTab = ctxt->inputTab;
|
||||
oldcharset = ctxt->charset;
|
||||
oldencoding = ctxt->encoding;
|
||||
ctxt->encoding = NULL;
|
||||
|
||||
ctxt->inputTab = (xmlParserInputPtr *)
|
||||
xmlMalloc(5 * sizeof(xmlParserInputPtr));
|
||||
|
@ -425,6 +445,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
|||
ctxt->inputMax = oldinputMax;
|
||||
ctxt->inputTab = oldinputTab;
|
||||
ctxt->charset = oldcharset;
|
||||
ctxt->encoding = oldencoding;
|
||||
return;
|
||||
}
|
||||
ctxt->inputNr = 0;
|
||||
|
@ -470,6 +491,11 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
|||
ctxt->inputMax = oldinputMax;
|
||||
ctxt->inputTab = oldinputTab;
|
||||
ctxt->charset = oldcharset;
|
||||
if ((ctxt->encoding != NULL) &&
|
||||
((ctxt->dict == NULL) ||
|
||||
(!xmlDictOwns(ctxt->dict, ctxt->encoding))))
|
||||
xmlFree((xmlChar *) ctxt->encoding);
|
||||
ctxt->encoding = oldencoding;
|
||||
/* ctxt->wellFormed = oldwellFormed; */
|
||||
}
|
||||
}
|
||||
|
@ -574,6 +600,7 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
|
|||
* parse the external entity
|
||||
*/
|
||||
xmlNodePtr children;
|
||||
unsigned long oldnbent = ctxt->nbentities;
|
||||
|
||||
val = xmlParseCtxtExternalEntity(ctxt, ret->URI,
|
||||
ret->ExternalID, &children);
|
||||
|
@ -586,8 +613,11 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
|
|||
return(NULL);
|
||||
}
|
||||
ret->owner = 1;
|
||||
if (ret->checked == 0)
|
||||
ret->checked = 1;
|
||||
if (ret->checked == 0) {
|
||||
ret->checked = (ctxt->nbentities - oldnbent + 1) * 2;
|
||||
if ((ret->content != NULL) && (xmlStrchr(ret->content, '<')))
|
||||
ret->checked |= 1;
|
||||
}
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
@ -964,12 +994,12 @@ xmlSAX2StartDocument(void *ctx)
|
|||
#ifdef LIBXML_HTML_ENABLED
|
||||
if (ctxt->myDoc == NULL)
|
||||
ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL);
|
||||
ctxt->myDoc->properties = XML_DOC_HTML;
|
||||
ctxt->myDoc->parseFlags = ctxt->options;
|
||||
if (ctxt->myDoc == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
|
||||
return;
|
||||
}
|
||||
ctxt->myDoc->properties = XML_DOC_HTML;
|
||||
ctxt->myDoc->parseFlags = ctxt->options;
|
||||
#else
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"libxml2 built without HTML support\n");
|
||||
|
@ -1048,7 +1078,7 @@ xmlSAX2EndDocument(void *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
/**
|
||||
* xmlSAX2AttributeInternal:
|
||||
* @ctx: the user data (XML parser context)
|
||||
|
@ -1147,6 +1177,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
|
||||
0,0,0);
|
||||
ctxt->depth--;
|
||||
if (val == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
|
||||
if (name != NULL)
|
||||
xmlFree(name);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
val = (xmlChar *) value;
|
||||
}
|
||||
|
@ -1756,7 +1792,6 @@ void
|
|||
xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlParserNodeInfo node_info;
|
||||
xmlNodePtr cur;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
|
@ -1770,10 +1805,10 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||
|
||||
/* Capture end position and add node */
|
||||
if (cur != NULL && ctxt->record_info) {
|
||||
node_info.end_pos = ctxt->input->cur - ctxt->input->base;
|
||||
node_info.end_line = ctxt->input->line;
|
||||
node_info.node = cur;
|
||||
xmlParserAddNodeInfo(ctxt, &node_info);
|
||||
ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base;
|
||||
ctxt->nodeInfo->end_line = ctxt->input->line;
|
||||
ctxt->nodeInfo->node = cur;
|
||||
xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
|
||||
|
@ -1793,7 +1828,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||
#endif
|
||||
nodePop(ctxt);
|
||||
}
|
||||
#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLE */
|
||||
#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */
|
||||
|
||||
/*
|
||||
* xmlSAX2TextNode:
|
||||
|
@ -1801,7 +1836,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||
* @str: the input string
|
||||
* @len: the string length
|
||||
*
|
||||
* Remove the entities from an attribute value
|
||||
* Callback for a text node
|
||||
*
|
||||
* Returns the newly allocated string or NULL if not needed or error
|
||||
*/
|
||||
|
@ -1834,7 +1869,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
|
|||
|
||||
if ((len < (int) (2 * sizeof(void *))) &&
|
||||
(ctxt->options & XML_PARSE_COMPACT)) {
|
||||
/* store the string in the node overrithing properties and nsDef */
|
||||
/* store the string in the node overriding properties and nsDef */
|
||||
xmlChar *tmp = (xmlChar *) &(ret->properties);
|
||||
memcpy(tmp, str, len);
|
||||
tmp[len] = 0;
|
||||
|
@ -1866,8 +1901,17 @@ skip:
|
|||
} else
|
||||
ret->content = (xmlChar *) intern;
|
||||
|
||||
if (ctxt->input != NULL)
|
||||
ret->line = ctxt->input->line;
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < 65535)
|
||||
ret->line = (short) ctxt->input->line;
|
||||
else {
|
||||
ret->line = 65535;
|
||||
if (ctxt->options & XML_PARSE_BIG_LINES)
|
||||
ret->psvi = (void *) (long) ctxt->input->line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
||||
xmlRegisterNodeDefaultValue(ret);
|
||||
|
@ -2107,12 +2151,14 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||
*/
|
||||
if (dup == NULL)
|
||||
dup = xmlStrndup(value, valueend - value);
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if (xmlValidateNCName(dup, 1) != 0) {
|
||||
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
|
||||
"xml:id : attribute value %s is not an NCName\n",
|
||||
(const char *) dup, NULL);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
||||
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
|
||||
|
@ -2163,6 +2209,7 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
xmlNodePtr parent;
|
||||
xmlNsPtr last = NULL, ns;
|
||||
const xmlChar *uri, *pref;
|
||||
xmlChar *lname = NULL;
|
||||
int i, j;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
|
@ -2176,11 +2223,25 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
(ctxt->myDoc->intSubset->elements == NULL) &&
|
||||
(ctxt->myDoc->intSubset->attributes == NULL) &&
|
||||
(ctxt->myDoc->intSubset->entities == NULL)))) {
|
||||
xmlErrValid(ctxt, XML_ERR_NO_DTD,
|
||||
xmlErrValid(ctxt, XML_DTD_NO_DTD,
|
||||
"Validation failed: no DTD found !", NULL, NULL);
|
||||
ctxt->validate = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Take care of the rare case of an undefined namespace prefix
|
||||
*/
|
||||
if ((prefix != NULL) && (URI == NULL)) {
|
||||
if (ctxt->dictNames) {
|
||||
const xmlChar *fullname;
|
||||
|
||||
fullname = xmlDictQLookup(ctxt->dict, prefix, localname);
|
||||
if (fullname != NULL)
|
||||
localname = fullname;
|
||||
} else {
|
||||
lname = xmlBuildQName(localname, prefix, NULL, 0);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* allocate the node
|
||||
*/
|
||||
|
@ -2194,7 +2255,10 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
if (ctxt->dictNames)
|
||||
ret->name = localname;
|
||||
else {
|
||||
if (lname == NULL)
|
||||
ret->name = xmlStrdup(localname);
|
||||
else
|
||||
ret->name = lname;
|
||||
if (ret->name == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
|
@ -2206,8 +2270,11 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
if (ctxt->dictNames)
|
||||
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
(xmlChar *) localname, NULL);
|
||||
else
|
||||
else if (lname == NULL)
|
||||
ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
|
||||
else
|
||||
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
(xmlChar *) lname, NULL);
|
||||
if (ret == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
|
@ -2222,7 +2289,7 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
|
||||
if (parent == NULL) {
|
||||
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
|
||||
}
|
||||
/*
|
||||
|
@ -2242,8 +2309,12 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
if ((URI != NULL) && (prefix == pref))
|
||||
ret->ns = ns;
|
||||
} else {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
/*
|
||||
* any out of memory error would already have been raised
|
||||
* but we can't be garanteed it's the actual error due to the
|
||||
* API, best is to skip in this case
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
|
||||
|
@ -2310,6 +2381,31 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
*/
|
||||
if (nb_attributes > 0) {
|
||||
for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
|
||||
/*
|
||||
* Handle the rare case of an undefined atribute prefix
|
||||
*/
|
||||
if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
|
||||
if (ctxt->dictNames) {
|
||||
const xmlChar *fullname;
|
||||
|
||||
fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
|
||||
attributes[j]);
|
||||
if (fullname != NULL) {
|
||||
xmlSAX2AttributeNs(ctxt, fullname, NULL,
|
||||
attributes[j+3], attributes[j+4]);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
lname = xmlBuildQName(attributes[j], attributes[j+1],
|
||||
NULL, 0);
|
||||
if (lname != NULL) {
|
||||
xmlSAX2AttributeNs(ctxt, lname, NULL,
|
||||
attributes[j+3], attributes[j+4]);
|
||||
xmlFree(lname);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
|
||||
attributes[j+3], attributes[j+4]);
|
||||
}
|
||||
|
@ -2482,6 +2578,10 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
|
|||
(xmlDictOwns(ctxt->dict, lastChild->content))) {
|
||||
lastChild->content = xmlStrdup(lastChild->content);
|
||||
}
|
||||
if (lastChild->content == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: xmlStrdup returned NULL");
|
||||
return;
|
||||
}
|
||||
if (((size_t)ctxt->nodelen + (size_t)len > XML_MAX_TEXT_LENGTH) &&
|
||||
((ctxt->options & XML_PARSE_HUGE) == 0)) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node");
|
||||
|
@ -2591,7 +2691,7 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
|
|||
xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
|
||||
return;
|
||||
}
|
||||
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
|
||||
if (parent == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Setting PI %s as root\n", target);
|
||||
|
@ -2652,7 +2752,7 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
|
|||
xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
|
||||
return;
|
||||
}
|
||||
if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
|
||||
if (parent == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Setting xmlSAX2Comment as root\n");
|
||||
|
|
|
@ -2,8 +2,8 @@ dnl Like AC_TRY_EVAL but also errors out if the compiler generates
|
|||
dnl _any_ output. Some compilers might issue warnings which we want
|
||||
dnl to catch.
|
||||
AC_DEFUN([AC_TRY_EVAL2],
|
||||
[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
|
||||
(eval [$]$1) 2>&AC_FD_CC; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }])
|
||||
[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AS_MESSAGE_LOG_FD; dnl
|
||||
(eval [$]$1) 2>&AS_MESSAGE_LOG_FD; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }])
|
||||
|
||||
dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL
|
||||
AC_DEFUN([AC_TRY_COMPILE2],
|
||||
|
@ -19,8 +19,8 @@ if AC_TRY_EVAL2(ac_compile); then
|
|||
ifelse([$3], , :, [rm -rf conftest*
|
||||
$3])
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
|
||||
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
|
||||
ifelse([$4], , , [ rm -rf conftest*
|
||||
$4
|
||||
])dnl
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<bakefile-gen>
|
||||
|
||||
<disable-formats>gnu,dmars,cbx_unix,cbuilderx</disable-formats>
|
||||
<input>libxml2.bkl</input>
|
||||
|
||||
<!-- List of output formats to generate: -->
|
||||
<add-formats>
|
||||
borland,dmars,mingw,msvc,msvc6prj,watcom,cbuilderx,cbx_unix,gnu
|
||||
</add-formats>
|
||||
|
||||
|
||||
</bakefile-gen>
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
LIBXML2 build system for Win32 README
|
||||
-------------------------------------
|
||||
|
||||
In this folder are stored all the files required to compile LIBXML2 with win32 compilers.
|
||||
Bakefile (http://bakefile.sourceforge.net) is used as makefile generator.
|
||||
|
||||
Supported makefiles:
|
||||
- makefile.vc for Microsoft NMAKE
|
||||
- makefile.bcc for Borland MAKE
|
||||
- makefile.wat for OpenWatcom MAKE
|
||||
- makefile.gcc for MinGW MINGW32-MAKE
|
||||
- all DSP & DSW for Microsoft VisualC++ 6.0 (can be used also with VS.NET AFAIK)
|
||||
|
||||
This readme is organized as:
|
||||
1.0 HOWTO compile LIBXML2 using makefiles <-- for users who want to build the library using *command-line*
|
||||
1.1 HOWTO compile LIBXML2 using an IDE <-- for users who want to build the library using an *IDE*
|
||||
1.2 HOWTO regenerate makefiles for LIBXML2 <-- for libxml2 mantainers/developers/advanced users
|
||||
|
||||
If you just want to compile the library (and the test programs) you should definitely avoid the
|
||||
section 1.1 and focus on the 1.0.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1.0 HOWTO compile LIBXML2 using makefiles
|
||||
-----------------------------------------
|
||||
|
||||
Choose your preferred compiler among those actually supported (see above) and then run
|
||||
|
||||
mycompilermake -fmakefile.makefileext [options]
|
||||
|
||||
for a full list of the available options you should open with a notepad (or something like that)
|
||||
the makefile you want to use; at the beginning you should see a section which starts as:
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# These are configurable options:
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
here you can find all the options actually used by that makefile.
|
||||
They can be customized when running the makefile writing something like:
|
||||
|
||||
nmake -fmakefile.vc BUILD=release
|
||||
mingw32-make -fmakefile.gcc BUILD=debug ICONV_DIR=c:\myiconv
|
||||
|
||||
or they can be permanently changed modifying the makefile.
|
||||
That's all: for any problem/compile-error/suggestion, write to
|
||||
frm@users.sourceforge.net with the word "libxml2" in the subject.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1.1 HOWTO compile LIBXML2 using an IDE
|
||||
--------------------------------------
|
||||
|
||||
Actually only the Microsoft VisualC++ 6.0 project files are generated.
|
||||
In future other Integrated Development Environments (IDEs) will be supported as well.
|
||||
|
||||
With MSVC++ 6.0, you should open the DSW file and then set as the active project the
|
||||
"libxml2" project, if you want to build the library or one of the test projects if you
|
||||
want to run them.
|
||||
Using the command "Build->Set Active Configuration" you can choose one of the predefined
|
||||
configuration.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1.2 HOWTO regenerate makefiles for LIBXML2
|
||||
------------------------------------------
|
||||
|
||||
Be sure to have installed Bakefile (http://bakefile.sourceforge.net).
|
||||
Just run the "bakefile_gen" command inside the folder containing the "libxml2.bkl" file.
|
||||
NOTE: if you want to remove all the makefiles, you can use the "bakefile_gen -c" command.
|
||||
|
||||
The template files used to generate all makefiles are only two:
|
||||
- libxml2.bkl (the main one)
|
||||
- Bakefiles.bkgen
|
||||
All the other files can be dinamically regenerated.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If you have problems with the compilation of LIBXML2 under windows (using one of the supported compiler)
|
||||
please write to:
|
||||
|
||||
Francesco Montorsi <frm@users.sourceforge.net>
|
||||
|
|
@ -0,0 +1,749 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<!-- Author: Francesco Montorsi <frm@users.sourceforge.net> -->
|
||||
<!-- Date: 30/8/2004 -->
|
||||
<!-- Last revision: 26/1/2005 -->
|
||||
|
||||
|
||||
<!-- LIBXML2 BAKEFILE -->
|
||||
<!-- -->
|
||||
<!-- The bakefile used to build the library and the test -->
|
||||
<!-- programs. The makefiles output is put: -->
|
||||
<!-- -->
|
||||
<!-- - in the ..\LIB folder -->
|
||||
<!-- - in the ..\BIN folder -->
|
||||
<!-- -->
|
||||
|
||||
<makefile>
|
||||
|
||||
<using module="datafiles"/>
|
||||
<requires version="0.1.5"/>
|
||||
|
||||
|
||||
<!-- This is a bakefile, that is, a generic template used to -->
|
||||
<!-- generate makefiles ALL supported compilers. -->
|
||||
<!-- To use this project file you need Bakefile installed. -->
|
||||
<!-- With the command "bakefile_gen" you can regen all the -->
|
||||
<!-- makefiles and project files. -->
|
||||
<!-- See http://bakefile.sourceforge.net for more info. -->
|
||||
|
||||
|
||||
<!--
|
||||
This file is divided in:
|
||||
- generic options
|
||||
- generic variables
|
||||
- libxml2 options
|
||||
- libxml2 variables
|
||||
- about config.h creation
|
||||
- templates
|
||||
- libxml2 library target
|
||||
- libxml2 test program targets
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- GENERIC OPTIONS -->
|
||||
<!-- -->
|
||||
|
||||
|
||||
<!-- This is a standard option that determines -->
|
||||
<!-- whether the user wants to build this library as -->
|
||||
<!-- a dll or as a static library. -->
|
||||
<option name="SHARED">
|
||||
<values>0,1</values>
|
||||
<values-description>,DLL</values-description>
|
||||
<default-value>0</default-value>
|
||||
<description>If set to zero a STATIC libxml library will be built</description>
|
||||
</option>
|
||||
|
||||
<!-- Configuration for building the bakefile with -->
|
||||
<!-- unicode strings or not (unicode or ansi). -->
|
||||
<option name="UNICODE">
|
||||
<values>0,1</values>
|
||||
<values-description>,Unicode</values-description>
|
||||
<default-value>0</default-value>
|
||||
<description>Compile Unicode build?</description>
|
||||
</option>
|
||||
|
||||
|
||||
<!-- There are several options that deal with build -->
|
||||
<!-- types. First, there's this one, BUILD. -->
|
||||
<!-- -->
|
||||
<!-- BUILD determines whether or not we want to build -->
|
||||
<!-- in release or debug mode. Note that in practice -->
|
||||
<!-- this means modifying the optimize tag, which by -->
|
||||
<!-- default is set to off. In this case debug means -->
|
||||
<!-- off (no optimizations), and release means speed -->
|
||||
<!-- (fast with inlining). There is also a size option -->
|
||||
<!-- that is not addressed in this example bakefile. -->
|
||||
<option name="BUILD">
|
||||
<values>debug,release</values>
|
||||
<values-description>Debug,Release</values-description>
|
||||
<default-value>release</default-value>
|
||||
<description>
|
||||
Type of compiled binaries
|
||||
</description>
|
||||
</option>
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- GENERIC VARIABLES -->
|
||||
<!-- -->
|
||||
|
||||
<!-- Set the ISDLL variable, so that we can use it -->
|
||||
<!-- inside an if statement later on (options not -->
|
||||
<!-- allowed in if statements). -->
|
||||
<set var="ISDLL" cond="SHARED=='1'">1</set>
|
||||
<set var="ISDLL" cond="SHARED=='0'">0</set>
|
||||
|
||||
<!-- The unicode define we want. By default bakefile -->
|
||||
<!-- makes variables an empty string, so if unicode -->
|
||||
<!-- is not defined $(UNICODE_DEFINE) would expand -->
|
||||
<!-- to nothing (literally). -->
|
||||
<set var="UNICODE_DEFINE">
|
||||
<if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
|
||||
</set>
|
||||
|
||||
<!-- The debug define we need with win32 compilers -->
|
||||
<!-- (on Linux, the wx-config program is used). -->
|
||||
<set var="DEBUG_DEFINE">
|
||||
<if cond="FORMAT!='autoconf' and BUILD=='debug'">
|
||||
__WXDEBUG__
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<!-- Value we will use later on for the debug-info -->
|
||||
<!-- tag inside our templates. -->
|
||||
<set var="DEBUGINFO">
|
||||
<if cond="BUILD=='debug'">on</if>
|
||||
<if cond="BUILD=='release'">off</if>
|
||||
</set>
|
||||
|
||||
<!-- Value we will use later on for the debug-runtime -->
|
||||
<!-- tag inside our templates. -->
|
||||
<set var="DEBUGRUNTIME">
|
||||
<if cond="BUILD=='debug'">on</if>
|
||||
<if cond="BUILD=='release'">off</if>
|
||||
</set>
|
||||
|
||||
<!-- Value for optimize tag. -->
|
||||
<set var="OPTIMIZEFLAG">
|
||||
<if cond="BUILD=='debug'">off</if>
|
||||
<if cond="BUILD=='release'">speed</if>
|
||||
</set>
|
||||
|
||||
<!-- Level of warnings. Here we max it out in debug -->
|
||||
<!-- mode, and turn them off in release mode. -->
|
||||
<set var="WARNINGS">
|
||||
<if cond="BUILD=='debug'">max</if>
|
||||
<if cond="BUILD=='release'">no</if>
|
||||
</set>
|
||||
|
||||
<!-- Set MYCPPFLAGS as empty; maybe it will be filled later... -->
|
||||
<set var="MYCPPFLAGS"></set>
|
||||
<if cond="FORMAT=='mingw' or FORMAT=='autoconf'">
|
||||
|
||||
<!-- With GCC, settings warnings to MAX would force -->
|
||||
<!-- Bakefile to call GCC with "-W -Wall" which generates -->
|
||||
<!-- a *lot* of warnings about wxWidgets headers... -->
|
||||
<!-- this is why "-W -Wall" is here replaced by "-Wall". -->
|
||||
<set var="WARNINGS">default</set>
|
||||
<set var="MYCPPFLAGS">-Wall</set>
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- LIBXML2 OPTIONS -->
|
||||
<!-- -->
|
||||
<!-- Note #1: not all of them are used by win32 makefiles -->
|
||||
<!-- -->
|
||||
<!-- Note #2: since all combinations of non-path options are -->
|
||||
<!-- translated into different 'configurations' by -->
|
||||
<!-- Bakefile when using the MSVC6PRJ output, we must -->
|
||||
<!-- avoid to create a 10 MB libxml2.dsp file forcing -->
|
||||
<!-- some options to their default values... this -->
|
||||
<!-- behaviour can be overridden by the -->
|
||||
<!-- FULL_OPTIONS_SUPPORT -->
|
||||
<!-- variable defined below... -->
|
||||
|
||||
<set var="FULL_OPTIONS_SUPPORT">
|
||||
<if cond="FORMAT=='msvc6prj'">0</if>
|
||||
<if cond="FORMAT!='msvc6prj'">1</if>
|
||||
</set>
|
||||
|
||||
<option name="ICONV_DIR" category="path">
|
||||
<default-value>c:\iconv</default-value>
|
||||
<description>The iconv library main folder</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_TRIO">
|
||||
<values>0,1</values>
|
||||
<default-value>0</default-value>
|
||||
<description>Enable TRIO string manipulator</description>
|
||||
</option>
|
||||
|
||||
<!-- see the note #2 -->
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='0'">
|
||||
<set var="WITH_THREADS">native</set>
|
||||
</if>
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='1'">
|
||||
<option name="WITH_THREADS">
|
||||
<values>no,ctls,native,posix</values>
|
||||
<default-value>native</default-value>
|
||||
<description>Enable thread safety</description>
|
||||
</option>
|
||||
</if>
|
||||
|
||||
<option name="WITH_FTP">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable FTP client</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_HTTP">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable HTTP client</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_C14N">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable C14N support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_CATALOG">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable catalog support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_DOCB">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable DocBook support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_XPATH">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable XPath support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_XPTR">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable XPointer support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_XINCLUDE">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable XInclude support</description>
|
||||
</option>
|
||||
|
||||
<!-- see the note #2 -->
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='0'">
|
||||
<set var="WITH_ICONV">1</set>
|
||||
</if>
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='1'">
|
||||
<option name="WITH_ICONV">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable iconv support</description>
|
||||
</option>
|
||||
</if>
|
||||
|
||||
<option name="WITH_ISO8859X">
|
||||
<values>0,1</values>
|
||||
<default-value>0</default-value>
|
||||
<description>Enable iso8859x support</description>
|
||||
</option>
|
||||
|
||||
<!-- see the note #2 -->
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='0'">
|
||||
<set var="WITH_ZLIB">0</set>
|
||||
</if>
|
||||
<if cond="FULL_OPTIONS_SUPPORT=='1'">
|
||||
<option name="WITH_ZLIB">
|
||||
<values>0,1</values>
|
||||
<default-value>0</default-value>
|
||||
<description>Enable ZLIB support</description>
|
||||
</option>
|
||||
</if>
|
||||
|
||||
<option name="WITH_REGEXPS">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable regular expressions</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_TREE">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable tree api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_READER">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable xmlReader api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_WRITER">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable xmlWriter api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_WALKER">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable xmlDocWalker api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_PATTERN">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable xmlPattern api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_PUSH">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable push api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_VALID">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable DTD validation support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_SAX1">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable SAX1 api</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_SCHEMAS">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable XML Schema support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_LEGACY">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable deprecated APIs</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_OUTPUT">
|
||||
<values>0,1</values>
|
||||
<default-value>1</default-value>
|
||||
<description>Enable serialization support</description>
|
||||
</option>
|
||||
|
||||
<option name="WITH_PYTHON">
|
||||
<values>0,1</values>
|
||||
<default-value>0</default-value>
|
||||
<description>Build Python bindings</description>
|
||||
</option>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- LIBXML2 VARIABLES -->
|
||||
<!-- -->
|
||||
|
||||
<!-- Put all the objects files generated by -->
|
||||
<!-- the compilation in a subfolder of BUILD -->
|
||||
<set var="BUILDDIR">$(FORMAT)</set>
|
||||
|
||||
<!-- This variable is set to 1 when the current output writer supports -->
|
||||
<!-- the __DEFINE_ARG variable. Otherwise it's set to zero. -->
|
||||
<set var="HAS_DEFINE_ARG">
|
||||
<if cond="FORMAT!='msvc6prj'">1</if>
|
||||
<if cond="FORMAT=='msvc6prj'">0</if>
|
||||
</set>
|
||||
|
||||
<!-- The root directory of libxml2 -->
|
||||
<set var="XMLBASEDIR">..</set>
|
||||
|
||||
<!-- The directory where libxml2' tests will be put -->
|
||||
<set var="XMLTESTDIR">$(XMLBASEDIR)$(DIRSEP)bin</set>
|
||||
|
||||
<set var="LIBXML_MAJOR_VERSION">2</set>
|
||||
<set var="LIBXML_MINOR_VERSION">6</set>
|
||||
<set var="LIBXML_MICRO_VERSION">16</set>
|
||||
|
||||
<!-- some defines related to threads -->
|
||||
<set var="THREADS_DEF">
|
||||
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='native'">
|
||||
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS
|
||||
</if>
|
||||
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='ctls'">
|
||||
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS $(__DEFINE_ARG)HAVE_COMPILER_TLS
|
||||
</if>
|
||||
<if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='posix'">
|
||||
$(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_PTHREAD_H
|
||||
</if>
|
||||
</set>
|
||||
<if cond="FORMAT=='borland'">
|
||||
<set var="THREADS_DEF">
|
||||
<if cond="WITH_THREADS=='native'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
|
||||
<if cond="WITH_THREADS=='ctls'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
|
||||
<if cond="WITH_THREADS=='posix'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
|
||||
</set>
|
||||
</if>
|
||||
|
||||
|
||||
<!-- some other conditional defines -->
|
||||
<set var="ZLIB_DEF"><if cond="WITH_ZLIB=='1'">HAVE_ZLIB_H</if></set>
|
||||
<set var="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
|
||||
<set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
|
||||
|
||||
<!-- this is very very important when compiling with MINGW: without this line,
|
||||
the test programs (and all the programs built with libxml2 which use xmlFree)
|
||||
won't build because of "undefined references to __xmlFree" -->
|
||||
<set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
|
||||
|
||||
<!-- some conditional libraries dependencies -->
|
||||
<set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
|
||||
<set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
|
||||
<set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
|
||||
<set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
|
||||
|
||||
<set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- ABOUT CONFIG.H HEADER CREATION -->
|
||||
<!-- -->
|
||||
|
||||
<set var="CONFIG_SRCNAME">win32config.h</set>
|
||||
<set var="CONFIG_DSTNAME">config.h</set>
|
||||
|
||||
<if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
|
||||
<copy-file-to-file id="setup">
|
||||
<!-- On win32 we need to manually copy a default config.h file -->
|
||||
<!-- from the include/mc/msw folder to include/mc -->
|
||||
<src>../include/$(CONFIG_SRCNAME)</src>
|
||||
<dst>../$(CONFIG_DSTNAME)</dst>
|
||||
<dependency-of>all</dependency-of>
|
||||
|
||||
<!-- With autoconf, we will use the configure script to translate -->
|
||||
<!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
|
||||
<!-- not need to do anything here... -->
|
||||
</copy-file-to-file>
|
||||
</if>
|
||||
|
||||
<if cond="FORMAT!='msvc6prj'">
|
||||
|
||||
<mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
|
||||
<mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
|
||||
|
||||
<!-- Creates all output folders -->
|
||||
<phony id="setupdirs">
|
||||
<dependency-of>all</dependency-of>
|
||||
<depends>setuplibdir</depends>
|
||||
<depends>setupbindir</depends>
|
||||
</phony>
|
||||
</if>
|
||||
|
||||
<!-- This defines a tag which includes headers on MSVC -->
|
||||
<!-- Note that $(value) is stuck in there by bakefile, -->
|
||||
<!-- and is the value between the beginning and end tag. -->
|
||||
<define-tag name="headers" rules="dll,lib,exe">
|
||||
<if cond="FORMAT=='msvc6prj'">
|
||||
<msvc-project-files>
|
||||
$(value)
|
||||
</msvc-project-files>
|
||||
</if>
|
||||
</define-tag>
|
||||
|
||||
<!-- Creates the following custom build rule for MSVC6PRJ file:
|
||||
copies ..\include\win32config.h into ..\config.h
|
||||
NOTE: this tag must be used before the <sources> tag if you want that the configuration
|
||||
file will be created before any other source file is compiled... -->
|
||||
<define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
|
||||
<if cond="FORMAT=='msvc6prj'">
|
||||
<headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
|
||||
<set var="__subdir">$(value)</set>
|
||||
<set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
|
||||
<set var="_custom_build____include_win32config_h">
|
||||
Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\$(CONFIG_SRCNAME)
|
||||
InputPath=..\include\$(CONFIG_SRCNAME)
|
||||
|
||||
"..\$(CONFIG_DSTNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
|
||||
$(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
|
||||
</set>
|
||||
</if>
|
||||
</define-tag>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- TEMPLATES -->
|
||||
<!-- -->
|
||||
|
||||
<!-- The basic template: used by all the targets -->
|
||||
<template id="base">
|
||||
<if cond="FORMAT=='mingw'">
|
||||
<define>HAVE_W32API_H</define>
|
||||
<ldflags>-mthreads</ldflags>
|
||||
</if>
|
||||
|
||||
<cxxflags>$(MYCPPFLAGS)</cxxflags>
|
||||
<warnings>$(WARNINGS)</warnings>
|
||||
<define>$(UNICODE_DEFINE)</define>
|
||||
<optimize>$(OPTIMIZEFLAG)</optimize>
|
||||
<debug-info>$(DEBUGINFO)</debug-info>
|
||||
<debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
|
||||
</template>
|
||||
|
||||
<!-- The template used both by the library and by the test programs -->
|
||||
<template id="xml2" template="base">
|
||||
|
||||
<!-- -I & -L equivalents -->
|
||||
<include>$(XMLBASEDIR)$(DIRSEP)include</include>
|
||||
<include>$(ICONV_DIR)$(DIRSEP)include</include>
|
||||
<lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>
|
||||
|
||||
<!-- some conditional define flags -->
|
||||
<cflags>$(THREADS_DEF)</cflags>
|
||||
<define>$(ZLIB_DEF)</define>
|
||||
<define>$(DEBUG_DEF)</define>
|
||||
<define>$(STATIC_DEF)</define>
|
||||
|
||||
<if cond="HAS_DEFINE_ARG=='0'">
|
||||
|
||||
<!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
|
||||
<define>_REENTRANT</define>
|
||||
<define>HAVE_WIN32_THREADS</define>
|
||||
</if>
|
||||
|
||||
|
||||
<!-- these must always be defined on win32 -->
|
||||
<define>WIN32</define>
|
||||
<define>_WINDOWS</define>
|
||||
<define>_MBCS</define>
|
||||
|
||||
<if cond="FORMAT=='borland'">
|
||||
<define>_NO_VCL</define>
|
||||
<define>EILSEQ=2</define>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
<!-- The template used by libxml2 test programs -->
|
||||
<template id="xml2test" template="xml2">
|
||||
<dirname>$(XMLTESTDIR)</dirname>
|
||||
<app-type>console</app-type>
|
||||
|
||||
<library>libxml2</library>
|
||||
|
||||
<sys-lib>$(ICONV_LIB)</sys-lib>
|
||||
<sys-lib>$(WSOCK32_LIB)</sys-lib>
|
||||
<sys-lib>$(ZLIB_LIB)</sys-lib>
|
||||
<sys-lib>$(POSIX_LIB)</sys-lib>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- LIBXML2 LIBRARY TARGET -->
|
||||
<!-- -->
|
||||
|
||||
<lib id="libxml2" template="xml2">
|
||||
|
||||
<!-- this is useful only when using MSVC6PRJ -->
|
||||
<if cond="FORMAT=='msvc6prj'">
|
||||
<msvc-copy-setup-h/>
|
||||
<msvc-file-group>Config headers:*config.h</msvc-file-group>
|
||||
</if>
|
||||
<if cond="FORMAT!='msvc6prj'">
|
||||
<depends>setup</depends>
|
||||
<depends>setuplibdir</depends>
|
||||
</if>
|
||||
|
||||
<!-- output folder -->
|
||||
<dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
|
||||
|
||||
<!-- The output name must be "libxml2.lib" with all compilers.
|
||||
Since mingw format autoadds the "lib" prefix to the library
|
||||
name, we must intercept that case to avoid to get "liblibxml2.a" -->
|
||||
<if cond="FORMAT!='mingw'">
|
||||
<libname>libxml2</libname>
|
||||
</if>
|
||||
<if cond="FORMAT=='mingw'">
|
||||
<libname>xml2</libname>
|
||||
</if>
|
||||
|
||||
<!-- the list of source files to compile -->
|
||||
<sources>
|
||||
$(XMLBASEDIR)$(DIRSEP)c14n.c
|
||||
$(XMLBASEDIR)$(DIRSEP)catalog.c
|
||||
$(XMLBASEDIR)$(DIRSEP)chvalid.c
|
||||
$(XMLBASEDIR)$(DIRSEP)debugXML.c
|
||||
$(XMLBASEDIR)$(DIRSEP)dict.c
|
||||
$(XMLBASEDIR)$(DIRSEP)DOCBparser.c
|
||||
$(XMLBASEDIR)$(DIRSEP)encoding.c
|
||||
$(XMLBASEDIR)$(DIRSEP)entities.c
|
||||
$(XMLBASEDIR)$(DIRSEP)error.c
|
||||
$(XMLBASEDIR)$(DIRSEP)globals.c
|
||||
$(XMLBASEDIR)$(DIRSEP)hash.c
|
||||
$(XMLBASEDIR)$(DIRSEP)HTMLparser.c
|
||||
$(XMLBASEDIR)$(DIRSEP)HTMLtree.c
|
||||
$(XMLBASEDIR)$(DIRSEP)legacy.c
|
||||
$(XMLBASEDIR)$(DIRSEP)list.c
|
||||
$(XMLBASEDIR)$(DIRSEP)nanoftp.c
|
||||
$(XMLBASEDIR)$(DIRSEP)nanohttp.c
|
||||
$(XMLBASEDIR)$(DIRSEP)parser.c
|
||||
$(XMLBASEDIR)$(DIRSEP)parserInternals.c
|
||||
$(XMLBASEDIR)$(DIRSEP)pattern.c
|
||||
$(XMLBASEDIR)$(DIRSEP)relaxng.c
|
||||
$(XMLBASEDIR)$(DIRSEP)SAX2.c
|
||||
$(XMLBASEDIR)$(DIRSEP)SAX.c
|
||||
$(XMLBASEDIR)$(DIRSEP)threads.c
|
||||
$(XMLBASEDIR)$(DIRSEP)tree.c
|
||||
$(XMLBASEDIR)$(DIRSEP)uri.c
|
||||
$(XMLBASEDIR)$(DIRSEP)valid.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xinclude.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xlink.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlIO.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlmemory.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlreader.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlregexp.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlsave.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlschemas.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlunicode.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlwriter.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xpath.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xpointer.c
|
||||
$(XMLBASEDIR)$(DIRSEP)xmlstring.c
|
||||
</sources>
|
||||
|
||||
<!-- the list of header files (for IDE projects) -->
|
||||
<headers>
|
||||
$(XMLINCLUDEDIR)c14n.h
|
||||
$(XMLINCLUDEDIR)catalog.h
|
||||
$(XMLINCLUDEDIR)chvalid.h
|
||||
$(XMLINCLUDEDIR)debugXML.h
|
||||
$(XMLINCLUDEDIR)dict.h
|
||||
$(XMLINCLUDEDIR)DOCBparser.h
|
||||
$(XMLINCLUDEDIR)encoding.h
|
||||
$(XMLINCLUDEDIR)entities.h
|
||||
$(XMLINCLUDEDIR)globals.h
|
||||
$(XMLINCLUDEDIR)hash.h
|
||||
$(XMLINCLUDEDIR)HTMLparser.h
|
||||
$(XMLINCLUDEDIR)HTMLtree.h
|
||||
$(XMLINCLUDEDIR)list.h
|
||||
$(XMLINCLUDEDIR)nanoftp.h
|
||||
$(XMLINCLUDEDIR)nanohttp.h
|
||||
$(XMLINCLUDEDIR)parser.h
|
||||
$(XMLINCLUDEDIR)parserInternals.h
|
||||
$(XMLINCLUDEDIR)pattern.h
|
||||
$(XMLINCLUDEDIR)relaxng.h
|
||||
$(XMLINCLUDEDIR)SAX.h
|
||||
$(XMLINCLUDEDIR)SAX2.h
|
||||
$(XMLINCLUDEDIR)schemasInternals.h
|
||||
$(XMLINCLUDEDIR)threads.h
|
||||
$(XMLINCLUDEDIR)tree.h
|
||||
$(XMLINCLUDEDIR)uri.h
|
||||
$(XMLINCLUDEDIR)valid.h
|
||||
$(XMLINCLUDEDIR)xinclude.h
|
||||
$(XMLINCLUDEDIR)xlink.h
|
||||
$(XMLINCLUDEDIR)xmlautomata.h
|
||||
$(XMLINCLUDEDIR)xmlerror.h
|
||||
$(XMLINCLUDEDIR)xmlexports.h
|
||||
$(XMLINCLUDEDIR)xmlIO.h
|
||||
$(XMLINCLUDEDIR)xmlmemory.h
|
||||
$(XMLINCLUDEDIR)xmlmodule.h
|
||||
$(XMLINCLUDEDIR)xmlreader.h
|
||||
$(XMLINCLUDEDIR)xmlregexp.h
|
||||
$(XMLINCLUDEDIR)xmlsave.h
|
||||
$(XMLINCLUDEDIR)xmlschemas.h
|
||||
$(XMLINCLUDEDIR)xmlschemastypes.h
|
||||
$(XMLINCLUDEDIR)xmlstring.h
|
||||
$(XMLINCLUDEDIR)xmlunicode.h
|
||||
$(XMLINCLUDEDIR)xmlversion.h
|
||||
$(XMLINCLUDEDIR)xmlwriter.h
|
||||
$(XMLINCLUDEDIR)xpath.h
|
||||
$(XMLINCLUDEDIR)xpathInternals.h
|
||||
$(XMLINCLUDEDIR)xpointer.h
|
||||
</headers>
|
||||
|
||||
<!-- these ones are not inside the include/libxml folder -->
|
||||
<headers>
|
||||
$(XMLBASEDIR)$(DIRSEP)libxml.h
|
||||
$(XMLBASEDIR)$(DIRSEP)triodef.h
|
||||
$(XMLBASEDIR)$(DIRSEP)trionan.h
|
||||
$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h
|
||||
</headers>
|
||||
</lib>
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- LIBXML2 test programs -->
|
||||
<!-- -->
|
||||
|
||||
<set var="BUILD_ALL_TESTS">
|
||||
|
||||
<!-- when using full options support with MSVC6PRJ we should
|
||||
avoid to create all the DSP files required for the test
|
||||
programs: they would take a _lot_ of space !! -->
|
||||
<if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
|
||||
|
||||
<!-- when creating a makefile or using MSVC6PRJ with limited
|
||||
options support, then we can build all the tests safely -->
|
||||
<if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
|
||||
|
||||
</set>
|
||||
|
||||
<if cond="BUILD_ALL_TESTS=='1'">
|
||||
|
||||
<exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
|
||||
<exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
|
||||
<exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
|
||||
<exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
|
||||
<exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
|
||||
<exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
|
||||
<exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
|
||||
<exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
|
||||
<exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
|
||||
<exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
|
||||
<exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
|
||||
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
|
||||
</if>
|
||||
|
||||
<!-- FIXME:
|
||||
<exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
|
||||
|
||||
<if cond="WITH_THREADS=='posix'">
|
||||
<exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
|
||||
</if>
|
||||
<if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
|
||||
<exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
|
||||
</if>
|
||||
-->
|
||||
</if>
|
||||
|
||||
</makefile>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Summary: Internal Interfaces for memory buffers in libxml2
|
||||
* Description: this module describes most of the new xmlBuf buffer
|
||||
* entry points, those are private routines, with a
|
||||
* few exceptions exported in tree.h. This was added
|
||||
* in 2.9.0.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_BUF_H__
|
||||
#define __XML_BUF_H__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
xmlBufPtr xmlBufCreate(void);
|
||||
xmlBufPtr xmlBufCreateSize(size_t size);
|
||||
xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
|
||||
|
||||
int xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
xmlBufferAllocationScheme scheme);
|
||||
int xmlBufGetAllocationScheme(xmlBufPtr buf);
|
||||
|
||||
void xmlBufFree(xmlBufPtr buf);
|
||||
void xmlBufEmpty(xmlBufPtr buf);
|
||||
|
||||
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
|
||||
int xmlBufGrow(xmlBufPtr buf, int len);
|
||||
int xmlBufInflate(xmlBufPtr buf, size_t len);
|
||||
int xmlBufResize(xmlBufPtr buf, size_t len);
|
||||
|
||||
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
|
||||
int xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len);
|
||||
int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
|
||||
int xmlBufCCat(xmlBufPtr buf, const char *str);
|
||||
int xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string);
|
||||
int xmlBufWriteChar(xmlBufPtr buf, const char *string);
|
||||
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
|
||||
|
||||
size_t xmlBufAvail(const xmlBufPtr buf);
|
||||
size_t xmlBufLength(const xmlBufPtr buf);
|
||||
/* size_t xmlBufUse(const xmlBufPtr buf); */
|
||||
int xmlBufIsEmpty(const xmlBufPtr buf);
|
||||
int xmlBufAddLen(xmlBufPtr buf, size_t len);
|
||||
int xmlBufErase(xmlBufPtr buf, size_t len);
|
||||
|
||||
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
|
||||
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
|
||||
|
||||
xmlChar * xmlBufDetach(xmlBufPtr buf);
|
||||
|
||||
size_t xmlBufDump(FILE *file, xmlBufPtr buf);
|
||||
|
||||
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
|
||||
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
|
||||
int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
|
||||
|
||||
int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
|
||||
size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
|
||||
int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
|
||||
size_t base, size_t cur);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_BUF_H__ */
|
||||
|
|
@ -27,6 +27,8 @@
|
|||
#include <libxml/xpathInternals.h>
|
||||
#include <libxml/c14n.h>
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Some declaration better left private ATM *
|
||||
|
@ -545,14 +547,15 @@ xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx)
|
|||
if (ns->prefix != NULL) {
|
||||
xmlOutputBufferWriteString(ctx->buf, " xmlns:");
|
||||
xmlOutputBufferWriteString(ctx->buf, (const char *) ns->prefix);
|
||||
xmlOutputBufferWriteString(ctx->buf, "=\"");
|
||||
xmlOutputBufferWriteString(ctx->buf, "=");
|
||||
} else {
|
||||
xmlOutputBufferWriteString(ctx->buf, " xmlns=\"");
|
||||
xmlOutputBufferWriteString(ctx->buf, " xmlns=");
|
||||
}
|
||||
if(ns->href != NULL) {
|
||||
xmlOutputBufferWriteString(ctx->buf, (const char *) ns->href);
|
||||
xmlBufWriteQuotedString(ctx->buf->buffer, ns->href);
|
||||
} else {
|
||||
xmlOutputBufferWriteString(ctx->buf, "\"\"");
|
||||
}
|
||||
xmlOutputBufferWriteString(ctx->buf, "\"");
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
@ -2033,9 +2036,9 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
|
|||
return (-1);
|
||||
}
|
||||
|
||||
ret = buf->buffer->use;
|
||||
ret = xmlBufUse(buf->buffer);
|
||||
if (ret > 0) {
|
||||
*doc_txt_ptr = xmlStrndup(buf->buffer->content, ret);
|
||||
*doc_txt_ptr = xmlStrndup(xmlBufContent(buf->buffer), ret);
|
||||
}
|
||||
(void) xmlOutputBufferClose(buf);
|
||||
|
||||
|
|
|
@ -41,13 +41,15 @@
|
|||
#include <libxml/threads.h>
|
||||
#include <libxml/globals.h>
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
#define MAX_DELEGATE 50
|
||||
#define MAX_CATAL_DEPTH 50
|
||||
|
||||
#ifdef _WIN32
|
||||
# define PATH_SEAPARATOR ';'
|
||||
# define PATH_SEPARATOR ';'
|
||||
#else
|
||||
# define PATH_SEAPARATOR ':'
|
||||
# define PATH_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -82,10 +84,12 @@ static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
|
|||
#define GetModuleHandleA GetModuleHandle
|
||||
#define GetModuleFileNameA GetModuleFileName
|
||||
#else
|
||||
#if !defined(_WINDOWS_)
|
||||
void* __stdcall GetModuleHandleA(const char*);
|
||||
unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
|
||||
static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
|
||||
|
@ -234,7 +238,7 @@ xmlCatalogErrMemory(const char *extra)
|
|||
*
|
||||
* Handle a catalog error
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(4,0)
|
||||
xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2,
|
||||
const xmlChar *str3)
|
||||
|
@ -912,10 +916,7 @@ xmlParseCatalogFile(const char *filename) {
|
|||
|
||||
inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
|
||||
inputStream->buf = buf;
|
||||
inputStream->base = inputStream->buf->buffer->content;
|
||||
inputStream->cur = inputStream->buf->buffer->content;
|
||||
inputStream->end =
|
||||
&inputStream->buf->buffer->content[inputStream->buf->buffer->use];
|
||||
xmlBufResetInput(buf->buffer, inputStream);
|
||||
|
||||
inputPush(ctxt, inputStream);
|
||||
if ((ctxt->directory == NULL) && (directory == NULL))
|
||||
|
@ -990,25 +991,27 @@ xmlLoadFileContent(const char *filename)
|
|||
return (NULL);
|
||||
}
|
||||
#endif
|
||||
content = xmlMallocAtomic(size + 10);
|
||||
content = (xmlChar*)xmlMallocAtomic(size + 10);
|
||||
if (content == NULL) {
|
||||
xmlCatalogErrMemory("allocating catalog data");
|
||||
return (NULL);
|
||||
}
|
||||
#ifdef HAVE_STAT
|
||||
len = read(fd, content, size);
|
||||
#else
|
||||
len = fread(content, 1, size, fd);
|
||||
#endif
|
||||
if (len < 0) {
|
||||
xmlFree(content);
|
||||
return (NULL);
|
||||
}
|
||||
#ifdef HAVE_STAT
|
||||
close(fd);
|
||||
#else
|
||||
fclose(fd);
|
||||
#endif
|
||||
return (NULL);
|
||||
}
|
||||
#ifdef HAVE_STAT
|
||||
len = read(fd, content, size);
|
||||
close(fd);
|
||||
#else
|
||||
len = fread(content, 1, size, fd);
|
||||
fclose(fd);
|
||||
#endif
|
||||
if (len < 0) {
|
||||
xmlFree(content);
|
||||
return (NULL);
|
||||
}
|
||||
content[len] = 0;
|
||||
|
||||
return(content);
|
||||
|
@ -1410,8 +1413,6 @@ xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) {
|
|||
return(-1);
|
||||
if (catal->URL == NULL)
|
||||
return(-1);
|
||||
if (catal->children != NULL)
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
* lock the whole catalog for modification
|
||||
|
@ -1553,7 +1554,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
|
|||
NULL, catal->prefer, NULL);
|
||||
if (doregister) {
|
||||
catal->type = XML_CATA_CATALOG;
|
||||
cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
|
||||
cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
|
||||
if (cur != NULL)
|
||||
cur->children = catal->children;
|
||||
}
|
||||
|
@ -3135,7 +3136,7 @@ xmlInitializeCatalog(void) {
|
|||
if (p != buf) {
|
||||
xmlChar* uri;
|
||||
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
|
||||
uri = xmlCanonicPath(buf);
|
||||
uri = xmlCanonicPath((const xmlChar*)buf);
|
||||
if (uri != NULL) {
|
||||
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
|
||||
xmlFree(uri);
|
||||
|
@ -3246,11 +3247,11 @@ xmlLoadCatalogs(const char *pathss) {
|
|||
while (xmlIsBlank_ch(*cur)) cur++;
|
||||
if (*cur != 0) {
|
||||
paths = cur;
|
||||
while ((*cur != 0) && (*cur != PATH_SEAPARATOR) && (!xmlIsBlank_ch(*cur)))
|
||||
while ((*cur != 0) && (*cur != PATH_SEPARATOR) && (!xmlIsBlank_ch(*cur)))
|
||||
cur++;
|
||||
path = xmlStrndup((const xmlChar *)paths, cur - paths);
|
||||
#ifdef _WIN32
|
||||
iLen = strlen(path);
|
||||
iLen = strlen((const char*)path);
|
||||
for(i = 0; i < iLen; i++) {
|
||||
if(path[i] == '\\') {
|
||||
path[i] = '/';
|
||||
|
@ -3262,7 +3263,7 @@ xmlLoadCatalogs(const char *pathss) {
|
|||
xmlFree(path);
|
||||
}
|
||||
}
|
||||
while (*cur == PATH_SEAPARATOR)
|
||||
while (*cur == PATH_SEPARATOR)
|
||||
cur++;
|
||||
}
|
||||
}
|
||||
|
@ -3554,8 +3555,8 @@ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer) {
|
|||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Setting catalog preference to SYSTEM\n");
|
||||
break;
|
||||
case XML_CATA_PREFER_NONE:
|
||||
break;
|
||||
default:
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
xmlCatalogDefaultPrefer = prefer;
|
||||
|
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1,14 +1,12 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright 1992-2013 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2009-11-20'
|
||||
timestamp='2013-06-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
|
@ -17,26 +15,22 @@ timestamp='2009-11-20'
|
|||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
# Originally written by Per Bothner.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
#
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
|
@ -56,8 +50,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright 1992-2013 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
case "${UNAME_SYSTEM}" in
|
||||
Linux|GNU|GNU/*)
|
||||
# If the system lacks a compiler, then just pick glibc.
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat <<-EOF > $dummy.c
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
#elif defined(__dietlibc__)
|
||||
LIBC=dietlibc
|
||||
#else
|
||||
LIBC=gnu
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
|
@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:OpenBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
|
@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit ;;
|
||||
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||
exitcode=$?
|
||||
trap '' 0
|
||||
exit $exitcode ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
|
@ -300,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
arm:riscos:*:*|arm:RISCOS:*:*)
|
||||
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
||||
echo arm-unknown-riscos
|
||||
exit ;;
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
|
@ -551,7 +572,7 @@ EOF
|
|||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[456])
|
||||
*:AIX:*:[4567])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
|
@ -788,21 +809,26 @@ EOF
|
|||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case ${UNAME_PROCESSOR} in
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
|
@ -848,15 +874,22 @@ EOF
|
|||
exit ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
|
@ -868,50 +901,54 @@ EOF
|
|||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arc:Linux:*:* | arceb:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo crisv32-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo frv-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
|
@ -930,51 +967,63 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||
;;
|
||||
or1k:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
echo sparc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
echo hppa64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||
esac
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
echo powerpc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc64le:Linux:*:*)
|
||||
echo powerpc64le-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppcle:Linux:*:*)
|
||||
echo powerpcle-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
|
@ -1178,6 +1227,9 @@ EOF
|
|||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
x86_64:Haiku:*:*)
|
||||
echo x86_64-unknown-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -1204,19 +1256,21 @@ EOF
|
|||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
i386)
|
||||
eval $set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR="x86_64"
|
||||
fi
|
||||
fi ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
|
@ -1230,7 +1284,10 @@ EOF
|
|||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit ;;
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-*:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
|
@ -1299,11 +1356,11 @@ EOF
|
|||
i*86:AROS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-aros
|
||||
exit ;;
|
||||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#undef HAVE_LIBZ
|
||||
#undef HAVE_LIBM
|
||||
#undef HAVE_ISINF
|
||||
#undef HAVE_ISNAN
|
||||
#undef HAVE_LIBHISTORY
|
||||
#undef HAVE_LIBREADLINE
|
||||
#undef HAVE_LIBPTHREAD
|
||||
#undef HAVE_PTHREAD_H
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if IPV6 support is there */
|
||||
#undef SUPPORT_IP6
|
||||
|
||||
/* Define if getaddrinfo is there */
|
||||
#undef HAVE_GETADDRINFO
|
||||
/* Type cast for the gethostbyname() argument */
|
||||
#undef GETHOSTBYNAME_ARG_CAST
|
||||
|
||||
/* Define to 1 if you have the <ansidecl.h> header file. */
|
||||
#undef HAVE_ANSIDECL_H
|
||||
|
@ -85,8 +72,8 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h.h> header file. */
|
||||
#undef HAVE_INTTYPES_H_H
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#undef HAVE_ISASCII
|
||||
|
||||
/* Define if isinf is there */
|
||||
#undef HAVE_ISINF
|
||||
|
@ -100,6 +87,9 @@
|
|||
/* Define if history library is there (-lhistory) */
|
||||
#undef HAVE_LIBHISTORY
|
||||
|
||||
/* Have compression library */
|
||||
#undef HAVE_LIBLZMA
|
||||
|
||||
/* Define if pthread library is there (-lpthread) */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
|
@ -115,6 +105,9 @@
|
|||
/* Define to 1 if you have the `localtime' function. */
|
||||
#undef HAVE_LOCALTIME
|
||||
|
||||
/* Define to 1 if you have the <lzma.h> header file. */
|
||||
#undef HAVE_LZMA_H
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
|
@ -124,6 +117,17 @@
|
|||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* mmap() is no good without munmap() */
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
|
||||
# undef /**/ HAVE_MMAP
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <nan.h> header file. */
|
||||
#undef HAVE_NAN_H
|
||||
|
||||
|
@ -145,6 +149,15 @@
|
|||
/* Define if <pthread.h> is there */
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define to 1 if you have the `rand' function. */
|
||||
#undef HAVE_RAND
|
||||
|
||||
/* Define to 1 if you have the `rand_r' function. */
|
||||
#undef HAVE_RAND_R
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
#undef HAVE_RESOLV_H
|
||||
|
||||
|
@ -163,6 +176,9 @@
|
|||
/* Define to 1 if you have the `sprintf' function. */
|
||||
#undef HAVE_SPRINTF
|
||||
|
||||
/* Define to 1 if you have the `srand' function. */
|
||||
#undef HAVE_SRAND
|
||||
|
||||
/* Define to 1 if you have the `sscanf' function. */
|
||||
#undef HAVE_SSCANF
|
||||
|
||||
|
@ -225,6 +241,9 @@
|
|||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#undef HAVE_TIME
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
|
@ -255,8 +274,7 @@
|
|||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
|
@ -280,8 +298,8 @@
|
|||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#undef PROTOTYPES
|
||||
/* Type cast for the send() function 2nd arg */
|
||||
#undef SEND_ARG2_CAST
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
@ -289,23 +307,26 @@
|
|||
/* Support for IPv6 */
|
||||
#undef SUPPORT_IP6
|
||||
|
||||
/* Define if va_list is an array type */
|
||||
#undef VA_LIST_IS_ARRAY
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Determine what socket length (socklen_t) data type is */
|
||||
#undef XML_SOCKLEN_T
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT32_T
|
||||
|
||||
/* Using the Win32 Socket implementation */
|
||||
#undef _WINSOCKAPI_
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#undef __PROTOTYPES
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
#undef snprintf
|
||||
|
||||
/* ss_family is not defined here, use __ss_family instead */
|
||||
#undef ss_family
|
||||
|
||||
/* Win32 Std C name mangling work-around */
|
||||
#undef vsnprintf
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint32_t
|
||||
|
|
|
@ -1,38 +1,31 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright 1992-2013 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2009-11-20'
|
||||
timestamp='2013-08-10'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
# This program 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
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
@ -75,8 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright 1992-2013 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -123,13 +115,18 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
android-linux)
|
||||
os=-linux-android
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
|
@ -152,7 +149,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
@ -221,6 +218,12 @@ case $os in
|
|||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*178)
|
||||
os=-lynxos178
|
||||
;;
|
||||
-lynx*5)
|
||||
os=-lynxos5
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
|
@ -245,20 +248,27 @@ case $basic_machine in
|
|||
# Some are omitted here because they have special meanings below.
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
@ -276,34 +286,45 @@ case $basic_machine in
|
|||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| open8 \
|
||||
| or1k | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| rx \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| spu \
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| we32k \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
||||
# Motorola 68HC11/12.
|
||||
c54x)
|
||||
basic_machine=tic54x-unknown
|
||||
;;
|
||||
c55x)
|
||||
basic_machine=tic55x-unknown
|
||||
;;
|
||||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
|
@ -313,6 +334,21 @@ case $basic_machine in
|
|||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
strongarm | thumb | xscale)
|
||||
basic_machine=arm-unknown
|
||||
;;
|
||||
xgate)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
xscaleeb)
|
||||
basic_machine=armeb-unknown
|
||||
;;
|
||||
|
||||
xscaleel)
|
||||
basic_machine=armel-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
|
@ -327,25 +363,30 @@ case $basic_machine in
|
|||
# Recognize the basic CPU types with company name.
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
@ -363,29 +404,34 @@ case $basic_machine in
|
|||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* | rx-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
| tron-* \
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-* | z80-*)
|
||||
|
@ -480,6 +526,15 @@ case $basic_machine in
|
|||
basic_machine=powerpc-ibm
|
||||
os=-cnk
|
||||
;;
|
||||
c54x-*)
|
||||
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c55x-*)
|
||||
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c6x-*)
|
||||
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
|
@ -516,7 +571,7 @@ case $basic_machine in
|
|||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16)
|
||||
cr16 | cr16-*)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
|
@ -674,7 +729,6 @@ case $basic_machine in
|
|||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
|
@ -732,11 +786,15 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
|
@ -771,10 +829,18 @@ case $basic_machine in
|
|||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
nacl)
|
||||
basic_machine=le32-unknown
|
||||
os=-nacl
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
|
@ -839,6 +905,12 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
neo-tandem)
|
||||
basic_machine=neo-tandem
|
||||
;;
|
||||
nse-tandem)
|
||||
basic_machine=nse-tandem
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -921,9 +993,10 @@ case $basic_machine in
|
|||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
|
@ -948,7 +1021,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
@ -1017,6 +1094,9 @@ case $basic_machine in
|
|||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
strongarm-* | thumb-*)
|
||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
|
@ -1073,20 +1153,8 @@ case $basic_machine in
|
|||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
|
@ -1156,6 +1224,9 @@ case $basic_machine in
|
|||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
xscale-* | xscalee[bl]-*)
|
||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
|
@ -1281,20 +1352,21 @@ case $os in
|
|||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
|
@ -1426,15 +1498,14 @@ case $os in
|
|||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1475,6 +1546,21 @@ case $basic_machine in
|
|||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
|
@ -1493,9 +1579,6 @@ case $basic_machine in
|
|||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
|
@ -1509,6 +1592,9 @@ case $basic_machine in
|
|||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or1k-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -44,10 +44,10 @@ struct _xmlDebugCtxt {
|
|||
int depth; /* current depth */
|
||||
xmlDocPtr doc; /* current document */
|
||||
xmlNodePtr node; /* current node */
|
||||
xmlDictPtr dict; /* the doc dictionnary */
|
||||
xmlDictPtr dict; /* the doc dictionary */
|
||||
int check; /* do just checkings */
|
||||
int errors; /* number of errors found */
|
||||
int nodict; /* if the document has no dictionnary */
|
||||
int nodict; /* if the document has no dictionary */
|
||||
int options; /* options */
|
||||
};
|
||||
|
||||
|
@ -164,7 +164,7 @@ xmlDebugErr(xmlDebugCtxtPtr ctxt, int error, const char *msg)
|
|||
NULL, NULL, NULL, 0, 0,
|
||||
"%s", msg);
|
||||
}
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra)
|
||||
{
|
||||
ctxt->errors++;
|
||||
|
@ -174,7 +174,7 @@ xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra)
|
|||
NULL, NULL, NULL, 0, 0,
|
||||
msg, extra);
|
||||
}
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlDebugErr3(xmlDebugCtxtPtr ctxt, int error, const char *msg, const char *extra)
|
||||
{
|
||||
ctxt->errors++;
|
||||
|
@ -243,7 +243,7 @@ xmlCtxtCheckString(xmlDebugCtxtPtr ctxt, const xmlChar * str)
|
|||
* @ctxt: the debug context
|
||||
* @name: the name
|
||||
*
|
||||
* Do debugging on the name, for example the dictionnary status and
|
||||
* Do debugging on the name, for example the dictionary status and
|
||||
* conformance to the Name production.
|
||||
*/
|
||||
static void
|
||||
|
@ -254,16 +254,18 @@ xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name)
|
|||
xmlDebugErr(ctxt, XML_CHECK_NO_NAME, "Name is NULL");
|
||||
return;
|
||||
}
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
if (xmlValidateName(name, 0)) {
|
||||
xmlDebugErr3(ctxt, XML_CHECK_NOT_NCNAME,
|
||||
"Name is not an NCName '%s'", (const char *) name);
|
||||
}
|
||||
#endif
|
||||
if ((ctxt->dict != NULL) &&
|
||||
(!xmlDictOwns(ctxt->dict, name)) &&
|
||||
((ctxt->doc == NULL) ||
|
||||
((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) {
|
||||
xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT,
|
||||
"Name is not from the document dictionnary '%s'",
|
||||
"Name is not from the document dictionary '%s'",
|
||||
(const char *) name);
|
||||
}
|
||||
}
|
||||
|
@ -290,7 +292,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
|
|||
/* desactivated right now as it raises too many errors */
|
||||
if (doc->type == XML_DOCUMENT_NODE)
|
||||
xmlDebugErr(ctxt, XML_CHECK_NO_DICT,
|
||||
"Document has no dictionnary\n");
|
||||
"Document has no dictionary\n");
|
||||
#endif
|
||||
ctxt->nodict = 1;
|
||||
}
|
||||
|
@ -1723,8 +1725,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
|
|||
|
||||
switch (node->type) {
|
||||
case XML_ELEMENT_NODE:
|
||||
if (node->name != NULL)
|
||||
if (node->name != NULL) {
|
||||
if ((node->ns != NULL) && (node->ns->prefix != NULL))
|
||||
fprintf(output, "%s:", node->ns->prefix);
|
||||
fprintf(output, "%s", (const char *) node->name);
|
||||
}
|
||||
break;
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
if (node->name != NULL)
|
||||
|
@ -2695,6 +2700,8 @@ xmlShellDu(xmlShellCtxtPtr ctxt,
|
|||
} else if (node->type == XML_ELEMENT_NODE) {
|
||||
for (i = 0; i < indent; i++)
|
||||
fprintf(ctxt->output, " ");
|
||||
if ((node->ns) && (node->ns->prefix))
|
||||
fprintf(ctxt->output, "%s:", node->ns->prefix);
|
||||
fprintf(ctxt->output, "%s\n", node->name);
|
||||
} else {
|
||||
}
|
||||
|
@ -2836,6 +2843,10 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
while (1) {
|
||||
if (ctxt->node == (xmlNodePtr) ctxt->doc)
|
||||
snprintf(prompt, sizeof(prompt), "%s > ", "/");
|
||||
else if ((ctxt->node != NULL) && (ctxt->node->name) &&
|
||||
(ctxt->node->ns) && (ctxt->node->ns->prefix))
|
||||
snprintf(prompt, sizeof(prompt), "%s:%s > ",
|
||||
(ctxt->node->ns->prefix), ctxt->node->name);
|
||||
else if ((ctxt->node != NULL) && (ctxt->node->name))
|
||||
snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name);
|
||||
else
|
||||
|
@ -2910,6 +2921,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
fprintf(ctxt->output, "\t the default namespace if any uses 'defaultns' prefix\n");
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
fprintf(ctxt->output, "\tpwd display current working directory\n");
|
||||
fprintf(ctxt->output, "\twhereis display absolute path of [path] or current working directory\n");
|
||||
fprintf(ctxt->output, "\tquit leave shell\n");
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
fprintf(ctxt->output, "\tsave [name] save this document to name or the original name\n");
|
||||
|
@ -2936,11 +2948,11 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
} else if (!strcmp(command, "save")) {
|
||||
xmlShellSave(ctxt, arg, NULL, NULL);
|
||||
} else if (!strcmp(command, "write")) {
|
||||
if ((arg == NULL) || (arg[0] == 0))
|
||||
if (arg[0] == 0)
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Write command requires a filename argument\n");
|
||||
else
|
||||
xmlShellWrite(ctxt, arg, NULL, NULL);
|
||||
xmlShellWrite(ctxt, arg, ctxt->node, NULL);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
} else if (!strcmp(command, "grep")) {
|
||||
xmlShellGrep(ctxt, arg, ctxt->node, NULL);
|
||||
|
@ -2959,7 +2971,79 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL))
|
||||
fprintf(ctxt->output, "%s\n", dir);
|
||||
} else if (!strcmp(command, "du")) {
|
||||
if (arg[0] == 0) {
|
||||
xmlShellDu(ctxt, NULL, ctxt->node, NULL);
|
||||
} else {
|
||||
ctxt->pctxt->node = ctxt->node;
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
ctxt->pctxt->node = ctxt->node;
|
||||
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
|
||||
#else
|
||||
list = NULL;
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
if (list != NULL) {
|
||||
switch (list->type) {
|
||||
case XPATH_UNDEFINED:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s: no such node\n", arg);
|
||||
break;
|
||||
case XPATH_NODESET:{
|
||||
int indx;
|
||||
|
||||
if (list->nodesetval == NULL)
|
||||
break;
|
||||
|
||||
for (indx = 0;
|
||||
indx < list->nodesetval->nodeNr;
|
||||
indx++)
|
||||
xmlShellDu(ctxt, NULL,
|
||||
list->nodesetval->
|
||||
nodeTab[indx], NULL);
|
||||
break;
|
||||
}
|
||||
case XPATH_BOOLEAN:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a Boolean\n", arg);
|
||||
break;
|
||||
case XPATH_NUMBER:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a number\n", arg);
|
||||
break;
|
||||
case XPATH_STRING:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a string\n", arg);
|
||||
break;
|
||||
case XPATH_POINT:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a point\n", arg);
|
||||
break;
|
||||
case XPATH_RANGE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a range\n", arg);
|
||||
break;
|
||||
case XPATH_LOCATIONSET:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a range\n", arg);
|
||||
break;
|
||||
case XPATH_USERS:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is user-defined\n", arg);
|
||||
break;
|
||||
case XPATH_XSLT_TREE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is an XSLT value tree\n",
|
||||
arg);
|
||||
break;
|
||||
}
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
xmlXPathFreeObject(list);
|
||||
#endif
|
||||
} else {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s: no such node\n", arg);
|
||||
}
|
||||
ctxt->pctxt->node = NULL;
|
||||
}
|
||||
} else if (!strcmp(command, "base")) {
|
||||
xmlShellBase(ctxt, NULL, ctxt->node, NULL);
|
||||
} else if (!strcmp(command, "set")) {
|
||||
|
@ -3070,6 +3154,83 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
}
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
xmlXPathFreeObject(list);
|
||||
#endif
|
||||
} else {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s: no such node\n", arg);
|
||||
}
|
||||
ctxt->pctxt->node = NULL;
|
||||
}
|
||||
} else if (!strcmp(command, "whereis")) {
|
||||
char dir[500];
|
||||
|
||||
if (arg[0] == 0) {
|
||||
if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL))
|
||||
fprintf(ctxt->output, "%s\n", dir);
|
||||
} else {
|
||||
ctxt->pctxt->node = ctxt->node;
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
|
||||
#else
|
||||
list = NULL;
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
if (list != NULL) {
|
||||
switch (list->type) {
|
||||
case XPATH_UNDEFINED:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s: no such node\n", arg);
|
||||
break;
|
||||
case XPATH_NODESET:{
|
||||
int indx;
|
||||
|
||||
if (list->nodesetval == NULL)
|
||||
break;
|
||||
|
||||
for (indx = 0;
|
||||
indx < list->nodesetval->nodeNr;
|
||||
indx++) {
|
||||
if (!xmlShellPwd(ctxt, dir, list->nodesetval->
|
||||
nodeTab[indx], NULL))
|
||||
fprintf(ctxt->output, "%s\n", dir);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XPATH_BOOLEAN:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a Boolean\n", arg);
|
||||
break;
|
||||
case XPATH_NUMBER:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a number\n", arg);
|
||||
break;
|
||||
case XPATH_STRING:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a string\n", arg);
|
||||
break;
|
||||
case XPATH_POINT:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a point\n", arg);
|
||||
break;
|
||||
case XPATH_RANGE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a range\n", arg);
|
||||
break;
|
||||
case XPATH_LOCATIONSET:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is a range\n", arg);
|
||||
break;
|
||||
case XPATH_USERS:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is user-defined\n", arg);
|
||||
break;
|
||||
case XPATH_XSLT_TREE:
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"%s is an XSLT value tree\n",
|
||||
arg);
|
||||
break;
|
||||
}
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
xmlXPathFreeObject(list);
|
||||
#endif
|
||||
} else {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
@ -3082,7 +3243,12 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||
ctxt->node = (xmlNodePtr) ctxt->doc;
|
||||
} else {
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
int l;
|
||||
|
||||
ctxt->pctxt->node = ctxt->node;
|
||||
l = strlen(arg);
|
||||
if ((l >= 2) && (arg[l - 1] == '/'))
|
||||
arg[l - 1] = 0;
|
||||
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
|
||||
#else
|
||||
list = NULL;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -28,7 +27,7 @@ scriptversion=2009-04-28.21; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
|
@ -40,11 +39,11 @@ as side-effects.
|
|||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
|
@ -57,6 +56,66 @@ EOF
|
|||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
|
@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
|
@ -90,10 +152,24 @@ if test "$depmode" = msvcmsys; then
|
|||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
|
@ -114,8 +190,7 @@ gcc3)
|
|||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -123,13 +198,17 @@ gcc3)
|
|||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
|
@ -137,31 +216,31 @@ gcc)
|
|||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -179,8 +258,7 @@ sgi)
|
|||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -188,43 +266,41 @@ sgi)
|
|||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
|
@ -237,9 +313,7 @@ aix)
|
|||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -248,44 +322,100 @@ aix)
|
|||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -297,8 +427,8 @@ icc)
|
|||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -309,9 +439,8 @@ hp2)
|
|||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
|
@ -322,8 +451,7 @@ hp2)
|
|||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -333,8 +461,8 @@ hp2)
|
|||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
|
@ -342,67 +470,97 @@ hp2)
|
|||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
|
@ -422,7 +580,7 @@ dashmstdout)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -442,18 +600,18 @@ dashmstdout)
|
|||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -503,12 +661,15 @@ makedepend)
|
|||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
|
@ -525,7 +686,7 @@ cpp)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -544,10 +705,10 @@ cpp)
|
|||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
|
@ -594,8 +755,8 @@ msvisualcpp)
|
|||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* dict.c: dictionary of reusable strings, just used to avoid allocation
|
||||
* and freeing operations.
|
||||
*
|
||||
* Copyright (C) 2003 Daniel Veillard.
|
||||
* Copyright (C) 2003-2012 Daniel Veillard.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -19,6 +19,29 @@
|
|||
#define IN_LIBXML
|
||||
#include "libxml.h"
|
||||
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Following http://www.ocert.org/advisories/ocert-2011-003.html
|
||||
* it seems that having hash randomization might be a good idea
|
||||
* when using XML with untrusted data
|
||||
* Note1: that it works correctly only if compiled with WITH_BIG_KEY
|
||||
* which is the default.
|
||||
* Note2: the fast function used for a small dict won't protect very
|
||||
* well but since the attack is based on growing a very big hash
|
||||
* list we will use the BigKey algo as soon as the hash size grows
|
||||
* over MIN_DICT_SIZE so this actually works
|
||||
*/
|
||||
#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
|
||||
#define DICT_RANDOMIZATION
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
|
@ -46,32 +69,32 @@ typedef unsigned __int32 uint32_t;
|
|||
#ifdef WITH_BIG_KEY
|
||||
#define xmlDictComputeKey(dict, name, len) \
|
||||
(((dict)->size == MIN_DICT_SIZE) ? \
|
||||
xmlDictComputeFastKey(name, len) : \
|
||||
xmlDictComputeBigKey(name, len))
|
||||
xmlDictComputeFastKey(name, len, (dict)->seed) : \
|
||||
xmlDictComputeBigKey(name, len, (dict)->seed))
|
||||
|
||||
#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
|
||||
(((prefix) == NULL) ? \
|
||||
(xmlDictComputeKey(dict, name, len)) : \
|
||||
(((dict)->size == MIN_DICT_SIZE) ? \
|
||||
xmlDictComputeFastQKey(prefix, plen, name, len) : \
|
||||
xmlDictComputeBigQKey(prefix, plen, name, len)))
|
||||
xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) : \
|
||||
xmlDictComputeBigQKey(prefix, plen, name, len, (dict)->seed)))
|
||||
|
||||
#else /* !WITH_BIG_KEY */
|
||||
#define xmlDictComputeKey(dict, name, len) \
|
||||
xmlDictComputeFastKey(name, len)
|
||||
xmlDictComputeFastKey(name, len, (dict)->seed)
|
||||
#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
|
||||
xmlDictComputeFastQKey(prefix, plen, name, len)
|
||||
xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed)
|
||||
#endif /* WITH_BIG_KEY */
|
||||
|
||||
/*
|
||||
* An entry in the dictionnary
|
||||
* An entry in the dictionary
|
||||
*/
|
||||
typedef struct _xmlDictEntry xmlDictEntry;
|
||||
typedef xmlDictEntry *xmlDictEntryPtr;
|
||||
struct _xmlDictEntry {
|
||||
struct _xmlDictEntry *next;
|
||||
const xmlChar *name;
|
||||
int len;
|
||||
unsigned int len;
|
||||
int valid;
|
||||
unsigned long okey;
|
||||
};
|
||||
|
@ -82,22 +105,26 @@ struct _xmlDictStrings {
|
|||
xmlDictStringsPtr next;
|
||||
xmlChar *free;
|
||||
xmlChar *end;
|
||||
int size;
|
||||
int nbStrings;
|
||||
size_t size;
|
||||
size_t nbStrings;
|
||||
xmlChar array[1];
|
||||
};
|
||||
/*
|
||||
* The entire dictionnary
|
||||
* The entire dictionary
|
||||
*/
|
||||
struct _xmlDict {
|
||||
int ref_counter;
|
||||
|
||||
struct _xmlDictEntry *dict;
|
||||
int size;
|
||||
int nbElems;
|
||||
size_t size;
|
||||
unsigned int nbElems;
|
||||
xmlDictStringsPtr strings;
|
||||
|
||||
struct _xmlDict *subdict;
|
||||
/* used for randomization */
|
||||
int seed;
|
||||
/* used to impose a limit on size */
|
||||
size_t limit;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -111,28 +138,84 @@ static xmlRMutexPtr xmlDictMutex = NULL;
|
|||
*/
|
||||
static int xmlDictInitialized = 0;
|
||||
|
||||
#ifdef DICT_RANDOMIZATION
|
||||
#ifdef HAVE_RAND_R
|
||||
/*
|
||||
* Internal data for random function, protected by xmlDictMutex
|
||||
*/
|
||||
static unsigned int rand_seed = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlInitializeDict:
|
||||
*
|
||||
* Do the dictionary mutex initialization.
|
||||
* this function is not thread safe, initialization should
|
||||
* preferably be done once at startup
|
||||
* this function is deprecated
|
||||
*
|
||||
* Returns 0 if initialization was already done, and 1 if that
|
||||
* call led to the initialization
|
||||
*/
|
||||
static int xmlInitializeDict(void) {
|
||||
int xmlInitializeDict(void) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* __xmlInitializeDict:
|
||||
*
|
||||
* This function is not public
|
||||
* Do the dictionary mutex initialization.
|
||||
* this function is not thread safe, initialization should
|
||||
* normally be done once at setup when called from xmlOnceInit()
|
||||
* we may also land in this code if thread support is not compiled in
|
||||
*
|
||||
* Returns 0 if initialization was already done, and 1 if that
|
||||
* call led to the initialization
|
||||
*/
|
||||
int __xmlInitializeDict(void) {
|
||||
if (xmlDictInitialized)
|
||||
return(1);
|
||||
|
||||
if ((xmlDictMutex = xmlNewRMutex()) == NULL)
|
||||
return(0);
|
||||
xmlRMutexLock(xmlDictMutex);
|
||||
|
||||
#ifdef DICT_RANDOMIZATION
|
||||
#ifdef HAVE_RAND_R
|
||||
rand_seed = time(NULL);
|
||||
rand_r(& rand_seed);
|
||||
#else
|
||||
srand(time(NULL));
|
||||
#endif
|
||||
#endif
|
||||
xmlDictInitialized = 1;
|
||||
xmlRMutexUnlock(xmlDictMutex);
|
||||
return(1);
|
||||
}
|
||||
|
||||
#ifdef DICT_RANDOMIZATION
|
||||
int __xmlRandom(void) {
|
||||
int ret;
|
||||
|
||||
if (xmlDictInitialized == 0)
|
||||
__xmlInitializeDict();
|
||||
|
||||
xmlRMutexLock(xmlDictMutex);
|
||||
#ifdef HAVE_RAND_R
|
||||
ret = rand_r(& rand_seed);
|
||||
#else
|
||||
ret = rand();
|
||||
#endif
|
||||
xmlRMutexUnlock(xmlDictMutex);
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlDictCleanup:
|
||||
*
|
||||
* Free the dictionary mutex.
|
||||
* Free the dictionary mutex. Do not call unless sure the library
|
||||
* is not in use anymore !
|
||||
*/
|
||||
void
|
||||
xmlDictCleanup(void) {
|
||||
|
@ -146,19 +229,20 @@ xmlDictCleanup(void) {
|
|||
|
||||
/*
|
||||
* xmlDictAddString:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @name: the name of the userdata
|
||||
* @len: the length of the name, if -1 it is recomputed
|
||||
* @len: the length of the name
|
||||
*
|
||||
* Add the string to the array[s]
|
||||
*
|
||||
* Returns the pointer of the local string, or NULL in case of error.
|
||||
*/
|
||||
static const xmlChar *
|
||||
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) {
|
||||
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, unsigned int namelen) {
|
||||
xmlDictStringsPtr pool;
|
||||
const xmlChar *ret;
|
||||
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||
size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||
size_t limit = 0;
|
||||
|
||||
#ifdef DICT_DEBUG_PATTERNS
|
||||
fprintf(stderr, "-");
|
||||
|
@ -168,12 +252,17 @@ xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) {
|
|||
if (pool->end - pool->free > namelen)
|
||||
goto found_pool;
|
||||
if (pool->size > size) size = pool->size;
|
||||
limit += pool->size;
|
||||
pool = pool->next;
|
||||
}
|
||||
/*
|
||||
* Not found, need to allocate
|
||||
*/
|
||||
if (pool == NULL) {
|
||||
if ((dict->limit > 0) && (limit > dict->limit)) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if (size == 0) size = 1000;
|
||||
else size *= 4; /* exponential growth */
|
||||
if (size < 4 * namelen)
|
||||
|
@ -202,23 +291,24 @@ found_pool:
|
|||
|
||||
/*
|
||||
* xmlDictAddQString:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @prefix: the prefix of the userdata
|
||||
* @plen: the prefix length
|
||||
* @name: the name of the userdata
|
||||
* @len: the length of the name, if -1 it is recomputed
|
||||
* @len: the length of the name
|
||||
*
|
||||
* Add the QName to the array[s]
|
||||
*
|
||||
* Returns the pointer of the local string, or NULL in case of error.
|
||||
*/
|
||||
static const xmlChar *
|
||||
xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen,
|
||||
const xmlChar *name, int namelen)
|
||||
xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, unsigned int plen,
|
||||
const xmlChar *name, unsigned int namelen)
|
||||
{
|
||||
xmlDictStringsPtr pool;
|
||||
const xmlChar *ret;
|
||||
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||
size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||
size_t limit = 0;
|
||||
|
||||
if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
|
||||
|
||||
|
@ -230,12 +320,17 @@ xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen,
|
|||
if (pool->end - pool->free > namelen + plen + 1)
|
||||
goto found_pool;
|
||||
if (pool->size > size) size = pool->size;
|
||||
limit += pool->size;
|
||||
pool = pool->next;
|
||||
}
|
||||
/*
|
||||
* Not found, need to allocate
|
||||
*/
|
||||
if (pool == NULL) {
|
||||
if ((dict->limit > 0) && (limit > dict->limit)) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if (size == 0) size = 1000;
|
||||
else size *= 4; /* exponential growth */
|
||||
if (size < 4 * (namelen + plen + 1))
|
||||
|
@ -277,13 +372,13 @@ found_pool:
|
|||
*/
|
||||
|
||||
static uint32_t
|
||||
xmlDictComputeBigKey(const xmlChar* data, int namelen) {
|
||||
xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
|
||||
uint32_t hash;
|
||||
int i;
|
||||
|
||||
if (namelen <= 0 || data == NULL) return(0);
|
||||
|
||||
hash = 0;
|
||||
hash = seed;
|
||||
|
||||
for (i = 0;i < namelen; i++) {
|
||||
hash += data[i];
|
||||
|
@ -310,12 +405,12 @@ xmlDictComputeBigKey(const xmlChar* data, int namelen) {
|
|||
*/
|
||||
static unsigned long
|
||||
xmlDictComputeBigQKey(const xmlChar *prefix, int plen,
|
||||
const xmlChar *name, int len)
|
||||
const xmlChar *name, int len, int seed)
|
||||
{
|
||||
uint32_t hash;
|
||||
int i;
|
||||
|
||||
hash = 0;
|
||||
hash = seed;
|
||||
|
||||
for (i = 0;i < plen; i++) {
|
||||
hash += prefix[i];
|
||||
|
@ -346,8 +441,8 @@ xmlDictComputeBigQKey(const xmlChar *prefix, int plen,
|
|||
* for low hash table fill.
|
||||
*/
|
||||
static unsigned long
|
||||
xmlDictComputeFastKey(const xmlChar *name, int namelen) {
|
||||
unsigned long value = 0L;
|
||||
xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
|
||||
unsigned long value = seed;
|
||||
|
||||
if (name == NULL) return(0);
|
||||
value = *name;
|
||||
|
@ -381,9 +476,9 @@ xmlDictComputeFastKey(const xmlChar *name, int namelen) {
|
|||
*/
|
||||
static unsigned long
|
||||
xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
|
||||
const xmlChar *name, int len)
|
||||
const xmlChar *name, int len, int seed)
|
||||
{
|
||||
unsigned long value = 0L;
|
||||
unsigned long value = (unsigned long) seed;
|
||||
|
||||
if (plen == 0)
|
||||
value += 30 * (unsigned long) ':';
|
||||
|
@ -391,7 +486,10 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
|
|||
value += 30 * (*prefix);
|
||||
|
||||
if (len > 10) {
|
||||
value += name[len - (plen + 1 + 1)];
|
||||
int offset = len - (plen + 1 + 1);
|
||||
if (offset < 0)
|
||||
offset = len - (10 + 1);
|
||||
value += name[offset];
|
||||
len = 10;
|
||||
if (plen > 10)
|
||||
plen = 10;
|
||||
|
@ -435,14 +533,14 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
|
|||
*
|
||||
* Create a new dictionary
|
||||
*
|
||||
* Returns the newly created dictionnary, or NULL if an error occured.
|
||||
* Returns the newly created dictionary, or NULL if an error occured.
|
||||
*/
|
||||
xmlDictPtr
|
||||
xmlDictCreate(void) {
|
||||
xmlDictPtr dict;
|
||||
|
||||
if (!xmlDictInitialized)
|
||||
if (!xmlInitializeDict())
|
||||
if (!__xmlInitializeDict())
|
||||
return(NULL);
|
||||
|
||||
#ifdef DICT_DEBUG_PATTERNS
|
||||
|
@ -452,6 +550,7 @@ xmlDictCreate(void) {
|
|||
dict = xmlMalloc(sizeof(xmlDict));
|
||||
if (dict) {
|
||||
dict->ref_counter = 1;
|
||||
dict->limit = 0;
|
||||
|
||||
dict->size = MIN_DICT_SIZE;
|
||||
dict->nbElems = 0;
|
||||
|
@ -460,6 +559,11 @@ xmlDictCreate(void) {
|
|||
dict->subdict = NULL;
|
||||
if (dict->dict) {
|
||||
memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry));
|
||||
#ifdef DICT_RANDOMIZATION
|
||||
dict->seed = __xmlRandom();
|
||||
#else
|
||||
dict->seed = 0;
|
||||
#endif
|
||||
return(dict);
|
||||
}
|
||||
xmlFree(dict);
|
||||
|
@ -469,14 +573,14 @@ xmlDictCreate(void) {
|
|||
|
||||
/**
|
||||
* xmlDictCreateSub:
|
||||
* @sub: an existing dictionnary
|
||||
* @sub: an existing dictionary
|
||||
*
|
||||
* Create a new dictionary, inheriting strings from the read-only
|
||||
* dictionnary @sub. On lookup, strings are first searched in the
|
||||
* new dictionnary, then in @sub, and if not found are created in the
|
||||
* new dictionnary.
|
||||
* dictionary @sub. On lookup, strings are first searched in the
|
||||
* new dictionary, then in @sub, and if not found are created in the
|
||||
* new dictionary.
|
||||
*
|
||||
* Returns the newly created dictionnary, or NULL if an error occured.
|
||||
* Returns the newly created dictionary, or NULL if an error occured.
|
||||
*/
|
||||
xmlDictPtr
|
||||
xmlDictCreateSub(xmlDictPtr sub) {
|
||||
|
@ -486,6 +590,7 @@ xmlDictCreateSub(xmlDictPtr sub) {
|
|||
#ifdef DICT_DEBUG_PATTERNS
|
||||
fprintf(stderr, "R");
|
||||
#endif
|
||||
dict->seed = sub->seed;
|
||||
dict->subdict = sub;
|
||||
xmlDictReference(dict->subdict);
|
||||
}
|
||||
|
@ -494,7 +599,7 @@ xmlDictCreateSub(xmlDictPtr sub) {
|
|||
|
||||
/**
|
||||
* xmlDictReference:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
*
|
||||
* Increment the reference counter of a dictionary
|
||||
*
|
||||
|
@ -503,7 +608,7 @@ xmlDictCreateSub(xmlDictPtr sub) {
|
|||
int
|
||||
xmlDictReference(xmlDictPtr dict) {
|
||||
if (!xmlDictInitialized)
|
||||
if (!xmlInitializeDict())
|
||||
if (!__xmlInitializeDict())
|
||||
return(-1);
|
||||
|
||||
if (dict == NULL) return -1;
|
||||
|
@ -515,17 +620,17 @@ xmlDictReference(xmlDictPtr dict) {
|
|||
|
||||
/**
|
||||
* xmlDictGrow:
|
||||
* @dict: the dictionnary
|
||||
* @size: the new size of the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @size: the new size of the dictionary
|
||||
*
|
||||
* resize the dictionnary
|
||||
* resize the dictionary
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of failure
|
||||
*/
|
||||
static int
|
||||
xmlDictGrow(xmlDictPtr dict, int size) {
|
||||
xmlDictGrow(xmlDictPtr dict, size_t size) {
|
||||
unsigned long key, okey;
|
||||
int oldsize, i;
|
||||
size_t oldsize, i;
|
||||
xmlDictEntryPtr iter, next;
|
||||
struct _xmlDictEntry *olddict;
|
||||
#ifdef DEBUG_GROW
|
||||
|
@ -642,7 +747,7 @@ xmlDictGrow(xmlDictPtr dict, int size) {
|
|||
|
||||
#ifdef DEBUG_GROW
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlDictGrow : from %d to %d, %d elems\n", oldsize, size, nbElem);
|
||||
"xmlDictGrow : from %lu to %lu, %u elems\n", oldsize, size, nbElem);
|
||||
#endif
|
||||
|
||||
return(ret);
|
||||
|
@ -650,14 +755,14 @@ xmlDictGrow(xmlDictPtr dict, int size) {
|
|||
|
||||
/**
|
||||
* xmlDictFree:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
*
|
||||
* Free the hash @dict and its contents. The userdata is
|
||||
* deallocated with @f if provided.
|
||||
*/
|
||||
void
|
||||
xmlDictFree(xmlDictPtr dict) {
|
||||
int i;
|
||||
size_t i;
|
||||
xmlDictEntryPtr iter;
|
||||
xmlDictEntryPtr next;
|
||||
int inside_dict = 0;
|
||||
|
@ -667,7 +772,7 @@ xmlDictFree(xmlDictPtr dict) {
|
|||
return;
|
||||
|
||||
if (!xmlDictInitialized)
|
||||
if (!xmlInitializeDict())
|
||||
if (!__xmlInitializeDict())
|
||||
return;
|
||||
|
||||
/* decrement the counter, it may be shared by a parser and docs */
|
||||
|
@ -712,11 +817,11 @@ xmlDictFree(xmlDictPtr dict) {
|
|||
|
||||
/**
|
||||
* xmlDictLookup:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @name: the name of the userdata
|
||||
* @len: the length of the name, if -1 it is recomputed
|
||||
*
|
||||
* Add the @name to the dictionnary @dict if not present.
|
||||
* Add the @name to the dictionary @dict if not present.
|
||||
*
|
||||
* Returns the internal copy of the name or NULL in case of internal error
|
||||
*/
|
||||
|
@ -726,17 +831,24 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
xmlDictEntryPtr entry;
|
||||
xmlDictEntryPtr insert;
|
||||
const xmlChar *ret;
|
||||
unsigned int l;
|
||||
|
||||
if ((dict == NULL) || (name == NULL))
|
||||
return(NULL);
|
||||
|
||||
if (len < 0)
|
||||
len = strlen((const char *) name);
|
||||
l = strlen((const char *) name);
|
||||
else
|
||||
l = len;
|
||||
|
||||
if (((dict->limit > 0) && (l >= dict->limit)) ||
|
||||
(l > INT_MAX / 2))
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
* Check for duplicate and insertion location.
|
||||
*/
|
||||
okey = xmlDictComputeKey(dict, name, len);
|
||||
okey = xmlDictComputeKey(dict, name, l);
|
||||
key = okey % dict->size;
|
||||
if (dict->dict[key].valid == 0) {
|
||||
insert = NULL;
|
||||
|
@ -744,25 +856,25 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
for (insert = &(dict->dict[key]); insert->next != NULL;
|
||||
insert = insert->next) {
|
||||
#ifdef __GNUC__
|
||||
if ((insert->okey == okey) && (insert->len == len)) {
|
||||
if (!memcmp(insert->name, name, len))
|
||||
if ((insert->okey == okey) && (insert->len == l)) {
|
||||
if (!memcmp(insert->name, name, l))
|
||||
return(insert->name);
|
||||
}
|
||||
#else
|
||||
if ((insert->okey == okey) && (insert->len == len) &&
|
||||
(!xmlStrncmp(insert->name, name, len)))
|
||||
if ((insert->okey == okey) && (insert->len == l) &&
|
||||
(!xmlStrncmp(insert->name, name, l)))
|
||||
return(insert->name);
|
||||
#endif
|
||||
nbi++;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
if ((insert->okey == okey) && (insert->len == len)) {
|
||||
if (!memcmp(insert->name, name, len))
|
||||
if ((insert->okey == okey) && (insert->len == l)) {
|
||||
if (!memcmp(insert->name, name, l))
|
||||
return(insert->name);
|
||||
}
|
||||
#else
|
||||
if ((insert->okey == okey) && (insert->len == len) &&
|
||||
(!xmlStrncmp(insert->name, name, len)))
|
||||
if ((insert->okey == okey) && (insert->len == l) &&
|
||||
(!xmlStrncmp(insert->name, name, l)))
|
||||
return(insert->name);
|
||||
#endif
|
||||
}
|
||||
|
@ -775,7 +887,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
(dict->subdict->size != MIN_DICT_SIZE)) ||
|
||||
((dict->size != MIN_DICT_SIZE) &&
|
||||
(dict->subdict->size == MIN_DICT_SIZE)))
|
||||
skey = xmlDictComputeKey(dict->subdict, name, len);
|
||||
skey = xmlDictComputeKey(dict->subdict, name, l);
|
||||
else
|
||||
skey = okey;
|
||||
|
||||
|
@ -786,32 +898,32 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
|
||||
tmp = tmp->next) {
|
||||
#ifdef __GNUC__
|
||||
if ((tmp->okey == skey) && (tmp->len == len)) {
|
||||
if (!memcmp(tmp->name, name, len))
|
||||
if ((tmp->okey == skey) && (tmp->len == l)) {
|
||||
if (!memcmp(tmp->name, name, l))
|
||||
return(tmp->name);
|
||||
}
|
||||
#else
|
||||
if ((tmp->okey == skey) && (tmp->len == len) &&
|
||||
(!xmlStrncmp(tmp->name, name, len)))
|
||||
if ((tmp->okey == skey) && (tmp->len == l) &&
|
||||
(!xmlStrncmp(tmp->name, name, l)))
|
||||
return(tmp->name);
|
||||
#endif
|
||||
nbi++;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
if ((tmp->okey == skey) && (tmp->len == len)) {
|
||||
if (!memcmp(tmp->name, name, len))
|
||||
if ((tmp->okey == skey) && (tmp->len == l)) {
|
||||
if (!memcmp(tmp->name, name, l))
|
||||
return(tmp->name);
|
||||
}
|
||||
#else
|
||||
if ((tmp->okey == skey) && (tmp->len == len) &&
|
||||
(!xmlStrncmp(tmp->name, name, len)))
|
||||
if ((tmp->okey == skey) && (tmp->len == l) &&
|
||||
(!xmlStrncmp(tmp->name, name, l)))
|
||||
return(tmp->name);
|
||||
#endif
|
||||
}
|
||||
key = okey % dict->size;
|
||||
}
|
||||
|
||||
ret = xmlDictAddString(dict, name, len);
|
||||
ret = xmlDictAddString(dict, name, l);
|
||||
if (ret == NULL)
|
||||
return(NULL);
|
||||
if (insert == NULL) {
|
||||
|
@ -822,7 +934,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
return(NULL);
|
||||
}
|
||||
entry->name = ret;
|
||||
entry->len = len;
|
||||
entry->len = l;
|
||||
entry->next = NULL;
|
||||
entry->valid = 1;
|
||||
entry->okey = okey;
|
||||
|
@ -845,11 +957,11 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
|
||||
/**
|
||||
* xmlDictExists:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @name: the name of the userdata
|
||||
* @len: the length of the name, if -1 it is recomputed
|
||||
*
|
||||
* Check if the @name exists in the dictionnary @dict.
|
||||
* Check if the @name exists in the dictionary @dict.
|
||||
*
|
||||
* Returns the internal copy of the name or NULL if not found.
|
||||
*/
|
||||
|
@ -857,17 +969,23 @@ const xmlChar *
|
|||
xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
||||
unsigned long key, okey, nbi = 0;
|
||||
xmlDictEntryPtr insert;
|
||||
unsigned int l;
|
||||
|
||||
if ((dict == NULL) || (name == NULL))
|
||||
return(NULL);
|
||||
|
||||
if (len < 0)
|
||||
len = strlen((const char *) name);
|
||||
l = strlen((const char *) name);
|
||||
else
|
||||
l = len;
|
||||
if (((dict->limit > 0) && (l >= dict->limit)) ||
|
||||
(l > INT_MAX / 2))
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
* Check for duplicate and insertion location.
|
||||
*/
|
||||
okey = xmlDictComputeKey(dict, name, len);
|
||||
okey = xmlDictComputeKey(dict, name, l);
|
||||
key = okey % dict->size;
|
||||
if (dict->dict[key].valid == 0) {
|
||||
insert = NULL;
|
||||
|
@ -875,25 +993,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
for (insert = &(dict->dict[key]); insert->next != NULL;
|
||||
insert = insert->next) {
|
||||
#ifdef __GNUC__
|
||||
if ((insert->okey == okey) && (insert->len == len)) {
|
||||
if (!memcmp(insert->name, name, len))
|
||||
if ((insert->okey == okey) && (insert->len == l)) {
|
||||
if (!memcmp(insert->name, name, l))
|
||||
return(insert->name);
|
||||
}
|
||||
#else
|
||||
if ((insert->okey == okey) && (insert->len == len) &&
|
||||
(!xmlStrncmp(insert->name, name, len)))
|
||||
if ((insert->okey == okey) && (insert->len == l) &&
|
||||
(!xmlStrncmp(insert->name, name, l)))
|
||||
return(insert->name);
|
||||
#endif
|
||||
nbi++;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
if ((insert->okey == okey) && (insert->len == len)) {
|
||||
if (!memcmp(insert->name, name, len))
|
||||
if ((insert->okey == okey) && (insert->len == l)) {
|
||||
if (!memcmp(insert->name, name, l))
|
||||
return(insert->name);
|
||||
}
|
||||
#else
|
||||
if ((insert->okey == okey) && (insert->len == len) &&
|
||||
(!xmlStrncmp(insert->name, name, len)))
|
||||
if ((insert->okey == okey) && (insert->len == l) &&
|
||||
(!xmlStrncmp(insert->name, name, l)))
|
||||
return(insert->name);
|
||||
#endif
|
||||
}
|
||||
|
@ -906,7 +1024,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
(dict->subdict->size != MIN_DICT_SIZE)) ||
|
||||
((dict->size != MIN_DICT_SIZE) &&
|
||||
(dict->subdict->size == MIN_DICT_SIZE)))
|
||||
skey = xmlDictComputeKey(dict->subdict, name, len);
|
||||
skey = xmlDictComputeKey(dict->subdict, name, l);
|
||||
else
|
||||
skey = okey;
|
||||
|
||||
|
@ -917,25 +1035,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
|
||||
tmp = tmp->next) {
|
||||
#ifdef __GNUC__
|
||||
if ((tmp->okey == skey) && (tmp->len == len)) {
|
||||
if (!memcmp(tmp->name, name, len))
|
||||
if ((tmp->okey == skey) && (tmp->len == l)) {
|
||||
if (!memcmp(tmp->name, name, l))
|
||||
return(tmp->name);
|
||||
}
|
||||
#else
|
||||
if ((tmp->okey == skey) && (tmp->len == len) &&
|
||||
(!xmlStrncmp(tmp->name, name, len)))
|
||||
if ((tmp->okey == skey) && (tmp->len == l) &&
|
||||
(!xmlStrncmp(tmp->name, name, l)))
|
||||
return(tmp->name);
|
||||
#endif
|
||||
nbi++;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
if ((tmp->okey == skey) && (tmp->len == len)) {
|
||||
if (!memcmp(tmp->name, name, len))
|
||||
if ((tmp->okey == skey) && (tmp->len == l)) {
|
||||
if (!memcmp(tmp->name, name, l))
|
||||
return(tmp->name);
|
||||
}
|
||||
#else
|
||||
if ((tmp->okey == skey) && (tmp->len == len) &&
|
||||
(!xmlStrncmp(tmp->name, name, len)))
|
||||
if ((tmp->okey == skey) && (tmp->len == l) &&
|
||||
(!xmlStrncmp(tmp->name, name, l)))
|
||||
return(tmp->name);
|
||||
#endif
|
||||
}
|
||||
|
@ -947,7 +1065,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
|||
|
||||
/**
|
||||
* xmlDictQLookup:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @prefix: the prefix
|
||||
* @name: the name
|
||||
*
|
||||
|
@ -961,7 +1079,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
|
|||
xmlDictEntryPtr entry;
|
||||
xmlDictEntryPtr insert;
|
||||
const xmlChar *ret;
|
||||
int len, plen, l;
|
||||
unsigned int len, plen, l;
|
||||
|
||||
if ((dict == NULL) || (name == NULL))
|
||||
return(NULL);
|
||||
|
@ -1052,7 +1170,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
|
|||
|
||||
/**
|
||||
* xmlDictOwns:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
* @str: the string
|
||||
*
|
||||
* check if a string is owned by the disctionary
|
||||
|
@ -1079,11 +1197,11 @@ xmlDictOwns(xmlDictPtr dict, const xmlChar *str) {
|
|||
|
||||
/**
|
||||
* xmlDictSize:
|
||||
* @dict: the dictionnary
|
||||
* @dict: the dictionary
|
||||
*
|
||||
* Query the number of elements installed in the hash @dict.
|
||||
*
|
||||
* Returns the number of elements in the dictionnary or
|
||||
* Returns the number of elements in the dictionary or
|
||||
* -1 in case of error
|
||||
*/
|
||||
int
|
||||
|
@ -1095,6 +1213,50 @@ xmlDictSize(xmlDictPtr dict) {
|
|||
return(dict->nbElems);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlDictSetLimit:
|
||||
* @dict: the dictionary
|
||||
* @limit: the limit in bytes
|
||||
*
|
||||
* Set a size limit for the dictionary
|
||||
* Added in 2.9.0
|
||||
*
|
||||
* Returns the previous limit of the dictionary or 0
|
||||
*/
|
||||
size_t
|
||||
xmlDictSetLimit(xmlDictPtr dict, size_t limit) {
|
||||
size_t ret;
|
||||
|
||||
if (dict == NULL)
|
||||
return(0);
|
||||
ret = dict->limit;
|
||||
dict->limit = limit;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlDictGetUsage:
|
||||
* @dict: the dictionary
|
||||
*
|
||||
* Get how much memory is used by a dictionary for strings
|
||||
* Added in 2.9.0
|
||||
*
|
||||
* Returns the amount of strings allocated
|
||||
*/
|
||||
size_t
|
||||
xmlDictGetUsage(xmlDictPtr dict) {
|
||||
xmlDictStringsPtr pool;
|
||||
size_t limit = 0;
|
||||
|
||||
if (dict == NULL)
|
||||
return(0);
|
||||
pool = dict->strings;
|
||||
while (pool != NULL) {
|
||||
limit += pool->size;
|
||||
pool = pool->next;
|
||||
}
|
||||
return(limit);
|
||||
}
|
||||
|
||||
#define bottom_dict
|
||||
#include "elfgcchack.h"
|
||||
|
|
|
@ -1061,7 +1061,7 @@ extern __typeof (xmlAddNotationDecl) xmlAddNotationDecl__internal_alias __attrib
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_tree
|
||||
#undef xmlAddPrevSibling
|
||||
extern __typeof (xmlAddPrevSibling) xmlAddPrevSibling __attribute((alias("xmlAddPrevSibling__internal_alias")));
|
||||
|
@ -1343,6 +1343,68 @@ extern __typeof (xmlBoolToText) xmlBoolToText__internal_alias __attribute((visib
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_buf
|
||||
#undef xmlBufContent
|
||||
extern __typeof (xmlBufContent) xmlBufContent __attribute((alias("xmlBufContent__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufContent
|
||||
extern __typeof (xmlBufContent) xmlBufContent__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufContent xmlBufContent__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_buf
|
||||
#undef xmlBufEnd
|
||||
extern __typeof (xmlBufEnd) xmlBufEnd __attribute((alias("xmlBufEnd__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufEnd
|
||||
extern __typeof (xmlBufEnd) xmlBufEnd__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufEnd xmlBufEnd__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_tree
|
||||
#undef xmlBufGetNodeContent
|
||||
extern __typeof (xmlBufGetNodeContent) xmlBufGetNodeContent __attribute((alias("xmlBufGetNodeContent__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufGetNodeContent
|
||||
extern __typeof (xmlBufGetNodeContent) xmlBufGetNodeContent__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufGetNodeContent xmlBufGetNodeContent__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||
#ifdef bottom_xmlsave
|
||||
#undef xmlBufNodeDump
|
||||
extern __typeof (xmlBufNodeDump) xmlBufNodeDump __attribute((alias("xmlBufNodeDump__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufNodeDump
|
||||
extern __typeof (xmlBufNodeDump) xmlBufNodeDump__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufNodeDump xmlBufNodeDump__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_buf
|
||||
#undef xmlBufShrink
|
||||
extern __typeof (xmlBufShrink) xmlBufShrink __attribute((alias("xmlBufShrink__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufShrink
|
||||
extern __typeof (xmlBufShrink) xmlBufShrink__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufShrink xmlBufShrink__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_buf
|
||||
#undef xmlBufUse
|
||||
extern __typeof (xmlBufUse) xmlBufUse __attribute((alias("xmlBufUse__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufUse
|
||||
extern __typeof (xmlBufUse) xmlBufUse__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufUse xmlBufUse__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_tree
|
||||
#undef xmlBufferAdd
|
||||
extern __typeof (xmlBufferAdd) xmlBufferAdd __attribute((alias("xmlBufferAdd__internal_alias")));
|
||||
|
@ -1423,6 +1485,16 @@ extern __typeof (xmlBufferCreateStatic) xmlBufferCreateStatic__internal_alias __
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_tree
|
||||
#undef xmlBufferDetach
|
||||
extern __typeof (xmlBufferDetach) xmlBufferDetach __attribute((alias("xmlBufferDetach__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlBufferDetach
|
||||
extern __typeof (xmlBufferDetach) xmlBufferDetach__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlBufferDetach xmlBufferDetach__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_tree
|
||||
#undef xmlBufferDump
|
||||
extern __typeof (xmlBufferDump) xmlBufferDump __attribute((alias("xmlBufferDump__internal_alias")));
|
||||
|
@ -2839,6 +2911,16 @@ extern __typeof (xmlDictFree) xmlDictFree__internal_alias __attribute((visibilit
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_dict
|
||||
#undef xmlDictGetUsage
|
||||
extern __typeof (xmlDictGetUsage) xmlDictGetUsage __attribute((alias("xmlDictGetUsage__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlDictGetUsage
|
||||
extern __typeof (xmlDictGetUsage) xmlDictGetUsage__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlDictGetUsage xmlDictGetUsage__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_dict
|
||||
#undef xmlDictLookup
|
||||
extern __typeof (xmlDictLookup) xmlDictLookup __attribute((alias("xmlDictLookup__internal_alias")));
|
||||
|
@ -2879,6 +2961,16 @@ extern __typeof (xmlDictReference) xmlDictReference__internal_alias __attribute(
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_dict
|
||||
#undef xmlDictSetLimit
|
||||
extern __typeof (xmlDictSetLimit) xmlDictSetLimit __attribute((alias("xmlDictSetLimit__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlDictSetLimit
|
||||
extern __typeof (xmlDictSetLimit) xmlDictSetLimit__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlDictSetLimit xmlDictSetLimit__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_dict
|
||||
#undef xmlDictSize
|
||||
extern __typeof (xmlDictSize) xmlDictSize __attribute((alias("xmlDictSize__internal_alias")));
|
||||
|
@ -4601,6 +4693,16 @@ extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog__internal_alias __at
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_dict
|
||||
#undef xmlInitializeDict
|
||||
extern __typeof (xmlInitializeDict) xmlInitializeDict __attribute((alias("xmlInitializeDict__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlInitializeDict
|
||||
extern __typeof (xmlInitializeDict) xmlInitializeDict__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlInitializeDict xmlInitializeDict__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_globals
|
||||
#undef xmlInitializeGlobalState
|
||||
extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState __attribute((alias("xmlInitializeGlobalState__internal_alias")));
|
||||
|
@ -6755,6 +6857,30 @@ extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush__internal_alias __at
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||
#ifdef bottom_xmlIO
|
||||
#undef xmlOutputBufferGetContent
|
||||
extern __typeof (xmlOutputBufferGetContent) xmlOutputBufferGetContent __attribute((alias("xmlOutputBufferGetContent__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlOutputBufferGetContent
|
||||
extern __typeof (xmlOutputBufferGetContent) xmlOutputBufferGetContent__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlOutputBufferGetContent xmlOutputBufferGetContent__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||
#ifdef bottom_xmlIO
|
||||
#undef xmlOutputBufferGetSize
|
||||
extern __typeof (xmlOutputBufferGetSize) xmlOutputBufferGetSize __attribute((alias("xmlOutputBufferGetSize__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlOutputBufferGetSize
|
||||
extern __typeof (xmlOutputBufferGetSize) xmlOutputBufferGetSize__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlOutputBufferGetSize xmlOutputBufferGetSize__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||
#ifdef bottom_xmlIO
|
||||
#undef xmlOutputBufferWrite
|
||||
|
@ -8759,7 +8885,7 @@ extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attrib
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#ifdef bottom_SAX2
|
||||
#undef xmlSAX2EndElement
|
||||
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
|
||||
|
@ -9005,7 +9131,7 @@ extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __at
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#ifdef bottom_SAX2
|
||||
#undef xmlSAX2StartElement
|
||||
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
|
||||
|
@ -10041,6 +10167,30 @@ extern __typeof (xmlSchemaValidatePredefinedType) xmlSchemaValidatePredefinedTyp
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_xmlschemas
|
||||
#undef xmlSchemaValidateSetFilename
|
||||
extern __typeof (xmlSchemaValidateSetFilename) xmlSchemaValidateSetFilename __attribute((alias("xmlSchemaValidateSetFilename__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchemaValidateSetFilename
|
||||
extern __typeof (xmlSchemaValidateSetFilename) xmlSchemaValidateSetFilename__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchemaValidateSetFilename xmlSchemaValidateSetFilename__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_xmlschemas
|
||||
#undef xmlSchemaValidateSetLocator
|
||||
extern __typeof (xmlSchemaValidateSetLocator) xmlSchemaValidateSetLocator __attribute((alias("xmlSchemaValidateSetLocator__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchemaValidateSetLocator
|
||||
extern __typeof (xmlSchemaValidateSetLocator) xmlSchemaValidateSetLocator__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchemaValidateSetLocator xmlSchemaValidateSetLocator__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_xmlschemas
|
||||
#undef xmlSchemaValidateStream
|
||||
|
@ -11713,6 +11863,18 @@ extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__int
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_xmlreader
|
||||
#undef xmlTextReaderRelaxNGValidateCtxt
|
||||
extern __typeof (xmlTextReaderRelaxNGValidateCtxt) xmlTextReaderRelaxNGValidateCtxt __attribute((alias("xmlTextReaderRelaxNGValidateCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlTextReaderRelaxNGValidateCtxt
|
||||
extern __typeof (xmlTextReaderRelaxNGValidateCtxt) xmlTextReaderRelaxNGValidateCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlTextReaderRelaxNGValidateCtxt xmlTextReaderRelaxNGValidateCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_xmlreader
|
||||
#undef xmlTextReaderSchemaValidate
|
||||
|
@ -12001,6 +12163,18 @@ extern __typeof (xmlTextWriterSetIndentString) xmlTextWriterSetIndentString__int
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_WRITER_ENABLED)
|
||||
#ifdef bottom_xmlwriter
|
||||
#undef xmlTextWriterSetQuoteChar
|
||||
extern __typeof (xmlTextWriterSetQuoteChar) xmlTextWriterSetQuoteChar __attribute((alias("xmlTextWriterSetQuoteChar__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlTextWriterSetQuoteChar
|
||||
extern __typeof (xmlTextWriterSetQuoteChar) xmlTextWriterSetQuoteChar__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlTextWriterSetQuoteChar xmlTextWriterSetQuoteChar__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_WRITER_ENABLED)
|
||||
#ifdef bottom_xmlwriter
|
||||
#undef xmlTextWriterStartAttribute
|
||||
|
@ -15189,7 +15363,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#ifdef bottom_tree
|
||||
#undef xmlValidateNCName
|
||||
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));
|
||||
|
@ -16593,6 +16767,18 @@ extern __typeof (xmlXPathNextSelf) xmlXPathNextSelf__internal_alias __attribute(
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED)
|
||||
#ifdef bottom_xpath
|
||||
#undef xmlXPathNodeEval
|
||||
extern __typeof (xmlXPathNodeEval) xmlXPathNodeEval __attribute((alias("xmlXPathNodeEval__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXPathNodeEval
|
||||
extern __typeof (xmlXPathNodeEval) xmlXPathNodeEval__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXPathNodeEval xmlXPathNodeEval__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED)
|
||||
#ifdef bottom_xpath
|
||||
#undef xmlXPathNodeLeading
|
||||
|
@ -17097,6 +17283,18 @@ extern __typeof (xmlXPathRoundFunction) xmlXPathRoundFunction__internal_alias __
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED)
|
||||
#ifdef bottom_xpath
|
||||
#undef xmlXPathSetContextNode
|
||||
extern __typeof (xmlXPathSetContextNode) xmlXPathSetContextNode __attribute((alias("xmlXPathSetContextNode__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXPathSetContextNode
|
||||
extern __typeof (xmlXPathSetContextNode) xmlXPathSetContextNode__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXPathSetContextNode xmlXPathSetContextNode__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED)
|
||||
#ifdef bottom_xpath
|
||||
#undef xmlXPathStartsWithFunction
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Summary: Internal Interfaces for encoding in libxml2
|
||||
* Description: this module describes a few interfaces which were
|
||||
* addded along with the API changes in 2.9.0
|
||||
* those are private routines at this point
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_ENC_H__
|
||||
#define __XML_ENC_H__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
||||
xmlBufferPtr in, int len);
|
||||
int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
|
||||
int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
|
||||
int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_ENC_H__ */
|
||||
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
#include "libxml.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
|
@ -44,6 +45,9 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "enc.h"
|
||||
|
||||
static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
|
||||
static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
|
||||
|
||||
|
@ -89,7 +93,7 @@ xmlEncodingErrMemory(const char *extra)
|
|||
*
|
||||
* n encoding error
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(2,0)
|
||||
xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val)
|
||||
{
|
||||
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -312,18 +316,18 @@ isolat1ToUTF8(unsigned char* out, int *outlen,
|
|||
inend = in + (*inlen);
|
||||
instop = inend;
|
||||
|
||||
while (in < inend && out < outend - 1) {
|
||||
while ((in < inend) && (out < outend - 1)) {
|
||||
if (*in >= 0x80) {
|
||||
*out++ = (((*in) >> 6) & 0x1F) | 0xC0;
|
||||
*out++ = ((*in) & 0x3F) | 0x80;
|
||||
++in;
|
||||
}
|
||||
if (instop - in > outend - out) instop = in + (outend - out);
|
||||
while (in < instop && *in < 0x80) {
|
||||
if ((instop - in) > (outend - out)) instop = in + (outend - out);
|
||||
while ((in < instop) && (*in < 0x80)) {
|
||||
*out++ = *in++;
|
||||
}
|
||||
}
|
||||
if (in < inend && out < outend && *in < 0x80) {
|
||||
if ((in < inend) && (out < outend) && (*in < 0x80)) {
|
||||
*out++ = *in++;
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
|
@ -1347,6 +1351,7 @@ xmlNewCharEncodingHandler(const char *name,
|
|||
xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
|
||||
return(NULL);
|
||||
}
|
||||
memset(handler, 0, sizeof(xmlCharEncodingHandler));
|
||||
handler->input = input;
|
||||
handler->output = output;
|
||||
handler->name = up;
|
||||
|
@ -1512,6 +1517,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) {
|
|||
if (handler != NULL) return(handler);
|
||||
handler = xmlFindCharEncodingHandler("EBCDIC-US");
|
||||
if (handler != NULL) return(handler);
|
||||
handler = xmlFindCharEncodingHandler("IBM-037");
|
||||
if (handler != NULL) return(handler);
|
||||
break;
|
||||
case XML_CHAR_ENCODING_UCS4BE:
|
||||
handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
|
||||
|
@ -1631,7 +1638,7 @@ xmlFindCharEncodingHandler(const char *name) {
|
|||
iconv_t icv_in, icv_out;
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
xmlCharEncodingHandlerPtr enc;
|
||||
xmlCharEncodingHandlerPtr encu;
|
||||
uconv_t *ucv_in, *ucv_out;
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
char upper[100];
|
||||
|
@ -1688,6 +1695,7 @@ xmlFindCharEncodingHandler(const char *name) {
|
|||
iconv_close(icv_out);
|
||||
return(NULL);
|
||||
}
|
||||
memset(enc, 0, sizeof(xmlCharEncodingHandler));
|
||||
enc->name = xmlMemStrdup(name);
|
||||
enc->input = NULL;
|
||||
enc->output = NULL;
|
||||
|
@ -1708,23 +1716,24 @@ xmlFindCharEncodingHandler(const char *name) {
|
|||
ucv_in = openIcuConverter(name, 1);
|
||||
ucv_out = openIcuConverter(name, 0);
|
||||
if (ucv_in != NULL && ucv_out != NULL) {
|
||||
enc = (xmlCharEncodingHandlerPtr)
|
||||
encu = (xmlCharEncodingHandlerPtr)
|
||||
xmlMalloc(sizeof(xmlCharEncodingHandler));
|
||||
if (enc == NULL) {
|
||||
if (encu == NULL) {
|
||||
closeIcuConverter(ucv_in);
|
||||
closeIcuConverter(ucv_out);
|
||||
return(NULL);
|
||||
}
|
||||
enc->name = xmlMemStrdup(name);
|
||||
enc->input = NULL;
|
||||
enc->output = NULL;
|
||||
enc->uconv_in = ucv_in;
|
||||
enc->uconv_out = ucv_out;
|
||||
memset(encu, 0, sizeof(xmlCharEncodingHandler));
|
||||
encu->name = xmlMemStrdup(name);
|
||||
encu->input = NULL;
|
||||
encu->output = NULL;
|
||||
encu->uconv_in = ucv_in;
|
||||
encu->uconv_out = ucv_out;
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Found ICU converter handler for encoding %s\n", name);
|
||||
#endif
|
||||
return enc;
|
||||
return encu;
|
||||
} else if (ucv_in != NULL || ucv_out != NULL) {
|
||||
closeIcuConverter(ucv_in);
|
||||
closeIcuConverter(ucv_out);
|
||||
|
@ -1894,9 +1903,6 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
|
|||
* The real API used by libxml for on-the-fly conversion *
|
||||
* *
|
||||
************************************************************************/
|
||||
int
|
||||
xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
||||
xmlBufferPtr in, int len);
|
||||
|
||||
/**
|
||||
* xmlCharEncFirstLineInt:
|
||||
|
@ -1925,7 +1931,7 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||
if (in == NULL) return(-1);
|
||||
|
||||
/* calculate space available */
|
||||
written = out->size - out->use;
|
||||
written = out->size - out->use - 1; /* count '\0' */
|
||||
toconv = in->use;
|
||||
/*
|
||||
* echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
|
||||
|
@ -1943,7 +1949,7 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||
toconv = 180;
|
||||
}
|
||||
if (toconv * 2 >= written) {
|
||||
xmlBufferGrow(out, toconv);
|
||||
xmlBufferGrow(out, toconv * 2);
|
||||
written = out->size - out->use - 1;
|
||||
}
|
||||
|
||||
|
@ -2025,6 +2031,252 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||
return(xmlCharEncFirstLineInt(handler, out, in, -1));
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlCharEncFirstLineInput:
|
||||
* @input: a parser input buffer
|
||||
* @len: number of bytes to convert for the first line, or -1
|
||||
*
|
||||
* Front-end for the encoding handler input function, but handle only
|
||||
* the very first line. Point is that this is based on autodetection
|
||||
* of the encoding and once that first line is converted we may find
|
||||
* out that a different decoder is needed to process the input.
|
||||
*
|
||||
* Returns the number of byte written if success, or
|
||||
* -1 general error
|
||||
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
||||
* the result of transformation can't fit into the encoding we want), or
|
||||
*/
|
||||
int
|
||||
xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len)
|
||||
{
|
||||
int ret = -2;
|
||||
size_t written;
|
||||
size_t toconv;
|
||||
int c_in;
|
||||
int c_out;
|
||||
xmlBufPtr in;
|
||||
xmlBufPtr out;
|
||||
|
||||
if ((input == NULL) || (input->encoder == NULL) ||
|
||||
(input->buffer == NULL) || (input->raw == NULL))
|
||||
return (-1);
|
||||
out = input->buffer;
|
||||
in = input->raw;
|
||||
|
||||
toconv = xmlBufUse(in);
|
||||
if (toconv == 0)
|
||||
return (0);
|
||||
written = xmlBufAvail(out) - 1; /* count '\0' */
|
||||
/*
|
||||
* echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
|
||||
* 45 chars should be sufficient to reach the end of the encoding
|
||||
* declaration without going too far inside the document content.
|
||||
* on UTF-16 this means 90bytes, on UCS4 this means 180
|
||||
* The actual value depending on guessed encoding is passed as @len
|
||||
* if provided
|
||||
*/
|
||||
if (len >= 0) {
|
||||
if (toconv > (unsigned int) len)
|
||||
toconv = len;
|
||||
} else {
|
||||
if (toconv > 180)
|
||||
toconv = 180;
|
||||
}
|
||||
if (toconv * 2 >= written) {
|
||||
xmlBufGrow(out, toconv * 2);
|
||||
written = xmlBufAvail(out) - 1;
|
||||
}
|
||||
if (written > 360)
|
||||
written = 360;
|
||||
|
||||
c_in = toconv;
|
||||
c_out = written;
|
||||
if (input->encoder->input != NULL) {
|
||||
ret = input->encoder->input(xmlBufEnd(out), &c_out,
|
||||
xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
}
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
else if (input->encoder->iconv_in != NULL) {
|
||||
ret = xmlIconvWrapper(input->encoder->iconv_in, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
if (ret == -1)
|
||||
ret = -3;
|
||||
}
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
else if (input->encoder->uconv_in != NULL) {
|
||||
ret = xmlUconvWrapper(input->encoder->uconv_in, 1, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
if (ret == -1)
|
||||
ret = -3;
|
||||
}
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
switch (ret) {
|
||||
case 0:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input\n",
|
||||
c_in, c_out);
|
||||
#endif
|
||||
break;
|
||||
case -1:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input, %d left\n",
|
||||
c_in, c_out, (int)xmlBufUse(in));
|
||||
#endif
|
||||
break;
|
||||
case -3:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input, %d left\n",
|
||||
c_in, c_out, (int)xmlBufUse(in));
|
||||
#endif
|
||||
break;
|
||||
case -2: {
|
||||
char buf[50];
|
||||
const xmlChar *content = xmlBufContent(in);
|
||||
|
||||
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
|
||||
content[0], content[1],
|
||||
content[2], content[3]);
|
||||
buf[49] = 0;
|
||||
xmlEncodingErr(XML_I18N_CONV_FAILED,
|
||||
"input conversion failed due to input error, bytes %s\n",
|
||||
buf);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Ignore when input buffer is not on a boundary
|
||||
*/
|
||||
if (ret == -3) ret = 0;
|
||||
if (ret == -1) ret = 0;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlCharEncInput:
|
||||
* @input: a parser input buffer
|
||||
* @flush: try to flush all the raw buffer
|
||||
*
|
||||
* Generic front-end for the encoding handler on parser input
|
||||
*
|
||||
* Returns the number of byte written if success, or
|
||||
* -1 general error
|
||||
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
||||
* the result of transformation can't fit into the encoding we want), or
|
||||
*/
|
||||
int
|
||||
xmlCharEncInput(xmlParserInputBufferPtr input, int flush)
|
||||
{
|
||||
int ret = -2;
|
||||
size_t written;
|
||||
size_t toconv;
|
||||
int c_in;
|
||||
int c_out;
|
||||
xmlBufPtr in;
|
||||
xmlBufPtr out;
|
||||
|
||||
if ((input == NULL) || (input->encoder == NULL) ||
|
||||
(input->buffer == NULL) || (input->raw == NULL))
|
||||
return (-1);
|
||||
out = input->buffer;
|
||||
in = input->raw;
|
||||
|
||||
toconv = xmlBufUse(in);
|
||||
if (toconv == 0)
|
||||
return (0);
|
||||
if ((toconv > 64 * 1024) && (flush == 0))
|
||||
toconv = 64 * 1024;
|
||||
written = xmlBufAvail(out);
|
||||
if (written > 0)
|
||||
written--; /* count '\0' */
|
||||
if (toconv * 2 >= written) {
|
||||
xmlBufGrow(out, toconv * 2);
|
||||
written = xmlBufAvail(out);
|
||||
if (written > 0)
|
||||
written--; /* count '\0' */
|
||||
}
|
||||
if ((written > 128 * 1024) && (flush == 0))
|
||||
written = 128 * 1024;
|
||||
|
||||
c_in = toconv;
|
||||
c_out = written;
|
||||
if (input->encoder->input != NULL) {
|
||||
ret = input->encoder->input(xmlBufEnd(out), &c_out,
|
||||
xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
}
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
else if (input->encoder->iconv_in != NULL) {
|
||||
ret = xmlIconvWrapper(input->encoder->iconv_in, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
if (ret == -1)
|
||||
ret = -3;
|
||||
}
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
else if (input->encoder->uconv_in != NULL) {
|
||||
ret = xmlUconvWrapper(input->encoder->uconv_in, 1, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
if (ret == -1)
|
||||
ret = -3;
|
||||
}
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
switch (ret) {
|
||||
case 0:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input\n",
|
||||
c_in, c_out);
|
||||
#endif
|
||||
break;
|
||||
case -1:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input, %d left\n",
|
||||
c_in, c_out, (int)xmlBufUse(in));
|
||||
#endif
|
||||
break;
|
||||
case -3:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of input, %d left\n",
|
||||
c_in, c_out, (int)xmlBufUse(in));
|
||||
#endif
|
||||
break;
|
||||
case -2: {
|
||||
char buf[50];
|
||||
const xmlChar *content = xmlBufContent(in);
|
||||
|
||||
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
|
||||
content[0], content[1],
|
||||
content[2], content[3]);
|
||||
buf[49] = 0;
|
||||
xmlEncodingErr(XML_I18N_CONV_FAILED,
|
||||
"input conversion failed due to input error, bytes %s\n",
|
||||
buf);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Ignore when input buffer is not on a boundary
|
||||
*/
|
||||
if (ret == -3)
|
||||
ret = 0;
|
||||
return (c_out? c_out : ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlCharEncInFunc:
|
||||
* @handler: char encoding transformation data structure
|
||||
|
@ -2056,7 +2308,7 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
|||
toconv = in->use;
|
||||
if (toconv == 0)
|
||||
return (0);
|
||||
written = out->size - out->use;
|
||||
written = out->size - out->use -1; /* count '\0' */
|
||||
if (toconv * 2 >= written) {
|
||||
xmlBufferGrow(out, out->size + toconv * 2);
|
||||
written = out->size - out->use - 1;
|
||||
|
@ -2132,6 +2384,237 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
|||
return (written? written : ret);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/**
|
||||
* xmlCharEncOutput:
|
||||
* @output: a parser output buffer
|
||||
* @init: is this an initialization call without data
|
||||
*
|
||||
* Generic front-end for the encoding handler on parser output
|
||||
* a first call with @init == 1 has to be made first to initiate the
|
||||
* output in case of non-stateless encoding needing to initiate their
|
||||
* state or the output (like the BOM in UTF16).
|
||||
* In case of UTF8 sequence conversion errors for the given encoder,
|
||||
* the content will be automatically remapped to a CharRef sequence.
|
||||
*
|
||||
* Returns the number of byte written if success, or
|
||||
* -1 general error
|
||||
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
||||
* the result of transformation can't fit into the encoding we want), or
|
||||
*/
|
||||
int
|
||||
xmlCharEncOutput(xmlOutputBufferPtr output, int init)
|
||||
{
|
||||
int ret = -2;
|
||||
size_t written;
|
||||
size_t writtentot = 0;
|
||||
size_t toconv;
|
||||
int c_in;
|
||||
int c_out;
|
||||
xmlBufPtr in;
|
||||
xmlBufPtr out;
|
||||
int charref_len = 0;
|
||||
|
||||
if ((output == NULL) || (output->encoder == NULL) ||
|
||||
(output->buffer == NULL) || (output->conv == NULL))
|
||||
return (-1);
|
||||
out = output->conv;
|
||||
in = output->buffer;
|
||||
|
||||
retry:
|
||||
|
||||
written = xmlBufAvail(out);
|
||||
if (written > 0)
|
||||
written--; /* count '\0' */
|
||||
|
||||
/*
|
||||
* First specific handling of the initialization call
|
||||
*/
|
||||
if (init) {
|
||||
c_in = 0;
|
||||
c_out = written;
|
||||
if (output->encoder->output != NULL) {
|
||||
ret = output->encoder->output(xmlBufEnd(out), &c_out,
|
||||
NULL, &c_in);
|
||||
if (ret > 0) /* Gennady: check return value */
|
||||
xmlBufAddLen(out, c_out);
|
||||
}
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
else if (output->encoder->iconv_out != NULL) {
|
||||
ret = xmlIconvWrapper(output->encoder->iconv_out, xmlBufEnd(out),
|
||||
&c_out, NULL, &c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
}
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
else if (output->encoder->uconv_out != NULL) {
|
||||
ret = xmlUconvWrapper(output->encoder->uconv_out, 0, xmlBufEnd(out),
|
||||
&c_out, NULL, &c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
}
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"initialized encoder\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Conversion itself.
|
||||
*/
|
||||
toconv = xmlBufUse(in);
|
||||
if (toconv == 0)
|
||||
return (0);
|
||||
if (toconv > 64 * 1024)
|
||||
toconv = 64 * 1024;
|
||||
if (toconv * 4 >= written) {
|
||||
xmlBufGrow(out, toconv * 4);
|
||||
written = xmlBufAvail(out) - 1;
|
||||
}
|
||||
if (written > 256 * 1024)
|
||||
written = 256 * 1024;
|
||||
|
||||
c_in = toconv;
|
||||
c_out = written;
|
||||
if (output->encoder->output != NULL) {
|
||||
ret = output->encoder->output(xmlBufEnd(out), &c_out,
|
||||
xmlBufContent(in), &c_in);
|
||||
if (c_out > 0) {
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
writtentot += c_out;
|
||||
}
|
||||
}
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
else if (output->encoder->iconv_out != NULL) {
|
||||
ret = xmlIconvWrapper(output->encoder->iconv_out, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
writtentot += c_out;
|
||||
if (ret == -1) {
|
||||
if (c_out > 0) {
|
||||
/*
|
||||
* Can be a limitation of iconv
|
||||
*/
|
||||
charref_len = 0;
|
||||
goto retry;
|
||||
}
|
||||
ret = -3;
|
||||
}
|
||||
}
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
else if (output->encoder->uconv_out != NULL) {
|
||||
ret = xmlUconvWrapper(output->encoder->uconv_out, 0, xmlBufEnd(out),
|
||||
&c_out, xmlBufContent(in), &c_in);
|
||||
xmlBufShrink(in, c_in);
|
||||
xmlBufAddLen(out, c_out);
|
||||
writtentot += c_out;
|
||||
if (ret == -1) {
|
||||
if (c_out > 0) {
|
||||
/*
|
||||
* Can be a limitation of uconv
|
||||
*/
|
||||
charref_len = 0;
|
||||
goto retry;
|
||||
}
|
||||
ret = -3;
|
||||
}
|
||||
}
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
else {
|
||||
xmlEncodingErr(XML_I18N_NO_OUTPUT,
|
||||
"xmlCharEncOutFunc: no output function !\n", NULL);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (ret >= 0) output += ret;
|
||||
|
||||
/*
|
||||
* Attempt to handle error cases
|
||||
*/
|
||||
switch (ret) {
|
||||
case 0:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"converted %d bytes to %d bytes of output\n",
|
||||
c_in, c_out);
|
||||
#endif
|
||||
break;
|
||||
case -1:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"output conversion failed by lack of space\n");
|
||||
#endif
|
||||
break;
|
||||
case -3:
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,"converted %d bytes to %d bytes of output %d left\n",
|
||||
c_in, c_out, (int) xmlBufUse(in));
|
||||
#endif
|
||||
break;
|
||||
case -2: {
|
||||
int len = (int) xmlBufUse(in);
|
||||
xmlChar *content = xmlBufContent(in);
|
||||
int cur;
|
||||
|
||||
cur = xmlGetUTF8Char(content, &len);
|
||||
if ((charref_len != 0) && (c_out < charref_len)) {
|
||||
/*
|
||||
* We attempted to insert a character reference and failed.
|
||||
* Undo what was written and skip the remaining charref.
|
||||
*/
|
||||
xmlBufErase(out, c_out);
|
||||
writtentot -= c_out;
|
||||
xmlBufShrink(in, charref_len - c_out);
|
||||
charref_len = 0;
|
||||
|
||||
ret = -1;
|
||||
break;
|
||||
} else if (cur > 0) {
|
||||
xmlChar charref[20];
|
||||
|
||||
#ifdef DEBUG_ENCODING
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"handling output conversion error\n");
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
|
||||
content[0], content[1],
|
||||
content[2], content[3]);
|
||||
#endif
|
||||
/*
|
||||
* Removes the UTF8 sequence, and replace it by a charref
|
||||
* and continue the transcoding phase, hoping the error
|
||||
* did not mangle the encoder state.
|
||||
*/
|
||||
charref_len = snprintf((char *) &charref[0], sizeof(charref),
|
||||
"&#%d;", cur);
|
||||
xmlBufShrink(in, len);
|
||||
xmlBufAddHead(in, charref, -1);
|
||||
|
||||
goto retry;
|
||||
} else {
|
||||
char buf[50];
|
||||
|
||||
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
|
||||
content[0], content[1],
|
||||
content[2], content[3]);
|
||||
buf[49] = 0;
|
||||
xmlEncodingErr(XML_I18N_CONV_FAILED,
|
||||
"output conversion failed due to conv error, bytes %s\n",
|
||||
buf);
|
||||
if (xmlBufGetAllocationScheme(in) != XML_BUFFER_ALLOC_IMMUTABLE)
|
||||
content[0] = ' ';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlCharEncOutFunc:
|
||||
* @handler: char enconding transformation data structure
|
||||
|
@ -2158,6 +2641,7 @@ xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||
int writtentot = 0;
|
||||
int toconv;
|
||||
int output = 0;
|
||||
int charref_len = 0;
|
||||
|
||||
if (handler == NULL) return(-1);
|
||||
if (out == NULL) return(-1);
|
||||
|
@ -2239,6 +2723,7 @@ retry:
|
|||
/*
|
||||
* Can be a limitation of iconv
|
||||
*/
|
||||
charref_len = 0;
|
||||
goto retry;
|
||||
}
|
||||
ret = -3;
|
||||
|
@ -2259,6 +2744,7 @@ retry:
|
|||
/*
|
||||
* Can be a limitation of iconv
|
||||
*/
|
||||
charref_len = 0;
|
||||
goto retry;
|
||||
}
|
||||
ret = -3;
|
||||
|
@ -2302,7 +2788,19 @@ retry:
|
|||
int cur;
|
||||
|
||||
cur = xmlGetUTF8Char(utf, &len);
|
||||
if (cur > 0) {
|
||||
if ((charref_len != 0) && (written < charref_len)) {
|
||||
/*
|
||||
* We attempted to insert a character reference and failed.
|
||||
* Undo what was written and skip the remaining charref.
|
||||
*/
|
||||
out->use -= written;
|
||||
writtentot -= written;
|
||||
xmlBufferShrink(in, charref_len - written);
|
||||
charref_len = 0;
|
||||
|
||||
ret = -1;
|
||||
break;
|
||||
} else if (cur > 0) {
|
||||
xmlChar charref[20];
|
||||
|
||||
#ifdef DEBUG_ENCODING
|
||||
|
@ -2318,7 +2816,8 @@ retry:
|
|||
* and continue the transcoding phase, hoping the error
|
||||
* did not mangle the encoder state.
|
||||
*/
|
||||
snprintf((char *) &charref[0], sizeof(charref), "&#%d;", cur);
|
||||
charref_len = snprintf((char *) &charref[0], sizeof(charref),
|
||||
"&#%d;", cur);
|
||||
xmlBufferShrink(in, len);
|
||||
xmlBufferAddHead(in, charref, -1);
|
||||
|
||||
|
@ -2353,17 +2852,27 @@ retry:
|
|||
int
|
||||
xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
|
||||
int ret = 0;
|
||||
int tofree = 0;
|
||||
int i, handler_in_list = 0;
|
||||
|
||||
if (handler == NULL) return(-1);
|
||||
if (handler->name == NULL) return(-1);
|
||||
if (handlers != NULL) {
|
||||
for (i = 0;i < nbCharEncodingHandler; i++) {
|
||||
if (handler == handlers[i]) {
|
||||
handler_in_list = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
/*
|
||||
* Iconv handlers can be used only once, free the whole block.
|
||||
* and the associated icon resources.
|
||||
*/
|
||||
if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
|
||||
if (handler->name != NULL)
|
||||
xmlFree(handler->name);
|
||||
handler->name = NULL;
|
||||
if ((handler_in_list == 0) &&
|
||||
((handler->iconv_out != NULL) || (handler->iconv_in != NULL))) {
|
||||
tofree = 1;
|
||||
if (handler->iconv_out != NULL) {
|
||||
if (iconv_close(handler->iconv_out))
|
||||
ret = -1;
|
||||
|
@ -2374,14 +2883,12 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
|
|||
ret = -1;
|
||||
handler->iconv_in = NULL;
|
||||
}
|
||||
xmlFree(handler);
|
||||
}
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) {
|
||||
if (handler->name != NULL)
|
||||
xmlFree(handler->name);
|
||||
handler->name = NULL;
|
||||
if ((handler_in_list == 0) &&
|
||||
((handler->uconv_out != NULL) || (handler->uconv_in != NULL))) {
|
||||
tofree = 1;
|
||||
if (handler->uconv_out != NULL) {
|
||||
closeIcuConverter(handler->uconv_out);
|
||||
handler->uconv_out = NULL;
|
||||
|
@ -2390,9 +2897,15 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
|
|||
closeIcuConverter(handler->uconv_in);
|
||||
handler->uconv_in = NULL;
|
||||
}
|
||||
xmlFree(handler);
|
||||
}
|
||||
#endif
|
||||
if (tofree) {
|
||||
/* free up only dynamic handlers iconv/uconv */
|
||||
if (handler->name != NULL)
|
||||
xmlFree(handler->name);
|
||||
handler->name = NULL;
|
||||
xmlFree(handler);
|
||||
}
|
||||
#ifdef DEBUG_ENCODING
|
||||
if (ret)
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
@ -2484,6 +2997,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
|||
unused += written;
|
||||
cur += toconv;
|
||||
} while (ret == -2);
|
||||
#endif
|
||||
} else {
|
||||
/* could not find a converter */
|
||||
return(-1);
|
||||
|
@ -2495,7 +3009,6 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
|||
}
|
||||
return(in->consumed + (in->cur - in->base));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED)
|
||||
#ifdef LIBXML_ISO8859X_ENABLED
|
||||
|
@ -2523,6 +3036,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||
const unsigned char* outstart = out;
|
||||
const unsigned char* inend;
|
||||
const unsigned char* instart = in;
|
||||
const unsigned char* processed = in;
|
||||
|
||||
if ((out == NULL) || (outlen == NULL) || (inlen == NULL) ||
|
||||
(xlattable == NULL))
|
||||
|
@ -2543,21 +3057,21 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||
} else if (d < 0xC0) {
|
||||
/* trailing byte in leading position */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 1;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
} else if (d < 0xE0) {
|
||||
unsigned char c;
|
||||
if (!(in < inend)) {
|
||||
/* trailing byte not in input buffer */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 1;
|
||||
return(-2);
|
||||
*inlen = processed - instart;
|
||||
return(-3);
|
||||
}
|
||||
c = *in++;
|
||||
if ((c & 0xC0) != 0x80) {
|
||||
/* not a trailing byte */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 2;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
c = c & 0x3F;
|
||||
|
@ -2566,7 +3080,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||
if (d == 0) {
|
||||
/* not in character set */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 2;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
*out++ = d;
|
||||
|
@ -2576,21 +3090,21 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||
if (!(in < inend - 1)) {
|
||||
/* trailing bytes not in input buffer */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 1;
|
||||
return(-2);
|
||||
*inlen = processed - instart;
|
||||
return(-3);
|
||||
}
|
||||
c1 = *in++;
|
||||
if ((c1 & 0xC0) != 0x80) {
|
||||
/* not a trailing byte (c1) */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 2;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
c2 = *in++;
|
||||
if ((c2 & 0xC0) != 0x80) {
|
||||
/* not a trailing byte (c2) */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 2;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
c1 = c1 & 0x3F;
|
||||
|
@ -2601,19 +3115,20 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||
if (d == 0) {
|
||||
/* not in character set */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 3;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
*out++ = d;
|
||||
} else {
|
||||
/* cannot transcode >= U+010000 */
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart - 1;
|
||||
*inlen = processed - instart;
|
||||
return(-2);
|
||||
}
|
||||
processed = in;
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart;
|
||||
*inlen = processed - instart;
|
||||
return(*outlen);
|
||||
}
|
||||
|
||||
|
@ -2647,10 +3162,10 @@ ISO8859xToUTF8(unsigned char* out, int *outlen,
|
|||
outend = out + *outlen;
|
||||
inend = in + *inlen;
|
||||
instop = inend;
|
||||
c = *in;
|
||||
while (in < inend && out < outend - 1) {
|
||||
if (c >= 0x80) {
|
||||
c = unicodetable [c - 0x80];
|
||||
|
||||
while ((in < inend) && (out < outend - 2)) {
|
||||
if (*in >= 0x80) {
|
||||
c = unicodetable [*in - 0x80];
|
||||
if (c == 0) {
|
||||
/* undefined code point */
|
||||
*outlen = out - outstart;
|
||||
|
@ -2666,18 +3181,17 @@ ISO8859xToUTF8(unsigned char* out, int *outlen,
|
|||
*out++ = (c & 0x3F) | 0x80;
|
||||
}
|
||||
++in;
|
||||
c = *in;
|
||||
}
|
||||
if (instop - in > outend - out) instop = in + (outend - out);
|
||||
while (c < 0x80 && in < instop) {
|
||||
*out++ = c;
|
||||
++in;
|
||||
c = *in;
|
||||
while ((*in < 0x80) && (in < instop)) {
|
||||
*out++ = *in++;
|
||||
}
|
||||
}
|
||||
if (in < inend && out < outend && c < 0x80) {
|
||||
*out++ = c;
|
||||
++in;
|
||||
if ((in < inend) && (out < outend) && (*in < 0x80)) {
|
||||
*out++ = *in++;
|
||||
}
|
||||
if ((in < inend) && (out < outend) && (*in < 0x80)) {
|
||||
*out++ = *in++;
|
||||
}
|
||||
*outlen = out - outstart;
|
||||
*inlen = in - instart;
|
||||
|
@ -3569,4 +4083,3 @@ xmlRegisterCharEncodingHandlersISO8859x (void) {
|
|||
|
||||
#define bottom_encoding
|
||||
#include "elfgcchack.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#include "save.h"
|
||||
|
||||
/*
|
||||
* The XML predefined entities.
|
||||
*/
|
||||
|
@ -81,7 +83,7 @@ xmlEntitiesErrMemory(const char *extra)
|
|||
*
|
||||
* Handle an out of memory condition
|
||||
*/
|
||||
static void
|
||||
static void LIBXML_ATTR_FORMAT(2,0)
|
||||
xmlEntitiesErr(xmlParserErrors code, const char *msg)
|
||||
{
|
||||
__xmlSimpleError(XML_FROM_TREE, code, NULL, msg, NULL);
|
||||
|
@ -500,7 +502,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) {
|
|||
* Returns A pointer to the entity structure or NULL if not found.
|
||||
*/
|
||||
xmlEntityPtr
|
||||
xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
|
||||
xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name) {
|
||||
xmlEntityPtr cur;
|
||||
xmlEntitiesTablePtr table;
|
||||
|
||||
|
@ -528,20 +530,20 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
|
|||
* Macro used to grow the current buffer.
|
||||
*/
|
||||
#define growBufferReentrant() { \
|
||||
buffer_size *= 2; \
|
||||
buffer = (xmlChar *) \
|
||||
xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
|
||||
if (buffer == NULL) { \
|
||||
xmlEntitiesErrMemory("xmlEncodeEntitiesReentrant: realloc failed");\
|
||||
return(NULL); \
|
||||
} \
|
||||
xmlChar *tmp; \
|
||||
size_t new_size = buffer_size * 2; \
|
||||
if (new_size < buffer_size) goto mem_error; \
|
||||
tmp = (xmlChar *) xmlRealloc(buffer, new_size); \
|
||||
if (tmp == NULL) goto mem_error; \
|
||||
buffer = tmp; \
|
||||
buffer_size = new_size; \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* xmlEncodeEntitiesReentrant:
|
||||
* xmlEncodeEntitiesInternal:
|
||||
* @doc: the document containing the string
|
||||
* @input: A string to convert to XML.
|
||||
* @attr: are we handling an atrbute value
|
||||
*
|
||||
* Do a global encoding of a string, replacing the predefined entities
|
||||
* and non ASCII values with their entities and CharRef counterparts.
|
||||
|
@ -550,12 +552,12 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
|
|||
*
|
||||
* Returns A newly allocated string with the substitution done.
|
||||
*/
|
||||
xmlChar *
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
||||
static xmlChar *
|
||||
xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
|
||||
const xmlChar *cur = input;
|
||||
xmlChar *buffer = NULL;
|
||||
xmlChar *out = NULL;
|
||||
int buffer_size = 0;
|
||||
size_t buffer_size = 0;
|
||||
int html = 0;
|
||||
|
||||
if (input == NULL) return(NULL);
|
||||
|
@ -568,14 +570,14 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
buffer_size = 1000;
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
|
||||
if (buffer == NULL) {
|
||||
xmlEntitiesErrMemory("xmlEncodeEntitiesReentrant: malloc failed");
|
||||
xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed");
|
||||
return(NULL);
|
||||
}
|
||||
out = buffer;
|
||||
|
||||
while (*cur != '\0') {
|
||||
if (out - buffer > buffer_size - 100) {
|
||||
int indx = out - buffer;
|
||||
size_t indx = out - buffer;
|
||||
if (indx + 100 > buffer_size) {
|
||||
|
||||
growBufferReentrant();
|
||||
out = &buffer[indx];
|
||||
|
@ -585,6 +587,27 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
* By default one have to encode at least '<', '>', '"' and '&' !
|
||||
*/
|
||||
if (*cur == '<') {
|
||||
const xmlChar *end;
|
||||
|
||||
/*
|
||||
* Special handling of server side include in HTML attributes
|
||||
*/
|
||||
if (html && attr &&
|
||||
(cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') &&
|
||||
((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) {
|
||||
while (cur != end) {
|
||||
*out++ = *cur++;
|
||||
indx = out - buffer;
|
||||
if (indx + 100 > buffer_size) {
|
||||
growBufferReentrant();
|
||||
out = &buffer[indx];
|
||||
}
|
||||
}
|
||||
*out++ = *cur++;
|
||||
*out++ = *cur++;
|
||||
*out++ = *cur++;
|
||||
continue;
|
||||
}
|
||||
*out++ = '&';
|
||||
*out++ = 'l';
|
||||
*out++ = 't';
|
||||
|
@ -595,6 +618,23 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
*out++ = 't';
|
||||
*out++ = ';';
|
||||
} else if (*cur == '&') {
|
||||
/*
|
||||
* Special handling of &{...} construct from HTML 4, see
|
||||
* http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1
|
||||
*/
|
||||
if (html && attr && (cur[1] == '{') &&
|
||||
(strchr((const char *) cur, '}'))) {
|
||||
while (*cur != '}') {
|
||||
*out++ = *cur++;
|
||||
indx = out - buffer;
|
||||
if (indx + 100 > buffer_size) {
|
||||
growBufferReentrant();
|
||||
out = &buffer[indx];
|
||||
}
|
||||
}
|
||||
*out++ = *cur++;
|
||||
continue;
|
||||
}
|
||||
*out++ = '&';
|
||||
*out++ = 'a';
|
||||
*out++ = 'm';
|
||||
|
@ -627,7 +667,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
|
||||
if (*cur < 0xC0) {
|
||||
xmlEntitiesErr(XML_CHECK_NOT_UTF8,
|
||||
"xmlEncodeEntitiesReentrant : input not UTF-8");
|
||||
"xmlEncodeEntities: input not UTF-8");
|
||||
if (doc != NULL)
|
||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||
|
@ -660,7 +700,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
}
|
||||
if ((l == 1) || (!IS_CHAR(val))) {
|
||||
xmlEntitiesErr(XML_ERR_INVALID_CHAR,
|
||||
"xmlEncodeEntitiesReentrant : char out of range\n");
|
||||
"xmlEncodeEntities: char out of range\n");
|
||||
if (doc != NULL)
|
||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||
|
@ -692,6 +732,44 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
}
|
||||
*out = 0;
|
||||
return(buffer);
|
||||
|
||||
mem_error:
|
||||
xmlEntitiesErrMemory("xmlEncodeEntities: realloc failed");
|
||||
xmlFree(buffer);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlEncodeAttributeEntities:
|
||||
* @doc: the document containing the string
|
||||
* @input: A string to convert to XML.
|
||||
*
|
||||
* Do a global encoding of a string, replacing the predefined entities
|
||||
* and non ASCII values with their entities and CharRef counterparts for
|
||||
* attribute values.
|
||||
*
|
||||
* Returns A newly allocated string with the substitution done.
|
||||
*/
|
||||
xmlChar *
|
||||
xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input) {
|
||||
return xmlEncodeEntitiesInternal(doc, input, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlEncodeEntitiesReentrant:
|
||||
* @doc: the document containing the string
|
||||
* @input: A string to convert to XML.
|
||||
*
|
||||
* Do a global encoding of a string, replacing the predefined entities
|
||||
* and non ASCII values with their entities and CharRef counterparts.
|
||||
* Contrary to xmlEncodeEntities, this routine is reentrant, and result
|
||||
* must be deallocated.
|
||||
*
|
||||
* Returns A newly allocated string with the substitution done.
|
||||
*/
|
||||
xmlChar *
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
||||
return xmlEncodeEntitiesInternal(doc, input, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -705,11 +783,11 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||
* Returns A newly allocated string with the substitution done.
|
||||
*/
|
||||
xmlChar *
|
||||
xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
|
||||
xmlEncodeSpecialChars(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlChar *input) {
|
||||
const xmlChar *cur = input;
|
||||
xmlChar *buffer = NULL;
|
||||
xmlChar *out = NULL;
|
||||
int buffer_size = 0;
|
||||
size_t buffer_size = 0;
|
||||
if (input == NULL) return(NULL);
|
||||
|
||||
/*
|
||||
|
@ -724,8 +802,8 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
|
|||
out = buffer;
|
||||
|
||||
while (*cur != '\0') {
|
||||
if (out - buffer > buffer_size - 10) {
|
||||
int indx = out - buffer;
|
||||
size_t indx = out - buffer;
|
||||
if (indx + 10 > buffer_size) {
|
||||
|
||||
growBufferReentrant();
|
||||
out = &buffer[indx];
|
||||
|
@ -774,6 +852,11 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
|
|||
}
|
||||
*out = 0;
|
||||
return(buffer);
|
||||
|
||||
mem_error:
|
||||
xmlEntitiesErrMemory("xmlEncodeSpecialChars: realloc failed");
|
||||
xmlFree(buffer);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
||||
const char *msg,
|
||||
...);
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
#define XML_GET_VAR_STR(msg, str) { \
|
||||
int size, prev_size = -1; \
|
||||
|
@ -177,7 +177,9 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
|||
xmlChar content[81]; /* space for 80 chars + line terminator */
|
||||
xmlChar *ctnt;
|
||||
|
||||
if (input == NULL) return;
|
||||
if ((input == NULL) || (input->cur == NULL))
|
||||
return;
|
||||
|
||||
cur = input->cur;
|
||||
base = input->base;
|
||||
/* skip backwards over any end-of-lines */
|
||||
|
@ -292,7 +294,10 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||
} else {
|
||||
if (file != NULL)
|
||||
channel(data, "%s:%d: ", file, line);
|
||||
else if ((line != 0) && (domain == XML_FROM_PARSER))
|
||||
else if ((line != 0) &&
|
||||
((domain == XML_FROM_PARSER) || (domain == XML_FROM_SCHEMASV)||
|
||||
(domain == XML_FROM_SCHEMASP)||(domain == XML_FROM_DTD) ||
|
||||
(domain == XML_FROM_RELAXNGP)||(domain == XML_FROM_RELAXNGV)))
|
||||
channel(data, "Entity: line %d: ", line);
|
||||
}
|
||||
if (name != NULL) {
|
||||
|
@ -360,6 +365,15 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||
case XML_FROM_I18N:
|
||||
channel(data, "encoding ");
|
||||
break;
|
||||
case XML_FROM_SCHEMATRONV:
|
||||
channel(data, "schematron ");
|
||||
break;
|
||||
case XML_FROM_BUFFER:
|
||||
channel(data, "internal buffer ");
|
||||
break;
|
||||
case XML_FROM_URI:
|
||||
channel(data, "URI ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -452,6 +466,8 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
xmlErrorPtr to = &xmlLastError;
|
||||
xmlNodePtr baseptr = NULL;
|
||||
|
||||
if (code == XML_ERR_OK)
|
||||
return;
|
||||
if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))
|
||||
return;
|
||||
if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
|
||||
|
@ -459,8 +475,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
|
||||
ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->initialized == XML_SAX2_MAGIC))
|
||||
(ctxt->sax->initialized == XML_SAX2_MAGIC) &&
|
||||
(ctxt->sax->serror != NULL)) {
|
||||
schannel = ctxt->sax->serror;
|
||||
data = ctxt->userData;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Check if structured error handler set
|
||||
|
@ -473,16 +492,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
if (schannel != NULL)
|
||||
data = xmlStructuredErrorContext;
|
||||
}
|
||||
if ((domain == XML_FROM_VALID) &&
|
||||
((channel == xmlParserValidityError) ||
|
||||
(channel == xmlParserValidityWarning))) {
|
||||
ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->initialized == XML_SAX2_MAGIC))
|
||||
schannel = ctxt->sax->serror;
|
||||
}
|
||||
if (code == XML_ERR_OK)
|
||||
return;
|
||||
/*
|
||||
* Formatting the message
|
||||
*/
|
||||
|
@ -526,6 +535,8 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
|
||||
if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
|
||||
line = node->line;
|
||||
if ((line == 0) || (line == 65535))
|
||||
line = xmlGetLineNo(node);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -589,6 +600,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
if (to != &xmlLastError)
|
||||
xmlCopyError(to,&xmlLastError);
|
||||
|
||||
if (schannel != NULL) {
|
||||
schannel(data, to);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the callback channel if channel param is NULL
|
||||
*/
|
||||
|
@ -600,20 +616,13 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
channel = ctxt->sax->error;
|
||||
data = ctxt->userData;
|
||||
} else if (channel == NULL) {
|
||||
if ((schannel == NULL) && (xmlStructuredError != NULL)) {
|
||||
schannel = xmlStructuredError;
|
||||
data = xmlStructuredErrorContext;
|
||||
} else {
|
||||
channel = xmlGenericError;
|
||||
if (!data) {
|
||||
if (ctxt != NULL) {
|
||||
data = ctxt;
|
||||
} else {
|
||||
data = xmlGenericErrorContext;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (schannel != NULL) {
|
||||
schannel(data, to);
|
||||
return;
|
||||
}
|
||||
if (channel == NULL)
|
||||
return;
|
||||
|
||||
|
|
|
@ -86,25 +86,6 @@ xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
|
|||
xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
|
||||
xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
|
||||
#else
|
||||
|
||||
#define MAX_LIBXML_MALLOC (1024*1024*512)
|
||||
|
||||
static void* size_checked_malloc(size_t size) {
|
||||
if (size > MAX_LIBXML_MALLOC) {
|
||||
*(volatile char*)0 = '\0';
|
||||
return NULL;
|
||||
}
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
static void* size_checked_realloc(void* ptr, size_t size) {
|
||||
if (size > MAX_LIBXML_MALLOC) {
|
||||
*(volatile char*)0 = '\0';
|
||||
return NULL;
|
||||
}
|
||||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlFree:
|
||||
* @mem: an already allocated block of memory
|
||||
|
@ -120,7 +101,7 @@ xmlFreeFunc xmlFree = (xmlFreeFunc) free;
|
|||
*
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error
|
||||
*/
|
||||
xmlMallocFunc xmlMalloc = (xmlMallocFunc) size_checked_malloc;
|
||||
xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
|
||||
/**
|
||||
* xmlMallocAtomic:
|
||||
* @size: the size requested in bytes
|
||||
|
@ -131,7 +112,7 @@ xmlMallocFunc xmlMalloc = (xmlMallocFunc) size_checked_malloc;
|
|||
*
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error
|
||||
*/
|
||||
xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) size_checked_malloc;
|
||||
xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
|
||||
/**
|
||||
* xmlRealloc:
|
||||
* @mem: an already allocated block of memory
|
||||
|
@ -141,7 +122,7 @@ xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) size_checked_malloc;
|
|||
*
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error
|
||||
*/
|
||||
xmlReallocFunc xmlRealloc = (xmlReallocFunc) size_checked_realloc;
|
||||
xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
|
||||
/**
|
||||
* xmlMemStrdup:
|
||||
* @str: a zero terminated string
|
||||
|
@ -528,7 +509,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
|
|||
#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
|
||||
#endif
|
||||
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
|
||||
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Reference: Your favorite introductory book on algorithms
|
||||
*
|
||||
* Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
|
||||
* Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -21,6 +21,22 @@
|
|||
#include "libxml.h"
|
||||
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Following http://www.ocert.org/advisories/ocert-2011-003.html
|
||||
* it seems that having hash randomization might be a good idea
|
||||
* when using XML with untrusted data
|
||||
*/
|
||||
#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
|
||||
#define HASH_RANDOMIZATION
|
||||
#endif
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
|
@ -53,6 +69,9 @@ struct _xmlHashTable {
|
|||
int size;
|
||||
int nbElems;
|
||||
xmlDictPtr dict;
|
||||
#ifdef HASH_RANDOMIZATION
|
||||
int random_seed;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -65,17 +84,22 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
|
|||
unsigned long value = 0L;
|
||||
char ch;
|
||||
|
||||
#ifdef HASH_RANDOMIZATION
|
||||
value = table->random_seed;
|
||||
#endif
|
||||
if (name != NULL) {
|
||||
value += 30 * (*name);
|
||||
while ((ch = *name++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
value = value ^ ((value << 5) + (value >> 3));
|
||||
if (name2 != NULL) {
|
||||
while ((ch = *name2++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
value = value ^ ((value << 5) + (value >> 3));
|
||||
if (name3 != NULL) {
|
||||
while ((ch = *name3++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
|
@ -92,6 +116,9 @@ xmlHashComputeQKey(xmlHashTablePtr table,
|
|||
unsigned long value = 0L;
|
||||
char ch;
|
||||
|
||||
#ifdef HASH_RANDOMIZATION
|
||||
value = table->random_seed;
|
||||
#endif
|
||||
if (prefix != NULL)
|
||||
value += 30 * (*prefix);
|
||||
else
|
||||
|
@ -108,6 +135,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
|
|||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
value = value ^ ((value << 5) + (value >> 3));
|
||||
if (prefix2 != NULL) {
|
||||
while ((ch = *prefix2++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
|
@ -119,6 +147,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
|
|||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
value = value ^ ((value << 5) + (value >> 3));
|
||||
if (prefix3 != NULL) {
|
||||
while ((ch = *prefix3++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
|
@ -156,6 +185,9 @@ xmlHashCreate(int size) {
|
|||
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
|
||||
if (table->table) {
|
||||
memset(table->table, 0, size * sizeof(xmlHashEntry));
|
||||
#ifdef HASH_RANDOMIZATION
|
||||
table->random_seed = __xmlRandom();
|
||||
#endif
|
||||
return(table);
|
||||
}
|
||||
xmlFree(table);
|
||||
|
@ -952,6 +984,9 @@ xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) {
|
|||
return(NULL);
|
||||
|
||||
ret = xmlHashCreate(table->size);
|
||||
if (ret == NULL)
|
||||
return(NULL);
|
||||
|
||||
if (table->table) {
|
||||
for(i = 0; i < table->size; i++) {
|
||||
if (table->table[i].valid == 0)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
SUBDIRS=libxml
|
||||
|
||||
EXTRA_DIST = win32config.h wsockcompat.h
|
||||
|
|
@ -0,0 +1,733 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = include
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
|
||||
C14N_OBJ = @C14N_OBJ@
|
||||
CATALOG_OBJ = @CATALOG_OBJ@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
|
||||
CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
|
||||
DEBUG_OBJ = @DEBUG_OBJ@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOCB_OBJ = @DOCB_OBJ@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FTP_OBJ = @FTP_OBJ@
|
||||
GREP = @GREP@
|
||||
HAVE_ISINF = @HAVE_ISINF@
|
||||
HAVE_ISNAN = @HAVE_ISNAN@
|
||||
HTML_DIR = @HTML_DIR@
|
||||
HTML_OBJ = @HTML_OBJ@
|
||||
HTTP_OBJ = @HTTP_OBJ@
|
||||
ICONV_LIBS = @ICONV_LIBS@
|
||||
ICU_CFLAGS = @ICU_CFLAGS@
|
||||
ICU_LIBS = @ICU_LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
|
||||
LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
|
||||
LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
|
||||
LIBXML_VERSION = @LIBXML_VERSION@
|
||||
LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
|
||||
LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
|
||||
LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
LZMA_CFLAGS = @LZMA_CFLAGS@
|
||||
LZMA_LIBS = @LZMA_LIBS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MODULE_EXTENSION = @MODULE_EXTENSION@
|
||||
MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
|
||||
MV = @MV@
|
||||
M_LIBS = @M_LIBS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
PYTHON = @PYTHON@
|
||||
PYTHON_INCLUDES = @PYTHON_INCLUDES@
|
||||
PYTHON_LIBS = @PYTHON_LIBS@
|
||||
PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
|
||||
PYTHON_SUBDIR = @PYTHON_SUBDIR@
|
||||
PYTHON_TESTS = @PYTHON_TESTS@
|
||||
PYTHON_VERSION = @PYTHON_VERSION@
|
||||
RANLIB = @RANLIB@
|
||||
RDL_LIBS = @RDL_LIBS@
|
||||
READER_TEST = @READER_TEST@
|
||||
RELDATE = @RELDATE@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STATIC_BINARIES = @STATIC_BINARIES@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
TEST_C14N = @TEST_C14N@
|
||||
TEST_CATALOG = @TEST_CATALOG@
|
||||
TEST_DEBUG = @TEST_DEBUG@
|
||||
TEST_HTML = @TEST_HTML@
|
||||
TEST_MODULES = @TEST_MODULES@
|
||||
TEST_PATTERN = @TEST_PATTERN@
|
||||
TEST_PHTML = @TEST_PHTML@
|
||||
TEST_PUSH = @TEST_PUSH@
|
||||
TEST_REGEXPS = @TEST_REGEXPS@
|
||||
TEST_SAX = @TEST_SAX@
|
||||
TEST_SCHEMAS = @TEST_SCHEMAS@
|
||||
TEST_SCHEMATRON = @TEST_SCHEMATRON@
|
||||
TEST_THREADS = @TEST_THREADS@
|
||||
TEST_VALID = @TEST_VALID@
|
||||
TEST_VTIME = @TEST_VTIME@
|
||||
TEST_XINCLUDE = @TEST_XINCLUDE@
|
||||
TEST_XPATH = @TEST_XPATH@
|
||||
TEST_XPTR = @TEST_XPTR@
|
||||
THREAD_CFLAGS = @THREAD_CFLAGS@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
VERSION = @VERSION@
|
||||
VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
|
||||
WGET = @WGET@
|
||||
WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
|
||||
WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
|
||||
WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
|
||||
WITH_C14N = @WITH_C14N@
|
||||
WITH_CATALOG = @WITH_CATALOG@
|
||||
WITH_DEBUG = @WITH_DEBUG@
|
||||
WITH_DOCB = @WITH_DOCB@
|
||||
WITH_FTP = @WITH_FTP@
|
||||
WITH_HTML = @WITH_HTML@
|
||||
WITH_HTTP = @WITH_HTTP@
|
||||
WITH_ICONV = @WITH_ICONV@
|
||||
WITH_ICU = @WITH_ICU@
|
||||
WITH_ISO8859X = @WITH_ISO8859X@
|
||||
WITH_LEGACY = @WITH_LEGACY@
|
||||
WITH_LZMA = @WITH_LZMA@
|
||||
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
|
||||
WITH_MODULES = @WITH_MODULES@
|
||||
WITH_OUTPUT = @WITH_OUTPUT@
|
||||
WITH_PATTERN = @WITH_PATTERN@
|
||||
WITH_PUSH = @WITH_PUSH@
|
||||
WITH_READER = @WITH_READER@
|
||||
WITH_REGEXPS = @WITH_REGEXPS@
|
||||
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
|
||||
WITH_SAX1 = @WITH_SAX1@
|
||||
WITH_SCHEMAS = @WITH_SCHEMAS@
|
||||
WITH_SCHEMATRON = @WITH_SCHEMATRON@
|
||||
WITH_THREADS = @WITH_THREADS@
|
||||
WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
|
||||
WITH_TREE = @WITH_TREE@
|
||||
WITH_TRIO = @WITH_TRIO@
|
||||
WITH_VALID = @WITH_VALID@
|
||||
WITH_WRITER = @WITH_WRITER@
|
||||
WITH_XINCLUDE = @WITH_XINCLUDE@
|
||||
WITH_XPATH = @WITH_XPATH@
|
||||
WITH_XPTR = @WITH_XPTR@
|
||||
WITH_ZLIB = @WITH_ZLIB@
|
||||
XINCLUDE_OBJ = @XINCLUDE_OBJ@
|
||||
XMLLINT = @XMLLINT@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_INCLUDEDIR = @XML_INCLUDEDIR@
|
||||
XML_LIBDIR = @XML_LIBDIR@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
|
||||
XPATH_OBJ = @XPATH_OBJ@
|
||||
XPTR_OBJ = @XPTR_OBJ@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
Z_CFLAGS = @Z_CFLAGS@
|
||||
Z_LIBS = @Z_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
pythondir = @pythondir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = libxml
|
||||
EXTRA_DIST = win32config.h wsockcompat.h
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||
ctags-am distclean distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -177,13 +177,15 @@ XMLPUBFUN void XMLCALL
|
|||
*/
|
||||
typedef enum {
|
||||
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
|
||||
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
|
||||
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
||||
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
||||
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
||||
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
||||
HTML_PARSE_NONET = 1<<11,/* Forbid network access */
|
||||
HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
|
||||
HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
|
||||
HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
|
||||
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
|
||||
} htmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
xmlincdir = $(includedir)/libxml2/libxml
|
||||
|
||||
xmlinc_HEADERS = \
|
||||
SAX.h \
|
||||
entities.h \
|
||||
encoding.h \
|
||||
parser.h \
|
||||
parserInternals.h \
|
||||
xmlerror.h \
|
||||
HTMLparser.h \
|
||||
HTMLtree.h \
|
||||
debugXML.h \
|
||||
tree.h \
|
||||
list.h \
|
||||
hash.h \
|
||||
xpath.h \
|
||||
xpathInternals.h \
|
||||
xpointer.h \
|
||||
xinclude.h \
|
||||
xmlIO.h \
|
||||
xmlmemory.h \
|
||||
nanohttp.h \
|
||||
nanoftp.h \
|
||||
uri.h \
|
||||
valid.h \
|
||||
xlink.h \
|
||||
xmlversion.h \
|
||||
DOCBparser.h \
|
||||
catalog.h \
|
||||
threads.h \
|
||||
globals.h \
|
||||
c14n.h \
|
||||
xmlautomata.h \
|
||||
xmlregexp.h \
|
||||
xmlmodule.h \
|
||||
xmlschemas.h \
|
||||
schemasInternals.h \
|
||||
xmlschemastypes.h \
|
||||
xmlstring.h \
|
||||
xmlunicode.h \
|
||||
xmlreader.h \
|
||||
relaxng.h \
|
||||
dict.h \
|
||||
SAX2.h \
|
||||
xmlexports.h \
|
||||
xmlwriter.h \
|
||||
chvalid.h \
|
||||
pattern.h \
|
||||
xmlsave.h \
|
||||
schematron.h
|
||||
|
||||
EXTRA_DIST = xmlversion.h.in
|
|
@ -0,0 +1,724 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = include/libxml
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(xmlinc_HEADERS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = xmlversion.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(xmlincdir)"
|
||||
HEADERS = $(xmlinc_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/xmlversion.h.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
|
||||
C14N_OBJ = @C14N_OBJ@
|
||||
CATALOG_OBJ = @CATALOG_OBJ@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
|
||||
CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
|
||||
DEBUG_OBJ = @DEBUG_OBJ@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOCB_OBJ = @DOCB_OBJ@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FTP_OBJ = @FTP_OBJ@
|
||||
GREP = @GREP@
|
||||
HAVE_ISINF = @HAVE_ISINF@
|
||||
HAVE_ISNAN = @HAVE_ISNAN@
|
||||
HTML_DIR = @HTML_DIR@
|
||||
HTML_OBJ = @HTML_OBJ@
|
||||
HTTP_OBJ = @HTTP_OBJ@
|
||||
ICONV_LIBS = @ICONV_LIBS@
|
||||
ICU_CFLAGS = @ICU_CFLAGS@
|
||||
ICU_LIBS = @ICU_LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
|
||||
LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
|
||||
LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
|
||||
LIBXML_VERSION = @LIBXML_VERSION@
|
||||
LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
|
||||
LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
|
||||
LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
LZMA_CFLAGS = @LZMA_CFLAGS@
|
||||
LZMA_LIBS = @LZMA_LIBS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MODULE_EXTENSION = @MODULE_EXTENSION@
|
||||
MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
|
||||
MV = @MV@
|
||||
M_LIBS = @M_LIBS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
PYTHON = @PYTHON@
|
||||
PYTHON_INCLUDES = @PYTHON_INCLUDES@
|
||||
PYTHON_LIBS = @PYTHON_LIBS@
|
||||
PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
|
||||
PYTHON_SUBDIR = @PYTHON_SUBDIR@
|
||||
PYTHON_TESTS = @PYTHON_TESTS@
|
||||
PYTHON_VERSION = @PYTHON_VERSION@
|
||||
RANLIB = @RANLIB@
|
||||
RDL_LIBS = @RDL_LIBS@
|
||||
READER_TEST = @READER_TEST@
|
||||
RELDATE = @RELDATE@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STATIC_BINARIES = @STATIC_BINARIES@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
TEST_C14N = @TEST_C14N@
|
||||
TEST_CATALOG = @TEST_CATALOG@
|
||||
TEST_DEBUG = @TEST_DEBUG@
|
||||
TEST_HTML = @TEST_HTML@
|
||||
TEST_MODULES = @TEST_MODULES@
|
||||
TEST_PATTERN = @TEST_PATTERN@
|
||||
TEST_PHTML = @TEST_PHTML@
|
||||
TEST_PUSH = @TEST_PUSH@
|
||||
TEST_REGEXPS = @TEST_REGEXPS@
|
||||
TEST_SAX = @TEST_SAX@
|
||||
TEST_SCHEMAS = @TEST_SCHEMAS@
|
||||
TEST_SCHEMATRON = @TEST_SCHEMATRON@
|
||||
TEST_THREADS = @TEST_THREADS@
|
||||
TEST_VALID = @TEST_VALID@
|
||||
TEST_VTIME = @TEST_VTIME@
|
||||
TEST_XINCLUDE = @TEST_XINCLUDE@
|
||||
TEST_XPATH = @TEST_XPATH@
|
||||
TEST_XPTR = @TEST_XPTR@
|
||||
THREAD_CFLAGS = @THREAD_CFLAGS@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
VERSION = @VERSION@
|
||||
VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
|
||||
WGET = @WGET@
|
||||
WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
|
||||
WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
|
||||
WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
|
||||
WITH_C14N = @WITH_C14N@
|
||||
WITH_CATALOG = @WITH_CATALOG@
|
||||
WITH_DEBUG = @WITH_DEBUG@
|
||||
WITH_DOCB = @WITH_DOCB@
|
||||
WITH_FTP = @WITH_FTP@
|
||||
WITH_HTML = @WITH_HTML@
|
||||
WITH_HTTP = @WITH_HTTP@
|
||||
WITH_ICONV = @WITH_ICONV@
|
||||
WITH_ICU = @WITH_ICU@
|
||||
WITH_ISO8859X = @WITH_ISO8859X@
|
||||
WITH_LEGACY = @WITH_LEGACY@
|
||||
WITH_LZMA = @WITH_LZMA@
|
||||
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
|
||||
WITH_MODULES = @WITH_MODULES@
|
||||
WITH_OUTPUT = @WITH_OUTPUT@
|
||||
WITH_PATTERN = @WITH_PATTERN@
|
||||
WITH_PUSH = @WITH_PUSH@
|
||||
WITH_READER = @WITH_READER@
|
||||
WITH_REGEXPS = @WITH_REGEXPS@
|
||||
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
|
||||
WITH_SAX1 = @WITH_SAX1@
|
||||
WITH_SCHEMAS = @WITH_SCHEMAS@
|
||||
WITH_SCHEMATRON = @WITH_SCHEMATRON@
|
||||
WITH_THREADS = @WITH_THREADS@
|
||||
WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
|
||||
WITH_TREE = @WITH_TREE@
|
||||
WITH_TRIO = @WITH_TRIO@
|
||||
WITH_VALID = @WITH_VALID@
|
||||
WITH_WRITER = @WITH_WRITER@
|
||||
WITH_XINCLUDE = @WITH_XINCLUDE@
|
||||
WITH_XPATH = @WITH_XPATH@
|
||||
WITH_XPTR = @WITH_XPTR@
|
||||
WITH_ZLIB = @WITH_ZLIB@
|
||||
XINCLUDE_OBJ = @XINCLUDE_OBJ@
|
||||
XMLLINT = @XMLLINT@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_INCLUDEDIR = @XML_INCLUDEDIR@
|
||||
XML_LIBDIR = @XML_LIBDIR@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
|
||||
XPATH_OBJ = @XPATH_OBJ@
|
||||
XPTR_OBJ = @XPTR_OBJ@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
Z_CFLAGS = @Z_CFLAGS@
|
||||
Z_LIBS = @Z_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
pythondir = @pythondir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
xmlincdir = $(includedir)/libxml2/libxml
|
||||
xmlinc_HEADERS = \
|
||||
SAX.h \
|
||||
entities.h \
|
||||
encoding.h \
|
||||
parser.h \
|
||||
parserInternals.h \
|
||||
xmlerror.h \
|
||||
HTMLparser.h \
|
||||
HTMLtree.h \
|
||||
debugXML.h \
|
||||
tree.h \
|
||||
list.h \
|
||||
hash.h \
|
||||
xpath.h \
|
||||
xpathInternals.h \
|
||||
xpointer.h \
|
||||
xinclude.h \
|
||||
xmlIO.h \
|
||||
xmlmemory.h \
|
||||
nanohttp.h \
|
||||
nanoftp.h \
|
||||
uri.h \
|
||||
valid.h \
|
||||
xlink.h \
|
||||
xmlversion.h \
|
||||
DOCBparser.h \
|
||||
catalog.h \
|
||||
threads.h \
|
||||
globals.h \
|
||||
c14n.h \
|
||||
xmlautomata.h \
|
||||
xmlregexp.h \
|
||||
xmlmodule.h \
|
||||
xmlschemas.h \
|
||||
schemasInternals.h \
|
||||
xmlschemastypes.h \
|
||||
xmlstring.h \
|
||||
xmlunicode.h \
|
||||
xmlreader.h \
|
||||
relaxng.h \
|
||||
dict.h \
|
||||
SAX2.h \
|
||||
xmlexports.h \
|
||||
xmlwriter.h \
|
||||
chvalid.h \
|
||||
pattern.h \
|
||||
xmlsave.h \
|
||||
schematron.h
|
||||
|
||||
EXTRA_DIST = xmlversion.h.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/libxml/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
xmlversion.h: $(top_builddir)/config.status $(srcdir)/xmlversion.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-xmlincHEADERS: $(xmlinc_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(xmlincdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(xmlincdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlincdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlincdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-xmlincHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(xmlincdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(xmlincdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-xmlincHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-xmlincHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
install-xmlincHEADERS installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-xmlincHEADERS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -98,7 +98,9 @@ XMLPUBFUN void XMLCALL
|
|||
xmlSAX2StartDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndDocument (void *ctx);
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
|
||||
defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
|
@ -106,7 +108,7 @@ XMLPUBFUN void XMLCALL
|
|||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
|
||||
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Summary: string dictionnary
|
||||
* Summary: string dictionary
|
||||
* Description: dictionary of reusable strings, just used to avoid allocation
|
||||
* and freeing operations.
|
||||
*
|
||||
|
@ -11,6 +11,19 @@
|
|||
#ifndef __XML_DICT_H__
|
||||
#define __XML_DICT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define __XML_EXTERNC extern "C"
|
||||
#else
|
||||
#define __XML_EXTERNC
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The dictionary.
|
||||
*/
|
||||
__XML_EXTERNC typedef struct _xmlDict xmlDict;
|
||||
__XML_EXTERNC typedef xmlDict *xmlDictPtr;
|
||||
|
||||
#include <limits.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
|
@ -19,16 +32,20 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*
|
||||
* The dictionnary.
|
||||
* Initializer
|
||||
*/
|
||||
typedef struct _xmlDict xmlDict;
|
||||
typedef xmlDict *xmlDictPtr;
|
||||
XMLPUBFUN int XMLCALL xmlInitializeDict(void);
|
||||
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
xmlDictCreate (void);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlDictSetLimit (xmlDictPtr dict,
|
||||
size_t limit);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlDictGetUsage (xmlDictPtr dict);
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
xmlDictCreateSub(xmlDictPtr sub);
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
@ -37,7 +54,7 @@ XMLPUBFUN void XMLCALL
|
|||
xmlDictFree (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Lookup of entry in the dictionnary.
|
||||
* Lookup of entry in the dictionary.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictLookup (xmlDictPtr dict,
|
||||
|
|
|
@ -26,24 +26,9 @@
|
|||
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
#include <iconv.h>
|
||||
#else
|
||||
#endif
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
#include <unicode/ucnv.h>
|
||||
#if 0
|
||||
/* Forward-declare UConverter here rather than pulling in <unicode/ucnv.h>
|
||||
* to prevent unwanted ICU symbols being exposed to users of libxml2.
|
||||
* One particular case is Qt4 conflicting on UChar32.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
struct UConverter;
|
||||
typedef struct UConverter UConverter;
|
||||
#ifdef _MSC_VER
|
||||
typedef wchar_t UChar;
|
||||
#else
|
||||
typedef uint16_t UChar;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -57,8 +57,9 @@ struct _xmlEntity {
|
|||
const xmlChar *URI; /* the full URI as computed */
|
||||
int owner; /* does the entity own the childrens */
|
||||
int checked; /* was the entity content checked */
|
||||
/* this is also used to count entites
|
||||
* references done from that entity */
|
||||
/* this is also used to count entities
|
||||
* references done from that entity
|
||||
* and if it contains '<' */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -102,7 +103,7 @@ XMLPUBFUN xmlEntityPtr XMLCALL
|
|||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetPredefinedEntity (const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDocEntity (xmlDocPtr doc,
|
||||
xmlGetDocEntity (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDtdEntity (xmlDocPtr doc,
|
||||
|
@ -119,7 +120,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlEncodeSpecialChars (xmlDocPtr doc,
|
||||
xmlEncodeSpecialChars (const xmlDoc *doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
xmlCreateEntitiesTable (void);
|
||||
|
|
|
@ -39,7 +39,9 @@ XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
|
|||
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
|
||||
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
|
||||
/**
|
||||
* xmlOutputBufferCreateFilenameFunc:
|
||||
|
@ -52,7 +54,9 @@ typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const
|
|||
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
|
||||
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
@ -185,7 +189,8 @@ XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregi
|
|||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/*
|
||||
|
@ -297,7 +302,8 @@ XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
|
|||
#else
|
||||
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
#endif
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
|
@ -479,7 +485,8 @@ XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
|
|||
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
|
||||
__xmlParserInputBufferCreateFilenameValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserInputBufferCreateFilenameValue \
|
||||
(*(__xmlParserInputBufferCreateFilenameValue()))
|
||||
|
|
|
@ -15,6 +15,26 @@
|
|||
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
|
||||
/* Needed for portability to Windows 64 bits */
|
||||
#if defined(__MINGW32__) || defined(_WIN32_WCE)
|
||||
#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
|
||||
|
@ -114,7 +134,7 @@ XMLPUBFUN int XMLCALL
|
|||
xmlNanoFTPDele (void *ctx,
|
||||
const char *file);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetConnection (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCloseConnection(void *ctx);
|
||||
|
@ -123,7 +143,7 @@ XMLPUBFUN int XMLCALL
|
|||
ftpListCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetSocket (void *ctx,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
|
|
@ -260,7 +260,7 @@ struct _xmlParserCtxt {
|
|||
void *catalogs; /* document's own catalog */
|
||||
int recovery; /* run in recovery mode */
|
||||
int progressive; /* is this a progressive parsing */
|
||||
xmlDictPtr dict; /* dictionnary for the parser */
|
||||
xmlDictPtr dict; /* dictionary for the parser */
|
||||
const xmlChar * *atts; /* array for the attributes callbacks */
|
||||
int maxatts; /* the size of the array */
|
||||
int docdict; /* use strings from dict to build tree */
|
||||
|
@ -308,6 +308,9 @@ struct _xmlParserCtxt {
|
|||
int nodeInfoNr; /* Depth of the parsing stack */
|
||||
int nodeInfoMax; /* Max depth of the parsing stack */
|
||||
xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
|
||||
|
||||
int input_id; /* we need to label inputs */
|
||||
unsigned long sizeentcopy; /* volume of entity copy */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1096,7 +1099,7 @@ typedef enum {
|
|||
XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
|
||||
XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
|
||||
XML_PARSE_NONET = 1<<11,/* Forbid network access */
|
||||
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
|
||||
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
|
||||
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
|
||||
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
|
||||
XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
|
||||
|
@ -1105,8 +1108,10 @@ typedef enum {
|
|||
crash if you try to modify the tree) */
|
||||
XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
|
||||
XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
|
||||
XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */
|
||||
XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
|
||||
XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
||||
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
|
||||
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
|
||||
XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
@ -1223,6 +1228,7 @@ typedef enum {
|
|||
XML_WITH_DEBUG_RUN = 30,
|
||||
XML_WITH_ZLIB = 31,
|
||||
XML_WITH_ICU = 32,
|
||||
XML_WITH_LZMA = 33,
|
||||
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
||||
} xmlFeature;
|
||||
|
||||
|
@ -1233,4 +1239,3 @@ XMLPUBFUN int XMLCALL
|
|||
}
|
||||
#endif
|
||||
#endif /* __XML_PARSER_H__ */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Summary: internals routines exported by the parser.
|
||||
* Summary: internals routines and limits exported by the parser.
|
||||
* Description: this module exports a number of internal parsing routines
|
||||
* they are not really all intended for applications but
|
||||
* can prove useful doing low level processing.
|
||||
|
@ -36,9 +36,42 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
|||
* Maximum size allowed for a single text node when building a tree.
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_TEXT_LENGTH 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_NAME_LENGTH:
|
||||
*
|
||||
* Maximum size allowed for a markup identitier
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Note that with the use of parsing dictionaries overriding the limit
|
||||
* may result in more runtime memory usage in face of "unfriendly' content
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_NAME_LENGTH 50000
|
||||
|
||||
/**
|
||||
* XML_MAX_DICTIONARY_LIMIT:
|
||||
*
|
||||
* Maximum size allowed by the parser for a dictionary by default
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_DICTIONARY_LIMIT 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_LOOKUP_LIMIT:
|
||||
*
|
||||
* Maximum size allowed by the parser for ahead lookup
|
||||
* This is an upper boundary enforced by the parser to avoid bad
|
||||
* behaviour on "unfriendly' content
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_LOOKUP_LIMIT 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_NAMELEN:
|
||||
*
|
||||
|
@ -318,7 +351,7 @@ XMLPUBFUN void XMLCALL
|
|||
xmlParserErrors xmlerr,
|
||||
const char *msg,
|
||||
const xmlChar * str1,
|
||||
const xmlChar * str2);
|
||||
const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,9 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
|
|||
*
|
||||
* Signature of an error callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* xmlRelaxNGValidityWarningFunc:
|
||||
|
@ -42,7 +44,9 @@ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg
|
|||
*
|
||||
* Signature of a warning callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
|
|
|
@ -28,52 +28,52 @@ extern "C" {
|
|||
|
||||
typedef enum {
|
||||
XML_SCHEMAS_UNKNOWN = 0,
|
||||
XML_SCHEMAS_STRING,
|
||||
XML_SCHEMAS_NORMSTRING,
|
||||
XML_SCHEMAS_DECIMAL,
|
||||
XML_SCHEMAS_TIME,
|
||||
XML_SCHEMAS_GDAY,
|
||||
XML_SCHEMAS_GMONTH,
|
||||
XML_SCHEMAS_GMONTHDAY,
|
||||
XML_SCHEMAS_GYEAR,
|
||||
XML_SCHEMAS_GYEARMONTH,
|
||||
XML_SCHEMAS_DATE,
|
||||
XML_SCHEMAS_DATETIME,
|
||||
XML_SCHEMAS_DURATION,
|
||||
XML_SCHEMAS_FLOAT,
|
||||
XML_SCHEMAS_DOUBLE,
|
||||
XML_SCHEMAS_BOOLEAN,
|
||||
XML_SCHEMAS_TOKEN,
|
||||
XML_SCHEMAS_LANGUAGE,
|
||||
XML_SCHEMAS_NMTOKEN,
|
||||
XML_SCHEMAS_NMTOKENS,
|
||||
XML_SCHEMAS_NAME,
|
||||
XML_SCHEMAS_QNAME,
|
||||
XML_SCHEMAS_NCNAME,
|
||||
XML_SCHEMAS_ID,
|
||||
XML_SCHEMAS_IDREF,
|
||||
XML_SCHEMAS_IDREFS,
|
||||
XML_SCHEMAS_ENTITY,
|
||||
XML_SCHEMAS_ENTITIES,
|
||||
XML_SCHEMAS_NOTATION,
|
||||
XML_SCHEMAS_ANYURI,
|
||||
XML_SCHEMAS_INTEGER,
|
||||
XML_SCHEMAS_NPINTEGER,
|
||||
XML_SCHEMAS_NINTEGER,
|
||||
XML_SCHEMAS_NNINTEGER,
|
||||
XML_SCHEMAS_PINTEGER,
|
||||
XML_SCHEMAS_INT,
|
||||
XML_SCHEMAS_UINT,
|
||||
XML_SCHEMAS_LONG,
|
||||
XML_SCHEMAS_ULONG,
|
||||
XML_SCHEMAS_SHORT,
|
||||
XML_SCHEMAS_USHORT,
|
||||
XML_SCHEMAS_BYTE,
|
||||
XML_SCHEMAS_UBYTE,
|
||||
XML_SCHEMAS_HEXBINARY,
|
||||
XML_SCHEMAS_BASE64BINARY,
|
||||
XML_SCHEMAS_ANYTYPE,
|
||||
XML_SCHEMAS_ANYSIMPLETYPE
|
||||
XML_SCHEMAS_STRING = 1,
|
||||
XML_SCHEMAS_NORMSTRING = 2,
|
||||
XML_SCHEMAS_DECIMAL = 3,
|
||||
XML_SCHEMAS_TIME = 4,
|
||||
XML_SCHEMAS_GDAY = 5,
|
||||
XML_SCHEMAS_GMONTH = 6,
|
||||
XML_SCHEMAS_GMONTHDAY = 7,
|
||||
XML_SCHEMAS_GYEAR = 8,
|
||||
XML_SCHEMAS_GYEARMONTH = 9,
|
||||
XML_SCHEMAS_DATE = 10,
|
||||
XML_SCHEMAS_DATETIME = 11,
|
||||
XML_SCHEMAS_DURATION = 12,
|
||||
XML_SCHEMAS_FLOAT = 13,
|
||||
XML_SCHEMAS_DOUBLE = 14,
|
||||
XML_SCHEMAS_BOOLEAN = 15,
|
||||
XML_SCHEMAS_TOKEN = 16,
|
||||
XML_SCHEMAS_LANGUAGE = 17,
|
||||
XML_SCHEMAS_NMTOKEN = 18,
|
||||
XML_SCHEMAS_NMTOKENS = 19,
|
||||
XML_SCHEMAS_NAME = 20,
|
||||
XML_SCHEMAS_QNAME = 21,
|
||||
XML_SCHEMAS_NCNAME = 22,
|
||||
XML_SCHEMAS_ID = 23,
|
||||
XML_SCHEMAS_IDREF = 24,
|
||||
XML_SCHEMAS_IDREFS = 25,
|
||||
XML_SCHEMAS_ENTITY = 26,
|
||||
XML_SCHEMAS_ENTITIES = 27,
|
||||
XML_SCHEMAS_NOTATION = 28,
|
||||
XML_SCHEMAS_ANYURI = 29,
|
||||
XML_SCHEMAS_INTEGER = 30,
|
||||
XML_SCHEMAS_NPINTEGER = 31,
|
||||
XML_SCHEMAS_NINTEGER = 32,
|
||||
XML_SCHEMAS_NNINTEGER = 33,
|
||||
XML_SCHEMAS_PINTEGER = 34,
|
||||
XML_SCHEMAS_INT = 35,
|
||||
XML_SCHEMAS_UINT = 36,
|
||||
XML_SCHEMAS_LONG = 37,
|
||||
XML_SCHEMAS_ULONG = 38,
|
||||
XML_SCHEMAS_SHORT = 39,
|
||||
XML_SCHEMAS_USHORT = 40,
|
||||
XML_SCHEMAS_BYTE = 41,
|
||||
XML_SCHEMAS_UBYTE = 42,
|
||||
XML_SCHEMAS_HEXBINARY = 43,
|
||||
XML_SCHEMAS_BASE64BINARY = 44,
|
||||
XML_SCHEMAS_ANYTYPE = 45,
|
||||
XML_SCHEMAS_ANYSIMPLETYPE = 46
|
||||
} xmlSchemaValType;
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define __XML_TREE_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
|
@ -74,13 +75,16 @@ typedef enum {
|
|||
XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
|
||||
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
|
||||
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
|
||||
XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
|
||||
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
|
||||
XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
|
||||
XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
|
||||
} xmlBufferAllocationScheme;
|
||||
|
||||
/**
|
||||
* xmlBuffer:
|
||||
*
|
||||
* A buffer structure.
|
||||
* A buffer structure, this old construct is limited to 2GB and
|
||||
* is being deprecated, use API with xmlBuf instead
|
||||
*/
|
||||
typedef struct _xmlBuffer xmlBuffer;
|
||||
typedef xmlBuffer *xmlBufferPtr;
|
||||
|
@ -92,6 +96,41 @@ struct _xmlBuffer {
|
|||
xmlChar *contentIO; /* in IO mode we may have a different base */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlBuf:
|
||||
*
|
||||
* A buffer structure, new one, the actual structure internals are not public
|
||||
*/
|
||||
|
||||
typedef struct _xmlBuf xmlBuf;
|
||||
|
||||
/**
|
||||
* xmlBufPtr:
|
||||
*
|
||||
* A pointer to a buffer structure, the actual structure internals are not
|
||||
* public
|
||||
*/
|
||||
|
||||
typedef xmlBuf *xmlBufPtr;
|
||||
|
||||
/*
|
||||
* A few public routines for xmlBuf. As those are expected to be used
|
||||
* mostly internally the bulk of the routines are internal in buf.h
|
||||
*/
|
||||
XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf);
|
||||
XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf);
|
||||
XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf);
|
||||
XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len);
|
||||
|
||||
/*
|
||||
* LIBXML2_NEW_BUFFER:
|
||||
*
|
||||
* Macro used to express that the API use the new buffers for
|
||||
* xmlParserInputBuffer and xmlOutputBuffer. The change was
|
||||
* introduced in 2.9.0.
|
||||
*/
|
||||
#define LIBXML2_NEW_BUFFER
|
||||
|
||||
/**
|
||||
* XML_XML_NAMESPACE:
|
||||
*
|
||||
|
@ -351,7 +390,6 @@ struct _xmlNs {
|
|||
struct _xmlNs *next; /* next Ns link for this node */
|
||||
xmlNsType type; /* global or local */
|
||||
const xmlChar *href; /* URL for the namespace */
|
||||
const char* dummy_children; /* lines up with node->children */
|
||||
const xmlChar *prefix; /* prefix for the namespace */
|
||||
void *_private; /* application data */
|
||||
struct _xmlDoc *context; /* normally an xmlDoc */
|
||||
|
@ -617,7 +655,11 @@ struct _xmlDOMWrapCtxt {
|
|||
/*
|
||||
* Some helper functions
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \
|
||||
defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
|
||||
defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
|
||||
defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNCName (const xmlChar *value,
|
||||
int space);
|
||||
|
@ -648,7 +690,7 @@ XMLPUBFUN const xmlChar * XMLCALL
|
|||
int *len);
|
||||
|
||||
/*
|
||||
* Handling Buffers.
|
||||
* Handling Buffers, the old ones see @xmlBuf for the new ones.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
@ -694,12 +736,14 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferEmpty (xmlBufferPtr buf);
|
||||
XMLPUBFUN const xmlChar* XMLCALL
|
||||
xmlBufferContent (const xmlBufferPtr buf);
|
||||
xmlBufferContent (const xmlBuffer *buf);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
xmlBufferDetach (xmlBufferPtr buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
|
||||
xmlBufferAllocationScheme scheme);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferLength (const xmlBufferPtr buf);
|
||||
xmlBufferLength (const xmlBuffer *buf);
|
||||
|
||||
/*
|
||||
* Creating/freeing new structures.
|
||||
|
@ -715,7 +759,7 @@ XMLPUBFUN xmlDtdPtr XMLCALL
|
|||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlGetIntSubset (xmlDocPtr doc);
|
||||
xmlGetIntSubset (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDtd (xmlDtdPtr cur);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
|
@ -803,7 +847,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||
const xmlChar *content);
|
||||
#endif
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocText (xmlDocPtr doc,
|
||||
xmlNewDocText (const xmlDoc *doc,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewText (const xmlChar *content);
|
||||
|
@ -834,20 +878,20 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||
xmlNewCharRef (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewReference (xmlDocPtr doc,
|
||||
xmlNewReference (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNode (const xmlNodePtr node,
|
||||
xmlCopyNode (xmlNodePtr node,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocCopyNode (const xmlNodePtr node,
|
||||
xmlDocCopyNode (xmlNodePtr node,
|
||||
xmlDocPtr doc,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocCopyNodeList (xmlDocPtr doc,
|
||||
const xmlNodePtr node);
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNodeList (const xmlNodePtr node);
|
||||
xmlCopyNodeList (xmlNodePtr node);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewTextChild (xmlNodePtr parent,
|
||||
|
@ -867,19 +911,19 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||
* Navigating.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlGetLineNo (xmlNodePtr node);
|
||||
xmlGetLineNo (const xmlNode *node);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNodePath (xmlNodePtr node);
|
||||
xmlGetNodePath (const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocGetRootElement (xmlDocPtr doc);
|
||||
xmlDocGetRootElement (const xmlDoc *doc);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlGetLastChild (xmlNodePtr parent);
|
||||
xmlGetLastChild (const xmlNode *parent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeIsText (xmlNodePtr node);
|
||||
xmlNodeIsText (const xmlNode *node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsBlankNode (xmlNodePtr node);
|
||||
xmlIsBlankNode (const xmlNode *node);
|
||||
|
||||
/*
|
||||
* Changing the structure.
|
||||
|
@ -906,7 +950,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||
xmlNodePtr cur);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddPrevSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
|
@ -947,10 +991,11 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
|||
xmlSearchNsByHref (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *href);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNsPtr * XMLCALL
|
||||
xmlGetNsList (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
xmlGetNsList (const xmlDoc *doc,
|
||||
const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
@ -964,7 +1009,8 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
|||
/*
|
||||
* Changing the content.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlSetProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
|
@ -974,39 +1020,40 @@ XMLPUBFUN xmlAttrPtr XMLCALL
|
|||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNoNsProp (xmlNodePtr node,
|
||||
xmlGetNoNsProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetProp (xmlNodePtr node,
|
||||
xmlGetProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasProp (xmlNodePtr node,
|
||||
xmlHasProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasNsProp (xmlNodePtr node,
|
||||
xmlHasNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNsProp (xmlNodePtr node,
|
||||
xmlGetNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringGetNodeList (xmlDocPtr doc,
|
||||
xmlStringGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringLenGetNodeList (xmlDocPtr doc,
|
||||
xmlStringLenGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeListGetString (xmlDocPtr doc,
|
||||
xmlNodePtr list,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeListGetRawString (xmlDocPtr doc,
|
||||
xmlNodePtr list,
|
||||
xmlNodeListGetRawString (const xmlDoc *doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
@ -1026,14 +1073,19 @@ XMLPUBFUN void XMLCALL
|
|||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetContent (xmlNodePtr cur);
|
||||
xmlNodeGetContent (const xmlNode *cur);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeBufGetContent (xmlBufferPtr buffer,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetLang (xmlNodePtr cur);
|
||||
const xmlNode *cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeGetSpacePreserve (xmlNodePtr cur);
|
||||
xmlBufGetNodeContent (xmlBufPtr buf,
|
||||
const xmlNode *cur);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetLang (const xmlNode *cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeGetSpacePreserve (const xmlNode *cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetLang (xmlNodePtr cur,
|
||||
|
@ -1043,8 +1095,8 @@ XMLPUBFUN void XMLCALL
|
|||
int val);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetBase (xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
xmlNodeGetBase (const xmlDoc *doc,
|
||||
const xmlNode *cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetBase (xmlNodePtr cur,
|
||||
|
@ -1137,6 +1189,12 @@ XMLPUBFUN int XMLCALL
|
|||
xmlSaveFormatFile (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
int format);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlBufNodeDump (xmlBufPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
int level,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
|
@ -1184,7 +1242,7 @@ XMLPUBFUN int XMLCALL
|
|||
* Compression.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetDocCompressMode (xmlDocPtr doc);
|
||||
xmlGetDocCompressMode (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetDocCompressMode (xmlDocPtr doc,
|
||||
int mode);
|
||||
|
|
|
@ -129,8 +129,8 @@ struct _xmlParserInputBuffer {
|
|||
|
||||
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
||||
|
||||
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
|
||||
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
|
||||
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
|
||||
xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
|
||||
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
|
||||
int error;
|
||||
unsigned long rawconsumed;/* amount consumed from raw */
|
||||
|
@ -145,8 +145,8 @@ struct _xmlOutputBuffer {
|
|||
|
||||
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
||||
|
||||
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
||||
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
|
||||
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
||||
xmlBufPtr conv; /* if encoder != NULL buffer for output */
|
||||
int written; /* total number of byte written */
|
||||
int error;
|
||||
};
|
||||
|
@ -245,6 +245,12 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
|||
void *ioctx,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
/* Couple of APIs to get the output without digging into the buffers */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
||||
int len,
|
||||
|
|
|
@ -62,7 +62,9 @@ typedef enum {
|
|||
XML_FROM_WRITER, /* The xmlwriter module */
|
||||
XML_FROM_MODULE, /* The dynamically loaded module module*/
|
||||
XML_FROM_I18N, /* The module handling character conversion */
|
||||
XML_FROM_SCHEMATRONV /* The Schematron validator module */
|
||||
XML_FROM_SCHEMATRONV,/* The Schematron validator module */
|
||||
XML_FROM_BUFFER, /* The buffers module */
|
||||
XML_FROM_URI /* The URI module */
|
||||
} xmlErrorDomain;
|
||||
|
||||
/**
|
||||
|
@ -84,7 +86,7 @@ struct _xmlError {
|
|||
char *str2; /* extra string information */
|
||||
char *str3; /* extra string information */
|
||||
int int1; /* extra number information */
|
||||
int int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
|
||||
int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
|
||||
void *ctxt; /* the parser context if available */
|
||||
void *node; /* the node in the tree */
|
||||
};
|
||||
|
@ -205,7 +207,8 @@ typedef enum {
|
|||
XML_WAR_ENTITY_REDEFINED, /* 107 */
|
||||
XML_ERR_UNKNOWN_VERSION, /* 108 */
|
||||
XML_ERR_VERSION_MISMATCH, /* 109 */
|
||||
XML_ERR_USER_STOP, /* 110 */
|
||||
XML_ERR_NAME_TOO_LONG, /* 110 */
|
||||
XML_ERR_USER_STOP, /* 111 */
|
||||
XML_NS_ERR_XML_NAMESPACE = 200,
|
||||
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
||||
XML_NS_ERR_QNAME, /* 202 */
|
||||
|
@ -826,11 +829,8 @@ typedef enum {
|
|||
XML_I18N_NO_HANDLER, /* 6001 */
|
||||
XML_I18N_EXCESS_HANDLER, /* 6002 */
|
||||
XML_I18N_CONV_FAILED, /* 6003 */
|
||||
XML_I18N_NO_OUTPUT /* 6004 */
|
||||
#if 0
|
||||
XML_CHECK_, /* 5033 */
|
||||
XML_CHECK_X /* 503 */
|
||||
#endif
|
||||
XML_I18N_NO_OUTPUT, /* 6004 */
|
||||
XML_BUF_OVERFLOW = 7000
|
||||
} xmlParserErrors;
|
||||
|
||||
/**
|
||||
|
@ -937,7 +937,7 @@ XMLPUBFUN void XMLCALL
|
|||
int code,
|
||||
xmlNodePtr node,
|
||||
const char *msg,
|
||||
const char *extra);
|
||||
const char *extra) LIBXML_ATTR_FORMAT(4,0);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
*/
|
||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||
#define XMLPUBFUN __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport) extern
|
||||
#else
|
||||
#define XMLPUBFUN
|
||||
#if !defined(LIBXML_STATIC)
|
||||
|
|
|
@ -130,16 +130,16 @@ XMLPUBFUN int XMLCALL
|
|||
|
||||
#ifdef LIBXML_WRITER_ENABLED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
|
||||
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
|
||||
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
|
||||
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Attributes of the node
|
||||
|
@ -284,6 +284,11 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
||||
const char *rng);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGValidCtxtPtr ctxt,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGPtr schema);
|
||||
|
@ -398,7 +403,6 @@ typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
|||
xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
||||
/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
|
|
@ -33,7 +33,8 @@ typedef enum {
|
|||
XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
|
||||
XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
|
||||
XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
|
||||
XML_SAVE_AS_HTML = 1<<6 /* force HTML serialization on XML doc */
|
||||
XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
|
||||
XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
|
||||
} xmlSaveOption;
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ typedef xmlSchema *xmlSchemaPtr;
|
|||
*
|
||||
* Signature of an error callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* xmlSchemaValidityWarningFunc:
|
||||
|
@ -102,7 +103,8 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg,
|
|||
*
|
||||
* Signature of a warning callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
|
@ -113,6 +115,22 @@ typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
|
|||
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
|
||||
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
|
||||
|
||||
/**
|
||||
* xmlSchemaValidityLocatorFunc:
|
||||
* @ctx: user provided context
|
||||
* @file: returned file information
|
||||
* @line: returned line information
|
||||
*
|
||||
* A schemas validation locator, a callback called by the validator.
|
||||
* This is used when file or node informations are not available
|
||||
* to find out what file and line number are affected
|
||||
*
|
||||
* Returns: 0 in case of success and -1 in case of error
|
||||
*/
|
||||
|
||||
typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
|
||||
const char **file, unsigned long *line);
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
|
@ -171,6 +189,9 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
|
@ -210,6 +231,13 @@ XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
|
|||
void **user_data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
|
||||
xmlSchemaValidityLocatorFunc f,
|
||||
void *ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -97,13 +97,13 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlStrPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const xmlChar *msg,
|
||||
...);
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrVPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const xmlChar *msg,
|
||||
va_list ap);
|
||||
const char *msg,
|
||||
va_list ap) LIBXML_ATTR_FORMAT(3,0);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetUTF8Char (const unsigned char *utf,
|
||||
|
|
|
@ -97,6 +97,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ALLOC_ENABLED:
|
||||
*
|
||||
* Whether the allocation hooks are per-thread
|
||||
*/
|
||||
#if @WITH_THREAD_ALLOC@
|
||||
#define LIBXML_THREAD_ALLOC_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
|
@ -391,6 +400,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LZMA_ENABLED:
|
||||
*
|
||||
* Whether the Lzma support is compiled in
|
||||
*/
|
||||
#if @WITH_LZMA@
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
|
@ -403,7 +421,11 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -413,7 +435,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* Summary: text writing API for XML
|
||||
* Description: text writing API for XML
|
||||
|
@ -471,6 +470,10 @@ extern "C" {
|
|||
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
|
||||
const xmlChar * str);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
|
||||
|
||||
|
||||
/*
|
||||
* misc
|
||||
*/
|
||||
|
|
|
@ -68,7 +68,9 @@ typedef enum {
|
|||
XPATH_UNDEF_PREFIX_ERROR,
|
||||
XPATH_ENCODING_ERROR,
|
||||
XPATH_INVALID_CHAR_ERROR,
|
||||
XPATH_INVALID_CTXT
|
||||
XPATH_INVALID_CTXT,
|
||||
XPATH_STACK_ERROR,
|
||||
XPATH_FORBID_VARIABLE_ERROR
|
||||
} xmlXPathError;
|
||||
|
||||
/*
|
||||
|
@ -380,6 +382,8 @@ struct _xmlXPathParserContext {
|
|||
xmlXPathCompExprPtr comp; /* the precompiled expression */
|
||||
int xptr; /* it this an XPointer expression */
|
||||
xmlNodePtr ancestor; /* used for walking preceding axis */
|
||||
|
||||
int valueFrame; /* used to limit Pop on the stack */
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
@ -504,6 +508,13 @@ XMLPUBFUN int XMLCALL
|
|||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlXPathOrderDocElems (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathSetContextNode (xmlNodePtr node,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNodeEval (xmlNodePtr node,
|
||||
const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
|
|
|
@ -229,7 +229,7 @@ XMLPUBFUN void * XMLCALL
|
|||
* Empties a node-set.
|
||||
*/
|
||||
#define xmlXPathEmptyNodeSet(ns) \
|
||||
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
|
||||
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; }
|
||||
|
||||
/**
|
||||
* CHECK_ERROR:
|
||||
|
@ -296,7 +296,9 @@ XMLPUBFUN void * XMLCALL
|
|||
#define CHECK_ARITY(x) \
|
||||
if (ctxt == NULL) return; \
|
||||
if (nargs != (x)) \
|
||||
XP_ERROR(XPATH_INVALID_ARITY);
|
||||
XP_ERROR(XPATH_INVALID_ARITY); \
|
||||
if (ctxt->valueNr < ctxt->valueFrame + (x)) \
|
||||
XP_ERROR(XPATH_STACK_ERROR);
|
||||
|
||||
/**
|
||||
* CAST_TO_STRING:
|
||||
|
@ -498,13 +500,13 @@ XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
|||
xmlXPathNewNodeSet (xmlNodePtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewValueTree (xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
|
||||
xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#define HAVE_STDARG_H
|
||||
#define HAVE_MALLOC_H
|
||||
#define HAVE_ERRNO_H
|
||||
#define SEND_ARG2_CAST
|
||||
#define GETHOSTBYNAME_ARG_CAST
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
#undef HAVE_ERRNO_H
|
||||
|
@ -95,7 +97,9 @@ static int isnan (double d) {
|
|||
|
||||
#if defined(_MSC_VER)
|
||||
#define mkdir(p,m) _mkdir(p)
|
||||
#if _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#if _MSC_VER < 1500
|
||||
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#if defined( __MINGW32__ ) || defined( _MSC_VER )
|
||||
/* Include <errno.h> here to ensure that it doesn't get included later
|
||||
* (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
|
||||
#include <errno.h>
|
||||
|
@ -39,6 +39,9 @@
|
|||
#endif
|
||||
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
|
||||
#if (!defined(_MSC_VER) || (_MSC_VER < 1600))
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EALREADY WSAEALREADY
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
|
@ -61,7 +64,6 @@
|
|||
#define ENOBUFS WSAENOBUFS
|
||||
#define EISCONN WSAEISCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#define ETOOMANYREFS WSAETOOMANYREFS
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
|
@ -79,5 +81,6 @@
|
|||
#define ENAMETOOLONG WSAENAMETOOLONG
|
||||
#define ENOTEMPTY WSAENOTEMPTY
|
||||
*/
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#endif /* __XML_WSOCKCOMPAT_H__ */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC
|
|||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
|
@ -156,6 +156,10 @@ while test $# -ne 0; do
|
|||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -194,13 +202,17 @@ if test $# -eq 0; then
|
|||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
|
@ -228,9 +240,9 @@ fi
|
|||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
|
@ -252,12 +264,7 @@ do
|
|||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
|
@ -347,7 +354,7 @@ do
|
|||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
|
@ -385,7 +392,7 @@ do
|
|||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
|
@ -403,7 +410,7 @@ do
|
|||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
|
|
|
@ -8,5 +8,5 @@ Name: libXML
|
|||
Version: @VERSION@
|
||||
Description: libXML library version2.
|
||||
Requires:
|
||||
Libs: -L${libdir} -lxml2 @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
|
||||
Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
|
||||
Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@
|
||||
|
|
|
@ -9,5 +9,5 @@ Version: @VERSION@
|
|||
Description: libXML library version2.
|
||||
Requires:
|
||||
Libs: -L${libdir} -lxml2
|
||||
Libs.private: @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
|
||||
Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
|
||||
Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
.TH libxml 3 "12 April 2000"
|
||||
.SH NAME
|
||||
libxml \- library used to parse XML files
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.I libxml
|
||||
library is used to parse XML files.
|
||||
Its internal document representation is as close as possible to the
|
||||
.I DOM
|
||||
(Document Object Model) interface,
|
||||
an API for accessing XML or HTML structured documents.
|
||||
.LP
|
||||
The
|
||||
.I libxml
|
||||
library also has a
|
||||
.IR SAX -like
|
||||
interface,
|
||||
which is designed to be compatible with
|
||||
.IR expat (1).
|
||||
NOTE:
|
||||
.IR SAX ,
|
||||
the Simple API for XML,
|
||||
is a standard interface for event-based XML parsing,
|
||||
developed collaboratively by the members of the XML-DEV mailing list,
|
||||
currently hosted by OASIS.
|
||||
The
|
||||
.I expat
|
||||
library is a XML 1.0 parser written in C,
|
||||
which aims to be fully conforming.
|
||||
It is currently not a validating XML processor.
|
||||
.LP
|
||||
The
|
||||
.I libxml
|
||||
library now includes a nearly complete
|
||||
.I XPath
|
||||
implementation.
|
||||
The
|
||||
.I XPath
|
||||
(XML Path Language) is a language for addressing parts of an
|
||||
XML document,
|
||||
designed to be used by both
|
||||
.I XSLT
|
||||
and
|
||||
.IR XPointer .
|
||||
.LP
|
||||
The
|
||||
.I libxml
|
||||
library exports Push and Pull type parser interfaces for both XML and
|
||||
.IR html .
|
||||
.SH FILES
|
||||
.TP 2.2i
|
||||
.B /depot/lib/libxml_2.0.0/libxml.a
|
||||
static library
|
||||
.TP
|
||||
.B /depot/lib/libxml_2.0.0/libxml.so
|
||||
shared library
|
||||
.TP
|
||||
.B /depot/package/libxml_2.0.0/bin/xmllint
|
||||
binary application for parsing XML files
|
||||
.SH AUTHORS
|
||||
Daniel Veillard (daniel@veillard.com).
|
||||
Red Hat Inc.
|
||||
Manual page by Ziying Sherwin (sherwin@nlm.nih.gov),
|
||||
Lister Hill National Center for Biomedical Communications,
|
||||
U.S. National Library of Medicine.
|
||||
.SH SEE ALSO
|
||||
.IR xmllint (1),
|
||||
.IR libxslt (3),
|
||||
.IR libexslt (3),
|
||||
.IR xsltproc (1)
|
||||
.\" end of manual page
|
|
@ -9,6 +9,8 @@
|
|||
#ifndef __XML_LIBXML_H__
|
||||
#define __XML_LIBXML_H__
|
||||
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifndef NO_LARGEFILE_SOURCE
|
||||
#ifndef _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE_SOURCE
|
||||
|
@ -29,6 +31,11 @@
|
|||
#include <win32config.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#else
|
||||
/*
|
||||
* Currently supported platforms use either autoconf or
|
||||
* copy to config.h own "preset" configuration file.
|
||||
* As result ifdef HAVE_CONFIG_H is omited here.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <libxml/xmlversion.h>
|
||||
#endif
|
||||
|
@ -63,7 +70,7 @@ extern int __xmlRegisterCallbacks;
|
|||
* internal error reporting routines, shared but not partof the API.
|
||||
*/
|
||||
void __xmlIOErr(int domain, int code, const char *extra);
|
||||
void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
|
||||
void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
/*
|
||||
* internal function of HTML parser needed for xmlParseInNodeContext
|
||||
|
@ -79,6 +86,18 @@ void __xmlGlobalInitMutexLock(void);
|
|||
void __xmlGlobalInitMutexUnlock(void);
|
||||
void __xmlGlobalInitMutexDestroy(void);
|
||||
|
||||
int __xmlInitializeDict(void);
|
||||
|
||||
#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
|
||||
/*
|
||||
* internal thread safe random function
|
||||
*/
|
||||
int __xmlRandom(void);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
|
||||
int xmlNop(void);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
#ifdef __GNUC__
|
||||
#ifdef PIC
|
||||
|
@ -90,7 +109,7 @@ void __xmlGlobalInitMutexDestroy(void);
|
|||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifndef PIC
|
||||
#if !defined(PIC) && !defined(NOLIBTOOL)
|
||||
# define LIBXML_STATIC
|
||||
#endif
|
||||
#endif /* ! __XML_LIBXML_H__ */
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
%global with_python3 1
|
||||
|
||||
Summary: Library providing XML and HTML support
|
||||
Name: libxml2
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
Release: 1%{?dist}%{?extra_release}
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
BuildRequires: python python-devel zlib-devel pkgconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif # with_python3
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xz-devel
|
||||
URL: http://xmlsoft.org/
|
||||
|
||||
%description
|
||||
|
@ -16,7 +24,7 @@ this includes parsing and validation even with complex DtDs, either
|
|||
at parse time or later once the document has been modified. The output
|
||||
can be a simple SAX stream or and in-memory DOM like representations.
|
||||
In this case one can use the built-in XPath and XPointer implementation
|
||||
to select subnodes or ranges. A flexible Input/Output mechanism is
|
||||
to select sub nodes or ranges. A flexible Input/Output mechanism is
|
||||
available, with existing HTTP and FTP modules and combined to an
|
||||
URI library.
|
||||
|
||||
|
@ -25,6 +33,7 @@ Summary: Libraries, includes, etc. to develop XML and HTML applications
|
|||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
Requires: zlib-devel
|
||||
Requires: xz-devel
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
|
@ -35,19 +44,27 @@ this includes parsing and validation even with complex DtDs, either
|
|||
at parse time or later once the document has been modified. The output
|
||||
can be a simple SAX stream or and in-memory DOM like representations.
|
||||
In this case one can use the built-in XPath and XPointer implementation
|
||||
to select subnodes or ranges. A flexible Input/Output mechanism is
|
||||
to select sub nodes or ranges. A flexible Input/Output mechanism is
|
||||
available, with existing HTTP and FTP modules and combined to an
|
||||
URI library.
|
||||
|
||||
%package static
|
||||
Summary: Static library for libxml2
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
Static library for libxml2 provided for specific uses or shaving a few
|
||||
microseconds when parsing, do not link to them for generic purpose packages.
|
||||
|
||||
%package python
|
||||
Summary: Python bindings for the libxml2 library
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
Requires: python
|
||||
|
||||
%description python
|
||||
The libxml2-python package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
The libxml2-python package contains a Python 2 module that permits applications
|
||||
written in the Python programming language, version 2, to use the interface
|
||||
supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
|
@ -55,35 +72,64 @@ to read, modify and write XML and HTML files. There is DTDs support
|
|||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package python3
|
||||
Summary: Python 3 bindings for the libxml2 library
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description python3
|
||||
The libxml2-python3 package contains a Python 3 module that permits
|
||||
applications written in the Python programming language, version 3, to use the
|
||||
interface supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
to read, modify and write XML and HTML files. There is DTDs support
|
||||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{_smp_mflags}
|
||||
gzip -9 ChangeLog
|
||||
|
||||
%install
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%makeinstall
|
||||
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
||||
gzip -9 doc/libxml2-api.xml
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
make clean
|
||||
%configure --with-python=%{__python3}
|
||||
make install DESTDIR=%{buildroot}
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
|
||||
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
||||
gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
||||
|
||||
%check
|
||||
make runtests
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
|
||||
%doc AUTHORS NEWS README Copyright TODO
|
||||
%doc %{_mandir}/man1/xmllint.1*
|
||||
%doc %{_mandir}/man1/xmlcatalog.1*
|
||||
%doc %{_mandir}/man3/libxml.3*
|
||||
|
@ -96,7 +142,7 @@ rm -fr %{buildroot}
|
|||
%defattr(-, root, root)
|
||||
|
||||
%doc %{_mandir}/man1/xml2-config.1*
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright
|
||||
%doc AUTHORS NEWS README Copyright
|
||||
%doc doc/*.html doc/html doc/*.gif doc/*.png
|
||||
%doc doc/tutorial doc/libxml2-api.xml.gz
|
||||
%doc doc/examples
|
||||
|
@ -107,25 +153,46 @@ rm -fr %{buildroot}
|
|||
%doc %{_datadir}/gtk-doc/html/libxml2/*.css
|
||||
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/*a
|
||||
%{_libdir}/*.sh
|
||||
%{_includedir}/*
|
||||
%{_bindir}/xml2-config
|
||||
%{_datadir}/aclocal/libxml.m4
|
||||
%{_libdir}/pkgconfig/libxml-2.0.pc
|
||||
%{_libdir}/cmake/libxml2/libxml2-config.cmake
|
||||
|
||||
%files static
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/*a
|
||||
|
||||
%files python
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright
|
||||
%{_libdir}/python*/site-packages/libxml2.py*
|
||||
%{_libdir}/python*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python*/site-packages/libxml2mod*
|
||||
%{_libdir}/python2*/site-packages/libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files python3
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/python3*/site-packages/libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* @RELDATE@ Daniel Veillard <veillard@redhat.com>
|
||||
- upstream release @VERSION@ see http://xmlsoft.org/news.html
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
# libxml2-config.cmake
|
||||
# --------------------
|
||||
#
|
||||
# Libxml2 cmake module.
|
||||
# THis module sets the following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LIBXML2_INCLUDE_DIRS - Directory where libxml2 headers are located.
|
||||
# LIBXML2_LIBRARIES - xml2 libraries to link against.
|
||||
# LIBXML2_VERSION_MAJOR - The major version of libxml2.
|
||||
# LIBXML2_VERSION_MINOR - The minor version of libxml2.
|
||||
# LIBXML2_VERSION_PATCH - The patch version of libxml2.
|
||||
# LIBXML2_VERSION_STRING - version number as a string (ex: "2.3.4")
|
||||
# LIBXML2_MODULES - whether libxml2 as dso support
|
||||
|
||||
get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
|
||||
|
||||
set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@)
|
||||
set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@)
|
||||
set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@)
|
||||
set(LIBXML2_VERSION_STRING "@VERSION@")
|
||||
set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
|
||||
set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include ${_libxml2_rootdir}/include/libxml2)
|
||||
set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
|
||||
set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2)
|
||||
|
||||
if(@WITH_THREADS@)
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND LIBXML2_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
if(@WITH_LZMA@)
|
||||
find_package(LibLZMA REQUIRED)
|
||||
list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES})
|
||||
list(APPEND LIBXML2_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(@WITH_ZLIB@)
|
||||
find_package(ZLIB REQUIRED)
|
||||
list(APPEND LIBXML2_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
list(APPEND LIBXML2_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
list(APPEND LIBXML2_LIBRARIES @ICU_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@)
|
||||
|
||||
# whether libxml2 has dso support
|
||||
set(LIBXML2_MODULES @WITH_MODULES@)
|
||||
|
||||
mark_as_advanced( LIBXML2_INCLUDE_DIRS LIBXML2_LIBRARIES )
|
|
@ -1,12 +1,20 @@
|
|||
%global with_python3 1
|
||||
|
||||
Summary: Library providing XML and HTML support
|
||||
Name: libxml2
|
||||
Version: 2.7.7
|
||||
Release: 1
|
||||
Version: 2.9.4
|
||||
Release: 1%{?dist}%{?extra_release}
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
BuildRequires: python python-devel zlib-devel pkgconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif # with_python3
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xz-devel
|
||||
URL: http://xmlsoft.org/
|
||||
|
||||
%description
|
||||
|
@ -16,7 +24,7 @@ this includes parsing and validation even with complex DtDs, either
|
|||
at parse time or later once the document has been modified. The output
|
||||
can be a simple SAX stream or and in-memory DOM like representations.
|
||||
In this case one can use the built-in XPath and XPointer implementation
|
||||
to select subnodes or ranges. A flexible Input/Output mechanism is
|
||||
to select sub nodes or ranges. A flexible Input/Output mechanism is
|
||||
available, with existing HTTP and FTP modules and combined to an
|
||||
URI library.
|
||||
|
||||
|
@ -25,6 +33,7 @@ Summary: Libraries, includes, etc. to develop XML and HTML applications
|
|||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
Requires: zlib-devel
|
||||
Requires: xz-devel
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
|
@ -35,19 +44,27 @@ this includes parsing and validation even with complex DtDs, either
|
|||
at parse time or later once the document has been modified. The output
|
||||
can be a simple SAX stream or and in-memory DOM like representations.
|
||||
In this case one can use the built-in XPath and XPointer implementation
|
||||
to select subnodes or ranges. A flexible Input/Output mechanism is
|
||||
to select sub nodes or ranges. A flexible Input/Output mechanism is
|
||||
available, with existing HTTP and FTP modules and combined to an
|
||||
URI library.
|
||||
|
||||
%package static
|
||||
Summary: Static library for libxml2
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
Static library for libxml2 provided for specific uses or shaving a few
|
||||
microseconds when parsing, do not link to them for generic purpose packages.
|
||||
|
||||
%package python
|
||||
Summary: Python bindings for the libxml2 library
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
Requires: python
|
||||
|
||||
%description python
|
||||
The libxml2-python package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
The libxml2-python package contains a Python 2 module that permits applications
|
||||
written in the Python programming language, version 2, to use the interface
|
||||
supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
|
@ -55,35 +72,64 @@ to read, modify and write XML and HTML files. There is DTDs support
|
|||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package python3
|
||||
Summary: Python 3 bindings for the libxml2 library
|
||||
Group: Development/Libraries
|
||||
Requires: libxml2 = %{version}-%{release}
|
||||
|
||||
%description python3
|
||||
The libxml2-python3 package contains a Python 3 module that permits
|
||||
applications written in the Python programming language, version 3, to use the
|
||||
interface supplied by the libxml2 library to manipulate XML files.
|
||||
|
||||
This library allows to manipulate XML files. It includes support
|
||||
to read, modify and write XML and HTML files. There is DTDs support
|
||||
this includes parsing and validation even with complex DTDs, either
|
||||
at parse time or later once the document has been modified.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{_smp_mflags}
|
||||
gzip -9 ChangeLog
|
||||
|
||||
%install
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%makeinstall
|
||||
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
||||
gzip -9 doc/libxml2-api.xml
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
make clean
|
||||
%configure --with-python=%{__python3}
|
||||
make install DESTDIR=%{buildroot}
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
|
||||
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
||||
gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
||||
|
||||
%check
|
||||
make runtests
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
|
||||
%doc AUTHORS NEWS README Copyright TODO
|
||||
%doc %{_mandir}/man1/xmllint.1*
|
||||
%doc %{_mandir}/man1/xmlcatalog.1*
|
||||
%doc %{_mandir}/man3/libxml.3*
|
||||
|
@ -96,7 +142,7 @@ rm -fr %{buildroot}
|
|||
%defattr(-, root, root)
|
||||
|
||||
%doc %{_mandir}/man1/xml2-config.1*
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright
|
||||
%doc AUTHORS NEWS README Copyright
|
||||
%doc doc/*.html doc/html doc/*.gif doc/*.png
|
||||
%doc doc/tutorial doc/libxml2-api.xml.gz
|
||||
%doc doc/examples
|
||||
|
@ -107,26 +153,47 @@ rm -fr %{buildroot}
|
|||
%doc %{_datadir}/gtk-doc/html/libxml2/*.css
|
||||
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/*a
|
||||
%{_libdir}/*.sh
|
||||
%{_includedir}/*
|
||||
%{_bindir}/xml2-config
|
||||
%{_datadir}/aclocal/libxml.m4
|
||||
%{_libdir}/pkgconfig/libxml-2.0.pc
|
||||
%{_libdir}/cmake/libxml2/libxml2-config.cmake
|
||||
|
||||
%files static
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/*a
|
||||
|
||||
%files python
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog.gz NEWS README Copyright
|
||||
%{_libdir}/python*/site-packages/libxml2.py*
|
||||
%{_libdir}/python*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python*/site-packages/libxml2mod*
|
||||
%{_libdir}/python2*/site-packages/libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python2*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
|
||||
%changelog
|
||||
* Mon Mar 15 2010 Daniel Veillard <veillard@redhat.com>
|
||||
- upstream release 2.7.7 see http://xmlsoft.org/news.html
|
||||
%if 0%{?with_python3}
|
||||
%files python3
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/python3*/site-packages/libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/drv_libxml2.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
|
||||
%{_libdir}/python3*/site-packages/libxml2mod*
|
||||
%doc python/TODO
|
||||
%doc python/libxml2class.txt
|
||||
%doc python/tests/*.py
|
||||
%doc doc/*.py
|
||||
%doc doc/python.html
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Thu May 26 2016 Daniel Veillard <veillard@redhat.com>
|
||||
- upstream release 2.9.4 see http://xmlsoft.org/news.html
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,437 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -0,0 +1,123 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -0,0 +1,23 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -0,0 +1,98 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
@ -0,0 +1,8 @@
|
|||
This is a MacOS port contribution (not to be used for MacOS-X)
|
||||
for the CodeWarrior environment.
|
||||
Please contact the author directly in case of problems:
|
||||
Eric <erlavigne@wanadoo.fr>
|
||||
|
||||
thanks,
|
||||
|
||||
Daniel
|
|
@ -0,0 +1 @@
|
|||
int test_main(int argc, char **argv);
|
|
@ -0,0 +1 @@
|
|||
int test_main(int argc, char* argv[]);
|
|
@ -0,0 +1,192 @@
|
|||
/* config.h generated manually for macos. */
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS
|
||||
|
||||
#define PACKAGE
|
||||
#define VERSION
|
||||
|
||||
#undef HAVE_LIBZ
|
||||
#undef HAVE_LIBM
|
||||
#undef HAVE_ISINF
|
||||
#undef HAVE_ISNAN
|
||||
#undef HAVE_LIBHISTORY
|
||||
#undef HAVE_LIBREADLINE
|
||||
|
||||
#define XML_SOCKLEN_T socklen_t
|
||||
#define HAVE_LIBPTHREAD
|
||||
#define HAVE_PTHREAD_H
|
||||
#define LIBXML_THREAD_ENABLED
|
||||
|
||||
/* Define if you have the _stat function. */
|
||||
#define HAVE__STAT
|
||||
|
||||
/* Define if you have the class function. */
|
||||
#undef HAVE_CLASS
|
||||
|
||||
/* Define if you have the finite function. */
|
||||
#undef HAVE_FINITE
|
||||
|
||||
/* Define if you have the fp_class function. */
|
||||
#undef HAVE_FP_CLASS
|
||||
|
||||
/* Define if you have the fpclass function. */
|
||||
#undef HAVE_FPCLASS
|
||||
|
||||
/* Define if you have the fprintf function. */
|
||||
#define HAVE_FPRINTF
|
||||
|
||||
/* Define if you have the isnand function. */
|
||||
#undef HAVE_ISNAND
|
||||
|
||||
/* Define if you have the localtime function. */
|
||||
#define HAVE_LOCALTIME
|
||||
|
||||
/* Define if you have the printf function. */
|
||||
#define HAVE_PRINTF
|
||||
|
||||
/* Define if you have the signal function. */
|
||||
#define HAVE_SIGNAL
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
#define HAVE_SNPRINTF
|
||||
|
||||
/* Define if you have the sprintf function. */
|
||||
#define HAVE_SPRINTF
|
||||
|
||||
/* Define if you have the sscanf function. */
|
||||
#define HAVE_SSCANF
|
||||
|
||||
/* Define if you have the stat function. */
|
||||
#define HAVE_STAT
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME
|
||||
|
||||
/* Define if you have the strndup function. */
|
||||
#define HAVE_STRNDUP
|
||||
|
||||
/* Define if you have the vfprintf function. */
|
||||
#define HAVE_VFPRINTF
|
||||
|
||||
/* Define if you have the vsnprintf function. */
|
||||
#define HAVE_VSNPRINTF
|
||||
|
||||
/* Define if you have the vsprintf function. */
|
||||
#define HAVE_VSPRINTF
|
||||
|
||||
/* Define if you have the <ansidecl.h> header file. */
|
||||
#define HAVE_ANSIDECL_H
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H
|
||||
|
||||
/* Define if you have the <ctype.h> header file. */
|
||||
#define HAVE_CTYPE_H
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H
|
||||
|
||||
/* Define if you have the <fp_class.h> header file. */
|
||||
#define HAVE_FP_CLASS_H
|
||||
|
||||
/* Define if you have the <ieeefp.h> header file. */
|
||||
#define HAVE_IEEEFP_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define if you have the <math.h> header file. */
|
||||
#define HAVE_MATH_H
|
||||
|
||||
/* Define if you have the <nan.h> header file. */
|
||||
#define HAVE_NAN_H
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
#define HAVE_NDIR_H
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H
|
||||
|
||||
/* Define if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H
|
||||
|
||||
/* Define if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
#define HAVE_SYS_DIR_H
|
||||
|
||||
/* Define if you have the <sys/mman.h> header file. */
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the <zlib.h> header file. */
|
||||
#undef HAVE_ZLIB_H
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION
|
||||
|
||||
/* Define if compiler has function prototypes */
|
||||
#define PROTOTYPES
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <sys/types.h>
|
||||
#include <extra/stricmp.h>
|
||||
#include <extra/strdup.h>
|
|
@ -0,0 +1 @@
|
|||
/**************** BEGIN GUSI CONFIGURATION ****************************
|
|
@ -0,0 +1 @@
|
|||
#include <GUSICommandLine.h>
|
|
@ -1,11 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
|
|||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
|
@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
|
|||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar*)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit $?
|
||||
fi
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
|
||||
tar*)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
}
|
||||
|
||||
exit 0
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
|
|
|
@ -78,7 +78,9 @@
|
|||
|
||||
|
||||
#if defined(__MINGW32__) || defined(_WIN32_WCE)
|
||||
#ifndef _WINSOCKAPI_
|
||||
#define _WINSOCKAPI_
|
||||
#endif
|
||||
#include <wsockcompat.h>
|
||||
#include <winsock2.h>
|
||||
#undef XML_SOCKLEN_T
|
||||
|
@ -92,7 +94,6 @@
|
|||
#if !defined(__BEOS__) || defined(__HAIKU__)
|
||||
#define closesocket(s) close(s)
|
||||
#endif
|
||||
#define SOCKET int
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
|
@ -484,7 +485,7 @@ xmlNanoFTPNewCtxt(const char *URL) {
|
|||
ret->returnValue = 0;
|
||||
ret->controlBufIndex = 0;
|
||||
ret->controlBufUsed = 0;
|
||||
ret->controlFd = -1;
|
||||
ret->controlFd = INVALID_SOCKET;
|
||||
|
||||
unescaped = xmlURIUnescapeString(URL, 0, NULL);
|
||||
if (unescaped != NULL) {
|
||||
|
@ -511,8 +512,8 @@ xmlNanoFTPFreeCtxt(void * ctx) {
|
|||
if (ctxt->protocol != NULL) xmlFree(ctxt->protocol);
|
||||
if (ctxt->path != NULL) xmlFree(ctxt->path);
|
||||
ctxt->passive = 1;
|
||||
if (ctxt->controlFd >= 0) closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
if (ctxt->controlFd != INVALID_SOCKET) closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlBufIndex = -1;
|
||||
ctxt->controlBufUsed = -1;
|
||||
xmlFree(ctxt);
|
||||
|
@ -567,7 +568,7 @@ xmlNanoFTPGetMore(void *ctx) {
|
|||
int len;
|
||||
int size;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
|
||||
if ((ctxt->controlBufIndex < 0) || (ctxt->controlBufIndex > FTP_BUF_SIZE)) {
|
||||
#ifdef DEBUG_FTP
|
||||
|
@ -619,8 +620,8 @@ xmlNanoFTPGetMore(void *ctx) {
|
|||
if ((len = recv(ctxt->controlFd, &ctxt->controlBuf[ctxt->controlBufIndex],
|
||||
size, 0)) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "recv failed");
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
#ifdef DEBUG_FTP
|
||||
|
@ -648,7 +649,7 @@ xmlNanoFTPReadResponse(void *ctx) {
|
|||
int len;
|
||||
int res = -1, cur = -1;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
|
||||
get_more:
|
||||
/*
|
||||
|
@ -737,7 +738,7 @@ xmlNanoFTPCheckResponse(void *ctx) {
|
|||
fd_set rfd;
|
||||
struct timeval tv;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
FD_ZERO(&rfd);
|
||||
|
@ -774,7 +775,7 @@ xmlNanoFTPSendUser(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
return(res);
|
||||
|
@ -802,7 +803,7 @@ xmlNanoFTPSendPasswd(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
return(res);
|
||||
|
@ -826,14 +827,14 @@ xmlNanoFTPQuit(void *ctx) {
|
|||
char buf[200];
|
||||
int len, res;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
|
||||
snprintf(buf, sizeof(buf), "QUIT\r\n");
|
||||
len = strlen(buf);
|
||||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf); /* Just to be consistent, even though we know it can't have a % in it */
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
return(res);
|
||||
|
@ -907,6 +908,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
return (-1);
|
||||
}
|
||||
if (tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) {
|
||||
if (result)
|
||||
freeaddrinfo (result);
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch");
|
||||
return (-1);
|
||||
}
|
||||
|
@ -927,9 +930,9 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#endif
|
||||
{
|
||||
if (proxy)
|
||||
hp = gethostbyname (proxy);
|
||||
hp = gethostbyname (GETHOSTBYNAME_ARG_CAST proxy);
|
||||
else
|
||||
hp = gethostbyname (ctxt->hostname);
|
||||
hp = gethostbyname (GETHOSTBYNAME_ARG_CAST ctxt->hostname);
|
||||
if (hp == NULL) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "gethostbyname failed");
|
||||
return (-1);
|
||||
|
@ -946,12 +949,13 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_family = AF_INET;
|
||||
memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
|
||||
hp->h_addr_list[0], hp->h_length);
|
||||
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port = (u_short)htons ((unsigned short)port);
|
||||
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port =
|
||||
(unsigned short)htons ((unsigned short)port);
|
||||
ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
|
||||
addrlen = sizeof (struct sockaddr_in);
|
||||
}
|
||||
|
||||
if (ctxt->controlFd < 0) {
|
||||
if (ctxt->controlFd == INVALID_SOCKET) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "socket failed");
|
||||
return(-1);
|
||||
}
|
||||
|
@ -962,8 +966,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
if (connect(ctxt->controlFd, (struct sockaddr *) &ctxt->ftpAddr,
|
||||
addrlen) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "Failed to create a connection");
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
@ -972,8 +976,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
*/
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
if (res != 2) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
@ -1026,11 +1030,11 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1048,17 +1052,17 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
if (res > 3) {
|
||||
closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
break;
|
||||
|
@ -1069,7 +1073,7 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
case -1:
|
||||
default:
|
||||
closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
@ -1089,11 +1093,11 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1103,8 +1107,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
break;
|
||||
}
|
||||
if (proxyType == 1) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
case 2:
|
||||
|
@ -1120,11 +1124,11 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1142,11 +1146,11 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1156,8 +1160,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
return(0);
|
||||
}
|
||||
if (proxyType == 2) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
case 3:
|
||||
|
@ -1166,8 +1170,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
* send the code or at least the sequence in use.
|
||||
*/
|
||||
default:
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
@ -1176,8 +1180,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
*/
|
||||
res = xmlNanoFTPSendUser(ctxt);
|
||||
if (res < 0) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1191,14 +1195,14 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
case 5:
|
||||
case -1:
|
||||
default:
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
res = xmlNanoFTPSendPasswd(ctxt);
|
||||
if (res < 0) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
|
@ -1213,8 +1217,8 @@ xmlNanoFTPConnect(void *ctx) {
|
|||
case 5:
|
||||
case -1:
|
||||
default:
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
@ -1242,7 +1246,13 @@ xmlNanoFTPConnectTo(const char *server, int port) {
|
|||
if (port <= 0)
|
||||
return(NULL);
|
||||
ctxt = (xmlNanoFTPCtxtPtr) xmlNanoFTPNewCtxt(NULL);
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
ctxt->hostname = xmlMemStrdup(server);
|
||||
if (ctxt->hostname == NULL) {
|
||||
xmlNanoFTPFreeCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
if (port != 0)
|
||||
ctxt->port = port;
|
||||
res = xmlNanoFTPConnect(ctxt);
|
||||
|
@ -1270,7 +1280,7 @@ xmlNanoFTPCwd(void *ctx, const char *directory) {
|
|||
int len;
|
||||
int res;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
if (directory == NULL) return 0;
|
||||
|
||||
/*
|
||||
|
@ -1286,7 +1296,7 @@ xmlNanoFTPCwd(void *ctx, const char *directory) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
return(res);
|
||||
|
@ -1319,8 +1329,8 @@ xmlNanoFTPDele(void *ctx, const char *file) {
|
|||
int len;
|
||||
int res;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0) || (file == NULL)) return(-1);
|
||||
if (file == NULL) return (0);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET) ||
|
||||
(file == NULL)) return(-1);
|
||||
|
||||
/*
|
||||
* Expected response code for DELE:
|
||||
|
@ -1337,7 +1347,7 @@ xmlNanoFTPDele(void *ctx, const char *file) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
return(res);
|
||||
|
@ -1362,7 +1372,7 @@ xmlNanoFTPDele(void *ctx, const char *file) {
|
|||
* Returns -1 incase of error, 0 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
SOCKET
|
||||
xmlNanoFTPGetConnection(void *ctx) {
|
||||
xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
|
||||
char buf[200], *cur;
|
||||
|
@ -1377,7 +1387,7 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
#endif
|
||||
XML_SOCKLEN_T dataAddrLen;
|
||||
|
||||
if (ctxt == NULL) return(-1);
|
||||
if (ctxt == NULL) return INVALID_SOCKET;
|
||||
|
||||
memset (&dataAddr, 0, sizeof(dataAddr));
|
||||
#ifdef SUPPORT_IP6
|
||||
|
@ -1393,9 +1403,9 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
dataAddrLen = sizeof (struct sockaddr_in);
|
||||
}
|
||||
|
||||
if (ctxt->dataFd < 0) {
|
||||
if (ctxt->dataFd == INVALID_SOCKET) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "socket failed");
|
||||
return (-1);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
if (ctxt->passive) {
|
||||
|
@ -1409,22 +1419,22 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
res = xmlNanoFTPReadResponse(ctx);
|
||||
if (res != 2) {
|
||||
if (res == 5) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(-1);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
} else {
|
||||
/*
|
||||
* retry with an active connection
|
||||
*/
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
ctxt->passive = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1435,10 +1445,10 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
if (sscanf (cur, "%u", &temp[0]) != 1) {
|
||||
__xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
|
||||
"Invalid answer to EPSV\n");
|
||||
if (ctxt->dataFd != -1) {
|
||||
closesocket (ctxt->dataFd); ctxt->dataFd = -1;
|
||||
if (ctxt->dataFd != INVALID_SOCKET) {
|
||||
closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
}
|
||||
return (-1);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
memcpy (&((struct sockaddr_in6 *)&dataAddr)->sin6_addr, &((struct sockaddr_in6 *)&ctxt->ftpAddr)->sin6_addr, sizeof(struct in6_addr));
|
||||
((struct sockaddr_in6 *)&dataAddr)->sin6_port = htons (temp[0]);
|
||||
|
@ -1450,10 +1460,10 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
&temp[3], &temp[4], &temp[5]) != 6) {
|
||||
__xmlIOErr(XML_FROM_FTP, XML_FTP_PASV_ANSWER,
|
||||
"Invalid answer to PASV\n");
|
||||
if (ctxt->dataFd != -1) {
|
||||
closesocket (ctxt->dataFd); ctxt->dataFd = -1;
|
||||
if (ctxt->dataFd != INVALID_SOCKET) {
|
||||
closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
}
|
||||
return (-1);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
for (i=0; i<6; i++) ad[i] = (unsigned char) (temp[i] & 0xff);
|
||||
memcpy (&((struct sockaddr_in *)&dataAddr)->sin_addr, &ad[0], 4);
|
||||
|
@ -1462,8 +1472,8 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
|
||||
if (connect(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "Failed to create a data connection");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return (-1);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
} else {
|
||||
getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
|
||||
|
@ -1476,15 +1486,15 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
|
||||
if (bind(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "bind failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return (-1);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
|
||||
|
||||
if (listen(ctxt->dataFd, 1) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "listen failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return (-1);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
#ifdef SUPPORT_IP6
|
||||
if ((ctxt->ftpAddr).ss_family == AF_INET6) {
|
||||
|
@ -1510,16 +1520,16 @@ xmlNanoFTPGetConnection(void *ctx) {
|
|||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
if (res != 2) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(-1);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
return(ctxt->dataFd);
|
||||
|
@ -1542,9 +1552,9 @@ xmlNanoFTPCloseConnection(void *ctx) {
|
|||
fd_set rfd, efd;
|
||||
struct timeval tv;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1);
|
||||
if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
|
||||
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
tv.tv_sec = 15;
|
||||
tv.tv_usec = 0;
|
||||
FD_ZERO(&rfd);
|
||||
|
@ -1556,7 +1566,7 @@ xmlNanoFTPCloseConnection(void *ctx) {
|
|||
#ifdef DEBUG_FTP
|
||||
perror("select");
|
||||
#endif
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
if (res == 0) {
|
||||
|
@ -1564,11 +1574,11 @@ xmlNanoFTPCloseConnection(void *ctx) {
|
|||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlNanoFTPCloseConnection: timeout\n");
|
||||
#endif
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
} else {
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
if (res != 2) {
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = -1;
|
||||
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
@ -1729,7 +1739,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
if (xmlNanoFTPCwd(ctxt, ctxt->path) < 1)
|
||||
return(-1);
|
||||
ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
|
||||
if (ctxt->dataFd == -1)
|
||||
if (ctxt->dataFd == INVALID_SOCKET)
|
||||
return(-1);
|
||||
snprintf(buf, sizeof(buf), "LIST -L\r\n");
|
||||
} else {
|
||||
|
@ -1738,7 +1748,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
return(-1);
|
||||
}
|
||||
ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
|
||||
if (ctxt->dataFd == -1)
|
||||
if (ctxt->dataFd == INVALID_SOCKET)
|
||||
return(-1);
|
||||
snprintf(buf, sizeof(buf), "LIST -L %s\r\n", filename);
|
||||
}
|
||||
|
@ -1747,15 +1757,15 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(res);
|
||||
}
|
||||
res = xmlNanoFTPReadResponse(ctxt);
|
||||
if (res != 1) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-res);
|
||||
}
|
||||
|
||||
|
@ -1771,18 +1781,18 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
#ifdef DEBUG_FTP
|
||||
perror("select");
|
||||
#endif
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
if (res == 0) {
|
||||
res = xmlNanoFTPCheckResponse(ctxt);
|
||||
if (res < 0) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
if (res == 2) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1791,8 +1801,8 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
|
||||
if ((len = recv(ctxt->dataFd, &buf[indx], sizeof(buf) - (indx + 1), 0)) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "recv");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
#ifdef DEBUG_FTP
|
||||
|
@ -1824,34 +1834,34 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
|||
*/
|
||||
|
||||
|
||||
int
|
||||
SOCKET
|
||||
xmlNanoFTPGetSocket(void *ctx, const char *filename) {
|
||||
xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
|
||||
char buf[300];
|
||||
int res, len;
|
||||
if (ctx == NULL)
|
||||
return(-1);
|
||||
return INVALID_SOCKET;
|
||||
if ((filename == NULL) && (ctxt->path == NULL))
|
||||
return(-1);
|
||||
return INVALID_SOCKET;
|
||||
ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
|
||||
if (ctxt->dataFd == -1)
|
||||
return(-1);
|
||||
if (ctxt->dataFd == INVALID_SOCKET)
|
||||
return INVALID_SOCKET;
|
||||
|
||||
snprintf(buf, sizeof(buf), "TYPE I\r\n");
|
||||
len = strlen(buf);
|
||||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
res = xmlNanoFTPReadResponse(ctxt);
|
||||
if (res != 2) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(-res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
if (filename == NULL)
|
||||
snprintf(buf, sizeof(buf), "RETR %s\r\n", ctxt->path);
|
||||
|
@ -1862,16 +1872,16 @@ xmlNanoFTPGetSocket(void *ctx, const char *filename) {
|
|||
#ifdef DEBUG_FTP
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", buf);
|
||||
#endif
|
||||
res = send(ctxt->controlFd, buf, len, 0);
|
||||
res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
|
||||
if (res < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "send failed");
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
res = xmlNanoFTPReadResponse(ctxt);
|
||||
if (res != 1) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
return(-res);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
return(ctxt->dataFd);
|
||||
}
|
||||
|
@ -1903,7 +1913,7 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
|
|||
return(-1);
|
||||
if (callback == NULL)
|
||||
return(-1);
|
||||
if (xmlNanoFTPGetSocket(ctxt, filename) < 0)
|
||||
if (xmlNanoFTPGetSocket(ctxt, filename) == INVALID_SOCKET)
|
||||
return(-1);
|
||||
|
||||
do {
|
||||
|
@ -1916,18 +1926,18 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
|
|||
#ifdef DEBUG_FTP
|
||||
perror("select");
|
||||
#endif
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
if (res == 0) {
|
||||
res = xmlNanoFTPCheckResponse(ctxt);
|
||||
if (res < 0) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
if (res == 2) {
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1936,7 +1946,7 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
|
|||
if ((len = recv(ctxt->dataFd, buf, sizeof(buf), 0)) < 0) {
|
||||
__xmlIOErr(XML_FROM_FTP, 0, "recv failed");
|
||||
callback(userData, buf, len);
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = -1;
|
||||
closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
|
||||
return(-1);
|
||||
}
|
||||
callback(userData, buf, len);
|
||||
|
@ -1962,7 +1972,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) {
|
|||
xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
|
||||
|
||||
if (ctx == NULL) return(-1);
|
||||
if (ctxt->dataFd < 0) return(0);
|
||||
if (ctxt->dataFd == INVALID_SOCKET) return(0);
|
||||
if (dest == NULL) return(-1);
|
||||
if (len <= 0) return(0);
|
||||
|
||||
|
@ -1990,7 +2000,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) {
|
|||
void*
|
||||
xmlNanoFTPOpen(const char *URL) {
|
||||
xmlNanoFTPCtxtPtr ctxt;
|
||||
int sock;
|
||||
SOCKET sock;
|
||||
|
||||
xmlNanoFTPInit();
|
||||
if (URL == NULL) return(NULL);
|
||||
|
@ -2003,7 +2013,7 @@ xmlNanoFTPOpen(const char *URL) {
|
|||
return(NULL);
|
||||
}
|
||||
sock = xmlNanoFTPGetSocket(ctxt, ctxt->path);
|
||||
if (sock < 0) {
|
||||
if (sock == INVALID_SOCKET) {
|
||||
xmlNanoFTPFreeCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
|
@ -2026,14 +2036,14 @@ xmlNanoFTPClose(void *ctx) {
|
|||
if (ctxt == NULL)
|
||||
return(-1);
|
||||
|
||||
if (ctxt->dataFd >= 0) {
|
||||
if (ctxt->dataFd != INVALID_SOCKET) {
|
||||
closesocket(ctxt->dataFd);
|
||||
ctxt->dataFd = -1;
|
||||
ctxt->dataFd = INVALID_SOCKET;
|
||||
}
|
||||
if (ctxt->controlFd >= 0) {
|
||||
if (ctxt->controlFd != INVALID_SOCKET) {
|
||||
xmlNanoFTPQuit(ctxt);
|
||||
closesocket(ctxt->controlFd);
|
||||
ctxt->controlFd = -1;
|
||||
ctxt->controlFd = INVALID_SOCKET;
|
||||
}
|
||||
xmlNanoFTPFreeCtxt(ctxt);
|
||||
return(0);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue