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,9 +68,11 @@
|
|||
],
|
||||
},
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/usr/lib/libxml2.dylib',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-lxml2',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
|
@ -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.
|
||||
|
|
|
@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
|
|||
/**
|
||||
* docbParseDocument:
|
||||
* @ctxt: an SGML parser context
|
||||
*
|
||||
*
|
||||
* parse an SGML document (and build a tree if using the standard SAX
|
||||
* interface).
|
||||
*
|
||||
|
@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
|
|||
* @cur: a pointer to an array of xmlChar
|
||||
* @encoding: a free form C string describing the SGML document encoding, or NULL
|
||||
* @sax: the SAX handler block
|
||||
* @userData: if using SAX, this pointer will be provided on callbacks.
|
||||
* @userData: if using SAX, this pointer will be provided on callbacks.
|
||||
*
|
||||
* parse an SGML in-memory document and build a tree.
|
||||
* It use the given SAX function block to handle the parsing callback.
|
||||
* If sax is NULL, fallback to the default DOM tree building routines.
|
||||
*
|
||||
*
|
||||
* Returns the resulting document tree
|
||||
*/
|
||||
|
||||
|
@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
|
|||
* @encoding: a free form C string describing the SGML document encoding, or NULL
|
||||
*
|
||||
* parse an SGML in-memory document and build a tree.
|
||||
*
|
||||
*
|
||||
* Returns the resulting document tree
|
||||
*/
|
||||
|
||||
|
@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
|
|||
* @filename: the filename
|
||||
* @encoding: the SGML document encoding, or NULL
|
||||
*
|
||||
* Create a parser context for a file content.
|
||||
* Create a parser context for a file content.
|
||||
* Automatic support for ZLIB/Compress compressed document is provided
|
||||
* by default if found at compile-time.
|
||||
*
|
||||
|
@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
|
|||
* @filename: the filename
|
||||
* @encoding: a free form C string describing the SGML document encoding, or NULL
|
||||
* @sax: the SAX handler block
|
||||
* @userData: if using SAX, this pointer will be provided on callbacks.
|
||||
* @userData: if using SAX, this pointer will be provided on callbacks.
|
||||
*
|
||||
* parse an SGML file and build a tree. Automatic support for ZLIB/Compress
|
||||
* compressed document is provided by default if found at compile-time.
|
||||
|
|
|
@ -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 != '\''))
|
||||
NEXT;
|
||||
|
||||
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 {
|
||||
|
@ -2887,9 +2971,11 @@ 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);
|
||||
NEXT;
|
||||
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)) {
|
||||
|
@ -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->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(ctxt->userData,
|
||||
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->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(ctxt->userData, 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)
|
||||
|
@ -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;
|
||||
}
|
||||
ctxt->instate = state;
|
||||
|
||||
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 */
|
||||
|
@ -5087,13 +5240,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
|
|||
* @stop: Array of chars, which stop the lookup.
|
||||
* @stopLen: Length of stop-Array
|
||||
*
|
||||
* Try to find if any char of the stop-Array is available in the input
|
||||
* Try to find if any char of the stop-Array is available in the input
|
||||
* stream.
|
||||
* This function has a side effect of (possibly) incrementing ctxt->checkIndex
|
||||
* to avoid rescanning sequences of bytes, it DOES change the state of the
|
||||
* parser, do not use liberally.
|
||||
*
|
||||
* Returns the index to the current parsing point if a stopChar
|
||||
* Returns the index to the current parsing point if a stopChar
|
||||
* is available, -1 otherwise.
|
||||
*/
|
||||
static int
|
||||
|
@ -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;
|
||||
/*
|
||||
* not enouth chars in buffer
|
||||
*/
|
||||
if (avail < 2) {
|
||||
if (!terminate)
|
||||
goto done;
|
||||
else
|
||||
next = ' ';
|
||||
} else {
|
||||
next = in->cur[1];
|
||||
}
|
||||
cur = in->cur[0];
|
||||
next = in->cur[1];
|
||||
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->sax->ignorableWhitespace != NULL)
|
||||
ctxt->sax->ignorableWhitespace(
|
||||
ctxt->userData, &cur, 1);
|
||||
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, &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,12 +6366,16 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
|
|||
|
||||
/* set encoding */
|
||||
if (encoding) {
|
||||
content = xmlMallocAtomic (xmlStrlen(content_line) + strlen(encoding) + 1);
|
||||
if (content) {
|
||||
strcpy ((char *)content, (char *)content_line);
|
||||
strcat ((char *)content, (char *)encoding);
|
||||
htmlCheckEncoding (ctxt, content);
|
||||
xmlFree (content);
|
||||
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);
|
||||
htmlCheckEncoding (ctxt, content);
|
||||
xmlFree (content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,16 +30,18 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/uri.h>
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Getting/Setting encoding meta tags *
|
||||
* Getting/Setting encoding meta tags *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* htmlGetMetaEncoding:
|
||||
* @doc: the document
|
||||
*
|
||||
*
|
||||
* Encoding definition lookup in the Meta tags
|
||||
*
|
||||
* Returns the current encoding as flagged in the HTML source
|
||||
|
@ -126,17 +128,17 @@ found_meta:
|
|||
|
||||
found_content:
|
||||
encoding = xmlStrstr(content, BAD_CAST"charset=");
|
||||
if (encoding == NULL)
|
||||
if (encoding == NULL)
|
||||
encoding = xmlStrstr(content, BAD_CAST"Charset=");
|
||||
if (encoding == NULL)
|
||||
if (encoding == NULL)
|
||||
encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
|
||||
if (encoding != NULL) {
|
||||
encoding += 8;
|
||||
} else {
|
||||
encoding = xmlStrstr(content, BAD_CAST"charset =");
|
||||
if (encoding == NULL)
|
||||
if (encoding == NULL)
|
||||
encoding = xmlStrstr(content, BAD_CAST"Charset =");
|
||||
if (encoding == NULL)
|
||||
if (encoding == NULL)
|
||||
encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
|
||||
if (encoding != NULL)
|
||||
encoding += 9;
|
||||
|
@ -151,7 +153,7 @@ found_content:
|
|||
* htmlSetMetaEncoding:
|
||||
* @doc: the document
|
||||
* @encoding: the encoding string
|
||||
*
|
||||
*
|
||||
* Sets the current encoding in the Meta tags
|
||||
* NOTE: this will not change the document content encoding, just
|
||||
* the META flag associated.
|
||||
|
@ -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);
|
||||
|
@ -244,7 +247,7 @@ found_meta:
|
|||
http = 1;
|
||||
else
|
||||
{
|
||||
if ((value != NULL) &&
|
||||
if ((value != NULL) &&
|
||||
(!xmlStrcasecmp(attr->name, BAD_CAST"content")))
|
||||
content = value;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +316,7 @@ static const char* htmlBooleanAttrs[] = {
|
|||
* @name: the name of the attribute to check
|
||||
*
|
||||
* Determine if a given attribute is a boolean attribute.
|
||||
*
|
||||
*
|
||||
* returns: false if the attribute is not boolean, true otherwise.
|
||||
*/
|
||||
int
|
||||
|
@ -332,7 +340,7 @@ xmlOutputBufferPtr
|
|||
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
|
||||
/************************************************************************
|
||||
* *
|
||||
* Output error handlers *
|
||||
* Output error handlers *
|
||||
* *
|
||||
************************************************************************/
|
||||
/**
|
||||
|
@ -381,17 +389,13 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
|
|||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Dumping HTML tree content to a simple buffer *
|
||||
* Dumping HTML tree content to a simple buffer *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -493,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
|
|||
if (handler == NULL)
|
||||
handler = xmlFindCharEncodingHandler("ascii");
|
||||
|
||||
/*
|
||||
/*
|
||||
* save the content to a temp buffer.
|
||||
*/
|
||||
buf = xmlOutputBufferCreateFile(out, handler);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -587,15 +604,15 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
|||
return;
|
||||
}
|
||||
|
||||
htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
|
||||
htmlDocContentDumpFormatOutput(buf, cur, NULL, 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);
|
||||
}
|
||||
|
@ -617,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
|||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Dumping HTML tree content to an I/O output buffer *
|
||||
* Dumping HTML tree content to an I/O output buffer *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
@ -628,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
|
|||
* @buf: the HTML buffer output
|
||||
* @doc: the document
|
||||
* @encoding: the encoding string
|
||||
*
|
||||
*
|
||||
* TODO: check whether encoding is needed
|
||||
*
|
||||
* Dump the HTML document DTD, if any.
|
||||
|
@ -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);
|
||||
}
|
||||
} else if (cur->SystemID != NULL) {
|
||||
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
|
||||
}
|
||||
} 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
|
||||
* occurring in an attribute value immediately followed by
|
||||
* a { character (see Section B.7.1 of the HTML 4.0 Recommendation).
|
||||
* 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++;
|
||||
|
||||
escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
|
||||
if (escaped != NULL) {
|
||||
xmlBufferWriteQuotedString(buf->buffer, escaped);
|
||||
xmlFree(escaped);
|
||||
} else {
|
||||
xmlBufferWriteQuotedString(buf->buffer, value);
|
||||
/* 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) {
|
||||
xmlBufCat(buf->buffer, escaped);
|
||||
xmlFree(escaped);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
@ -1101,7 +1151,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||
|
||||
if ((cur == NULL) || (filename == NULL))
|
||||
return(-1);
|
||||
|
||||
|
||||
xmlInitParser();
|
||||
|
||||
encoding = (const char *) htmlGetMetaEncoding(cur);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1132,7 +1182,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||
if (handler == NULL)
|
||||
handler = xmlFindCharEncodingHandler("ascii");
|
||||
|
||||
/*
|
||||
/*
|
||||
* save the content to a temp buffer.
|
||||
*/
|
||||
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
|
||||
|
@ -1152,7 +1202,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||
* @encoding: the document encoding
|
||||
*
|
||||
* Dump an HTML document to a file using a given encoding.
|
||||
*
|
||||
*
|
||||
* returns: the number of byte written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
|
@ -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 {
|
||||
|
@ -1196,7 +1246,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
|
|||
if (handler == NULL)
|
||||
handler = xmlFindCharEncodingHandler("ascii");
|
||||
|
||||
/*
|
||||
/*
|
||||
* save the content to a temp buffer.
|
||||
*/
|
||||
buf = xmlOutputBufferCreateFilename(filename, handler, 0);
|
||||
|
@ -1216,7 +1266,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
|
|||
*
|
||||
* Dump an HTML document to a file using a given encoding
|
||||
* and formatting returns/spaces are added.
|
||||
*
|
||||
*
|
||||
* returns: the number of byte written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
|
|
|
@ -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,7 +2441,8 @@ 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
|
||||
|
||||
added xmlStopParser() to stop parsing
|
||||
improved a lot parsing speed when there is large CDATA blocs
|
||||
includes XPath patches provided by Picdar Technology
|
||||
tried to fix as much as possible DTD validation and namespace
|
||||
|
@ -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,7 +2499,8 @@ 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
|
||||
|
||||
fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
|
||||
handled now
|
||||
Better handling of entities, especially well-formedness checking
|
||||
and proper PEref extensions in external subsets
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
void
|
||||
initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
|
||||
{
|
||||
|
||||
|
||||
if(hdlr->initialized == 1)
|
||||
return;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*> values "system" and "public". I have made the default be "system" to
|
||||
*> match yours.
|
||||
*/
|
||||
#define TODO \
|
||||
#define TODO \
|
||||
xmlGenericError(xmlGenericErrorContext, \
|
||||
"Unimplemented block at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -126,7 +143,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
if (ctxt != NULL)
|
||||
ctxt->errNo = error;
|
||||
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
|
||||
XML_ERR_FATAL, NULL, 0,
|
||||
XML_ERR_FATAL, NULL, 0,
|
||||
(const char *) str1, (const char *) str2,
|
||||
NULL, 0, 0, msg, str1, str2);
|
||||
if (ctxt != NULL) {
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -157,7 +174,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
if (ctxt != NULL)
|
||||
ctxt->errNo = error;
|
||||
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
|
||||
XML_ERR_WARNING, NULL, 0,
|
||||
XML_ERR_WARNING, NULL, 0,
|
||||
(const char *) str1, NULL,
|
||||
NULL, 0, 0, msg, 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)
|
||||
{
|
||||
|
@ -182,7 +199,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
if (ctxt != NULL)
|
||||
ctxt->errNo = error;
|
||||
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
|
||||
XML_ERR_ERROR, NULL, 0,
|
||||
XML_ERR_ERROR, NULL, 0,
|
||||
(const char *) str1, (const char *) str2,
|
||||
NULL, 0, 0, msg, str1, 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)
|
||||
{
|
||||
|
@ -206,7 +223,7 @@ xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||
if (ctxt != NULL)
|
||||
ctxt->errNo = error;
|
||||
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
|
||||
XML_ERR_WARNING, NULL, 0,
|
||||
XML_ERR_WARNING, NULL, 0,
|
||||
(const char *) str1, (const char *) str2,
|
||||
NULL, 0, 0, msg, str1, str2);
|
||||
}
|
||||
|
@ -240,7 +257,7 @@ xmlSAX2GetSystemId(void *ctx)
|
|||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
|
||||
return((const xmlChar *) ctxt->input->filename);
|
||||
return((const xmlChar *) ctxt->input->filename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -355,7 +372,7 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
|
|||
xmlFreeDtd(dtd);
|
||||
ctxt->myDoc->intSubset = NULL;
|
||||
}
|
||||
ctxt->myDoc->intSubset =
|
||||
ctxt->myDoc->intSubset =
|
||||
xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID);
|
||||
if (ctxt->myDoc->intSubset == NULL)
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset");
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -621,8 +651,8 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
|
|||
/**
|
||||
* xmlSAX2EntityDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @publicId: The public ID of the entity
|
||||
* @systemId: The system ID of the entity
|
||||
* @content: the entity value (without processing).
|
||||
|
@ -657,7 +687,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||
base = ctxt->input->filename;
|
||||
if (base == NULL)
|
||||
base = ctxt->directory;
|
||||
|
||||
|
||||
URI = xmlBuildURI(systemId, (const xmlChar *) base);
|
||||
ent->URI = URI;
|
||||
}
|
||||
|
@ -666,7 +696,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||
systemId, content);
|
||||
if ((ent == NULL) && (ctxt->pedantic) &&
|
||||
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
"Entity(%s) already defined in the external subset\n", name);
|
||||
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
|
||||
xmlChar *URI;
|
||||
|
@ -676,7 +706,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||
base = ctxt->input->filename;
|
||||
if (base == NULL)
|
||||
base = ctxt->directory;
|
||||
|
||||
|
||||
URI = xmlBuildURI(systemId, (const xmlChar *) base);
|
||||
ent->URI = URI;
|
||||
}
|
||||
|
@ -691,8 +721,8 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||
* xmlSAX2AttributeDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @elem: the name of the element
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @def: the type of default value
|
||||
* @defaultValue: the attribute default value
|
||||
* @tree: the tree of enumerated value set
|
||||
|
@ -735,7 +765,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||
(xmlAttributeDefault) def, defaultValue, tree);
|
||||
else if (ctxt->inSubset == 2)
|
||||
attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem,
|
||||
name, prefix, (xmlAttributeType) type,
|
||||
name, prefix, (xmlAttributeType) type,
|
||||
(xmlAttributeDefault) def, defaultValue, tree);
|
||||
else {
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||
|
@ -761,8 +791,8 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||
/**
|
||||
* xmlSAX2ElementDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @content: the element value tree
|
||||
*
|
||||
* An element definition has been parsed
|
||||
|
@ -883,7 +913,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
|||
publicId, systemId, notationName);
|
||||
if ((ent == NULL) && (ctxt->pedantic) &&
|
||||
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
"Entity(%s) already defined in the internal subset\n", name);
|
||||
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
|
||||
xmlChar *URI;
|
||||
|
@ -893,7 +923,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
|||
base = ctxt->input->filename;
|
||||
if (base == NULL)
|
||||
base = ctxt->directory;
|
||||
|
||||
|
||||
URI = xmlBuildURI(systemId, (const xmlChar *) base);
|
||||
ent->URI = URI;
|
||||
}
|
||||
|
@ -903,7 +933,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
|||
publicId, systemId, notationName);
|
||||
if ((ent == NULL) && (ctxt->pedantic) &&
|
||||
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
"Entity(%s) already defined in the external subset\n", name);
|
||||
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
|
||||
xmlChar *URI;
|
||||
|
@ -913,7 +943,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
|||
base = ctxt->input->filename;
|
||||
if (base == NULL)
|
||||
base = ctxt->directory;
|
||||
|
||||
|
||||
URI = xmlBuildURI(systemId, (const xmlChar *) base);
|
||||
ent->URI = URI;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1157,12 +1193,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
uri = xmlParseURI((const char *)val);
|
||||
if (uri == NULL) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
"xmlns: %s not a valid URI\n", val);
|
||||
} else {
|
||||
if (uri->scheme == NULL) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
ctxt->sax->warning(ctxt->userData,
|
||||
"xmlns: URI %s is not absolute\n", val);
|
||||
}
|
||||
xmlFreeURI(uri);
|
||||
|
@ -1182,7 +1218,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
|
||||
ctxt->node, prefix, nsret, val);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
if (name != NULL)
|
||||
if (name != NULL)
|
||||
xmlFree(name);
|
||||
if (nval != NULL)
|
||||
xmlFree(nval);
|
||||
|
@ -1204,7 +1240,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
if (val == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
|
||||
xmlFree(ns);
|
||||
if (name != NULL)
|
||||
if (name != NULL)
|
||||
xmlFree(name);
|
||||
return;
|
||||
}
|
||||
|
@ -1245,7 +1281,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
|
||||
ctxt->node, prefix, nsret, value);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
if (name != NULL)
|
||||
if (name != NULL)
|
||||
xmlFree(name);
|
||||
if (nval != NULL)
|
||||
xmlFree(nval);
|
||||
|
@ -1311,7 +1347,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
#ifdef LIBXML_VALID_ENABLED
|
||||
if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
|
||||
ctxt->myDoc && ctxt->myDoc->intSubset) {
|
||||
|
||||
|
||||
/*
|
||||
* If we don't substitute entities, the validation should be
|
||||
* done on a value with replaced entities anyway.
|
||||
|
@ -1323,7 +1359,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
|
||||
0,0,0);
|
||||
ctxt->depth--;
|
||||
|
||||
|
||||
if (val == NULL)
|
||||
ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
|
||||
ctxt->myDoc, ctxt->node, ret, value);
|
||||
|
@ -1380,7 +1416,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||
error:
|
||||
if (nval != NULL)
|
||||
xmlFree(nval);
|
||||
if (ns != NULL)
|
||||
if (ns != NULL)
|
||||
xmlFree(ns);
|
||||
}
|
||||
|
||||
|
@ -1479,7 +1515,7 @@ process_external_subset:
|
|||
* - this is a namespace prefix
|
||||
* - the user required for completion in the tree
|
||||
* like XSLT
|
||||
* - there isn't already an attribute definition
|
||||
* - there isn't already an attribute definition
|
||||
* in the internal subset overriding it.
|
||||
*/
|
||||
if (((attr->prefix != NULL) &&
|
||||
|
@ -1568,17 +1604,17 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
|||
/*
|
||||
* First check on validity:
|
||||
*/
|
||||
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
|
||||
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
|
||||
((ctxt->myDoc->intSubset == NULL) ||
|
||||
((ctxt->myDoc->intSubset->notations == NULL) &&
|
||||
((ctxt->myDoc->intSubset->notations == NULL) &&
|
||||
(ctxt->myDoc->intSubset->elements == NULL) &&
|
||||
(ctxt->myDoc->intSubset->attributes == NULL) &&
|
||||
(ctxt->myDoc->intSubset->attributes == NULL) &&
|
||||
(ctxt->myDoc->intSubset->entities == NULL)))) {
|
||||
xmlErrValid(ctxt, XML_ERR_NO_DTD,
|
||||
"Validation failed: no DTD found !", NULL, NULL);
|
||||
ctxt->validate = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Split the full name into a namespace prefix and the tag name
|
||||
|
@ -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;
|
||||
|
@ -1767,13 +1802,13 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||
else
|
||||
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name);
|
||||
#endif
|
||||
|
||||
|
||||
/* 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;
|
||||
|
||||
|
@ -1784,7 +1819,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||
cur);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* end of parsing of this node.
|
||||
*/
|
||||
|
@ -1793,15 +1828,15 @@ 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:
|
||||
* @ctxt: the parser context
|
||||
* @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);
|
||||
|
@ -1880,7 +1924,7 @@ skip:
|
|||
* @ctxt: the parser context
|
||||
* @str: the input string
|
||||
* @len: the string length
|
||||
*
|
||||
*
|
||||
* Remove the entities from an attribute value
|
||||
*
|
||||
* Returns the newly allocated string or NULL if not needed or error
|
||||
|
@ -1946,7 +1990,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||
memset(ret, 0, sizeof(xmlAttr));
|
||||
ret->type = XML_ATTRIBUTE_NODE;
|
||||
|
||||
ret->parent = ctxt->node;
|
||||
ret->parent = ctxt->node;
|
||||
ret->doc = ctxt->myDoc;
|
||||
ret->ns = namespace;
|
||||
|
||||
|
@ -1970,7 +2014,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||
xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
|
||||
} else {
|
||||
if (ctxt->dictNames)
|
||||
ret = xmlNewNsPropEatName(ctxt->node, namespace,
|
||||
ret = xmlNewNsPropEatName(ctxt->node, namespace,
|
||||
(xmlChar *) localname, NULL);
|
||||
else
|
||||
ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL);
|
||||
|
@ -2056,7 +2100,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||
xmlChar *nvalnorm;
|
||||
xmlChar fn[50];
|
||||
xmlChar *fullname;
|
||||
|
||||
|
||||
fullname = xmlBuildQName(localname, prefix, fn, 50);
|
||||
if (fullname != NULL) {
|
||||
ctxt->vctxt.valid = 1;
|
||||
|
@ -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;
|
||||
|
@ -2170,17 +2217,31 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
/*
|
||||
* First check on validity:
|
||||
*/
|
||||
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
|
||||
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
|
||||
((ctxt->myDoc->intSubset == NULL) ||
|
||||
((ctxt->myDoc->intSubset->notations == NULL) &&
|
||||
((ctxt->myDoc->intSubset->notations == NULL) &&
|
||||
(ctxt->myDoc->intSubset->elements == NULL) &&
|
||||
(ctxt->myDoc->intSubset->attributes == 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 {
|
||||
ret->name = xmlStrdup(localname);
|
||||
if (lname == NULL)
|
||||
ret->name = xmlStrdup(localname);
|
||||
else
|
||||
ret->name = lname;
|
||||
if (ret->name == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
return;
|
||||
|
@ -2204,10 +2268,13 @@ xmlSAX2StartElementNs(void *ctx,
|
|||
xmlRegisterNodeDefaultValue(ret);
|
||||
} else {
|
||||
if (ctxt->dictNames)
|
||||
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
|
||||
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,8 +2381,33 @@ 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]);
|
||||
attributes[j+3], attributes[j+4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2382,7 +2478,7 @@ xmlSAX2EndElementNs(void *ctx,
|
|||
* @ctx: the user data (XML parser context)
|
||||
* @name: The entity name
|
||||
*
|
||||
* called when an entity xmlSAX2Reference is detected.
|
||||
* called when an entity xmlSAX2Reference is detected.
|
||||
*/
|
||||
void
|
||||
xmlSAX2Reference(void *ctx, const xmlChar *name)
|
||||
|
@ -2482,12 +2578,16 @@ 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");
|
||||
return;
|
||||
}
|
||||
if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
|
||||
if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
|
||||
(size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented");
|
||||
return;
|
||||
|
@ -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__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* catalog.c: set of generic Catalog related routines
|
||||
* catalog.c: set of generic Catalog related routines
|
||||
*
|
||||
* Reference: SGML Open Technical Resolution TR9401:1997.
|
||||
* http://www.jclark.com/sp/catalog.htm
|
||||
|
@ -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
|
||||
|
||||
/**
|
||||
|
@ -60,7 +62,7 @@
|
|||
*> values "system" and "public". I have made the default be "system" to
|
||||
*> match yours.
|
||||
*/
|
||||
#define TODO \
|
||||
#define TODO \
|
||||
xmlGenericError(xmlGenericErrorContext, \
|
||||
"Unimplemented block at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
|
@ -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);
|
||||
|
@ -206,7 +210,7 @@ static int xmlCatalogInitialized = 0;
|
|||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Catalog error handlers *
|
||||
* Catalog error handlers *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
@ -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)
|
||||
|
@ -259,9 +263,9 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
|
|||
* @name: name of the entry
|
||||
* @value: value of the entry
|
||||
* @prefer: the PUBLIC vs. SYSTEM current preference value
|
||||
* @group: for members of a group, the group entry
|
||||
* @group: for members of a group, the group entry
|
||||
*
|
||||
* create a new Catalog entry, this type is shared both by XML and
|
||||
* create a new Catalog entry, this type is shared both by XML and
|
||||
* SGML catalogs, but the acceptable types values differs.
|
||||
*
|
||||
* Returns the xmlCatalogEntryPtr or NULL in case of error
|
||||
|
@ -399,7 +403,7 @@ xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) {
|
|||
* @type: type of catalog
|
||||
* @prefer: the PUBLIC vs. SYSTEM current preference value
|
||||
*
|
||||
* create a new Catalog, this type is shared both by XML and
|
||||
* create a new Catalog, this type is shared both by XML and
|
||||
* SGML catalogs, but the acceptable types values differs.
|
||||
*
|
||||
* Returns the xmlCatalogPtr or NULL in case of error
|
||||
|
@ -567,7 +571,7 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
|
|||
xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE);
|
||||
if (xns != NULL)
|
||||
xmlSetNsProp(node, xns, BAD_CAST "base",
|
||||
cur->value);
|
||||
cur->value);
|
||||
}
|
||||
switch (cur->prefer) {
|
||||
case XML_CATA_PREFER_NONE:
|
||||
|
@ -685,7 +689,7 @@ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
|
|||
xmlAddChild((xmlNodePtr) doc, catalog);
|
||||
|
||||
xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
|
||||
|
||||
|
||||
/*
|
||||
* reserialize it
|
||||
*/
|
||||
|
@ -822,7 +826,7 @@ xmlCatalogUnWrapURN(const xmlChar *urn) {
|
|||
if (xmlStrncmp(urn, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1))
|
||||
return(NULL);
|
||||
urn += sizeof(XML_URN_PUBID) - 1;
|
||||
|
||||
|
||||
while (*urn != 0) {
|
||||
if (i > sizeof(result) - 4)
|
||||
break;
|
||||
|
@ -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))
|
||||
|
@ -938,7 +939,7 @@ xmlParseCatalogFile(const char *filename) {
|
|||
ctxt->myDoc = NULL;
|
||||
}
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
#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);
|
||||
}
|
||||
#ifdef HAVE_STAT
|
||||
close(fd);
|
||||
#else
|
||||
fclose(fd);
|
||||
#endif
|
||||
content[len] = 0;
|
||||
|
||||
return(content);
|
||||
|
@ -1331,7 +1334,7 @@ xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
|||
*
|
||||
* Parses the catalog file to extract the XML tree and then analyze the
|
||||
* tree to build a list of Catalog entries corresponding to this catalog
|
||||
*
|
||||
*
|
||||
* Returns the resulting Catalog entries list
|
||||
*/
|
||||
static xmlCatalogEntryPtr
|
||||
|
@ -1399,19 +1402,17 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) {
|
|||
* @catal: an existing but incomplete catalog entry
|
||||
*
|
||||
* Fetch and parse the subcatalog referenced by an entry
|
||||
*
|
||||
*
|
||||
* Returns 0 in case of success, -1 otherwise
|
||||
*/
|
||||
static int
|
||||
xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) {
|
||||
xmlCatalogEntryPtr doc;
|
||||
|
||||
if (catal == NULL)
|
||||
if (catal == NULL)
|
||||
return(-1);
|
||||
if (catal->URL == NULL)
|
||||
return(-1);
|
||||
if (catal->children != NULL)
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
* lock the whole catalog for modification
|
||||
|
@ -1500,7 +1501,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
|
|||
xmlCatalogEntryType typ;
|
||||
int doregister = 0;
|
||||
|
||||
if ((catal == NULL) ||
|
||||
if ((catal == NULL) ||
|
||||
((catal->type != XML_CATA_CATALOG) &&
|
||||
(catal->type != XML_CATA_BROKEN_CATALOG)))
|
||||
return(-1);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1576,7 +1577,7 @@ xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) {
|
|||
xmlCatalogEntryPtr cur;
|
||||
int ret = 0;
|
||||
|
||||
if ((catal == NULL) ||
|
||||
if ((catal == NULL) ||
|
||||
((catal->type != XML_CATA_CATALOG) &&
|
||||
(catal->type != XML_CATA_BROKEN_CATALOG)))
|
||||
return(-1);
|
||||
|
@ -1791,7 +1792,7 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
|
|||
}
|
||||
if (nbList < MAX_DELEGATE)
|
||||
delegates[nbList++] = cur->URL;
|
||||
|
||||
|
||||
if (cur->children == NULL) {
|
||||
xmlFetchXMLCatalogFile(cur);
|
||||
}
|
||||
|
@ -2004,7 +2005,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
|
|||
xmlChar *ret = NULL;
|
||||
xmlChar *urnID = NULL;
|
||||
xmlChar *normid;
|
||||
|
||||
|
||||
if (catal == NULL)
|
||||
return(NULL);
|
||||
if ((pubID == NULL) && (sysID == NULL))
|
||||
|
@ -2013,7 +2014,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
|
|||
normid = xmlCatalogNormalizePublic(pubID);
|
||||
if (normid != NULL)
|
||||
pubID = (*normid != 0 ? normid : NULL);
|
||||
|
||||
|
||||
if (!xmlStrncmp(pubID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
|
||||
urnID = xmlCatalogUnWrapURN(pubID);
|
||||
if (xmlDebugCatalogs) {
|
||||
|
@ -2093,7 +2094,7 @@ static xmlChar *
|
|||
xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
|
||||
xmlChar *ret = NULL;
|
||||
xmlChar *urnID = NULL;
|
||||
|
||||
|
||||
if (catal == NULL)
|
||||
return(NULL);
|
||||
if (URI == NULL)
|
||||
|
@ -2153,7 +2154,7 @@ xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
|
|||
*/
|
||||
static const xmlChar *
|
||||
xmlParseSGMLCatalogComment(const xmlChar *cur) {
|
||||
if ((cur[0] != '-') || (cur[1] != '-'))
|
||||
if ((cur[0] != '-') || (cur[1] != '-'))
|
||||
return(cur);
|
||||
SKIP(2);
|
||||
while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-'))))
|
||||
|
@ -2688,7 +2689,7 @@ xmlLoadACatalog(const char *filename)
|
|||
|
||||
|
||||
first = content;
|
||||
|
||||
|
||||
while ((*first != 0) && (*first != '-') && (*first != '<') &&
|
||||
(!(((*first >= 'A') && (*first <= 'Z')) ||
|
||||
((*first >= 'a') && (*first <= 'z')))))
|
||||
|
@ -2783,7 +2784,7 @@ xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) {
|
|||
|
||||
if ((sysID == NULL) || (catal == NULL))
|
||||
return(NULL);
|
||||
|
||||
|
||||
if (xmlDebugCatalogs)
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Resolve sysID %s\n", sysID);
|
||||
|
@ -2818,7 +2819,7 @@ xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) {
|
|||
|
||||
if ((pubID == NULL) || (catal == NULL))
|
||||
return(NULL);
|
||||
|
||||
|
||||
if (xmlDebugCatalogs)
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Resolve pubID %s\n", pubID);
|
||||
|
@ -2937,7 +2938,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
|
|||
} else {
|
||||
xmlHashScan(catal->sgml,
|
||||
(xmlHashScanner) xmlCatalogDumpEntry, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
|
@ -2945,7 +2946,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
|
|||
* xmlACatalogAdd:
|
||||
* @catal: a Catalog
|
||||
* @type: the type of record to add to the catalog
|
||||
* @orig: the system, public or prefix to match
|
||||
* @orig: the system, public or prefix to match
|
||||
* @replace: the replacement value for the match
|
||||
*
|
||||
* Add an entry in the catalog, it may overwrite existing but
|
||||
|
@ -3004,7 +3005,7 @@ xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) {
|
|||
(xmlHashDeallocator) xmlFreeCatalogEntry);
|
||||
if (res == 0)
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
|
||||
|
@ -3063,7 +3064,7 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) {
|
|||
return(1);
|
||||
if (res < 0)
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -3086,7 +3087,7 @@ xmlInitializeCatalogData(void) {
|
|||
if (xmlCatalogInitialized != 0)
|
||||
return;
|
||||
|
||||
if (getenv("XML_DEBUG_CATALOG"))
|
||||
if (getenv("XML_DEBUG_CATALOG"))
|
||||
xmlDebugCatalogs = 1;
|
||||
xmlCatalogMutex = xmlNewRMutex();
|
||||
|
||||
|
@ -3107,7 +3108,7 @@ xmlInitializeCatalog(void) {
|
|||
xmlInitializeCatalogData();
|
||||
xmlRMutexLock(xmlCatalogMutex);
|
||||
|
||||
if (getenv("XML_DEBUG_CATALOG"))
|
||||
if (getenv("XML_DEBUG_CATALOG"))
|
||||
xmlDebugCatalogs = 1;
|
||||
|
||||
if (xmlDefaultCatalog == NULL) {
|
||||
|
@ -3130,12 +3131,12 @@ xmlInitializeCatalog(void) {
|
|||
unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
|
||||
if (len != 0) {
|
||||
char* p = &(buf[len]);
|
||||
while (*p != '\\' && p > buf)
|
||||
while (*p != '\\' && p > buf)
|
||||
p--;
|
||||
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);
|
||||
|
@ -3149,15 +3150,15 @@ xmlInitializeCatalog(void) {
|
|||
catalogs = XML_XML_DEFAULT_CATALOG;
|
||||
#endif
|
||||
|
||||
catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
|
||||
catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
|
||||
xmlCatalogDefaultPrefer);
|
||||
if (catal != NULL) {
|
||||
/* the XML_CATALOG_FILES envvar is allowed to contain a
|
||||
/* the XML_CATALOG_FILES envvar is allowed to contain a
|
||||
space-separated list of entries. */
|
||||
cur = catalogs;
|
||||
nextent = &catal->xml;
|
||||
while (*cur != '\0') {
|
||||
while (xmlIsBlank_ch(*cur))
|
||||
while (xmlIsBlank_ch(*cur))
|
||||
cur++;
|
||||
if (*cur != 0) {
|
||||
paths = cur;
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
@ -3282,7 +3283,7 @@ xmlCatalogCleanup(void) {
|
|||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Catalogs cleanup\n");
|
||||
if (xmlCatalogXMLFiles != NULL)
|
||||
xmlHashFree(xmlCatalogXMLFiles,
|
||||
xmlHashFree(xmlCatalogXMLFiles,
|
||||
(xmlHashDeallocator)xmlFreeCatalogHashEntryList);
|
||||
xmlCatalogXMLFiles = NULL;
|
||||
if (xmlDefaultCatalog != NULL)
|
||||
|
@ -3397,7 +3398,7 @@ xmlCatalogDump(FILE *out) {
|
|||
/**
|
||||
* xmlCatalogAdd:
|
||||
* @type: the type of record to add to the catalog
|
||||
* @orig: the system, public or prefix to match
|
||||
* @orig: the system, public or prefix to match
|
||||
* @replace: the replacement value for the match
|
||||
*
|
||||
* Add an entry in the catalog, it may overwrite existing but
|
||||
|
@ -3428,7 +3429,7 @@ xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace)
|
|||
|
||||
xmlRMutexUnlock(xmlCatalogMutex);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace);
|
||||
xmlRMutexUnlock(xmlCatalogMutex);
|
||||
|
@ -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;
|
||||
|
@ -3616,7 +3617,7 @@ xmlCatalogFreeLocal(void *catalogs) {
|
|||
*
|
||||
* Returns the updated list
|
||||
*/
|
||||
void *
|
||||
void *
|
||||
xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
|
||||
xmlCatalogEntryPtr catal, add;
|
||||
|
||||
|
@ -3636,7 +3637,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
|
|||
return(catalogs);
|
||||
|
||||
catal = (xmlCatalogEntryPtr) catalogs;
|
||||
if (catal == NULL)
|
||||
if (catal == NULL)
|
||||
return((void *) add);
|
||||
|
||||
while (catal->next != NULL)
|
||||
|
@ -3651,7 +3652,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
|
|||
* @pubID: the public ID string
|
||||
* @sysID: the system ID string
|
||||
*
|
||||
* Do a complete resolution lookup of an External Identifier using a
|
||||
* Do a complete resolution lookup of an External Identifier using a
|
||||
* document's private catalog list
|
||||
*
|
||||
* Returns the URI of the resource or NULL if not found, it must be freed
|
||||
|
@ -3696,7 +3697,7 @@ xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID,
|
|||
* @catalogs: a document's list of catalogs
|
||||
* @URI: the URI
|
||||
*
|
||||
* Do a complete resolution lookup of an URI using a
|
||||
* Do a complete resolution lookup of an URI using a
|
||||
* document's private catalog list
|
||||
*
|
||||
* Returns the URI of the resource or NULL if not found, it must be freed
|
||||
|
@ -3757,7 +3758,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) {
|
|||
|
||||
if (sysID == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
/*
|
||||
* Check first the XML catalogs
|
||||
*/
|
||||
|
@ -3801,7 +3802,7 @@ xmlCatalogGetPublic(const xmlChar *pubID) {
|
|||
|
||||
if (pubID == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
||||
/*
|
||||
* Check first the XML catalogs
|
||||
*/
|
||||
|
|
|
@ -46,109 +46,109 @@ const unsigned char xmlIsPubidChar_tab[256] = {
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
|
||||
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
|
||||
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
|
||||
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
|
||||
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
|
||||
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
|
||||
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
|
||||
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
|
||||
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
|
||||
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
|
||||
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
|
||||
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
|
||||
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
|
||||
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
|
||||
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
|
||||
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
|
||||
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
|
||||
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
|
||||
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
|
||||
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
|
||||
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
|
||||
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
|
||||
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
|
||||
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
|
||||
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
|
||||
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
|
||||
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
|
||||
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
|
||||
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
|
||||
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
|
||||
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
|
||||
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
|
||||
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
|
||||
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
|
||||
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
|
||||
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
|
||||
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
|
||||
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
|
||||
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
|
||||
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
|
||||
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
|
||||
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
|
||||
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
|
||||
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
|
||||
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
|
||||
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
|
||||
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
|
||||
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
|
||||
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
|
||||
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
|
||||
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
|
||||
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
|
||||
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
|
||||
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
|
||||
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
|
||||
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
|
||||
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
|
||||
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
|
||||
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
|
||||
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
|
||||
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
|
||||
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
|
||||
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
|
||||
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
|
||||
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
|
||||
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
|
||||
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
|
||||
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
|
||||
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
|
||||
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
|
||||
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
|
||||
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
|
||||
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
|
||||
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
|
||||
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
|
||||
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
|
||||
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
|
||||
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
|
||||
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
|
||||
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
|
||||
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
|
||||
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
|
||||
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
|
||||
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
|
||||
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
|
||||
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
|
||||
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
|
||||
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
|
||||
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
|
||||
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
|
||||
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
|
||||
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
|
||||
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
|
||||
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
|
||||
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
|
||||
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
|
||||
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
|
||||
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
|
||||
{0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
|
||||
const xmlChRangeGroup xmlIsBaseCharGroup =
|
||||
{197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
|
||||
|
||||
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
|
||||
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
|
||||
{0xe000, 0xfffd}};
|
||||
static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
|
||||
const xmlChRangeGroup xmlIsCharGroup =
|
||||
{2, 1, xmlIsChar_srng, xmlIsChar_lrng};
|
||||
|
||||
static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
|
||||
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
||||
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
||||
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
|
||||
{0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903},
|
||||
{0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954},
|
||||
{0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be},
|
||||
{0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
|
||||
{0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c},
|
||||
{0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48},
|
||||
{0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc},
|
||||
{0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03},
|
||||
{0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d},
|
||||
{0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
|
||||
{0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44},
|
||||
{0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83},
|
||||
{0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
|
||||
{0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
|
||||
{0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e},
|
||||
{0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd},
|
||||
{0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39},
|
||||
{0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b},
|
||||
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
|
||||
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
|
||||
static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
|
||||
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
||||
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
||||
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
|
||||
{0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903},
|
||||
{0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954},
|
||||
{0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be},
|
||||
{0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
|
||||
{0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c},
|
||||
{0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48},
|
||||
{0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc},
|
||||
{0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03},
|
||||
{0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d},
|
||||
{0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
|
||||
{0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44},
|
||||
{0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83},
|
||||
{0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
|
||||
{0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
|
||||
{0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e},
|
||||
{0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd},
|
||||
{0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39},
|
||||
{0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b},
|
||||
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
|
||||
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
|
||||
{0x3099, 0x3099}, {0x309a, 0x309a}};
|
||||
const xmlChRangeGroup xmlIsCombiningGroup =
|
||||
{95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
|
||||
|
||||
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
|
||||
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
|
||||
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
|
||||
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
||||
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
|
||||
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
|
||||
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
|
||||
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
||||
{0xf20, 0xf29}};
|
||||
const xmlChRangeGroup xmlIsDigitGroup =
|
||||
{14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
|
||||
|
||||
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
|
||||
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
|
||||
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
|
||||
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
|
||||
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
|
||||
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
|
||||
{0x30fc, 0x30fe}};
|
||||
const xmlChRangeGroup xmlIsExtenderGroup =
|
||||
{10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
|
||||
|
||||
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
|
||||
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
|
||||
{0x3021, 0x3029}, {0x4e00, 0x9fa5}};
|
||||
const xmlChRangeGroup xmlIsIdeographicGroup =
|
||||
{3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
|
||||
|
|
|
@ -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
|
||||
|
@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
|
@ -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}
|
||||
|
@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
;;
|
||||
*5.*)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
;;
|
||||
esac
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
|
@ -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
|
||||
|
@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
echo s390-ibm-zvmoe
|
||||
exit ;;
|
||||
*:OS400:*:*)
|
||||
echo powerpc-ibm-os400
|
||||
echo powerpc-ibm-os400
|
||||
exit ;;
|
||||
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:*:*)
|
||||
|
@ -394,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
exit ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
m68k:machten:*:*)
|
||||
echo m68k-apple-machten${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -480,8 +501,8 @@ EOF
|
|||
echo m88k-motorola-sysv3
|
||||
exit ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
|
@ -494,7 +515,7 @@ EOF
|
|||
else
|
||||
echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit ;;
|
||||
|
@ -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
|
||||
|
@ -594,52 +615,52 @@ EOF
|
|||
9000/[678][0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
|
@ -730,22 +751,22 @@ EOF
|
|||
exit ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit ;;
|
||||
|
@ -769,14 +790,14 @@ EOF
|
|||
exit ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
|
@ -788,30 +809,35 @@ 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
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
exit ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
*:Interix*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -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 ;;
|
||||
|
@ -866,52 +899,56 @@ EOF
|
|||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
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.
|
||||
|
@ -983,11 +1032,11 @@ EOF
|
|||
echo i386-sequent-sysv4
|
||||
exit ;;
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit ;;
|
||||
i*86:OS/2:*:*)
|
||||
|
@ -1019,7 +1068,7 @@ EOF
|
|||
fi
|
||||
exit ;;
|
||||
i*86:*:5:[678]*)
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
case `/bin/uname -X | grep "^Machine"` in
|
||||
*486*) UNAME_MACHINE=i486 ;;
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
|
@ -1047,13 +1096,13 @@ EOF
|
|||
exit ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
exit ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit ;;
|
||||
|
@ -1088,8 +1137,8 @@ EOF
|
|||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||
OS_REL='.3'
|
||||
test -r /etc/.relid \
|
||||
|
@ -1132,10 +1181,10 @@ EOF
|
|||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
|
@ -1161,11 +1210,11 @@ EOF
|
|||
exit ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit ;;
|
||||
|
@ -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 [ "$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 ;;
|
||||
esac
|
||||
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
|
||||
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:*:*)
|
||||
|
@ -1275,13 +1332,13 @@ EOF
|
|||
echo pdp10-unknown-its
|
||||
exit ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:DragonFly:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit ;;
|
||||
*:*VMS:*:*)
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
case "${UNAME_MACHINE}" in
|
||||
A*) echo alpha-dec-vms ; exit ;;
|
||||
I*) echo ia64-dec-vms ; exit ;;
|
||||
|
@ -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_
|
||||
|
@ -1321,11 +1378,11 @@ main ()
|
|||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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,12 +149,12 @@ 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
|
||||
;;
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
|
@ -173,10 +170,10 @@ case $os in
|
|||
os=-chorusos
|
||||
basic_machine=$1
|
||||
;;
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
basic_machine=$1
|
||||
;;
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
|
@ -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-*)
|
||||
|
@ -410,7 +456,7 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
|
@ -480,11 +526,20 @@ 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
|
||||
;;
|
||||
cegcc)
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
|
@ -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
|
||||
|
@ -1253,11 +1324,11 @@ esac
|
|||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
;;
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
|
@ -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* \
|
||||
|
@ -1341,7 +1413,7 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
|
@ -1390,7 +1462,7 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
|
@ -1426,15 +1498,14 @@ case $os in
|
|||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1457,10 +1528,10 @@ else
|
|||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
|
@ -1472,8 +1543,23 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
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-*)
|
||||
|
@ -1493,14 +1579,11 @@ 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
|
||||
;;
|
||||
mep-*)
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
|
@ -1509,6 +1592,9 @@ case $basic_machine in
|
|||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or1k-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
|
@ -1527,7 +1613,7 @@ case $basic_machine in
|
|||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
|
|
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 */
|
||||
};
|
||||
|
||||
|
@ -85,7 +85,7 @@ xmlCtxtDumpCleanCtxt(xmlDebugCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
|||
*
|
||||
* Check that a given namespace is in scope on a node.
|
||||
*
|
||||
* Returns 1 if in scope, -1 in case of argument error,
|
||||
* Returns 1 if in scope, -1 in case of argument error,
|
||||
* -2 if the namespace is not in scope, and -3 if not on
|
||||
* an ancestor node.
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -311,7 +313,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
|
|||
(node != (xmlNodePtr) node->parent->properties))
|
||||
xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
|
||||
"Attr has no prev and not first of attr list\n");
|
||||
|
||||
|
||||
} else if ((node->parent != NULL) && (node->parent->children != node))
|
||||
xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
|
||||
"Node has no prev and not first of parent list\n");
|
||||
|
@ -1067,7 +1069,7 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
|
|||
return;
|
||||
}
|
||||
xmlCtxtDumpOneNode(ctxt, node);
|
||||
if ((node->type != XML_NAMESPACE_DECL) &&
|
||||
if ((node->type != XML_NAMESPACE_DECL) &&
|
||||
(node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
|
||||
ctxt->depth++;
|
||||
xmlCtxtDumpNodeList(ctxt, node->children);
|
||||
|
@ -1602,7 +1604,7 @@ int
|
|||
xmlLsCountNode(xmlNodePtr node) {
|
||||
int ret = 0;
|
||||
xmlNodePtr list = NULL;
|
||||
|
||||
|
||||
if (node == NULL)
|
||||
return(0);
|
||||
|
||||
|
@ -1643,7 +1645,7 @@ xmlLsCountNode(xmlNodePtr node) {
|
|||
ret = 1;
|
||||
break;
|
||||
}
|
||||
for (;list != NULL;ret++)
|
||||
for (;list != NULL;ret++)
|
||||
list = list->next;
|
||||
return(ret);
|
||||
}
|
||||
|
@ -1711,11 +1713,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
|
|||
if (node->type != XML_NAMESPACE_DECL) {
|
||||
if (node->properties != NULL)
|
||||
fprintf(output, "a");
|
||||
else
|
||||
else
|
||||
fprintf(output, "-");
|
||||
if (node->nsDef != NULL)
|
||||
if (node->nsDef != NULL)
|
||||
fprintf(output, "n");
|
||||
else
|
||||
else
|
||||
fprintf(output, "-");
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -1782,7 +1787,7 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
|
|||
* xmlBoolToText:
|
||||
* @boolval: a bool to turn into text
|
||||
*
|
||||
* Convenient way to turn bool into text
|
||||
* Convenient way to turn bool into text
|
||||
*
|
||||
* Returns a pointer to either "True" or "False"
|
||||
*/
|
||||
|
@ -1798,7 +1803,7 @@ xmlBoolToText(int boolval)
|
|||
#ifdef LIBXML_XPATH_ENABLED
|
||||
/****************************************************************
|
||||
* *
|
||||
* The XML shell related functions *
|
||||
* The XML shell related functions *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
|
@ -2049,7 +2054,7 @@ xmlShellBase(xmlShellCtxtPtr ctxt,
|
|||
if (node == NULL) {
|
||||
fprintf(ctxt->output, "NULL\n");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
base = xmlNodeGetBase(node->doc, node);
|
||||
|
||||
|
@ -2276,7 +2281,7 @@ xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||
if (node == NULL) {
|
||||
fprintf(ctxt->output, "NULL\n");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
if ((node->type == XML_DOCUMENT_NODE) ||
|
||||
(node->type == XML_HTML_DOCUMENT_NODE)) {
|
||||
xmlDebugDumpDocumentHead(ctxt->output, (xmlDocPtr) node);
|
||||
|
@ -2411,7 +2416,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
|
|||
if (node == NULL) {
|
||||
fprintf(ctxt->output, "NULL\n");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) {
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
if (node->type == XML_HTML_DOCUMENT_NODE)
|
||||
|
@ -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 {
|
||||
}
|
||||
|
@ -2747,7 +2754,7 @@ xmlShellDu(xmlShellCtxtPtr ctxt,
|
|||
* xmlShellPwd:
|
||||
* @ctxt: the shell context
|
||||
* @buffer: the output buffer
|
||||
* @node: a node
|
||||
* @node: a node
|
||||
* @node2: unused
|
||||
*
|
||||
* Implements the XML shell function "pwd"
|
||||
|
@ -2792,7 +2799,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer,
|
|||
* @input: the line reading function
|
||||
* @output: the output FILE*, defaults to stdout if NULL
|
||||
*
|
||||
* Implements the XML shell
|
||||
* Implements the XML shell
|
||||
* This allow to load, validate, view, modify and save a document
|
||||
* using a environment similar to a UNIX commandline.
|
||||
*/
|
||||
|
@ -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")) {
|
||||
xmlShellDu(ctxt, NULL, ctxt->node, NULL);
|
||||
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,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
@ -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
|
||||
|
@ -80,18 +142,32 @@ if test "$depmode" = hp; then
|
|||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
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"
|
||||
depmode=msvisualcpp
|
||||
# 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'
|
||||
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
|
||||
|
@ -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" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
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"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
# 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=$?
|
||||
# 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,77 +461,107 @@ 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/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
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'.
|
||||
# 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.
|
||||
# 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$//'`
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# 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.
|
||||
# Subdirectories are respected.
|
||||
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
|
||||
# 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
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
if test "$libtool" = yes; then
|
||||
# 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$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.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
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"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
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)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
|
@ -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"
|
||||
|
@ -579,23 +740,23 @@ msvisualcpp)
|
|||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
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>
|
||||
|
@ -44,34 +67,34 @@ typedef unsigned __int32 uint32_t;
|
|||
#define WITH_BIG_KEY
|
||||
|
||||
#ifdef WITH_BIG_KEY
|
||||
#define xmlDictComputeKey(dict, name, len) \
|
||||
(((dict)->size == MIN_DICT_SIZE) ? \
|
||||
xmlDictComputeFastKey(name, len) : \
|
||||
xmlDictComputeBigKey(name, len))
|
||||
#define xmlDictComputeKey(dict, name, len) \
|
||||
(((dict)->size == MIN_DICT_SIZE) ? \
|
||||
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)))
|
||||
#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
|
||||
(((prefix) == NULL) ? \
|
||||
(xmlDictComputeKey(dict, name, len)) : \
|
||||
(((dict)->size == MIN_DICT_SIZE) ? \
|
||||
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)
|
||||
#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
|
||||
xmlDictComputeFastQKey(prefix, plen, name, len)
|
||||
#define xmlDictComputeKey(dict, name, len) \
|
||||
xmlDictComputeFastKey(name, len, (dict)->seed)
|
||||
#define xmlDictComputeQKey(dict, 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,15 +252,20 @@ 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)
|
||||
if (size < 4 * namelen)
|
||||
size = 4 * namelen; /* just in case ! */
|
||||
pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size);
|
||||
if (pool == NULL)
|
||||
|
@ -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,13 +934,13 @@ 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;
|
||||
|
||||
|
||||
if (insert != NULL)
|
||||
if (insert != NULL)
|
||||
insert->next = entry;
|
||||
|
||||
dict->nbElems++;
|
||||
|
@ -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);
|
||||
|
@ -1037,7 +1155,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
|
|||
entry->valid = 1;
|
||||
entry->okey = okey;
|
||||
|
||||
if (insert != NULL)
|
||||
if (insert != NULL)
|
||||
insert->next = entry;
|
||||
|
||||
dict->nbElems++;
|
||||
|
@ -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__ */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -22,41 +22,43 @@
|
|||
#include <libxml/globals.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#include "save.h"
|
||||
|
||||
/*
|
||||
* The XML predefined entities.
|
||||
*/
|
||||
|
||||
static xmlEntity xmlEntityLt = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "lt",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "<", BAD_CAST "<", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
};
|
||||
static xmlEntity xmlEntityGt = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "gt",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST ">", BAD_CAST ">", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
};
|
||||
static xmlEntity xmlEntityAmp = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "amp",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "&", BAD_CAST "&", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
};
|
||||
static xmlEntity xmlEntityQuot = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "quot",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "\"", BAD_CAST "\"", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
};
|
||||
static xmlEntity xmlEntityApos = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "apos",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "'", BAD_CAST "'", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
|
@ -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);
|
||||
|
@ -426,7 +428,7 @@ xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type,
|
|||
*
|
||||
* Do an entity lookup in the table.
|
||||
* returns the corresponding parameter entity, if found.
|
||||
*
|
||||
*
|
||||
* Returns A pointer to the entity structure or NULL if not found.
|
||||
*/
|
||||
static xmlEntityPtr
|
||||
|
@ -441,7 +443,7 @@ xmlGetEntityFromTable(xmlEntitiesTablePtr table, const xmlChar *name) {
|
|||
*
|
||||
* Do an entity lookup in the internal and external subsets and
|
||||
* returns the corresponding parameter entity, if found.
|
||||
*
|
||||
*
|
||||
* Returns A pointer to the entity structure or NULL if not found.
|
||||
*/
|
||||
xmlEntityPtr
|
||||
|
@ -472,7 +474,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) {
|
|||
* Do an entity lookup in the DTD entity hash table and
|
||||
* returns the corresponding entity, if found.
|
||||
* Note: the first argument is the document node, not the DTD node.
|
||||
*
|
||||
*
|
||||
* Returns A pointer to the entity structure or NULL if not found.
|
||||
*/
|
||||
xmlEntityPtr
|
||||
|
@ -496,11 +498,11 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) {
|
|||
* Do an entity lookup in the document entity hash table and
|
||||
* returns the corresponding entity, otherwise a lookup is done
|
||||
* in the predefined entities too.
|
||||
*
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -820,7 +903,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
|
|||
* @ent: An entity
|
||||
*
|
||||
* Build a copy of an entity
|
||||
*
|
||||
*
|
||||
* Returns the new xmlEntitiesPtr or NULL in case of error.
|
||||
*/
|
||||
static xmlEntityPtr
|
||||
|
@ -856,7 +939,7 @@ xmlCopyEntity(xmlEntityPtr ent) {
|
|||
* @table: An entity table
|
||||
*
|
||||
* Build a copy of an entity table.
|
||||
*
|
||||
*
|
||||
* Returns the new xmlEntitiesTablePtr or NULL in case of error.
|
||||
*/
|
||||
xmlEntitiesTablePtr
|
||||
|
@ -1005,7 +1088,7 @@ static void
|
|||
xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
|
||||
xmlDumpEntityDecl(buf, ent);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* xmlDumpEntitiesTable:
|
||||
* @buf: An XML buffer.
|
||||
|
|
|
@ -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; \
|
||||
|
@ -33,7 +33,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
|||
\
|
||||
while (size < 64000) { \
|
||||
va_start(ap, msg); \
|
||||
chars = vsnprintf(str, size, msg, ap); \
|
||||
chars = vsnprintf(str, size, msg, ap); \
|
||||
va_end(ap); \
|
||||
if ((chars > -1) && (chars < size)) { \
|
||||
if (prev_size == chars) { \
|
||||
|
@ -54,9 +54,9 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of out of context errors *
|
||||
* *
|
||||
* *
|
||||
* Handling of out of context errors *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -64,7 +64,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
|||
* @ctx: an error context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Default handler for out of context error messages.
|
||||
*/
|
||||
void XMLCDECL
|
||||
|
@ -82,7 +82,7 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
|
|||
/**
|
||||
* initGenericErrorDefaultFunc:
|
||||
* @handler: the handler
|
||||
*
|
||||
*
|
||||
* Set or reset (if NULL) the default handler for generic errors
|
||||
* to the builtin error function.
|
||||
*/
|
||||
|
@ -137,15 +137,15 @@ xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of parsing errors *
|
||||
* *
|
||||
* *
|
||||
* Handling of parsing errors *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* xmlParserPrintFileInfo:
|
||||
* @input: an xmlParserInputPtr input
|
||||
*
|
||||
*
|
||||
* Displays the associated file and line informations for the current input
|
||||
*/
|
||||
|
||||
|
@ -165,19 +165,21 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
|
|||
/**
|
||||
* xmlParserPrintFileContext:
|
||||
* @input: an xmlParserInputPtr input
|
||||
*
|
||||
*
|
||||
* Displays current context within the input content for error tracking
|
||||
*/
|
||||
|
||||
static void
|
||||
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
||||
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
||||
xmlGenericErrorFunc channel, void *data ) {
|
||||
const xmlChar *cur, *base;
|
||||
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
|
||||
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 */
|
||||
|
@ -186,8 +188,8 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
|||
}
|
||||
n = 0;
|
||||
/* search backwards for beginning-of-line (to max buff size) */
|
||||
while ((n++ < (sizeof(content)-1)) && (cur > base) &&
|
||||
(*(cur) != '\n') && (*(cur) != '\r'))
|
||||
while ((n++ < (sizeof(content)-1)) && (cur > base) &&
|
||||
(*(cur) != '\n') && (*(cur) != '\r'))
|
||||
cur--;
|
||||
if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
|
||||
/* calculate the error position in terms of the current position */
|
||||
|
@ -196,8 +198,8 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
|||
n = 0;
|
||||
ctnt = content;
|
||||
/* copy selected text to our buffer */
|
||||
while ((*cur != 0) && (*(cur) != '\n') &&
|
||||
(*(cur) != '\r') && (n < sizeof(content)-1)) {
|
||||
while ((*cur != 0) && (*(cur) != '\n') &&
|
||||
(*(cur) != '\r') && (n < sizeof(content)-1)) {
|
||||
*ctnt++ = *cur++;
|
||||
n++;
|
||||
}
|
||||
|
@ -221,7 +223,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
|||
/**
|
||||
* xmlParserPrintFileContext:
|
||||
* @input: an xmlParserInputPtr input
|
||||
*
|
||||
*
|
||||
* Displays current context within the input content for error tracking
|
||||
*/
|
||||
void
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -429,7 +443,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||
* @str2: extra string info
|
||||
* @str3: extra string info
|
||||
* @int1: extra int info
|
||||
* @col: column number of the error or 0 if N/A
|
||||
* @col: column number of the error or 0 if N/A
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
|
@ -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;
|
||||
channel = xmlGenericError;
|
||||
if (ctxt != NULL) {
|
||||
data = ctxt;
|
||||
} else {
|
||||
channel = xmlGenericError;
|
||||
if (!data) {
|
||||
data = xmlGenericErrorContext;
|
||||
}
|
||||
data = xmlGenericErrorContext;
|
||||
}
|
||||
}
|
||||
if (schannel != NULL) {
|
||||
schannel(data, to);
|
||||
return;
|
||||
}
|
||||
if (channel == NULL)
|
||||
return;
|
||||
|
||||
|
@ -664,7 +673,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format an error messages, gives file, line, position and
|
||||
* extra parameters.
|
||||
*/
|
||||
|
@ -707,7 +716,7 @@ xmlParserError(void *ctx, const char *msg, ...)
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format a warning messages, gives file, line, position and
|
||||
* extra parameters.
|
||||
*/
|
||||
|
@ -728,7 +737,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
|||
}
|
||||
xmlParserPrintFileInfo(input);
|
||||
}
|
||||
|
||||
|
||||
xmlGenericError(xmlGenericErrorContext, "warning: ");
|
||||
XML_GET_VAR_STR(msg, str);
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", str);
|
||||
|
@ -746,9 +755,9 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of validation errors *
|
||||
* *
|
||||
* *
|
||||
* Handling of validation errors *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
|
@ -756,7 +765,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format an validity error messages, gives file,
|
||||
* line, position and extra parameters.
|
||||
*/
|
||||
|
@ -774,7 +783,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
|||
input = ctxt->input;
|
||||
if ((input->filename == NULL) && (ctxt->inputNr > 1))
|
||||
input = ctxt->inputTab[ctxt->inputNr - 2];
|
||||
|
||||
|
||||
if (had_info == 0) {
|
||||
xmlParserPrintFileInfo(input);
|
||||
}
|
||||
|
@ -800,7 +809,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format a validity warning messages, gives file, line,
|
||||
* position and extra parameters.
|
||||
*/
|
||||
|
@ -819,7 +828,7 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
|||
|
||||
xmlParserPrintFileInfo(input);
|
||||
}
|
||||
|
||||
|
||||
xmlGenericError(xmlGenericErrorContext, "validity warning: ");
|
||||
XML_GET_VAR_STR(msg, str);
|
||||
xmlGenericError(xmlGenericErrorContext, "%s", str);
|
||||
|
|
|
@ -65,9 +65,9 @@ void xmlCleanupGlobals(void)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* *
|
||||
* All the user accessible global variables of the library *
|
||||
* *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -265,7 +246,7 @@ static int xmlPedanticParserDefaultValueThrDef = 0;
|
|||
* xmlLineNumbersDefaultValue:
|
||||
*
|
||||
* Global setting, indicate that the parser should store the line number
|
||||
* in the content field of elements in the DOM tree.
|
||||
* in the content field of elements in the DOM tree.
|
||||
* Disabled by default since this may not be safe for old classes of
|
||||
* applicaton.
|
||||
*/
|
||||
|
@ -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
|
||||
|
||||
|
@ -542,7 +523,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
|
|||
gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
|
||||
gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
|
||||
gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
|
||||
gs->xmlDoValidityCheckingDefaultValue =
|
||||
gs->xmlDoValidityCheckingDefaultValue =
|
||||
xmlDoValidityCheckingDefaultValueThrDef;
|
||||
#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
|
||||
gs->xmlFree = (xmlFreeFunc) xmlMemFree;
|
||||
|
@ -567,7 +548,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
|
|||
gs->xmlParserVersion = LIBXML_VERSION_STRING;
|
||||
gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
|
||||
gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
|
||||
gs->xmlSubstituteEntitiesDefaultValue =
|
||||
gs->xmlSubstituteEntitiesDefaultValue =
|
||||
xmlSubstituteEntitiesDefaultValueThrDef;
|
||||
|
||||
gs->xmlGenericError = xmlGenericErrorThrDef;
|
||||
|
@ -619,7 +600,7 @@ xmlRegisterNodeFunc
|
|||
xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
|
||||
{
|
||||
xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
|
||||
|
||||
|
||||
__xmlRegisterCallbacks = 1;
|
||||
xmlRegisterNodeDefaultValue = func;
|
||||
return(old);
|
||||
|
@ -629,10 +610,10 @@ xmlRegisterNodeFunc
|
|||
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
|
||||
{
|
||||
xmlRegisterNodeFunc old;
|
||||
|
||||
|
||||
xmlMutexLock(xmlThrDefMutex);
|
||||
old = xmlRegisterNodeDefaultValueThrDef;
|
||||
|
||||
|
||||
__xmlRegisterCallbacks = 1;
|
||||
xmlRegisterNodeDefaultValueThrDef = func;
|
||||
xmlMutexUnlock(xmlThrDefMutex);
|
||||
|
@ -652,7 +633,7 @@ xmlDeregisterNodeFunc
|
|||
xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
|
||||
{
|
||||
xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
|
||||
|
||||
|
||||
__xmlRegisterCallbacks = 1;
|
||||
xmlDeregisterNodeDefaultValue = func;
|
||||
return(old);
|
||||
|
@ -665,7 +646,7 @@ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
|
|||
|
||||
xmlMutexLock(xmlThrDefMutex);
|
||||
old = xmlDeregisterNodeDefaultValueThrDef;
|
||||
|
||||
|
||||
__xmlRegisterCallbacks = 1;
|
||||
xmlDeregisterNodeDefaultValueThrDef = func;
|
||||
xmlMutexUnlock(xmlThrDefMutex);
|
||||
|
@ -677,7 +658,7 @@ xmlParserInputBufferCreateFilenameFunc
|
|||
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
|
||||
{
|
||||
xmlParserInputBufferCreateFilenameFunc old;
|
||||
|
||||
|
||||
xmlMutexLock(xmlThrDefMutex);
|
||||
old = xmlParserInputBufferCreateFilenameValueThrDef;
|
||||
if (old == NULL) {
|
||||
|
@ -694,7 +675,7 @@ xmlOutputBufferCreateFilenameFunc
|
|||
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
|
||||
{
|
||||
xmlOutputBufferCreateFilenameFunc old;
|
||||
|
||||
|
||||
xmlMutexLock(xmlThrDefMutex);
|
||||
old = xmlOutputBufferCreateFilenameValueThrDef;
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
|
@ -751,7 +732,7 @@ __xmlMalloc(void){
|
|||
if (IS_MAIN_THREAD)
|
||||
return (&xmlMalloc);
|
||||
else
|
||||
return (&xmlGetGlobalState()->xmlMalloc);
|
||||
return (&xmlGetGlobalState()->xmlMalloc);
|
||||
}
|
||||
|
||||
#undef xmlMallocAtomic
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -64,18 +83,23 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
|
|||
const xmlChar *name2, const xmlChar *name3) {
|
||||
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);
|
||||
|
@ -91,7 +115,10 @@ xmlHashComputeQKey(xmlHashTablePtr table,
|
|||
const xmlChar *prefix3, const xmlChar *name3) {
|
||||
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);
|
||||
|
@ -144,10 +173,10 @@ xmlHashComputeQKey(xmlHashTablePtr table,
|
|||
xmlHashTablePtr
|
||||
xmlHashCreate(int size) {
|
||||
xmlHashTablePtr table;
|
||||
|
||||
|
||||
if (size <= 0)
|
||||
size = 256;
|
||||
|
||||
|
||||
table = xmlMalloc(sizeof(xmlHashTable));
|
||||
if (table) {
|
||||
table->dict = NULL;
|
||||
|
@ -155,8 +184,11 @@ xmlHashCreate(int size) {
|
|||
table->nbElems = 0;
|
||||
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
|
||||
if (table->table) {
|
||||
memset(table->table, 0, size * sizeof(xmlHashEntry));
|
||||
return(table);
|
||||
memset(table->table, 0, size * sizeof(xmlHashEntry));
|
||||
#ifdef HASH_RANDOMIZATION
|
||||
table->random_seed = __xmlRandom();
|
||||
#endif
|
||||
return(table);
|
||||
}
|
||||
xmlFree(table);
|
||||
}
|
||||
|
@ -202,7 +234,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
|
|||
#ifdef DEBUG_GROW
|
||||
unsigned long nbElem = 0;
|
||||
#endif
|
||||
|
||||
|
||||
if (table == NULL)
|
||||
return(-1);
|
||||
if (size < 8)
|
||||
|
@ -214,7 +246,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
|
|||
oldtable = table->table;
|
||||
if (oldtable == NULL)
|
||||
return(-1);
|
||||
|
||||
|
||||
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
|
||||
if (table->table == NULL) {
|
||||
table->table = oldtable;
|
||||
|
@ -224,13 +256,13 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
|
|||
table->size = size;
|
||||
|
||||
/* If the two loops are merged, there would be situations where
|
||||
a new entry needs to allocated and data copied into it from
|
||||
a new entry needs to allocated and data copied into it from
|
||||
the main table. So instead, we run through the array twice, first
|
||||
copying all the elements in the main array (where we can't get
|
||||
conflicts) and then the rest, so we only free (and don't allocate)
|
||||
*/
|
||||
for (i = 0; i < oldsize; i++) {
|
||||
if (oldtable[i].valid == 0)
|
||||
if (oldtable[i].valid == 0)
|
||||
continue;
|
||||
key = xmlHashComputeKey(table, oldtable[i].name, oldtable[i].name2,
|
||||
oldtable[i].name3);
|
||||
|
@ -254,8 +286,8 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
|
|||
table->table[key].next = NULL;
|
||||
xmlFree(iter);
|
||||
} else {
|
||||
iter->next = table->table[key].next;
|
||||
table->table[key].next = iter;
|
||||
iter->next = table->table[key].next;
|
||||
table->table[key].next = iter;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_GROW
|
||||
|
@ -571,7 +603,7 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
|
|||
entry->valid = 1;
|
||||
|
||||
|
||||
if (insert != NULL)
|
||||
if (insert != NULL)
|
||||
insert->next = entry;
|
||||
|
||||
table->nbElems++;
|
||||
|
@ -720,7 +752,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
|
|||
* Returns the a pointer to the userdata
|
||||
*/
|
||||
void *
|
||||
xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3) {
|
||||
unsigned long key;
|
||||
xmlHashEntryPtr entry;
|
||||
|
@ -793,14 +825,14 @@ typedef struct {
|
|||
void *data;
|
||||
} stubData;
|
||||
|
||||
static void
|
||||
stubHashScannerFull (void *payload, void *data, const xmlChar *name,
|
||||
static void
|
||||
stubHashScannerFull (void *payload, void *data, const xmlChar *name,
|
||||
const xmlChar *name2 ATTRIBUTE_UNUSED,
|
||||
const xmlChar *name3 ATTRIBUTE_UNUSED) {
|
||||
stubData *stubdata = (stubData *) data;
|
||||
stubdata->hashscanner (payload, stubdata->data, (xmlChar *) name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlHashScan:
|
||||
* @table: the hash table
|
||||
|
@ -813,7 +845,7 @@ void
|
|||
xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
|
||||
stubData stubdata;
|
||||
stubdata.data = data;
|
||||
stubdata.hashscanner = f;
|
||||
stubdata.hashscanner = f;
|
||||
xmlHashScanFull (table, stubHashScannerFull, &stubdata);
|
||||
}
|
||||
|
||||
|
@ -838,7 +870,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
|
|||
|
||||
if (table->table) {
|
||||
for(i = 0; i < table->size; i++) {
|
||||
if (table->table[i].valid == 0)
|
||||
if (table->table[i].valid == 0)
|
||||
continue;
|
||||
iter = &(table->table[i]);
|
||||
while (iter) {
|
||||
|
@ -877,7 +909,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
|
|||
* the comparison is considered to match.
|
||||
*/
|
||||
void
|
||||
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3,
|
||||
xmlHashScanner f, void *data) {
|
||||
xmlHashScanFull3 (table, name, name2, name3,
|
||||
|
@ -898,7 +930,7 @@ xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
|
|||
* the comparison is considered to match.
|
||||
*/
|
||||
void
|
||||
xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3,
|
||||
xmlHashScannerFull f, void *data) {
|
||||
int i;
|
||||
|
@ -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:
|
|
@ -47,44 +47,44 @@ XMLPUBFUN int XMLCALL
|
|||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseDoc (xmlChar *cur,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseDoc (xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseFile (const char *filename,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseChunk (docbParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseDocument (docbParserCtxtPtr ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -83,87 +83,87 @@ struct _htmlEntityDesc {
|
|||
/*
|
||||
* There is only few public functions.
|
||||
*/
|
||||
XMLPUBFUN const htmlElemDesc * XMLCALL
|
||||
XMLPUBFUN const htmlElemDesc * XMLCALL
|
||||
htmlTagLookup (const xmlChar *tag);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlEntityLookup(const xmlChar *name);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlEntityValueLookup(unsigned int value);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsAutoClosed(htmlDocPtr doc,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlAutoCloseTag(htmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
|
||||
const xmlChar **str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseCharRef(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlParseElement(htmlParserCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlNewParserCtxt(void);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseDocument(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlSAXParseDoc (xmlChar *cur,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlParseDoc (xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlSAXParseFile(const char *filename,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
UTF8ToHtml (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlEncodeEntities(unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsScriptAttribute(const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlHandleOmittedElem(int val);
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseChunk (htmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
#endif /* LIBXML_PUSH_ENABLED */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
|
|
@ -62,78 +62,78 @@ extern "C" {
|
|||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlNewDoc (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlNewDocNoDtD (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
htmlGetMetaEncoding (htmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSetMetaEncoding (htmlDocPtr doc,
|
||||
const xmlChar *encoding);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocDumpMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocDumpMemoryFormat (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlDocDump (FILE *f,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFile (const char *filename,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpFile (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlNodeDumpFileFormat (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFileFormat (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding);
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsBooleanAttr (const xmlChar *name);
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
|
@ -25,53 +25,53 @@ extern "C" {
|
|||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
getPublicId (void *ctx);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
getSystemId (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
setDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
getLineNumber (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
getColumnNumber (void *ctx);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
isStandalone (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
hasInternalSubset (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
hasExternalSubset (void *ctx);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
internalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
externalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
getEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
getParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
resolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
entityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
attributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
|
@ -79,87 +79,87 @@ XMLPUBFUN void XMLCALL
|
|||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
elementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
notationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
unparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
startDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
endDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
attribute (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
startElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
endElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
ignorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
processingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
globalNamespace (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
setNamespace (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
getNamespace (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
checkNamespace (void *ctx,
|
||||
xmlChar *nameSpace);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
namespaceDecl (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
cdataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
|
|
@ -23,53 +23,53 @@ extern "C" {
|
|||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSAX2GetPublicId (void *ctx);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSAX2GetSystemId (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2SetDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2GetLineNumber (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2GetColumnNumber (void *ctx);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2IsStandalone (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2HasInternalSubset (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2HasExternalSubset (void *ctx);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ExternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlSAX2GetEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlSAX2GetParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlSAX2ResolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2AttributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
|
@ -77,36 +77,38 @@ XMLPUBFUN void XMLCALL
|
|||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ElementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2NotationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2UnparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndDocument (void *ctx);
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
#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,
|
||||
const xmlChar **atts);
|
||||
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,
|
||||
|
@ -122,25 +124,25 @@ XMLPUBFUN void XMLCALL
|
|||
const xmlChar *localname,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *URI);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2IgnorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ProcessingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2CDataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
@ -153,22 +155,22 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlSAXVersion (xmlSAXHandler *hdlr,
|
||||
int version);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDefaultSAXHandlerInit (void);
|
||||
#endif
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
docbDefaultSAXHandlerInit (void);
|
||||
#endif
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDefaultSAXHandlerInit (void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ extern "C" {
|
|||
|
||||
/*
|
||||
* xmlC14NMode:
|
||||
*
|
||||
*
|
||||
* Predefined values for C14N modes
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -68,111 +68,111 @@ typedef xmlCatalog *xmlCatalogPtr;
|
|||
*/
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlNewCatalog (int sgml);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlLoadACatalog (const char *filename);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlLoadSGMLSuperCatalog (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlACatalogAdd (xmlCatalogPtr catal,
|
||||
const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlACatalogRemove (xmlCatalogPtr catal,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolve (xmlCatalogPtr catal,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
||||
const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
||||
const xmlChar *URI);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlACatalogDump (xmlCatalogPtr catal,
|
||||
FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
||||
|
||||
/*
|
||||
* Global operations.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitializeCatalog (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlLoadCatalog (const char *filename);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlLoadCatalogs (const char *paths);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogCleanup (void);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogDump (FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolve (const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolveSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolvePublic (const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolveURI (const xmlChar *URI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogAdd (const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogRemove (const xmlChar *value);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseCatalogFile (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogConvert (void);
|
||||
|
||||
/*
|
||||
* Strictly minimal interfaces for per-document catalogs used
|
||||
* by the parser.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogFreeLocal (void *catalogs);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlCatalogAddLocal (void *catalogs,
|
||||
const xmlChar *URL);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogLocalResolve (void *catalogs,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogLocalResolveURI(void *catalogs,
|
||||
const xmlChar *URI);
|
||||
/*
|
||||
* Preference settings.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogSetDebug (int level);
|
||||
XMLPUBFUN xmlCatalogPrefer XMLCALL
|
||||
XMLPUBFUN xmlCatalogPrefer XMLCALL
|
||||
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
||||
XMLPUBFUN xmlCatalogAllow XMLCALL
|
||||
XMLPUBFUN xmlCatalogAllow XMLCALL
|
||||
xmlCatalogGetDefaults (void);
|
||||
|
||||
|
||||
/* DEPRECATED interfaces */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlCatalogGetSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlCatalogGetPublic (const xmlChar *pubID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -25,18 +25,18 @@ extern "C" {
|
|||
/*
|
||||
* The standard Dump routines.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpString (FILE *output,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpAttr (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpAttrList (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpOneNode (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
|
@ -54,16 +54,16 @@ XMLPUBFUN void XMLCALL
|
|||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpDocument (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpDTD (FILE *output,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpEntities (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* Checking routines *
|
||||
* Checking routines *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
|
@ -73,16 +73,16 @@ XMLPUBFUN int XMLCALL
|
|||
|
||||
/****************************************************************
|
||||
* *
|
||||
* XML shell helpers *
|
||||
* XML shell helpers *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlLsCountNode (xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlBoolToText (int boolval);
|
||||
|
||||
/****************************************************************
|
||||
|
@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
|||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintXPathError (int errorType,
|
||||
const char *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellList (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellBase (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellDir (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintNode (xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellCat (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellSave (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
||||
char *dtd,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellDu (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr tree,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
||||
char *buffer,
|
||||
xmlNodePtr node,
|
||||
|
@ -201,12 +201,12 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* The Shell interface.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShell (xmlDocPtr doc,
|
||||
char *filename,
|
||||
xmlShellReadlineFunc input,
|
||||
FILE *output);
|
||||
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -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,42 +32,46 @@ 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
|
||||
xmlDictReference(xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDictFree (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Lookup of entry in the dictionnary.
|
||||
* Lookup of entry in the dictionary.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictLookup (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictExists (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictQLookup (xmlDictPtr dict,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDictOwns (xmlDictPtr dict,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDictSize (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" {
|
||||
|
@ -178,32 +163,32 @@ extern "C" {
|
|||
/*
|
||||
* Interfaces for encoding handlers.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitCharEncodingHandlers (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupCharEncodingHandlers (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlFindCharEncodingHandler (const char *name);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlNewCharEncodingHandler (const char *name,
|
||||
xmlCharEncodingInputFunc input,
|
||||
xmlCharEncodingOutputFunc output);
|
||||
xmlNewCharEncodingHandler (const char *name,
|
||||
xmlCharEncodingInputFunc input,
|
||||
xmlCharEncodingOutputFunc output);
|
||||
|
||||
/*
|
||||
* Interfaces for encoding names and aliases.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAddEncodingAlias (const char *name,
|
||||
const char *alias);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDelEncodingAlias (const char *alias);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlGetEncodingAlias (const char *alias);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupEncodingAliases (void);
|
||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||
xmlParseCharEncoding (const char *name);
|
||||
|
@ -217,12 +202,12 @@ XMLPUBFUN xmlCharEncoding XMLCALL
|
|||
xmlDetectCharEncoding (const unsigned char *in,
|
||||
int len);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
|
@ -230,20 +215,20 @@ XMLPUBFUN int XMLCALL
|
|||
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
|
||||
|
||||
/*
|
||||
* Export a few useful functions
|
||||
*/
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
UTF8Toisolat1 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
isolat1ToUTF8 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
|
|
|
@ -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()))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Summary: Chained hash tables
|
||||
* Description: This module implements the hash table support used in
|
||||
* various places in the library.
|
||||
* Description: This module implements the hash table support used in
|
||||
* various places in the library.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
|
@ -108,40 +108,40 @@ XMLPUBFUN xmlHashTablePtr XMLCALL
|
|||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCreateDict(int size,
|
||||
xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashFree (xmlHashTablePtr table,
|
||||
xmlHashDeallocator f);
|
||||
|
||||
/*
|
||||
* Add a new entry to the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry2(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry2(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
|
@ -152,13 +152,13 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Remove an entry from the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3,
|
||||
xmlHashDeallocator f);
|
||||
|
@ -166,29 +166,29 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Retrieve the userdata.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup (xmlHashTablePtr table,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup2 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup2 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *prefix2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix,
|
||||
|
@ -200,27 +200,27 @@ XMLPUBFUN void * XMLCALL
|
|||
/*
|
||||
* Helpers.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCopy (xmlHashTablePtr table,
|
||||
xmlHashCopier f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashSize (xmlHashTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan (xmlHashTablePtr table,
|
||||
xmlHashScanner f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashScanner f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull (xmlHashTablePtr table,
|
||||
xmlHashScannerFull f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Summary: lists interfaces
|
||||
* Description: this module implement the list support used in
|
||||
* Description: this module implement the list support used in
|
||||
* various place in the library.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
|
@ -55,76 +55,76 @@ typedef int (*xmlListWalker) (const void *data, const void *user);
|
|||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlListCreate (xmlListDeallocator deallocator,
|
||||
xmlListDataCompare compare);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListDelete (xmlListPtr l);
|
||||
|
||||
/* Basic Operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlListSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlListReverseSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListInsert (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListAppend (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveFirst (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveLast (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveAll (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListClear (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListEmpty (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
xmlListFront (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
xmlListEnd (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListSize (xmlListPtr l);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListPopFront (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListPopBack (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListPushFront (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListPushBack (xmlListPtr l,
|
||||
void *data);
|
||||
|
||||
/* Advanced Operators */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListReverse (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListSort (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
const void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListReverseWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
const void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListMerge (xmlListPtr l1,
|
||||
xmlListPtr l2);
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlListDup (const xmlListPtr old);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListCopy (xmlListPtr cur,
|
||||
const xmlListPtr old);
|
||||
/* Link operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlLinkGetData (xmlLinkPtr lk);
|
||||
|
||||
/* xmlListUnique() */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __NANO_FTP_H__
|
||||
#define __NANO_FTP_H__
|
||||
|
||||
|
@ -15,12 +15,32 @@
|
|||
|
||||
#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
|
||||
|
||||
/**
|
||||
* ftpListCallback:
|
||||
* ftpListCallback:
|
||||
* @userData: user provided data for the callback
|
||||
* @filename: the file name (including "->" when links are shown)
|
||||
* @attrib: the attribute string
|
||||
|
@ -44,7 +64,7 @@ typedef void (*ftpListCallback) (void *userData,
|
|||
const char *month, int day, int hour,
|
||||
int minute);
|
||||
/**
|
||||
* ftpDataCallback:
|
||||
* ftpDataCallback:
|
||||
* @userData: the user provided context
|
||||
* @data: the data received
|
||||
* @len: its size in bytes
|
||||
|
@ -60,78 +80,78 @@ typedef void (*ftpDataCallback) (void *userData,
|
|||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPInit (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPCleanup (void);
|
||||
|
||||
/*
|
||||
* Creating/freeing contexts.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPNewCtxt (const char *URL);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPFreeCtxt (void * ctx);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPConnectTo (const char *server,
|
||||
int port);
|
||||
/*
|
||||
* Opening/closing session connections.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPOpen (const char *URL);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPConnect (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPClose (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPQuit (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPScanProxy (const char *URL);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPProxy (const char *host,
|
||||
int port,
|
||||
const char *user,
|
||||
const char *passwd,
|
||||
int type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPUpdateURL (void *ctx,
|
||||
const char *URL);
|
||||
|
||||
/*
|
||||
* Rather internal commands.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPGetResponse (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCheckResponse (void *ctx);
|
||||
|
||||
/*
|
||||
* CD/DIR/GET handlers.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCwd (void *ctx,
|
||||
const char *directory);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPDele (void *ctx,
|
||||
const char *file);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetConnection (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCloseConnection(void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPList (void *ctx,
|
||||
ftpListCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetSocket (void *ctx,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPGet (void *ctx,
|
||||
ftpDataCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __NANO_HTTP_H__
|
||||
#define __NANO_HTTP_H__
|
||||
|
||||
|
@ -20,22 +20,22 @@ extern "C" {
|
|||
#endif
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPInit (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPCleanup (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPScanProxy (const char *URL);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPFetch (const char *URL,
|
||||
const char *filename,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPMethod (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
char **contentType,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPMethodRedir (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
|
@ -43,16 +43,16 @@ XMLPUBFUN void * XMLCALL
|
|||
char **redir,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPOpen (const char *URL,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPOpenRedir (const char *URL,
|
||||
char **contentType,
|
||||
char **redir);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPReturnCode (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPAuthHeader (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPRedir (void *ctx);
|
||||
|
@ -62,16 +62,16 @@ XMLPUBFUN const char * XMLCALL
|
|||
xmlNanoHTTPEncoding (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPMimeType (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPSave (void *ctxt,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPClose (void *ctx);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ struct _xmlParserInput {
|
|||
* xmlParserNodeInfo:
|
||||
*
|
||||
* The parser can be asked to collect Node informations, i.e. at what
|
||||
* place in the file they were detected.
|
||||
* place in the file they were detected.
|
||||
* NOTE: This is off by default and not very well tested.
|
||||
*/
|
||||
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
|
||||
|
@ -125,9 +125,9 @@ typedef enum {
|
|||
XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
|
||||
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
|
||||
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
|
||||
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
||||
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
||||
XML_PARSER_IGNORE, /* within an IGNORED section */
|
||||
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
|
||||
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
|
||||
} xmlParserInputState;
|
||||
|
||||
/**
|
||||
|
@ -221,7 +221,7 @@ struct _xmlParserCtxt {
|
|||
xmlValidCtxt vctxt; /* The validity context */
|
||||
|
||||
xmlParserInputState instate; /* current type of input */
|
||||
int token; /* next char look-ahead */
|
||||
int token; /* next char look-ahead */
|
||||
|
||||
char *directory; /* the data directory */
|
||||
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -398,8 +401,8 @@ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
|
|||
/**
|
||||
* entityDeclSAXFunc:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @publicId: The public ID of the entity
|
||||
* @systemId: The system ID of the entity
|
||||
* @content: the entity value (without processing).
|
||||
|
@ -429,8 +432,8 @@ typedef void (*notationDeclSAXFunc)(void *ctx,
|
|||
* attributeDeclSAXFunc:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @elem: the name of the element
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @def: the type of default value
|
||||
* @defaultValue: the attribute default value
|
||||
* @tree: the tree of enumerated value set
|
||||
|
@ -447,8 +450,8 @@ typedef void (*attributeDeclSAXFunc)(void *ctx,
|
|||
/**
|
||||
* elementDeclSAXFunc:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @content: the element value tree
|
||||
*
|
||||
* An element definition has been parsed.
|
||||
|
@ -535,7 +538,7 @@ typedef void (*attributeSAXFunc) (void *ctx,
|
|||
* @ctx: the user data (XML parser context)
|
||||
* @name: The entity name
|
||||
*
|
||||
* Called when an entity reference is detected.
|
||||
* Called when an entity reference is detected.
|
||||
*/
|
||||
typedef void (*referenceSAXFunc) (void *ctx,
|
||||
const xmlChar *name);
|
||||
|
@ -599,7 +602,7 @@ typedef void (*cdataBlockSAXFunc) (
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format a warning messages, callback.
|
||||
*/
|
||||
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
|
||||
|
@ -609,7 +612,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format an error messages, callback.
|
||||
*/
|
||||
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
|
||||
|
@ -619,7 +622,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
|
|||
* @ctx: an XML parser context
|
||||
* @msg: the message to display/transmit
|
||||
* @...: extra parameters for the message display
|
||||
*
|
||||
*
|
||||
* Display and format fatal error messages, callback.
|
||||
* Note: so far fatalError() SAX callbacks are not used, error()
|
||||
* get all the callbacks for errors.
|
||||
|
@ -695,7 +698,7 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
|
|||
int nb_attributes,
|
||||
int nb_defaulted,
|
||||
const xmlChar **attributes);
|
||||
|
||||
|
||||
/**
|
||||
* endElementNsSAX2Func:
|
||||
* @ctx: the user data (XML parser context)
|
||||
|
@ -790,7 +793,7 @@ struct _xmlSAXHandlerV1 {
|
|||
* xmlExternalEntityLoader:
|
||||
* @URL: The System ID of the resource requested
|
||||
* @ID: The Public ID of the resource requested
|
||||
* @context: the XML parser context
|
||||
* @context: the XML parser context
|
||||
*
|
||||
* External entity loaders types.
|
||||
*
|
||||
|
@ -816,18 +819,18 @@ extern "C" {
|
|||
/*
|
||||
* Init/Cleanup
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitParser (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupParser (void);
|
||||
|
||||
/*
|
||||
* Input functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputRead (xmlParserInputPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputGrow (xmlParserInputPtr in,
|
||||
int len);
|
||||
|
||||
|
@ -835,101 +838,101 @@ XMLPUBFUN int XMLCALL
|
|||
* Basic parsing Interfaces
|
||||
*/
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseDoc (const xmlChar *cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseFile (const char *filename);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseMemory (const char *buffer,
|
||||
int size);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSubstituteEntitiesDefault(int val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlKeepBlanksDefault (int val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPedanticParserDefault(int val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlLineNumbersDefault (int val);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
/*
|
||||
* Recovery mode
|
||||
* Recovery mode
|
||||
*/
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlRecoverDoc (const xmlChar *cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlRecoverMemory (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlRecoverFile (const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
/*
|
||||
* Less common routines and SAX interfaces
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseDocument (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
|
||||
const xmlChar *cur,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
||||
const char *buffer,
|
||||
int size,
|
||||
int size,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
||||
const char *buffer,
|
||||
int size,
|
||||
int size,
|
||||
int recovery,
|
||||
void *data);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseFile (xmlSAXHandlerPtr sax,
|
||||
const char *filename,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
|
||||
const char *filename,
|
||||
int recovery,
|
||||
void *data);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
|
||||
const char *filename);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseEntity (const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlParseDTD (const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlIOParseDTD (xmlSAXHandlerPtr sax,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc);
|
||||
#endif /* LIBXML_VALID_ENABLE */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseBalancedChunkMemory(xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
|
@ -944,7 +947,7 @@ XMLPUBFUN xmlParserErrors XMLCALL
|
|||
int options,
|
||||
xmlNodePtr *lst);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
|
@ -952,7 +955,7 @@ XMLPUBFUN int XMLCALL
|
|||
const xmlChar *string,
|
||||
xmlNodePtr *lst,
|
||||
int recover);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseExternalEntity (xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
|
@ -961,7 +964,7 @@ XMLPUBFUN int XMLCALL
|
|||
const xmlChar *ID,
|
||||
xmlNodePtr *lst);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
|
||||
const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
|
@ -970,35 +973,35 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Parser contexts handling.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlNewParserCtxt (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar* buffer,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateDocParserCtxt (const xmlChar *cur);
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
/*
|
||||
* Reading/setting optional parsing features.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetFeaturesList (int *len,
|
||||
const char **result);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *result);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *value);
|
||||
|
@ -1008,13 +1011,13 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseChunk (xmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
|
@ -1025,7 +1028,7 @@ XMLPUBFUN int XMLCALL
|
|||
* Special I/O mode.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
xmlInputReadCallback ioread,
|
||||
|
@ -1033,7 +1036,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
|||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc);
|
||||
|
@ -1044,14 +1047,14 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
|||
XMLPUBFUN const xmlParserNodeInfo* XMLCALL
|
||||
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
||||
const xmlParserNodeInfoPtr info);
|
||||
|
||||
|
@ -1059,7 +1062,7 @@ XMLPUBFUN void XMLCALL
|
|||
* External entities handling actually implemented in xmlIO.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
|
||||
XMLPUBFUN xmlExternalEntityLoader XMLCALL
|
||||
xmlGetExternalEntityLoader(void);
|
||||
|
@ -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:
|
||||
*
|
||||
|
@ -57,7 +90,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
|||
|
||||
/************************************************************************
|
||||
* *
|
||||
* UNICODE version of the macros. *
|
||||
* UNICODE version of the macros. *
|
||||
* *
|
||||
************************************************************************/
|
||||
/**
|
||||
|
@ -153,7 +186,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
|||
*
|
||||
* Always false (all combining chars > 0xff)
|
||||
*/
|
||||
#define IS_COMBINING_CH(c) 0
|
||||
#define IS_COMBINING_CH(c) 0
|
||||
|
||||
/**
|
||||
* IS_EXTENDER:
|
||||
|
@ -194,7 +227,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
|||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
*
|
||||
* [84] Letter ::= BaseChar | Ideographic
|
||||
* [84] Letter ::= BaseChar | Ideographic
|
||||
*/
|
||||
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
|
||||
|
||||
|
@ -251,7 +284,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
|||
*
|
||||
* Skips the end of line chars.
|
||||
*/
|
||||
#define SKIP_EOL(p) \
|
||||
#define SKIP_EOL(p) \
|
||||
if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
|
||||
if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
|
||||
|
||||
|
@ -288,25 +321,25 @@ XMLPUBFUN int XMLCALL xmlIsLetter (int c);
|
|||
/**
|
||||
* Parser context.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateFileParserCtxt (const char *filename);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateURLParserCtxt (const char *filename,
|
||||
int options);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
|
@ -318,35 +351,35 @@ XMLPUBFUN void XMLCALL
|
|||
xmlParserErrors xmlerr,
|
||||
const char *msg,
|
||||
const xmlChar * str1,
|
||||
const xmlChar * str2);
|
||||
const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Input Streams.
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *buffer);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPushInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlChar XMLCALL
|
||||
XMLPUBFUN xmlChar XMLCALL
|
||||
xmlPopInput (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeInputStream (xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewInputStream (xmlParserCtxtPtr ctxt);
|
||||
|
||||
/**
|
||||
* Namespaces.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSplitQName (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlChar **prefix);
|
||||
|
@ -354,112 +387,112 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||
/**
|
||||
* Generic production rules.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **orig);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseAttValue (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseCharData (xmlParserCtxtPtr ctxt,
|
||||
int cdata);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseExternalID (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **publicID,
|
||||
int strict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseComment (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParsePITarget (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParsePI (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlParseNotationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlParseElementMixedContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlParseElementChildrenContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlElementContentPtr *result);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseCharRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParsePEReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseAttribute (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseStartTag (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseEndTag (xmlParserCtxtPtr ctxt);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseCDSect (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseContent (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseElement (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseEncName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseMisc (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
const xmlChar *SystemID);
|
||||
/**
|
||||
* XML_SUBSTITUTE_NONE:
|
||||
*
|
||||
|
@ -483,7 +516,7 @@ XMLPUBFUN void XMLCALL
|
|||
*
|
||||
* Both general and parameter entities need to be substituted.
|
||||
*/
|
||||
#define XML_SUBSTITUTE_BOTH 3
|
||||
#define XML_SUBSTITUTE_BOTH 3
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
|
@ -563,21 +596,21 @@ XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filenam
|
|||
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
|
||||
xmlNodePtr firstNode,
|
||||
xmlNodePtr lastNode);
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseNamespace (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlScanName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **prefix);
|
||||
/**
|
||||
|
@ -590,7 +623,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHandleEntity (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -104,8 +104,8 @@ typedef enum {
|
|||
XML_SCHEMA_TYPE_IDC_UNIQUE,
|
||||
XML_SCHEMA_TYPE_IDC_KEY,
|
||||
XML_SCHEMA_TYPE_IDC_KEYREF,
|
||||
XML_SCHEMA_TYPE_PARTICLE = 25,
|
||||
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
|
||||
XML_SCHEMA_TYPE_PARTICLE = 25,
|
||||
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
|
||||
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
|
||||
XML_SCHEMA_FACET_MINEXCLUSIVE,
|
||||
XML_SCHEMA_FACET_MAXINCLUSIVE,
|
||||
|
|
|
@ -69,17 +69,17 @@ typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
|
|||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewMemParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
|
||||
/*****
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
|
@ -92,9 +92,9 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
|
||||
*****/
|
||||
XMLPUBFUN xmlSchematronPtr XMLCALL
|
||||
XMLPUBFUN xmlSchematronPtr XMLCALL
|
||||
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFree (xmlSchematronPtr schema);
|
||||
/*
|
||||
* Interfaces for validating
|
||||
|
@ -105,7 +105,7 @@ XMLPUBFUN void XMLCALL
|
|||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
/******
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
|
@ -125,12 +125,12 @@ XMLPUBFUN int XMLCALL
|
|||
xmlNodePtr elem);
|
||||
*******/
|
||||
|
||||
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
|
||||
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlDocPtr instance);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
@ -480,7 +518,7 @@ struct _xmlNode {
|
|||
/**
|
||||
* XML_GET_LINE:
|
||||
*
|
||||
* Macro to extract the line number of an element node.
|
||||
* Macro to extract the line number of an element node.
|
||||
*/
|
||||
#define XML_GET_LINE(n) \
|
||||
(xmlGetLineNo(n))
|
||||
|
@ -523,7 +561,7 @@ struct _xmlDoc {
|
|||
|
||||
/* End of common part */
|
||||
int compression;/* level of zlib compression */
|
||||
int standalone; /* standalone document (no external refs)
|
||||
int standalone; /* standalone document (no external refs)
|
||||
1 if standalone="yes"
|
||||
0 if standalone="no"
|
||||
-1 if there is no XML declaration
|
||||
|
@ -554,9 +592,9 @@ typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
|
|||
/**
|
||||
* xmlDOMWrapAcquireNsFunction:
|
||||
* @ctxt: a DOM wrapper context
|
||||
* @node: the context node (element or attribute)
|
||||
* @node: the context node (element or attribute)
|
||||
* @nsName: the requested namespace name
|
||||
* @nsPrefix: the requested namespace prefix
|
||||
* @nsPrefix: the requested namespace prefix
|
||||
*
|
||||
* A function called to acquire namespaces (xmlNs) from the wrapper.
|
||||
*
|
||||
|
@ -603,7 +641,7 @@ struct _xmlDOMWrapCtxt {
|
|||
/**
|
||||
* xmlRootNode:
|
||||
*
|
||||
* Macro for compatibility naming layer with libxml1. Maps
|
||||
* Macro for compatibility naming layer with libxml1. Maps
|
||||
* to "children".
|
||||
*/
|
||||
#ifndef xmlRootNode
|
||||
|
@ -617,436 +655,450 @@ 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);
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateQName (const xmlChar *value,
|
||||
int space);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateName (const xmlChar *value,
|
||||
int space);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNMToken (const xmlChar *value,
|
||||
int space);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlBuildQName (const xmlChar *ncname,
|
||||
const xmlChar *prefix,
|
||||
xmlChar *memory,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSplitQName2 (const xmlChar *name,
|
||||
xmlChar **prefix);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSplitQName3 (const xmlChar *name,
|
||||
int *len);
|
||||
|
||||
/*
|
||||
* Handling Buffers.
|
||||
* Handling Buffers, the old ones see @xmlBuf for the new ones.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
xmlGetBufferAllocationScheme(void);
|
||||
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
xmlBufferCreate (void);
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
xmlBufferCreateSize (size_t size);
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
xmlBufferCreateStatic (void *mem,
|
||||
size_t size);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferResize (xmlBufferPtr buf,
|
||||
unsigned int size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferFree (xmlBufferPtr buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferDump (FILE *file,
|
||||
xmlBufferPtr buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferAdd (xmlBufferPtr buf,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferAddHead (xmlBufferPtr buf,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferCat (xmlBufferPtr buf,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferCCat (xmlBufferPtr buf,
|
||||
const char *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferShrink (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferGrow (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferEmpty (xmlBufferPtr buf);
|
||||
XMLPUBFUN const xmlChar* XMLCALL
|
||||
xmlBufferContent (const xmlBufferPtr buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN const xmlChar* XMLCALL
|
||||
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);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlBufferLength (const xmlBuffer *buf);
|
||||
|
||||
/*
|
||||
* Creating/freeing new structures.
|
||||
*/
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlCreateIntSubset (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlNewDtd (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlGetIntSubset (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlGetIntSubset (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDtd (xmlDtdPtr cur);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlNewGlobalNs (xmlDocPtr doc,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlNewNs (xmlNodePtr node,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNs (xmlNsPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNsList (xmlNsPtr cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlNewDoc (const xmlChar *version);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDoc (xmlDocPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlNewDocProp (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlNewProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlNewNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlNewNsPropEatName (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreePropList (xmlAttrPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeProp (xmlAttrPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlCopyProp (xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlCopyPropList (xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
xmlCopyDtd (xmlDtdPtr dtd);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlCopyDoc (xmlDocPtr doc,
|
||||
int recursive);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
/*
|
||||
* Creating new nodes.
|
||||
*/
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocNode (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocNodeEatName (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewNode (xmlNsPtr ns,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewNodeEatName (xmlNsPtr ns,
|
||||
xmlChar *name);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
#endif
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocText (xmlDocPtr doc,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocText (const xmlDoc *doc,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewText (const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocPI (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewPI (const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocTextLen (xmlDocPtr doc,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewTextLen (const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocComment (xmlDocPtr doc,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewComment (const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewCDataBlock (xmlDocPtr doc,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewCharRef (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewReference (xmlDocPtr doc,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewReference (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNode (const xmlNodePtr node,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNode (xmlNodePtr node,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocCopyNode (const xmlNodePtr node,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocCopyNode (xmlNodePtr node,
|
||||
xmlDocPtr doc,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocCopyNodeList (xmlDocPtr doc,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNodeList (const xmlNodePtr node);
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlCopyNodeList (xmlNodePtr node);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewTextChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocRawNode (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlNewDocFragment (xmlDocPtr doc);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/*
|
||||
* Navigating.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlGetLineNo (xmlNodePtr node);
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlGetLineNo (const xmlNode *node);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNodePath (xmlNodePtr node);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNodePath (const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocGetRootElement (xmlDocPtr doc);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlGetLastChild (xmlNodePtr parent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeIsText (xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsBlankNode (xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocGetRootElement (const xmlDoc *doc);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlGetLastChild (const xmlNode *parent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeIsText (const xmlNode *node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsBlankNode (const xmlNode *node);
|
||||
|
||||
/*
|
||||
* Changing the structure.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlDocSetRootElement (xmlDocPtr doc,
|
||||
xmlNodePtr root);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetName (xmlNodePtr cur,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddChild (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddChildList (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlReplaceNode (xmlNodePtr old,
|
||||
xmlNodePtr cur);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddPrevSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlAddNextSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlUnlinkNode (xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlTextMerge (xmlNodePtr first,
|
||||
xmlNodePtr second);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextConcat (xmlNodePtr node,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNodeList (xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNode (xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetTreeDoc (xmlNodePtr tree,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetListDoc (xmlNodePtr list,
|
||||
xmlDocPtr doc);
|
||||
/*
|
||||
* Namespaces.
|
||||
*/
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlSearchNs (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlSearchNsByHref (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *href);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNsPtr * XMLCALL
|
||||
xmlGetNsList (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNsPtr * XMLCALL
|
||||
xmlGetNsList (const xmlDoc *doc,
|
||||
const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetNs (xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlCopyNamespace (xmlNsPtr cur);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
xmlCopyNamespaceList (xmlNsPtr cur);
|
||||
|
||||
/*
|
||||
* Changing the content.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
#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,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlSetNsProp (xmlNodePtr node,
|
||||
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) */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNoNsProp (xmlNodePtr node,
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNoNsProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetProp (xmlNodePtr node,
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasProp (xmlNodePtr node,
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasNsProp (xmlNodePtr node,
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlHasNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNsProp (xmlNodePtr node,
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringGetNodeList (xmlDocPtr doc,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringLenGetNodeList (xmlDocPtr doc,
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlStringLenGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
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,
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeListGetRawString (const xmlDoc *doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeAddContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeAddContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetContent (xmlNodePtr cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetContent (const xmlNode *cur);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeBufGetContent (xmlBufferPtr buffer,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetLang (xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeGetSpacePreserve (xmlNodePtr cur);
|
||||
const xmlNode *cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
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
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetLang (xmlNodePtr cur,
|
||||
const xmlChar *lang);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
||||
int val);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetBase (xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetBase (const xmlDoc *doc,
|
||||
const xmlNode *cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetBase (xmlNodePtr cur,
|
||||
const xmlChar *uri);
|
||||
#endif
|
||||
|
@ -1054,14 +1106,14 @@ XMLPUBFUN void XMLCALL
|
|||
/*
|
||||
* Removing content.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveProp (xmlAttrPtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUnsetNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUnsetProp (xmlNodePtr node,
|
||||
const xmlChar *name);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
|
@ -1069,13 +1121,13 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Internal, don't use.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferWriteCHAR (xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferWriteChar (xmlBufferPtr buf,
|
||||
const char *string);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlBufferWriteQuotedString(xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
|
||||
|
@ -1090,7 +1142,7 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
|
|||
/*
|
||||
* Namespace handling.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReconciliateNs (xmlDocPtr doc,
|
||||
xmlNodePtr tree);
|
||||
#endif
|
||||
|
@ -1099,61 +1151,67 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* Saving.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDocDumpFormatMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDocDumpMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
|
||||
xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
const char *txt_encoding);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
|
||||
xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
const char *txt_encoding,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocFormatDump (FILE *f,
|
||||
xmlDocPtr cur,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDocDump (FILE *f,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlElemDump (FILE *f,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFile (const char *filename,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFormatFile (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlBufNodeDump (xmlBufPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
int level,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
int level,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFileTo (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
|
@ -1161,13 +1219,13 @@ XMLPUBFUN void XMLCALL
|
|||
int format,
|
||||
const char *encoding);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFormatFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
|
@ -1176,21 +1234,21 @@ XMLPUBFUN int XMLCALL
|
|||
/*
|
||||
* XHTML
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsXHTML (const xmlChar *systemID,
|
||||
const xmlChar *publicID);
|
||||
|
||||
/*
|
||||
* Compression.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetDocCompressMode (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetDocCompressMode (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetDocCompressMode (xmlDocPtr doc,
|
||||
int mode);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetCompressMode (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetCompressMode (int mode);
|
||||
|
||||
/*
|
||||
|
@ -1208,7 +1266,7 @@ XMLPUBFUN int XMLCALL
|
|||
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
|
||||
xmlDocPtr sourceDoc,
|
||||
xmlNodePtr node,
|
||||
xmlDocPtr destDoc,
|
||||
xmlDocPtr destDoc,
|
||||
xmlNodePtr destParent,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
|
|
@ -150,55 +150,55 @@ typedef struct _xmlHashTable xmlRefTable;
|
|||
typedef xmlRefTable *xmlRefTablePtr;
|
||||
|
||||
/* Notation */
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *PublicID,
|
||||
const xmlChar *SystemID);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNotationTablePtr XMLCALL
|
||||
XMLPUBFUN xmlNotationTablePtr XMLCALL
|
||||
xmlCopyNotationTable (xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNotationTable (xmlNotationTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpNotationDecl (xmlBufferPtr buf,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpNotationTable (xmlBufferPtr buf,
|
||||
xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Element Content */
|
||||
/* the non Doc version are being deprecated */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlNewElementContent (const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlCopyElementContent (xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeElementContent (xmlElementContentPtr cur);
|
||||
/* the new versions with doc argument */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlNewDocElementContent (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlCopyDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSnprintfElementContent(char *buf,
|
||||
int size,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/* DEPRECATED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSprintfElementContent(char *buf,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
|
@ -206,39 +206,39 @@ XMLPUBFUN void XMLCALL
|
|||
/* DEPRECATED */
|
||||
|
||||
/* Element */
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
xmlElementTypeVal type,
|
||||
xmlElementContentPtr content);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlElementTablePtr XMLCALL
|
||||
XMLPUBFUN xmlElementTablePtr XMLCALL
|
||||
xmlCopyElementTable (xmlElementTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeElementTable (xmlElementTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpElementTable (xmlBufferPtr buf,
|
||||
xmlElementTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpElementDecl (xmlBufferPtr buf,
|
||||
xmlElementPtr elem);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Enumeration */
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlCreateEnumeration (const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeEnumeration (xmlEnumerationPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlCopyEnumeration (xmlEnumerationPtr cur);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/* Attribute */
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
|
@ -249,55 +249,55 @@ XMLPUBFUN xmlAttributePtr XMLCALL
|
|||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlAttributeTablePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributeTablePtr XMLCALL
|
||||
xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeAttributeTable (xmlAttributeTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpAttributeTable (xmlBufferPtr buf,
|
||||
xmlAttributeTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpAttributeDecl (xmlBufferPtr buf,
|
||||
xmlAttributePtr attr);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* IDs */
|
||||
XMLPUBFUN xmlIDPtr XMLCALL
|
||||
XMLPUBFUN xmlIDPtr XMLCALL
|
||||
xmlAddID (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeIDTable (xmlIDTablePtr table);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlGetID (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsID (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveID (xmlDocPtr doc,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveID (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
|
||||
/* IDREFs */
|
||||
XMLPUBFUN xmlRefPtr XMLCALL
|
||||
XMLPUBFUN xmlRefPtr XMLCALL
|
||||
xmlAddRef (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeRefTable (xmlRefTablePtr table);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsRef (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveRef (xmlDocPtr doc,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveRef (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlGetRefs (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
|
||||
|
@ -306,146 +306,146 @@ XMLPUBFUN xmlListPtr XMLCALL
|
|||
*/
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
/* Allocate/Release Validation Contexts */
|
||||
XMLPUBFUN xmlValidCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlValidCtxtPtr XMLCALL
|
||||
xmlNewValidCtxt(void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeValidCtxt(xmlValidCtxtPtr);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateRoot (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlElementPtr elem);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlAttributePtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateAttributeValue(xmlAttributeType type,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDtd (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDocument (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *prefix,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *notationName);
|
||||
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsMixedElement (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
||||
const xmlChar **names,
|
||||
int *len,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidGetValidElements(xmlNode *prev,
|
||||
xmlNode *next,
|
||||
const xmlChar **names,
|
||||
int max);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNameValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNamesValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNmtokenValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNmtokensValue(const xmlChar *value);
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
/*
|
||||
* Validation based on the regexp support
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
|
||||
xmlElementPtr elem);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *qname);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef enum {
|
|||
* xlinkNodeDetectFunc:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node to check
|
||||
*
|
||||
*
|
||||
* This is the prototype for the link detection routine.
|
||||
* It calls the default link detection callbacks upon link detection.
|
||||
*/
|
||||
|
@ -157,26 +157,26 @@ struct _xlinkHandler {
|
|||
|
||||
/*
|
||||
* The default detection routine, can be overridden, they call the default
|
||||
* detection callbacks.
|
||||
* detection callbacks.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
|
||||
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
|
||||
xlinkGetDefaultDetect (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
|
||||
|
||||
/*
|
||||
* Routines to set/get the default handlers.
|
||||
*/
|
||||
XMLPUBFUN xlinkHandlerPtr XMLCALL
|
||||
XMLPUBFUN xlinkHandlerPtr XMLCALL
|
||||
xlinkGetDefaultHandler (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
|
||||
|
||||
/*
|
||||
* Link detection module itself.
|
||||
*/
|
||||
XMLPUBFUN xlinkType XMLCALL
|
||||
XMLPUBFUN xlinkType XMLCALL
|
||||
xlinkIsLink (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ extern "C" {
|
|||
* xmlInputMatchCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Input API to detect if the current handler
|
||||
* Callback used in the I/O Input API to detect if the current handler
|
||||
* can provide input fonctionnalities for this resource.
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Input module should be used
|
||||
|
@ -72,7 +72,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
|
|||
* xmlOutputMatchCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Output API to detect if the current handler
|
||||
* Callback used in the I/O Output API to detect if the current handler
|
||||
* can provide output fonctionnalities for this resource.
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Output module should be used
|
||||
|
@ -126,11 +126,11 @@ struct _xmlParserInputBuffer {
|
|||
void* context;
|
||||
xmlInputReadCallback readcallback;
|
||||
xmlInputCloseCallback closecallback;
|
||||
|
||||
|
||||
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 */
|
||||
|
@ -142,11 +142,11 @@ struct _xmlOutputBuffer {
|
|||
void* context;
|
||||
xmlOutputWriteCallback writecallback;
|
||||
xmlOutputCloseCallback closecallback;
|
||||
|
||||
|
||||
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;
|
||||
};
|
||||
|
@ -155,13 +155,13 @@ struct _xmlOutputBuffer {
|
|||
/*
|
||||
* Interfaces for input
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPopInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterDefaultInputCallbacks (void);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
||||
|
@ -186,22 +186,22 @@ XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
|||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
||||
int len,
|
||||
const char *buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
XMLPUBFUN char * XMLCALL
|
||||
xmlParserGetDirectory (const char *filename);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
|
||||
xmlInputOpenCallback openFunc,
|
||||
xmlInputReadCallback readFunc,
|
||||
|
@ -209,15 +209,15 @@ XMLPUBFUN int XMLCALL
|
|||
|
||||
xmlParserInputBufferPtr
|
||||
__xmlParserInputBufferCreateFilename(const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
xmlCharEncoding enc);
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
* Interfaces for output
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupOutputCallbacks (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterDefaultOutputCallbacks(void);
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
||||
|
@ -245,24 +245,30 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
|||
void *ioctx,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
/* 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,
|
||||
const char *buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
||||
const char *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
||||
const xmlChar *str,
|
||||
xmlCharEncodingOutputFunc escaping);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
||||
xmlOutputOpenCallback openFunc,
|
||||
xmlOutputWriteCallback writeFunc,
|
||||
|
@ -275,10 +281,10 @@ xmlOutputBufferPtr
|
|||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
/* This function only exists if HTTP support built into the library */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterHTTPPostCallbacks (void );
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
|
@ -288,69 +294,69 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
|||
/*
|
||||
* A predefined entity loader disabling network accesses
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNoNetExternalEntityLoader (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
||||
/*
|
||||
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
||||
* Check xmlCanonicPath in uri.h for a better alternative.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNormalizeWindowsPath (const xmlChar *path);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCheckFilename (const char *path);
|
||||
/**
|
||||
* Default 'file://' protocol callbacks
|
||||
* Default 'file://' protocol callbacks
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlFileOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileRead (void * context,
|
||||
char * buffer,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlFileOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileClose (void * context);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileClose (void * context);
|
||||
|
||||
/**
|
||||
* Default 'http://' protocol callbacks
|
||||
* Default 'http://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOHTTPOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOHTTPOpen (const char *filename);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOHTTPOpenW (const char * post_uri,
|
||||
int compression );
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPRead (void * context,
|
||||
char * buffer,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPClose (void * context);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPClose (void * context);
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
/**
|
||||
* Default 'ftp://' protocol callbacks
|
||||
* Default 'ftp://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOFTPOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPRead (void * context,
|
||||
char * buffer,
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOFTPOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPClose (void * context);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPClose (void * context);
|
||||
#endif /* LIBXML_FTP_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -40,25 +40,25 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
|
|||
/*
|
||||
* Building API
|
||||
*/
|
||||
XMLPUBFUN xmlAutomataPtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataPtr XMLCALL
|
||||
xmlNewAutomata (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeAutomata (xmlAutomataPtr am);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataGetInitState (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataSetFinalState (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr state);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewState (xmlAutomataPtr am);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewTransition (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewTransition2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
|
@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
|||
const xmlChar *token2,
|
||||
void *data);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
|
@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
|||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
|
@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
|||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
|
@ -99,46 +99,46 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
|||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
int min,
|
||||
int max,
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewAllTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int lax);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataNewCounter (xmlAutomataPtr am,
|
||||
int min,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
xmlAutomataCompile (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataIsDeterminist (xmlAutomataPtr am);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_AUTOMATA_ENABLED */
|
||||
#endif /* LIBXML_REGEXP_ENABLED */
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
/**
|
||||
* XMLCDECL:
|
||||
*
|
||||
* Macro which declares the calling convention for exported functions that
|
||||
* Macro which declares the calling convention for exported functions that
|
||||
* use '...'.
|
||||
*/
|
||||
#define XMLCDECL
|
||||
|
@ -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)
|
||||
|
|
|
@ -50,7 +50,7 @@ XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_MODULES_ENABLED */
|
||||
|
||||
|
|
|
@ -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);
|
||||
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);
|
||||
|
@ -392,27 +397,26 @@ typedef void * xmlTextReaderLocatorPtr;
|
|||
*
|
||||
* Signature of an error callback from a reader parser
|
||||
*/
|
||||
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
||||
const char *msg,
|
||||
xmlParserSeverities severity,
|
||||
xmlTextReaderLocatorPtr locator);
|
||||
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
||||
const char *msg,
|
||||
xmlParserSeverities severity,
|
||||
xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
||||
/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
|
||||
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
||||
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc f,
|
||||
void *arg);
|
||||
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlStructuredErrorFunc f,
|
||||
void *arg);
|
||||
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlStructuredErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc *f,
|
||||
void **arg);
|
||||
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc *f,
|
||||
void **arg);
|
||||
|
||||
#endif /* LIBXML_READER_ENABLED */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -30,23 +30,23 @@ typedef enum {
|
|||
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
|
||||
} xmlSchemaWhitespaceValueType;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaInitTypes (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaInitTypes (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaCleanupTypes (void);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetPredefinedType (const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
|
@ -54,25 +54,25 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaWhitespaceValueType fws,
|
||||
xmlSchemaValType valType,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeValue (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
|
||||
xmlSchemaNewFacet (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaTypePtr typeDecl,
|
||||
xmlSchemaParserCtxtPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaCompareValues (xmlSchemaValPtr x,
|
||||
xmlSchemaValPtr y);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
|
||||
|
@ -82,7 +82,7 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetBuiltInType (xmlSchemaValType type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
|
||||
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
|
||||
int facetType);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSchemaCollapseString (const xmlChar *value);
|
||||
|
@ -91,7 +91,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||
XMLPUBFUN unsigned long XMLCALL
|
||||
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
|
||||
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
|
@ -100,19 +100,19 @@ XMLPUBFUN int XMLCALL
|
|||
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
xmlSchemaValPtr val,
|
||||
unsigned long *length,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
|
||||
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
|
||||
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
|
|
|
@ -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,
|
||||
|
@ -113,16 +113,16 @@ XMLPUBFUN int XMLCALL
|
|||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Strsize (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlUTF8Strndup (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlUTF8Strpos (const xmlChar *utf,
|
||||
int pos);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Strloc (const xmlChar *utf,
|
||||
const xmlChar *utfchar);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlUTF8Strsub (const xmlChar *utf,
|
||||
int start,
|
||||
int len);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
|
||||
typedef struct _xmlXPathContext xmlXPathContext;
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -271,11 +273,11 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
|
|||
*
|
||||
* Expression evaluation occurs with respect to a context.
|
||||
* he context consists of:
|
||||
* - a node (the context node)
|
||||
* - a node list (the context node list)
|
||||
* - a set of variable bindings
|
||||
* - a function library
|
||||
* - the set of namespace declarations in scope for the expression
|
||||
* - a node (the context node)
|
||||
* - a node list (the context node list)
|
||||
* - a set of variable bindings
|
||||
* - a function library
|
||||
* - the set of namespace declarations in scope for the expression
|
||||
* Following the switch to hash tables, this need to be trimmed up at
|
||||
* the next binary incompatible release.
|
||||
* The node may be modified when the context is passed to libxml2
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
@ -417,7 +421,7 @@ XMLPUBVAR double xmlXPathNINF;
|
|||
* @index is out of range (0 to length-1)
|
||||
*/
|
||||
#define xmlXPathNodeSetItem(ns, index) \
|
||||
((((ns) != NULL) && \
|
||||
((((ns) != NULL) && \
|
||||
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
|
||||
(ns)->nodeTab[(index)] \
|
||||
: NULL)
|
||||
|
@ -433,64 +437,64 @@ XMLPUBVAR double xmlXPathNINF;
|
|||
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeObject (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeSetCreate (xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathObjectCopy (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCmpNodes (xmlNodePtr node1,
|
||||
xmlNodePtr node2);
|
||||
/**
|
||||
* Conversion functions to basic types.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastNumberToBoolean (double val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastStringToBoolean (const xmlChar * val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastBooleanToNumber (int val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastStringToNumber (const xmlChar * val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastNodeToNumber (xmlNodePtr node);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastToNumber (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastBooleanToString (int val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNumberToString (double val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNodeToString (xmlNodePtr node);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastToString (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertNumber (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertString (xmlXPathObjectPtr val);
|
||||
|
||||
/**
|
||||
* Context handling.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
xmlXPathNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
||||
|
@ -502,36 +506,43 @@ XMLPUBFUN int XMLCALL
|
|||
/**
|
||||
* Evaluation functions.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlXPathOrderDocElems (xmlDocPtr doc);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
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);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathEvalExpression (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
/**
|
||||
* Separate compilation/evaluation entry points.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
xmlXPathCompile (const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathInit (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathIsNaN (double val);
|
||||
|
|
|
@ -100,16 +100,16 @@ extern "C" {
|
|||
*/
|
||||
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/**
|
||||
* xmlXPathReturnBoolean:
|
||||
|
@ -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:
|
||||
|
@ -329,7 +331,7 @@ XMLPUBFUN void * XMLCALL
|
|||
* Variable Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathVariableLookupFunc f,
|
||||
void *data);
|
||||
|
@ -338,7 +340,7 @@ XMLPUBFUN void XMLCALL
|
|||
* Function Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathFuncLookupFunc f,
|
||||
void *funcCtxt);
|
||||
|
@ -346,7 +348,7 @@ XMLPUBFUN void XMLCALL
|
|||
/*
|
||||
* Error reporting.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPatherror (xmlXPathParserContextPtr ctxt,
|
||||
const char *file,
|
||||
int line,
|
||||
|
@ -357,11 +359,11 @@ XMLPUBFUN void XMLCALL
|
|||
int error);
|
||||
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathDebugDumpObject (FILE *output,
|
||||
xmlXPathObjectPtr cur,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathDebugDumpCompExpr(FILE *output,
|
||||
xmlXPathCompExprPtr comp,
|
||||
int depth);
|
||||
|
@ -369,48 +371,48 @@ XMLPUBFUN void XMLCALL
|
|||
/**
|
||||
* NodeSet handling.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDifference (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathIntersection (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDistinct (xmlNodeSetPtr nodes);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathLeading (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathTrailing (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
|
@ -419,51 +421,51 @@ XMLPUBFUN xmlNodeSetPtr XMLCALL
|
|||
* Extending a context.
|
||||
*/
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
|
||||
|
||||
/**
|
||||
|
@ -471,79 +473,79 @@ XMLPUBFUN void XMLCALL
|
|||
*/
|
||||
XMLPUBFUN xmlXPathParserContextPtr XMLCALL
|
||||
xmlXPathNewParserContext (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/* TODO: remap to xmlXPathValuePop and Push. */
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
valuePop (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int XMLCALL
|
||||
valuePush (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr value);
|
||||
xmlXPathObjectPtr value);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewString (const xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewCString (const char *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapString (xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapCString (char * val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewFloat (double val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewBoolean (int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewNodeSet (xmlNodePtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
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
|
||||
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
|
||||
xmlNodePtr node,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
|
||||
xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetSort (xmlNodeSetPtr set);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/*
|
||||
* Existing functions.
|
||||
*/
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathStringEvalNumber (const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
|
||||
xmlNodeSetPtr val2);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
|
||||
int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapExternal (void *val);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
|
@ -621,7 +623,7 @@ XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, in
|
|||
* Really internal functions
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Added support for the element() scheme described in:
|
||||
* W3C Proposed Recommendation 13 November 2002
|
||||
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
|
||||
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
|
@ -43,68 +43,68 @@ struct _xmlLocationSet {
|
|||
* Handling of location sets.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
|
||||
xmlLocationSetPtr val2);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRange (xmlNodePtr start,
|
||||
int startindex,
|
||||
xmlNodePtr end,
|
||||
int endindex);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewCollapsedRange (xmlNodePtr start);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
|
||||
int val);
|
||||
|
||||
/*
|
||||
* Functions.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
xmlXPtrNewContext (xmlDocPtr doc,
|
||||
xmlNodePtr here,
|
||||
xmlNodePtr origin);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
int nargs);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -393,7 +393,7 @@ xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
|
|||
* @end: an end marker xmlChar, 0 if none
|
||||
* @end2: an end marker xmlChar, 0 if none
|
||||
* @end3: an end marker xmlChar, 0 if none
|
||||
*
|
||||
*
|
||||
* This function is deprecated, we now always process entities content
|
||||
* through xmlStringDecodeEntities
|
||||
*
|
||||
|
@ -456,7 +456,7 @@ xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
|||
/**
|
||||
* xmlNamespaceParseQName:
|
||||
* @ctxt: an XML parser context
|
||||
* @prefix: a xmlChar **
|
||||
* @prefix: a xmlChar **
|
||||
*
|
||||
* TODO: this seems not in use anymore, the namespace handling is done on
|
||||
* top of the SAX interfaces, i.e. not on raw input.
|
||||
|
@ -603,7 +603,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
|||
/**
|
||||
* xmlParserHandleReference:
|
||||
* @ctxt: the parser context
|
||||
*
|
||||
*
|
||||
* TODO: Remove, now deprecated ... the test is done directly in the
|
||||
* content parsing
|
||||
* routines.
|
||||
|
@ -615,7 +615,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
|||
* [ WFC: Entity Declared ]
|
||||
* the Name given in the entity reference must match that in an entity
|
||||
* declaration, except that well-formed documents need not declare any
|
||||
* of the following entities: amp, lt, gt, apos, quot.
|
||||
* of the following entities: amp, lt, gt, apos, quot.
|
||||
*
|
||||
* [ WFC: Parsed Entity ]
|
||||
* An entity reference must not contain the name of an unparsed entity
|
||||
|
@ -624,7 +624,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
|||
* '&#x' [0-9a-fA-F]+ ';'
|
||||
*
|
||||
* A PEReference may have been detected in the current input stream
|
||||
* the handling is done accordingly to
|
||||
* the handling is done accordingly to
|
||||
* http://www.w3.org/TR/REC-xml#entproc
|
||||
*/
|
||||
void
|
||||
|
@ -693,7 +693,7 @@ xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
|
|||
/**
|
||||
* xmlUpgradeOldNs:
|
||||
* @doc: a document pointer
|
||||
*
|
||||
*
|
||||
* Upgrade old style Namespaces (PI) and move them to the root of the document.
|
||||
* DEPRECATED
|
||||
*/
|
||||
|
@ -719,7 +719,7 @@ xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
|
|||
*
|
||||
* People must migrate their code to xmlEncodeEntitiesReentrant !
|
||||
* This routine will issue a warning when encountered.
|
||||
*
|
||||
*
|
||||
* Returns NULL
|
||||
*/
|
||||
const xmlChar *
|
||||
|
@ -740,7 +740,7 @@ xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
|
|||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Old set of SAXv1 functions *
|
||||
* Old set of SAXv1 functions *
|
||||
* *
|
||||
************************************************************************/
|
||||
static int deprecated_v1_msg = 0;
|
||||
|
@ -961,8 +961,8 @@ getParameterEntity(void *ctx, const xmlChar * name)
|
|||
/**
|
||||
* entityDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @name: the entity name
|
||||
* @type: the entity type
|
||||
* @publicId: The public ID of the entity
|
||||
* @systemId: The system ID of the entity
|
||||
* @content: the entity value (without processing).
|
||||
|
@ -983,8 +983,8 @@ entityDecl(void *ctx, const xmlChar * name, int type,
|
|||
* attributeDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @elem: the name of the element
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @fullname: the attribute name
|
||||
* @type: the attribute type
|
||||
* @def: the type of default value
|
||||
* @defaultValue: the attribute default value
|
||||
* @tree: the tree of enumerated value set
|
||||
|
@ -1005,8 +1005,8 @@ attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
|
|||
/**
|
||||
* elementDecl:
|
||||
* @ctx: the user data (XML parser context)
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @name: the element name
|
||||
* @type: the element type
|
||||
* @content: the element value tree
|
||||
*
|
||||
* An element definition has been parsed
|
||||
|
@ -1151,7 +1151,7 @@ void
|
|||
endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
DEPRECATED("endElement")
|
||||
xmlSAX2EndElement(ctx, name);
|
||||
xmlSAX2EndElement(ctx, name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1159,7 +1159,7 @@ endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
|
|||
* @ctx: the user data (XML parser context)
|
||||
* @name: The entity name
|
||||
*
|
||||
* called when an entity reference is detected.
|
||||
* called when an entity reference is detected.
|
||||
* DEPRECATED: use xmlSAX2Reference()
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -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@
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue