Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/ElementSoup.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/__init__.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_difflib.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_html5builder.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_setmixin.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/builder.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/clean.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/defs.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/diff.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/formfill.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/html5parser.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/soupparser.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/usedoctest.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__pycache__/__init__.cpython-312.pyc +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/config.pxd +3 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/dtdvalid.pxd +18 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__init__.py +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/libcharset.h +45 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/localcharset.h +137 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zconf.h +543 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zlib.h +1938 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h +108 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h +70 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltexports.h +63 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLparser.h +339 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLtree.h +148 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX.h +18 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX2.h +170 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__init__.py +0 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/c14n.h +115 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/catalog.h +183 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/chvalid.h +230 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/debugXML.h +79 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/dict.h +82 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/encoding.h +307 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/entities.h +147 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/globals.h +25 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/hash.h +251 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/list.h +137 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanoftp.h +16 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanohttp.h +98 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parser.h +1633 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parserInternals.h +591 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/relaxng.h +224 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schemasInternals.h +959 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schematron.h +143 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/threads.h +81 -0
- platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/tree.h +1326 -0
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/ElementSoup.cpython-312.pyc
ADDED
|
Binary file (595 Bytes). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (80.9 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc
ADDED
|
Binary file (3.87 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_difflib.cpython-312.pyc
ADDED
|
Binary file (77.1 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_html5builder.cpython-312.pyc
ADDED
|
Binary file (5.8 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_setmixin.cpython-312.pyc
ADDED
|
Binary file (2.51 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/builder.cpython-312.pyc
ADDED
|
Binary file (7.35 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/clean.cpython-312.pyc
ADDED
|
Binary file (599 Bytes). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/defs.cpython-312.pyc
ADDED
|
Binary file (3.33 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/diff.cpython-312.pyc
ADDED
|
Binary file (35.1 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/formfill.cpython-312.pyc
ADDED
|
Binary file (12.2 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/html5parser.cpython-312.pyc
ADDED
|
Binary file (8.97 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/soupparser.cpython-312.pyc
ADDED
|
Binary file (11.6 kB). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/usedoctest.cpython-312.pyc
ADDED
|
Binary file (483 Bytes). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (166 Bytes). View file
|
|
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/config.pxd
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cdef extern from "etree_defs.h":
|
| 2 |
+
cdef bint ENABLE_THREADING
|
| 3 |
+
cdef bint ENABLE_SCHEMATRON
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/dtdvalid.pxd
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from lxml.includes cimport tree
|
| 2 |
+
from lxml.includes.tree cimport xmlDoc, xmlDtd
|
| 3 |
+
|
| 4 |
+
cdef extern from "libxml/valid.h" nogil:
|
| 5 |
+
ctypedef void (*xmlValidityErrorFunc)(void * ctx, const char * msg, ...) noexcept
|
| 6 |
+
ctypedef void (*xmlValidityWarningFunc)(void * ctx, const char * msg, ...) noexcept
|
| 7 |
+
|
| 8 |
+
ctypedef struct xmlValidCtxt:
|
| 9 |
+
void *userData
|
| 10 |
+
xmlValidityErrorFunc error
|
| 11 |
+
xmlValidityWarningFunc warning
|
| 12 |
+
|
| 13 |
+
cdef xmlValidCtxt* xmlNewValidCtxt()
|
| 14 |
+
cdef void xmlFreeValidCtxt(xmlValidCtxt* cur)
|
| 15 |
+
|
| 16 |
+
cdef int xmlValidateDtd(xmlValidCtxt* ctxt, xmlDoc* doc, xmlDtd* dtd)
|
| 17 |
+
cdef tree.xmlElement* xmlGetDtdElementDesc(
|
| 18 |
+
xmlDtd* dtd, tree.const_xmlChar* name)
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__init__.py
ADDED
|
File without changes
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/libcharset.h
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
| 2 |
+
This file is part of the GNU CHARSET Library.
|
| 3 |
+
|
| 4 |
+
The GNU CHARSET Library is free software; you can redistribute it and/or
|
| 5 |
+
modify it under the terms of the GNU Lesser General Public License as
|
| 6 |
+
published by the Free Software Foundation; either version 2 of the
|
| 7 |
+
License, or (at your option) any later version.
|
| 8 |
+
|
| 9 |
+
The GNU CHARSET Library is distributed in the hope that it will be useful,
|
| 10 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 12 |
+
Lesser General Public License for more details.
|
| 13 |
+
|
| 14 |
+
You should have received a copy of the GNU Lesser General Public License
|
| 15 |
+
along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
|
| 16 |
+
see <https://www.gnu.org/licenses/>. */
|
| 17 |
+
|
| 18 |
+
#ifndef _LIBCHARSET_H
|
| 19 |
+
#define _LIBCHARSET_H
|
| 20 |
+
|
| 21 |
+
#include <localcharset.h>
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
#ifdef __cplusplus
|
| 25 |
+
extern "C" {
|
| 26 |
+
#endif
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
/* Support for relocatable packages. */
|
| 30 |
+
|
| 31 |
+
/* Sets the original and the current installation prefix of the package.
|
| 32 |
+
Relocation simply replaces a pathname starting with the original prefix
|
| 33 |
+
by the corresponding pathname with the current prefix instead. Both
|
| 34 |
+
prefixes should be directory names without trailing slash (i.e. use ""
|
| 35 |
+
instead of "/"). */
|
| 36 |
+
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
|
| 37 |
+
const char *curr_prefix);
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
#ifdef __cplusplus
|
| 41 |
+
}
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
#endif /* _LIBCHARSET_H */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/localcharset.h
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Determine a canonical name for the current locale's character encoding.
|
| 2 |
+
Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
|
| 3 |
+
This file is part of the GNU CHARSET Library.
|
| 4 |
+
|
| 5 |
+
This program is free software; you can redistribute it and/or modify it
|
| 6 |
+
under the terms of the GNU Lesser General Public License as published
|
| 7 |
+
by the Free Software Foundation; either version 2, or (at your option)
|
| 8 |
+
any later version.
|
| 9 |
+
|
| 10 |
+
This program is distributed in the hope that it will be useful,
|
| 11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 13 |
+
Lesser General Public License for more details.
|
| 14 |
+
|
| 15 |
+
You should have received a copy of the GNU Lesser General Public License
|
| 16 |
+
along with this program; if not, see <https://www.gnu.org/licenses/>. */
|
| 17 |
+
|
| 18 |
+
#ifndef _LOCALCHARSET_H
|
| 19 |
+
#define _LOCALCHARSET_H
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
/* Determine the current locale's character encoding, and canonicalize it
|
| 28 |
+
into one of the canonical names listed below.
|
| 29 |
+
The result must not be freed; it is statically allocated. The result
|
| 30 |
+
becomes invalid when setlocale() is used to change the global locale, or
|
| 31 |
+
when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
|
| 32 |
+
is changed; threads in multithreaded programs should not do this.
|
| 33 |
+
If the canonical name cannot be determined, the result is a non-canonical
|
| 34 |
+
name. */
|
| 35 |
+
extern const char * locale_charset (void);
|
| 36 |
+
|
| 37 |
+
/* About GNU canonical names for character encodings:
|
| 38 |
+
|
| 39 |
+
Every canonical name must be supported by GNU libiconv. Support by GNU libc
|
| 40 |
+
is also desirable.
|
| 41 |
+
|
| 42 |
+
The name is case insensitive. Usually an upper case MIME charset name is
|
| 43 |
+
preferred.
|
| 44 |
+
|
| 45 |
+
The current list of these GNU canonical names is:
|
| 46 |
+
|
| 47 |
+
name MIME? used by which systems
|
| 48 |
+
(darwin = Mac OS X, windows = native Windows)
|
| 49 |
+
|
| 50 |
+
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
|
| 51 |
+
ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
| 52 |
+
ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
| 53 |
+
ISO-8859-3 Y glibc solaris cygwin
|
| 54 |
+
ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
|
| 55 |
+
ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
| 56 |
+
ISO-8859-6 Y glibc aix hpux solaris cygwin
|
| 57 |
+
ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
| 58 |
+
ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
|
| 59 |
+
ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
|
| 60 |
+
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
|
| 61 |
+
ISO-8859-14 glibc cygwin
|
| 62 |
+
ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
|
| 63 |
+
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
|
| 64 |
+
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
|
| 65 |
+
KOI8-T glibc
|
| 66 |
+
CP437 dos
|
| 67 |
+
CP775 dos
|
| 68 |
+
CP850 aix osf dos
|
| 69 |
+
CP852 dos
|
| 70 |
+
CP855 dos
|
| 71 |
+
CP856 aix
|
| 72 |
+
CP857 dos
|
| 73 |
+
CP861 dos
|
| 74 |
+
CP862 dos
|
| 75 |
+
CP864 dos
|
| 76 |
+
CP865 dos
|
| 77 |
+
CP866 freebsd netbsd openbsd darwin dos
|
| 78 |
+
CP869 dos
|
| 79 |
+
CP874 windows dos
|
| 80 |
+
CP922 aix
|
| 81 |
+
CP932 aix cygwin windows dos
|
| 82 |
+
CP943 aix zos
|
| 83 |
+
CP949 osf darwin windows dos
|
| 84 |
+
CP950 windows dos
|
| 85 |
+
CP1046 aix
|
| 86 |
+
CP1124 aix
|
| 87 |
+
CP1125 dos
|
| 88 |
+
CP1129 aix
|
| 89 |
+
CP1131 freebsd darwin
|
| 90 |
+
CP1250 windows
|
| 91 |
+
CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
|
| 92 |
+
CP1252 aix windows
|
| 93 |
+
CP1253 windows
|
| 94 |
+
CP1254 windows
|
| 95 |
+
CP1255 glibc windows
|
| 96 |
+
CP1256 windows
|
| 97 |
+
CP1257 windows
|
| 98 |
+
GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
|
| 99 |
+
EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
|
| 100 |
+
EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
|
| 101 |
+
EUC-TW glibc aix hpux irix osf solaris netbsd
|
| 102 |
+
BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
|
| 103 |
+
BIG5-HKSCS glibc hpux solaris netbsd darwin
|
| 104 |
+
GBK glibc aix osf solaris freebsd darwin cygwin windows dos
|
| 105 |
+
GB18030 glibc hpux solaris freebsd netbsd darwin
|
| 106 |
+
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
|
| 107 |
+
JOHAB glibc solaris windows
|
| 108 |
+
TIS-620 glibc aix hpux osf solaris cygwin zos
|
| 109 |
+
VISCII Y glibc
|
| 110 |
+
TCVN5712-1 glibc
|
| 111 |
+
ARMSCII-8 glibc freebsd netbsd darwin
|
| 112 |
+
GEORGIAN-PS glibc cygwin
|
| 113 |
+
PT154 glibc netbsd cygwin
|
| 114 |
+
HP-ROMAN8 hpux
|
| 115 |
+
HP-ARABIC8 hpux
|
| 116 |
+
HP-GREEK8 hpux
|
| 117 |
+
HP-HEBREW8 hpux
|
| 118 |
+
HP-TURKISH8 hpux
|
| 119 |
+
HP-KANA8 hpux
|
| 120 |
+
DEC-KANJI osf
|
| 121 |
+
DEC-HANYU osf
|
| 122 |
+
UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
|
| 123 |
+
|
| 124 |
+
Note: Names which are not marked as being a MIME name should not be used in
|
| 125 |
+
Internet protocols for information interchange (mail, news, etc.).
|
| 126 |
+
|
| 127 |
+
Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
| 128 |
+
must understand both names and treat them as equivalent.
|
| 129 |
+
*/
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
#ifdef __cplusplus
|
| 133 |
+
}
|
| 134 |
+
#endif
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
#endif /* _LOCALCHARSET_H */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zconf.h
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* zconf.h -- configuration of the zlib compression library
|
| 2 |
+
* Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
|
| 3 |
+
* For conditions of distribution and use, see copyright notice in zlib.h
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
/* @(#) $Id$ */
|
| 7 |
+
|
| 8 |
+
#ifndef ZCONF_H
|
| 9 |
+
#define ZCONF_H
|
| 10 |
+
|
| 11 |
+
/*
|
| 12 |
+
* If you *really* need a unique prefix for all types and library functions,
|
| 13 |
+
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
| 14 |
+
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
| 15 |
+
* this permanently in zconf.h using "./configure --zprefix".
|
| 16 |
+
*/
|
| 17 |
+
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
| 18 |
+
# define Z_PREFIX_SET
|
| 19 |
+
|
| 20 |
+
/* all linked symbols and init macros */
|
| 21 |
+
# define _dist_code z__dist_code
|
| 22 |
+
# define _length_code z__length_code
|
| 23 |
+
# define _tr_align z__tr_align
|
| 24 |
+
# define _tr_flush_bits z__tr_flush_bits
|
| 25 |
+
# define _tr_flush_block z__tr_flush_block
|
| 26 |
+
# define _tr_init z__tr_init
|
| 27 |
+
# define _tr_stored_block z__tr_stored_block
|
| 28 |
+
# define _tr_tally z__tr_tally
|
| 29 |
+
# define adler32 z_adler32
|
| 30 |
+
# define adler32_combine z_adler32_combine
|
| 31 |
+
# define adler32_combine64 z_adler32_combine64
|
| 32 |
+
# define adler32_z z_adler32_z
|
| 33 |
+
# ifndef Z_SOLO
|
| 34 |
+
# define compress z_compress
|
| 35 |
+
# define compress2 z_compress2
|
| 36 |
+
# define compressBound z_compressBound
|
| 37 |
+
# endif
|
| 38 |
+
# define crc32 z_crc32
|
| 39 |
+
# define crc32_combine z_crc32_combine
|
| 40 |
+
# define crc32_combine64 z_crc32_combine64
|
| 41 |
+
# define crc32_combine_gen z_crc32_combine_gen
|
| 42 |
+
# define crc32_combine_gen64 z_crc32_combine_gen64
|
| 43 |
+
# define crc32_combine_op z_crc32_combine_op
|
| 44 |
+
# define crc32_z z_crc32_z
|
| 45 |
+
# define deflate z_deflate
|
| 46 |
+
# define deflateBound z_deflateBound
|
| 47 |
+
# define deflateCopy z_deflateCopy
|
| 48 |
+
# define deflateEnd z_deflateEnd
|
| 49 |
+
# define deflateGetDictionary z_deflateGetDictionary
|
| 50 |
+
# define deflateInit z_deflateInit
|
| 51 |
+
# define deflateInit2 z_deflateInit2
|
| 52 |
+
# define deflateInit2_ z_deflateInit2_
|
| 53 |
+
# define deflateInit_ z_deflateInit_
|
| 54 |
+
# define deflateParams z_deflateParams
|
| 55 |
+
# define deflatePending z_deflatePending
|
| 56 |
+
# define deflatePrime z_deflatePrime
|
| 57 |
+
# define deflateReset z_deflateReset
|
| 58 |
+
# define deflateResetKeep z_deflateResetKeep
|
| 59 |
+
# define deflateSetDictionary z_deflateSetDictionary
|
| 60 |
+
# define deflateSetHeader z_deflateSetHeader
|
| 61 |
+
# define deflateTune z_deflateTune
|
| 62 |
+
# define deflate_copyright z_deflate_copyright
|
| 63 |
+
# define get_crc_table z_get_crc_table
|
| 64 |
+
# ifndef Z_SOLO
|
| 65 |
+
# define gz_error z_gz_error
|
| 66 |
+
# define gz_intmax z_gz_intmax
|
| 67 |
+
# define gz_strwinerror z_gz_strwinerror
|
| 68 |
+
# define gzbuffer z_gzbuffer
|
| 69 |
+
# define gzclearerr z_gzclearerr
|
| 70 |
+
# define gzclose z_gzclose
|
| 71 |
+
# define gzclose_r z_gzclose_r
|
| 72 |
+
# define gzclose_w z_gzclose_w
|
| 73 |
+
# define gzdirect z_gzdirect
|
| 74 |
+
# define gzdopen z_gzdopen
|
| 75 |
+
# define gzeof z_gzeof
|
| 76 |
+
# define gzerror z_gzerror
|
| 77 |
+
# define gzflush z_gzflush
|
| 78 |
+
# define gzfread z_gzfread
|
| 79 |
+
# define gzfwrite z_gzfwrite
|
| 80 |
+
# define gzgetc z_gzgetc
|
| 81 |
+
# define gzgetc_ z_gzgetc_
|
| 82 |
+
# define gzgets z_gzgets
|
| 83 |
+
# define gzoffset z_gzoffset
|
| 84 |
+
# define gzoffset64 z_gzoffset64
|
| 85 |
+
# define gzopen z_gzopen
|
| 86 |
+
# define gzopen64 z_gzopen64
|
| 87 |
+
# ifdef _WIN32
|
| 88 |
+
# define gzopen_w z_gzopen_w
|
| 89 |
+
# endif
|
| 90 |
+
# define gzprintf z_gzprintf
|
| 91 |
+
# define gzputc z_gzputc
|
| 92 |
+
# define gzputs z_gzputs
|
| 93 |
+
# define gzread z_gzread
|
| 94 |
+
# define gzrewind z_gzrewind
|
| 95 |
+
# define gzseek z_gzseek
|
| 96 |
+
# define gzseek64 z_gzseek64
|
| 97 |
+
# define gzsetparams z_gzsetparams
|
| 98 |
+
# define gztell z_gztell
|
| 99 |
+
# define gztell64 z_gztell64
|
| 100 |
+
# define gzungetc z_gzungetc
|
| 101 |
+
# define gzvprintf z_gzvprintf
|
| 102 |
+
# define gzwrite z_gzwrite
|
| 103 |
+
# endif
|
| 104 |
+
# define inflate z_inflate
|
| 105 |
+
# define inflateBack z_inflateBack
|
| 106 |
+
# define inflateBackEnd z_inflateBackEnd
|
| 107 |
+
# define inflateBackInit z_inflateBackInit
|
| 108 |
+
# define inflateBackInit_ z_inflateBackInit_
|
| 109 |
+
# define inflateCodesUsed z_inflateCodesUsed
|
| 110 |
+
# define inflateCopy z_inflateCopy
|
| 111 |
+
# define inflateEnd z_inflateEnd
|
| 112 |
+
# define inflateGetDictionary z_inflateGetDictionary
|
| 113 |
+
# define inflateGetHeader z_inflateGetHeader
|
| 114 |
+
# define inflateInit z_inflateInit
|
| 115 |
+
# define inflateInit2 z_inflateInit2
|
| 116 |
+
# define inflateInit2_ z_inflateInit2_
|
| 117 |
+
# define inflateInit_ z_inflateInit_
|
| 118 |
+
# define inflateMark z_inflateMark
|
| 119 |
+
# define inflatePrime z_inflatePrime
|
| 120 |
+
# define inflateReset z_inflateReset
|
| 121 |
+
# define inflateReset2 z_inflateReset2
|
| 122 |
+
# define inflateResetKeep z_inflateResetKeep
|
| 123 |
+
# define inflateSetDictionary z_inflateSetDictionary
|
| 124 |
+
# define inflateSync z_inflateSync
|
| 125 |
+
# define inflateSyncPoint z_inflateSyncPoint
|
| 126 |
+
# define inflateUndermine z_inflateUndermine
|
| 127 |
+
# define inflateValidate z_inflateValidate
|
| 128 |
+
# define inflate_copyright z_inflate_copyright
|
| 129 |
+
# define inflate_fast z_inflate_fast
|
| 130 |
+
# define inflate_table z_inflate_table
|
| 131 |
+
# ifndef Z_SOLO
|
| 132 |
+
# define uncompress z_uncompress
|
| 133 |
+
# define uncompress2 z_uncompress2
|
| 134 |
+
# endif
|
| 135 |
+
# define zError z_zError
|
| 136 |
+
# ifndef Z_SOLO
|
| 137 |
+
# define zcalloc z_zcalloc
|
| 138 |
+
# define zcfree z_zcfree
|
| 139 |
+
# endif
|
| 140 |
+
# define zlibCompileFlags z_zlibCompileFlags
|
| 141 |
+
# define zlibVersion z_zlibVersion
|
| 142 |
+
|
| 143 |
+
/* all zlib typedefs in zlib.h and zconf.h */
|
| 144 |
+
# define Byte z_Byte
|
| 145 |
+
# define Bytef z_Bytef
|
| 146 |
+
# define alloc_func z_alloc_func
|
| 147 |
+
# define charf z_charf
|
| 148 |
+
# define free_func z_free_func
|
| 149 |
+
# ifndef Z_SOLO
|
| 150 |
+
# define gzFile z_gzFile
|
| 151 |
+
# endif
|
| 152 |
+
# define gz_header z_gz_header
|
| 153 |
+
# define gz_headerp z_gz_headerp
|
| 154 |
+
# define in_func z_in_func
|
| 155 |
+
# define intf z_intf
|
| 156 |
+
# define out_func z_out_func
|
| 157 |
+
# define uInt z_uInt
|
| 158 |
+
# define uIntf z_uIntf
|
| 159 |
+
# define uLong z_uLong
|
| 160 |
+
# define uLongf z_uLongf
|
| 161 |
+
# define voidp z_voidp
|
| 162 |
+
# define voidpc z_voidpc
|
| 163 |
+
# define voidpf z_voidpf
|
| 164 |
+
|
| 165 |
+
/* all zlib structs in zlib.h and zconf.h */
|
| 166 |
+
# define gz_header_s z_gz_header_s
|
| 167 |
+
# define internal_state z_internal_state
|
| 168 |
+
|
| 169 |
+
#endif
|
| 170 |
+
|
| 171 |
+
#if defined(__MSDOS__) && !defined(MSDOS)
|
| 172 |
+
# define MSDOS
|
| 173 |
+
#endif
|
| 174 |
+
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
| 175 |
+
# define OS2
|
| 176 |
+
#endif
|
| 177 |
+
#if defined(_WINDOWS) && !defined(WINDOWS)
|
| 178 |
+
# define WINDOWS
|
| 179 |
+
#endif
|
| 180 |
+
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
| 181 |
+
# ifndef WIN32
|
| 182 |
+
# define WIN32
|
| 183 |
+
# endif
|
| 184 |
+
#endif
|
| 185 |
+
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
| 186 |
+
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
| 187 |
+
# ifndef SYS16BIT
|
| 188 |
+
# define SYS16BIT
|
| 189 |
+
# endif
|
| 190 |
+
# endif
|
| 191 |
+
#endif
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
| 195 |
+
* than 64k bytes at a time (needed on systems with 16-bit int).
|
| 196 |
+
*/
|
| 197 |
+
#ifdef SYS16BIT
|
| 198 |
+
# define MAXSEG_64K
|
| 199 |
+
#endif
|
| 200 |
+
#ifdef MSDOS
|
| 201 |
+
# define UNALIGNED_OK
|
| 202 |
+
#endif
|
| 203 |
+
|
| 204 |
+
#ifdef __STDC_VERSION__
|
| 205 |
+
# ifndef STDC
|
| 206 |
+
# define STDC
|
| 207 |
+
# endif
|
| 208 |
+
# if __STDC_VERSION__ >= 199901L
|
| 209 |
+
# ifndef STDC99
|
| 210 |
+
# define STDC99
|
| 211 |
+
# endif
|
| 212 |
+
# endif
|
| 213 |
+
#endif
|
| 214 |
+
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
| 215 |
+
# define STDC
|
| 216 |
+
#endif
|
| 217 |
+
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
| 218 |
+
# define STDC
|
| 219 |
+
#endif
|
| 220 |
+
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
| 221 |
+
# define STDC
|
| 222 |
+
#endif
|
| 223 |
+
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
| 224 |
+
# define STDC
|
| 225 |
+
#endif
|
| 226 |
+
|
| 227 |
+
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
| 228 |
+
# define STDC
|
| 229 |
+
#endif
|
| 230 |
+
|
| 231 |
+
#ifndef STDC
|
| 232 |
+
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
| 233 |
+
# define const /* note: need a more gentle solution here */
|
| 234 |
+
# endif
|
| 235 |
+
#endif
|
| 236 |
+
|
| 237 |
+
#if defined(ZLIB_CONST) && !defined(z_const)
|
| 238 |
+
# define z_const const
|
| 239 |
+
#else
|
| 240 |
+
# define z_const
|
| 241 |
+
#endif
|
| 242 |
+
|
| 243 |
+
#ifdef Z_SOLO
|
| 244 |
+
# ifdef _WIN64
|
| 245 |
+
typedef unsigned long long z_size_t;
|
| 246 |
+
# else
|
| 247 |
+
typedef unsigned long z_size_t;
|
| 248 |
+
# endif
|
| 249 |
+
#else
|
| 250 |
+
# define z_longlong long long
|
| 251 |
+
# if defined(NO_SIZE_T)
|
| 252 |
+
typedef unsigned NO_SIZE_T z_size_t;
|
| 253 |
+
# elif defined(STDC)
|
| 254 |
+
# include <stddef.h>
|
| 255 |
+
typedef size_t z_size_t;
|
| 256 |
+
# else
|
| 257 |
+
typedef unsigned long z_size_t;
|
| 258 |
+
# endif
|
| 259 |
+
# undef z_longlong
|
| 260 |
+
#endif
|
| 261 |
+
|
| 262 |
+
/* Maximum value for memLevel in deflateInit2 */
|
| 263 |
+
#ifndef MAX_MEM_LEVEL
|
| 264 |
+
# ifdef MAXSEG_64K
|
| 265 |
+
# define MAX_MEM_LEVEL 8
|
| 266 |
+
# else
|
| 267 |
+
# define MAX_MEM_LEVEL 9
|
| 268 |
+
# endif
|
| 269 |
+
#endif
|
| 270 |
+
|
| 271 |
+
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
| 272 |
+
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
| 273 |
+
* created by gzip. (Files created by minigzip can still be extracted by
|
| 274 |
+
* gzip.)
|
| 275 |
+
*/
|
| 276 |
+
#ifndef MAX_WBITS
|
| 277 |
+
# define MAX_WBITS 15 /* 32K LZ77 window */
|
| 278 |
+
#endif
|
| 279 |
+
|
| 280 |
+
/* The memory requirements for deflate are (in bytes):
|
| 281 |
+
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
| 282 |
+
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
| 283 |
+
plus a few kilobytes for small objects. For example, if you want to reduce
|
| 284 |
+
the default memory requirements from 256K to 128K, compile with
|
| 285 |
+
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
| 286 |
+
Of course this will generally degrade compression (there's no free lunch).
|
| 287 |
+
|
| 288 |
+
The memory requirements for inflate are (in bytes) 1 << windowBits
|
| 289 |
+
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
|
| 290 |
+
for small objects.
|
| 291 |
+
*/
|
| 292 |
+
|
| 293 |
+
/* Type declarations */
|
| 294 |
+
|
| 295 |
+
#ifndef OF /* function prototypes */
|
| 296 |
+
# ifdef STDC
|
| 297 |
+
# define OF(args) args
|
| 298 |
+
# else
|
| 299 |
+
# define OF(args) ()
|
| 300 |
+
# endif
|
| 301 |
+
#endif
|
| 302 |
+
|
| 303 |
+
/* The following definitions for FAR are needed only for MSDOS mixed
|
| 304 |
+
* model programming (small or medium model with some far allocations).
|
| 305 |
+
* This was tested only with MSC; for other MSDOS compilers you may have
|
| 306 |
+
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
| 307 |
+
* just define FAR to be empty.
|
| 308 |
+
*/
|
| 309 |
+
#ifdef SYS16BIT
|
| 310 |
+
# if defined(M_I86SM) || defined(M_I86MM)
|
| 311 |
+
/* MSC small or medium model */
|
| 312 |
+
# define SMALL_MEDIUM
|
| 313 |
+
# ifdef _MSC_VER
|
| 314 |
+
# define FAR _far
|
| 315 |
+
# else
|
| 316 |
+
# define FAR far
|
| 317 |
+
# endif
|
| 318 |
+
# endif
|
| 319 |
+
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
| 320 |
+
/* Turbo C small or medium model */
|
| 321 |
+
# define SMALL_MEDIUM
|
| 322 |
+
# ifdef __BORLANDC__
|
| 323 |
+
# define FAR _far
|
| 324 |
+
# else
|
| 325 |
+
# define FAR far
|
| 326 |
+
# endif
|
| 327 |
+
# endif
|
| 328 |
+
#endif
|
| 329 |
+
|
| 330 |
+
#if defined(WINDOWS) || defined(WIN32)
|
| 331 |
+
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
| 332 |
+
* This is not mandatory, but it offers a little performance increase.
|
| 333 |
+
*/
|
| 334 |
+
# ifdef ZLIB_DLL
|
| 335 |
+
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
| 336 |
+
# ifdef ZLIB_INTERNAL
|
| 337 |
+
# define ZEXTERN extern __declspec(dllexport)
|
| 338 |
+
# else
|
| 339 |
+
# define ZEXTERN extern __declspec(dllimport)
|
| 340 |
+
# endif
|
| 341 |
+
# endif
|
| 342 |
+
# endif /* ZLIB_DLL */
|
| 343 |
+
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
| 344 |
+
* define ZLIB_WINAPI.
|
| 345 |
+
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
| 346 |
+
*/
|
| 347 |
+
# ifdef ZLIB_WINAPI
|
| 348 |
+
# ifdef FAR
|
| 349 |
+
# undef FAR
|
| 350 |
+
# endif
|
| 351 |
+
# ifndef WIN32_LEAN_AND_MEAN
|
| 352 |
+
# define WIN32_LEAN_AND_MEAN
|
| 353 |
+
# endif
|
| 354 |
+
# include <windows.h>
|
| 355 |
+
/* No need for _export, use ZLIB.DEF instead. */
|
| 356 |
+
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
| 357 |
+
# define ZEXPORT WINAPI
|
| 358 |
+
# ifdef WIN32
|
| 359 |
+
# define ZEXPORTVA WINAPIV
|
| 360 |
+
# else
|
| 361 |
+
# define ZEXPORTVA FAR CDECL
|
| 362 |
+
# endif
|
| 363 |
+
# endif
|
| 364 |
+
#endif
|
| 365 |
+
|
| 366 |
+
#if defined (__BEOS__)
|
| 367 |
+
# ifdef ZLIB_DLL
|
| 368 |
+
# ifdef ZLIB_INTERNAL
|
| 369 |
+
# define ZEXPORT __declspec(dllexport)
|
| 370 |
+
# define ZEXPORTVA __declspec(dllexport)
|
| 371 |
+
# else
|
| 372 |
+
# define ZEXPORT __declspec(dllimport)
|
| 373 |
+
# define ZEXPORTVA __declspec(dllimport)
|
| 374 |
+
# endif
|
| 375 |
+
# endif
|
| 376 |
+
#endif
|
| 377 |
+
|
| 378 |
+
#ifndef ZEXTERN
|
| 379 |
+
# define ZEXTERN extern
|
| 380 |
+
#endif
|
| 381 |
+
#ifndef ZEXPORT
|
| 382 |
+
# define ZEXPORT
|
| 383 |
+
#endif
|
| 384 |
+
#ifndef ZEXPORTVA
|
| 385 |
+
# define ZEXPORTVA
|
| 386 |
+
#endif
|
| 387 |
+
|
| 388 |
+
#ifndef FAR
|
| 389 |
+
# define FAR
|
| 390 |
+
#endif
|
| 391 |
+
|
| 392 |
+
#if !defined(__MACTYPES__)
|
| 393 |
+
typedef unsigned char Byte; /* 8 bits */
|
| 394 |
+
#endif
|
| 395 |
+
typedef unsigned int uInt; /* 16 bits or more */
|
| 396 |
+
typedef unsigned long uLong; /* 32 bits or more */
|
| 397 |
+
|
| 398 |
+
#ifdef SMALL_MEDIUM
|
| 399 |
+
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
| 400 |
+
# define Bytef Byte FAR
|
| 401 |
+
#else
|
| 402 |
+
typedef Byte FAR Bytef;
|
| 403 |
+
#endif
|
| 404 |
+
typedef char FAR charf;
|
| 405 |
+
typedef int FAR intf;
|
| 406 |
+
typedef uInt FAR uIntf;
|
| 407 |
+
typedef uLong FAR uLongf;
|
| 408 |
+
|
| 409 |
+
#ifdef STDC
|
| 410 |
+
typedef void const *voidpc;
|
| 411 |
+
typedef void FAR *voidpf;
|
| 412 |
+
typedef void *voidp;
|
| 413 |
+
#else
|
| 414 |
+
typedef Byte const *voidpc;
|
| 415 |
+
typedef Byte FAR *voidpf;
|
| 416 |
+
typedef Byte *voidp;
|
| 417 |
+
#endif
|
| 418 |
+
|
| 419 |
+
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
| 420 |
+
# include <limits.h>
|
| 421 |
+
# if (UINT_MAX == 0xffffffffUL)
|
| 422 |
+
# define Z_U4 unsigned
|
| 423 |
+
# elif (ULONG_MAX == 0xffffffffUL)
|
| 424 |
+
# define Z_U4 unsigned long
|
| 425 |
+
# elif (USHRT_MAX == 0xffffffffUL)
|
| 426 |
+
# define Z_U4 unsigned short
|
| 427 |
+
# endif
|
| 428 |
+
#endif
|
| 429 |
+
|
| 430 |
+
#ifdef Z_U4
|
| 431 |
+
typedef Z_U4 z_crc_t;
|
| 432 |
+
#else
|
| 433 |
+
typedef unsigned long z_crc_t;
|
| 434 |
+
#endif
|
| 435 |
+
|
| 436 |
+
#if 1 /* was set to #if 1 by ./configure */
|
| 437 |
+
# define Z_HAVE_UNISTD_H
|
| 438 |
+
#endif
|
| 439 |
+
|
| 440 |
+
#if 1 /* was set to #if 1 by ./configure */
|
| 441 |
+
# define Z_HAVE_STDARG_H
|
| 442 |
+
#endif
|
| 443 |
+
|
| 444 |
+
#ifdef STDC
|
| 445 |
+
# ifndef Z_SOLO
|
| 446 |
+
# include <sys/types.h> /* for off_t */
|
| 447 |
+
# endif
|
| 448 |
+
#endif
|
| 449 |
+
|
| 450 |
+
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
| 451 |
+
# ifndef Z_SOLO
|
| 452 |
+
# include <stdarg.h> /* for va_list */
|
| 453 |
+
# endif
|
| 454 |
+
#endif
|
| 455 |
+
|
| 456 |
+
#ifdef _WIN32
|
| 457 |
+
# ifndef Z_SOLO
|
| 458 |
+
# include <stddef.h> /* for wchar_t */
|
| 459 |
+
# endif
|
| 460 |
+
#endif
|
| 461 |
+
|
| 462 |
+
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
| 463 |
+
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
| 464 |
+
* though the former does not conform to the LFS document), but considering
|
| 465 |
+
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
| 466 |
+
* equivalently requesting no 64-bit operations
|
| 467 |
+
*/
|
| 468 |
+
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
| 469 |
+
# undef _LARGEFILE64_SOURCE
|
| 470 |
+
#endif
|
| 471 |
+
|
| 472 |
+
#ifndef Z_HAVE_UNISTD_H
|
| 473 |
+
# ifdef __WATCOMC__
|
| 474 |
+
# define Z_HAVE_UNISTD_H
|
| 475 |
+
# endif
|
| 476 |
+
#endif
|
| 477 |
+
#ifndef Z_HAVE_UNISTD_H
|
| 478 |
+
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
|
| 479 |
+
# define Z_HAVE_UNISTD_H
|
| 480 |
+
# endif
|
| 481 |
+
#endif
|
| 482 |
+
#ifndef Z_SOLO
|
| 483 |
+
# if defined(Z_HAVE_UNISTD_H)
|
| 484 |
+
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
| 485 |
+
# ifdef VMS
|
| 486 |
+
# include <unixio.h> /* for off_t */
|
| 487 |
+
# endif
|
| 488 |
+
# ifndef z_off_t
|
| 489 |
+
# define z_off_t off_t
|
| 490 |
+
# endif
|
| 491 |
+
# endif
|
| 492 |
+
#endif
|
| 493 |
+
|
| 494 |
+
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
| 495 |
+
# define Z_LFS64
|
| 496 |
+
#endif
|
| 497 |
+
|
| 498 |
+
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
| 499 |
+
# define Z_LARGE64
|
| 500 |
+
#endif
|
| 501 |
+
|
| 502 |
+
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
| 503 |
+
# define Z_WANT64
|
| 504 |
+
#endif
|
| 505 |
+
|
| 506 |
+
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
| 507 |
+
# define SEEK_SET 0 /* Seek from beginning of file. */
|
| 508 |
+
# define SEEK_CUR 1 /* Seek from current position. */
|
| 509 |
+
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
| 510 |
+
#endif
|
| 511 |
+
|
| 512 |
+
#ifndef z_off_t
|
| 513 |
+
# define z_off_t long
|
| 514 |
+
#endif
|
| 515 |
+
|
| 516 |
+
#if !defined(_WIN32) && defined(Z_LARGE64)
|
| 517 |
+
# define z_off64_t off64_t
|
| 518 |
+
#else
|
| 519 |
+
# if defined(_WIN32) && !defined(__GNUC__)
|
| 520 |
+
# define z_off64_t __int64
|
| 521 |
+
# else
|
| 522 |
+
# define z_off64_t z_off_t
|
| 523 |
+
# endif
|
| 524 |
+
#endif
|
| 525 |
+
|
| 526 |
+
/* MVS linker does not support external names larger than 8 bytes */
|
| 527 |
+
#if defined(__MVS__)
|
| 528 |
+
#pragma map(deflateInit_,"DEIN")
|
| 529 |
+
#pragma map(deflateInit2_,"DEIN2")
|
| 530 |
+
#pragma map(deflateEnd,"DEEND")
|
| 531 |
+
#pragma map(deflateBound,"DEBND")
|
| 532 |
+
#pragma map(inflateInit_,"ININ")
|
| 533 |
+
#pragma map(inflateInit2_,"ININ2")
|
| 534 |
+
#pragma map(inflateEnd,"INEND")
|
| 535 |
+
#pragma map(inflateSync,"INSY")
|
| 536 |
+
#pragma map(inflateSetDictionary,"INSEDI")
|
| 537 |
+
#pragma map(compressBound,"CMBND")
|
| 538 |
+
#pragma map(inflate_table,"INTABL")
|
| 539 |
+
#pragma map(inflate_fast,"INFA")
|
| 540 |
+
#pragma map(inflate_copyright,"INCOPY")
|
| 541 |
+
#endif
|
| 542 |
+
|
| 543 |
+
#endif /* ZCONF_H */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zlib.h
ADDED
|
@@ -0,0 +1,1938 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
| 2 |
+
version 1.3.1, January 22nd, 2024
|
| 3 |
+
|
| 4 |
+
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
| 5 |
+
|
| 6 |
+
This software is provided 'as-is', without any express or implied
|
| 7 |
+
warranty. In no event will the authors be held liable for any damages
|
| 8 |
+
arising from the use of this software.
|
| 9 |
+
|
| 10 |
+
Permission is granted to anyone to use this software for any purpose,
|
| 11 |
+
including commercial applications, and to alter it and redistribute it
|
| 12 |
+
freely, subject to the following restrictions:
|
| 13 |
+
|
| 14 |
+
1. The origin of this software must not be misrepresented; you must not
|
| 15 |
+
claim that you wrote the original software. If you use this software
|
| 16 |
+
in a product, an acknowledgment in the product documentation would be
|
| 17 |
+
appreciated but is not required.
|
| 18 |
+
2. Altered source versions must be plainly marked as such, and must not be
|
| 19 |
+
misrepresented as being the original software.
|
| 20 |
+
3. This notice may not be removed or altered from any source distribution.
|
| 21 |
+
|
| 22 |
+
Jean-loup Gailly Mark Adler
|
| 23 |
+
jloup@gzip.org madler@alumni.caltech.edu
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
The data format used by the zlib library is described by RFCs (Request for
|
| 27 |
+
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
| 28 |
+
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
| 29 |
+
*/
|
| 30 |
+
|
| 31 |
+
#ifndef ZLIB_H
|
| 32 |
+
#define ZLIB_H
|
| 33 |
+
|
| 34 |
+
#include "zconf.h"
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
#define ZLIB_VERSION "1.3.1"
|
| 41 |
+
#define ZLIB_VERNUM 0x1310
|
| 42 |
+
#define ZLIB_VER_MAJOR 1
|
| 43 |
+
#define ZLIB_VER_MINOR 3
|
| 44 |
+
#define ZLIB_VER_REVISION 1
|
| 45 |
+
#define ZLIB_VER_SUBREVISION 0
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
The 'zlib' compression library provides in-memory compression and
|
| 49 |
+
decompression functions, including integrity checks of the uncompressed data.
|
| 50 |
+
This version of the library supports only one compression method (deflation)
|
| 51 |
+
but other algorithms will be added later and will have the same stream
|
| 52 |
+
interface.
|
| 53 |
+
|
| 54 |
+
Compression can be done in a single step if the buffers are large enough,
|
| 55 |
+
or can be done by repeated calls of the compression function. In the latter
|
| 56 |
+
case, the application must provide more input and/or consume the output
|
| 57 |
+
(providing more output space) before each call.
|
| 58 |
+
|
| 59 |
+
The compressed data format used by default by the in-memory functions is
|
| 60 |
+
the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
|
| 61 |
+
around a deflate stream, which is itself documented in RFC 1951.
|
| 62 |
+
|
| 63 |
+
The library also supports reading and writing files in gzip (.gz) format
|
| 64 |
+
with an interface similar to that of stdio using the functions that start
|
| 65 |
+
with "gz". The gzip format is different from the zlib format. gzip is a
|
| 66 |
+
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
|
| 67 |
+
|
| 68 |
+
This library can optionally read and write gzip and raw deflate streams in
|
| 69 |
+
memory as well.
|
| 70 |
+
|
| 71 |
+
The zlib format was designed to be compact and fast for use in memory
|
| 72 |
+
and on communications channels. The gzip format was designed for single-
|
| 73 |
+
file compression on file systems, has a larger header than zlib to maintain
|
| 74 |
+
directory information, and uses a different, slower check method than zlib.
|
| 75 |
+
|
| 76 |
+
The library does not install any signal handler. The decoder checks
|
| 77 |
+
the consistency of the compressed data, so the library should never crash
|
| 78 |
+
even in the case of corrupted input.
|
| 79 |
+
*/
|
| 80 |
+
|
| 81 |
+
typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
|
| 82 |
+
typedef void (*free_func)(voidpf opaque, voidpf address);
|
| 83 |
+
|
| 84 |
+
struct internal_state;
|
| 85 |
+
|
| 86 |
+
typedef struct z_stream_s {
|
| 87 |
+
z_const Bytef *next_in; /* next input byte */
|
| 88 |
+
uInt avail_in; /* number of bytes available at next_in */
|
| 89 |
+
uLong total_in; /* total number of input bytes read so far */
|
| 90 |
+
|
| 91 |
+
Bytef *next_out; /* next output byte will go here */
|
| 92 |
+
uInt avail_out; /* remaining free space at next_out */
|
| 93 |
+
uLong total_out; /* total number of bytes output so far */
|
| 94 |
+
|
| 95 |
+
z_const char *msg; /* last error message, NULL if no error */
|
| 96 |
+
struct internal_state FAR *state; /* not visible by applications */
|
| 97 |
+
|
| 98 |
+
alloc_func zalloc; /* used to allocate the internal state */
|
| 99 |
+
free_func zfree; /* used to free the internal state */
|
| 100 |
+
voidpf opaque; /* private data object passed to zalloc and zfree */
|
| 101 |
+
|
| 102 |
+
int data_type; /* best guess about the data type: binary or text
|
| 103 |
+
for deflate, or the decoding state for inflate */
|
| 104 |
+
uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
|
| 105 |
+
uLong reserved; /* reserved for future use */
|
| 106 |
+
} z_stream;
|
| 107 |
+
|
| 108 |
+
typedef z_stream FAR *z_streamp;
|
| 109 |
+
|
| 110 |
+
/*
|
| 111 |
+
gzip header information passed to and from zlib routines. See RFC 1952
|
| 112 |
+
for more details on the meanings of these fields.
|
| 113 |
+
*/
|
| 114 |
+
typedef struct gz_header_s {
|
| 115 |
+
int text; /* true if compressed data believed to be text */
|
| 116 |
+
uLong time; /* modification time */
|
| 117 |
+
int xflags; /* extra flags (not used when writing a gzip file) */
|
| 118 |
+
int os; /* operating system */
|
| 119 |
+
Bytef *extra; /* pointer to extra field or Z_NULL if none */
|
| 120 |
+
uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
|
| 121 |
+
uInt extra_max; /* space at extra (only when reading header) */
|
| 122 |
+
Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
|
| 123 |
+
uInt name_max; /* space at name (only when reading header) */
|
| 124 |
+
Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
|
| 125 |
+
uInt comm_max; /* space at comment (only when reading header) */
|
| 126 |
+
int hcrc; /* true if there was or will be a header crc */
|
| 127 |
+
int done; /* true when done reading gzip header (not used
|
| 128 |
+
when writing a gzip file) */
|
| 129 |
+
} gz_header;
|
| 130 |
+
|
| 131 |
+
typedef gz_header FAR *gz_headerp;
|
| 132 |
+
|
| 133 |
+
/*
|
| 134 |
+
The application must update next_in and avail_in when avail_in has dropped
|
| 135 |
+
to zero. It must update next_out and avail_out when avail_out has dropped
|
| 136 |
+
to zero. The application must initialize zalloc, zfree and opaque before
|
| 137 |
+
calling the init function. All other fields are set by the compression
|
| 138 |
+
library and must not be updated by the application.
|
| 139 |
+
|
| 140 |
+
The opaque value provided by the application will be passed as the first
|
| 141 |
+
parameter for calls of zalloc and zfree. This can be useful for custom
|
| 142 |
+
memory management. The compression library attaches no meaning to the
|
| 143 |
+
opaque value.
|
| 144 |
+
|
| 145 |
+
zalloc must return Z_NULL if there is not enough memory for the object.
|
| 146 |
+
If zlib is used in a multi-threaded application, zalloc and zfree must be
|
| 147 |
+
thread safe. In that case, zlib is thread-safe. When zalloc and zfree are
|
| 148 |
+
Z_NULL on entry to the initialization function, they are set to internal
|
| 149 |
+
routines that use the standard library functions malloc() and free().
|
| 150 |
+
|
| 151 |
+
On 16-bit systems, the functions zalloc and zfree must be able to allocate
|
| 152 |
+
exactly 65536 bytes, but will not be required to allocate more than this if
|
| 153 |
+
the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers
|
| 154 |
+
returned by zalloc for objects of exactly 65536 bytes *must* have their
|
| 155 |
+
offset normalized to zero. The default allocation function provided by this
|
| 156 |
+
library ensures this (see zutil.c). To reduce memory requirements and avoid
|
| 157 |
+
any allocation of 64K objects, at the expense of compression ratio, compile
|
| 158 |
+
the library with -DMAX_WBITS=14 (see zconf.h).
|
| 159 |
+
|
| 160 |
+
The fields total_in and total_out can be used for statistics or progress
|
| 161 |
+
reports. After compression, total_in holds the total size of the
|
| 162 |
+
uncompressed data and may be saved for use by the decompressor (particularly
|
| 163 |
+
if the decompressor wants to decompress everything in a single step).
|
| 164 |
+
*/
|
| 165 |
+
|
| 166 |
+
/* constants */
|
| 167 |
+
|
| 168 |
+
#define Z_NO_FLUSH 0
|
| 169 |
+
#define Z_PARTIAL_FLUSH 1
|
| 170 |
+
#define Z_SYNC_FLUSH 2
|
| 171 |
+
#define Z_FULL_FLUSH 3
|
| 172 |
+
#define Z_FINISH 4
|
| 173 |
+
#define Z_BLOCK 5
|
| 174 |
+
#define Z_TREES 6
|
| 175 |
+
/* Allowed flush values; see deflate() and inflate() below for details */
|
| 176 |
+
|
| 177 |
+
#define Z_OK 0
|
| 178 |
+
#define Z_STREAM_END 1
|
| 179 |
+
#define Z_NEED_DICT 2
|
| 180 |
+
#define Z_ERRNO (-1)
|
| 181 |
+
#define Z_STREAM_ERROR (-2)
|
| 182 |
+
#define Z_DATA_ERROR (-3)
|
| 183 |
+
#define Z_MEM_ERROR (-4)
|
| 184 |
+
#define Z_BUF_ERROR (-5)
|
| 185 |
+
#define Z_VERSION_ERROR (-6)
|
| 186 |
+
/* Return codes for the compression/decompression functions. Negative values
|
| 187 |
+
* are errors, positive values are used for special but normal events.
|
| 188 |
+
*/
|
| 189 |
+
|
| 190 |
+
#define Z_NO_COMPRESSION 0
|
| 191 |
+
#define Z_BEST_SPEED 1
|
| 192 |
+
#define Z_BEST_COMPRESSION 9
|
| 193 |
+
#define Z_DEFAULT_COMPRESSION (-1)
|
| 194 |
+
/* compression levels */
|
| 195 |
+
|
| 196 |
+
#define Z_FILTERED 1
|
| 197 |
+
#define Z_HUFFMAN_ONLY 2
|
| 198 |
+
#define Z_RLE 3
|
| 199 |
+
#define Z_FIXED 4
|
| 200 |
+
#define Z_DEFAULT_STRATEGY 0
|
| 201 |
+
/* compression strategy; see deflateInit2() below for details */
|
| 202 |
+
|
| 203 |
+
#define Z_BINARY 0
|
| 204 |
+
#define Z_TEXT 1
|
| 205 |
+
#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
|
| 206 |
+
#define Z_UNKNOWN 2
|
| 207 |
+
/* Possible values of the data_type field for deflate() */
|
| 208 |
+
|
| 209 |
+
#define Z_DEFLATED 8
|
| 210 |
+
/* The deflate compression method (the only one supported in this version) */
|
| 211 |
+
|
| 212 |
+
#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
|
| 213 |
+
|
| 214 |
+
#define zlib_version zlibVersion()
|
| 215 |
+
/* for compatibility with versions < 1.0.2 */
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
/* basic functions */
|
| 219 |
+
|
| 220 |
+
ZEXTERN const char * ZEXPORT zlibVersion(void);
|
| 221 |
+
/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
|
| 222 |
+
If the first character differs, the library code actually used is not
|
| 223 |
+
compatible with the zlib.h header file used by the application. This check
|
| 224 |
+
is automatically made by deflateInit and inflateInit.
|
| 225 |
+
*/
|
| 226 |
+
|
| 227 |
+
/*
|
| 228 |
+
ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
|
| 229 |
+
|
| 230 |
+
Initializes the internal stream state for compression. The fields
|
| 231 |
+
zalloc, zfree and opaque must be initialized before by the caller. If
|
| 232 |
+
zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
|
| 233 |
+
allocation functions. total_in, total_out, adler, and msg are initialized.
|
| 234 |
+
|
| 235 |
+
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
|
| 236 |
+
1 gives best speed, 9 gives best compression, 0 gives no compression at all
|
| 237 |
+
(the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
|
| 238 |
+
requests a default compromise between speed and compression (currently
|
| 239 |
+
equivalent to level 6).
|
| 240 |
+
|
| 241 |
+
deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
| 242 |
+
memory, Z_STREAM_ERROR if level is not a valid compression level, or
|
| 243 |
+
Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
|
| 244 |
+
with the version assumed by the caller (ZLIB_VERSION). msg is set to null
|
| 245 |
+
if there is no error message. deflateInit does not perform any compression:
|
| 246 |
+
this will be done by deflate().
|
| 247 |
+
*/
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
|
| 251 |
+
/*
|
| 252 |
+
deflate compresses as much data as possible, and stops when the input
|
| 253 |
+
buffer becomes empty or the output buffer becomes full. It may introduce
|
| 254 |
+
some output latency (reading input without producing any output) except when
|
| 255 |
+
forced to flush.
|
| 256 |
+
|
| 257 |
+
The detailed semantics are as follows. deflate performs one or both of the
|
| 258 |
+
following actions:
|
| 259 |
+
|
| 260 |
+
- Compress more input starting at next_in and update next_in and avail_in
|
| 261 |
+
accordingly. If not all input can be processed (because there is not
|
| 262 |
+
enough room in the output buffer), next_in and avail_in are updated and
|
| 263 |
+
processing will resume at this point for the next call of deflate().
|
| 264 |
+
|
| 265 |
+
- Generate more output starting at next_out and update next_out and avail_out
|
| 266 |
+
accordingly. This action is forced if the parameter flush is non zero.
|
| 267 |
+
Forcing flush frequently degrades the compression ratio, so this parameter
|
| 268 |
+
should be set only when necessary. Some output may be provided even if
|
| 269 |
+
flush is zero.
|
| 270 |
+
|
| 271 |
+
Before the call of deflate(), the application should ensure that at least
|
| 272 |
+
one of the actions is possible, by providing more input and/or consuming more
|
| 273 |
+
output, and updating avail_in or avail_out accordingly; avail_out should
|
| 274 |
+
never be zero before the call. The application can consume the compressed
|
| 275 |
+
output when it wants, for example when the output buffer is full (avail_out
|
| 276 |
+
== 0), or after each call of deflate(). If deflate returns Z_OK and with
|
| 277 |
+
zero avail_out, it must be called again after making room in the output
|
| 278 |
+
buffer because there might be more output pending. See deflatePending(),
|
| 279 |
+
which can be used if desired to determine whether or not there is more output
|
| 280 |
+
in that case.
|
| 281 |
+
|
| 282 |
+
Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
|
| 283 |
+
decide how much data to accumulate before producing output, in order to
|
| 284 |
+
maximize compression.
|
| 285 |
+
|
| 286 |
+
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
|
| 287 |
+
flushed to the output buffer and the output is aligned on a byte boundary, so
|
| 288 |
+
that the decompressor can get all input data available so far. (In
|
| 289 |
+
particular avail_in is zero after the call if enough output space has been
|
| 290 |
+
provided before the call.) Flushing may degrade compression for some
|
| 291 |
+
compression algorithms and so it should be used only when necessary. This
|
| 292 |
+
completes the current deflate block and follows it with an empty stored block
|
| 293 |
+
that is three bits plus filler bits to the next byte, followed by four bytes
|
| 294 |
+
(00 00 ff ff).
|
| 295 |
+
|
| 296 |
+
If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
|
| 297 |
+
output buffer, but the output is not aligned to a byte boundary. All of the
|
| 298 |
+
input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
|
| 299 |
+
This completes the current deflate block and follows it with an empty fixed
|
| 300 |
+
codes block that is 10 bits long. This assures that enough bytes are output
|
| 301 |
+
in order for the decompressor to finish the block before the empty fixed
|
| 302 |
+
codes block.
|
| 303 |
+
|
| 304 |
+
If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
|
| 305 |
+
for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
|
| 306 |
+
seven bits of the current block are held to be written as the next byte after
|
| 307 |
+
the next deflate block is completed. In this case, the decompressor may not
|
| 308 |
+
be provided enough bits at this point in order to complete decompression of
|
| 309 |
+
the data provided so far to the compressor. It may need to wait for the next
|
| 310 |
+
block to be emitted. This is for advanced applications that need to control
|
| 311 |
+
the emission of deflate blocks.
|
| 312 |
+
|
| 313 |
+
If flush is set to Z_FULL_FLUSH, all output is flushed as with
|
| 314 |
+
Z_SYNC_FLUSH, and the compression state is reset so that decompression can
|
| 315 |
+
restart from this point if previous compressed data has been damaged or if
|
| 316 |
+
random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
|
| 317 |
+
compression.
|
| 318 |
+
|
| 319 |
+
If deflate returns with avail_out == 0, this function must be called again
|
| 320 |
+
with the same value of the flush parameter and more output space (updated
|
| 321 |
+
avail_out), until the flush is complete (deflate returns with non-zero
|
| 322 |
+
avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
|
| 323 |
+
avail_out is greater than six when the flush marker begins, in order to avoid
|
| 324 |
+
repeated flush markers upon calling deflate() again when avail_out == 0.
|
| 325 |
+
|
| 326 |
+
If the parameter flush is set to Z_FINISH, pending input is processed,
|
| 327 |
+
pending output is flushed and deflate returns with Z_STREAM_END if there was
|
| 328 |
+
enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
|
| 329 |
+
function must be called again with Z_FINISH and more output space (updated
|
| 330 |
+
avail_out) but no more input data, until it returns with Z_STREAM_END or an
|
| 331 |
+
error. After deflate has returned Z_STREAM_END, the only possible operations
|
| 332 |
+
on the stream are deflateReset or deflateEnd.
|
| 333 |
+
|
| 334 |
+
Z_FINISH can be used in the first deflate call after deflateInit if all the
|
| 335 |
+
compression is to be done in a single step. In order to complete in one
|
| 336 |
+
call, avail_out must be at least the value returned by deflateBound (see
|
| 337 |
+
below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
|
| 338 |
+
output space is provided, deflate will not return Z_STREAM_END, and it must
|
| 339 |
+
be called again as described above.
|
| 340 |
+
|
| 341 |
+
deflate() sets strm->adler to the Adler-32 checksum of all input read
|
| 342 |
+
so far (that is, total_in bytes). If a gzip stream is being generated, then
|
| 343 |
+
strm->adler will be the CRC-32 checksum of the input read so far. (See
|
| 344 |
+
deflateInit2 below.)
|
| 345 |
+
|
| 346 |
+
deflate() may update strm->data_type if it can make a good guess about
|
| 347 |
+
the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
|
| 348 |
+
considered binary. This field is only for information purposes and does not
|
| 349 |
+
affect the compression algorithm in any manner.
|
| 350 |
+
|
| 351 |
+
deflate() returns Z_OK if some progress has been made (more input
|
| 352 |
+
processed or more output produced), Z_STREAM_END if all input has been
|
| 353 |
+
consumed and all output has been produced (only when flush is set to
|
| 354 |
+
Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
|
| 355 |
+
if next_in or next_out was Z_NULL or the state was inadvertently written over
|
| 356 |
+
by the application), or Z_BUF_ERROR if no progress is possible (for example
|
| 357 |
+
avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
|
| 358 |
+
deflate() can be called again with more input and more output space to
|
| 359 |
+
continue compressing.
|
| 360 |
+
*/
|
| 361 |
+
|
| 362 |
+
|
| 363 |
+
ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
|
| 364 |
+
/*
|
| 365 |
+
All dynamically allocated data structures for this stream are freed.
|
| 366 |
+
This function discards any unprocessed input and does not flush any pending
|
| 367 |
+
output.
|
| 368 |
+
|
| 369 |
+
deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
|
| 370 |
+
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
|
| 371 |
+
prematurely (some input or output was discarded). In the error case, msg
|
| 372 |
+
may be set but then points to a static string (which must not be
|
| 373 |
+
deallocated).
|
| 374 |
+
*/
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
/*
|
| 378 |
+
ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
|
| 379 |
+
|
| 380 |
+
Initializes the internal stream state for decompression. The fields
|
| 381 |
+
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
|
| 382 |
+
the caller. In the current version of inflate, the provided input is not
|
| 383 |
+
read or consumed. The allocation of a sliding window will be deferred to
|
| 384 |
+
the first call of inflate (if the decompression does not complete on the
|
| 385 |
+
first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
|
| 386 |
+
them to use default allocation functions. total_in, total_out, adler, and
|
| 387 |
+
msg are initialized.
|
| 388 |
+
|
| 389 |
+
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
| 390 |
+
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
| 391 |
+
version assumed by the caller, or Z_STREAM_ERROR if the parameters are
|
| 392 |
+
invalid, such as a null pointer to the structure. msg is set to null if
|
| 393 |
+
there is no error message. inflateInit does not perform any decompression.
|
| 394 |
+
Actual decompression will be done by inflate(). So next_in, and avail_in,
|
| 395 |
+
next_out, and avail_out are unused and unchanged. The current
|
| 396 |
+
implementation of inflateInit() does not process any header information --
|
| 397 |
+
that is deferred until inflate() is called.
|
| 398 |
+
*/
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
|
| 402 |
+
/*
|
| 403 |
+
inflate decompresses as much data as possible, and stops when the input
|
| 404 |
+
buffer becomes empty or the output buffer becomes full. It may introduce
|
| 405 |
+
some output latency (reading input without producing any output) except when
|
| 406 |
+
forced to flush.
|
| 407 |
+
|
| 408 |
+
The detailed semantics are as follows. inflate performs one or both of the
|
| 409 |
+
following actions:
|
| 410 |
+
|
| 411 |
+
- Decompress more input starting at next_in and update next_in and avail_in
|
| 412 |
+
accordingly. If not all input can be processed (because there is not
|
| 413 |
+
enough room in the output buffer), then next_in and avail_in are updated
|
| 414 |
+
accordingly, and processing will resume at this point for the next call of
|
| 415 |
+
inflate().
|
| 416 |
+
|
| 417 |
+
- Generate more output starting at next_out and update next_out and avail_out
|
| 418 |
+
accordingly. inflate() provides as much output as possible, until there is
|
| 419 |
+
no more input data or no more space in the output buffer (see below about
|
| 420 |
+
the flush parameter).
|
| 421 |
+
|
| 422 |
+
Before the call of inflate(), the application should ensure that at least
|
| 423 |
+
one of the actions is possible, by providing more input and/or consuming more
|
| 424 |
+
output, and updating the next_* and avail_* values accordingly. If the
|
| 425 |
+
caller of inflate() does not provide both available input and available
|
| 426 |
+
output space, it is possible that there will be no progress made. The
|
| 427 |
+
application can consume the uncompressed output when it wants, for example
|
| 428 |
+
when the output buffer is full (avail_out == 0), or after each call of
|
| 429 |
+
inflate(). If inflate returns Z_OK and with zero avail_out, it must be
|
| 430 |
+
called again after making room in the output buffer because there might be
|
| 431 |
+
more output pending.
|
| 432 |
+
|
| 433 |
+
The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
|
| 434 |
+
Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
|
| 435 |
+
output as possible to the output buffer. Z_BLOCK requests that inflate()
|
| 436 |
+
stop if and when it gets to the next deflate block boundary. When decoding
|
| 437 |
+
the zlib or gzip format, this will cause inflate() to return immediately
|
| 438 |
+
after the header and before the first block. When doing a raw inflate,
|
| 439 |
+
inflate() will go ahead and process the first block, and will return when it
|
| 440 |
+
gets to the end of that block, or when it runs out of data.
|
| 441 |
+
|
| 442 |
+
The Z_BLOCK option assists in appending to or combining deflate streams.
|
| 443 |
+
To assist in this, on return inflate() always sets strm->data_type to the
|
| 444 |
+
number of unused bits in the last byte taken from strm->next_in, plus 64 if
|
| 445 |
+
inflate() is currently decoding the last block in the deflate stream, plus
|
| 446 |
+
128 if inflate() returned immediately after decoding an end-of-block code or
|
| 447 |
+
decoding the complete header up to just before the first byte of the deflate
|
| 448 |
+
stream. The end-of-block will not be indicated until all of the uncompressed
|
| 449 |
+
data from that block has been written to strm->next_out. The number of
|
| 450 |
+
unused bits may in general be greater than seven, except when bit 7 of
|
| 451 |
+
data_type is set, in which case the number of unused bits will be less than
|
| 452 |
+
eight. data_type is set as noted here every time inflate() returns for all
|
| 453 |
+
flush options, and so can be used to determine the amount of currently
|
| 454 |
+
consumed input in bits.
|
| 455 |
+
|
| 456 |
+
The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
|
| 457 |
+
end of each deflate block header is reached, before any actual data in that
|
| 458 |
+
block is decoded. This allows the caller to determine the length of the
|
| 459 |
+
deflate block header for later use in random access within a deflate block.
|
| 460 |
+
256 is added to the value of strm->data_type when inflate() returns
|
| 461 |
+
immediately after reaching the end of the deflate block header.
|
| 462 |
+
|
| 463 |
+
inflate() should normally be called until it returns Z_STREAM_END or an
|
| 464 |
+
error. However if all decompression is to be performed in a single step (a
|
| 465 |
+
single call of inflate), the parameter flush should be set to Z_FINISH. In
|
| 466 |
+
this case all pending input is processed and all pending output is flushed;
|
| 467 |
+
avail_out must be large enough to hold all of the uncompressed data for the
|
| 468 |
+
operation to complete. (The size of the uncompressed data may have been
|
| 469 |
+
saved by the compressor for this purpose.) The use of Z_FINISH is not
|
| 470 |
+
required to perform an inflation in one step. However it may be used to
|
| 471 |
+
inform inflate that a faster approach can be used for the single inflate()
|
| 472 |
+
call. Z_FINISH also informs inflate to not maintain a sliding window if the
|
| 473 |
+
stream completes, which reduces inflate's memory footprint. If the stream
|
| 474 |
+
does not complete, either because not all of the stream is provided or not
|
| 475 |
+
enough output space is provided, then a sliding window will be allocated and
|
| 476 |
+
inflate() can be called again to continue the operation as if Z_NO_FLUSH had
|
| 477 |
+
been used.
|
| 478 |
+
|
| 479 |
+
In this implementation, inflate() always flushes as much output as
|
| 480 |
+
possible to the output buffer, and always uses the faster approach on the
|
| 481 |
+
first call. So the effects of the flush parameter in this implementation are
|
| 482 |
+
on the return value of inflate() as noted below, when inflate() returns early
|
| 483 |
+
when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
|
| 484 |
+
memory for a sliding window when Z_FINISH is used.
|
| 485 |
+
|
| 486 |
+
If a preset dictionary is needed after this call (see inflateSetDictionary
|
| 487 |
+
below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
|
| 488 |
+
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
|
| 489 |
+
strm->adler to the Adler-32 checksum of all output produced so far (that is,
|
| 490 |
+
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
|
| 491 |
+
below. At the end of the stream, inflate() checks that its computed Adler-32
|
| 492 |
+
checksum is equal to that saved by the compressor and returns Z_STREAM_END
|
| 493 |
+
only if the checksum is correct.
|
| 494 |
+
|
| 495 |
+
inflate() can decompress and check either zlib-wrapped or gzip-wrapped
|
| 496 |
+
deflate data. The header type is detected automatically, if requested when
|
| 497 |
+
initializing with inflateInit2(). Any information contained in the gzip
|
| 498 |
+
header is not retained unless inflateGetHeader() is used. When processing
|
| 499 |
+
gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
|
| 500 |
+
produced so far. The CRC-32 is checked against the gzip trailer, as is the
|
| 501 |
+
uncompressed length, modulo 2^32.
|
| 502 |
+
|
| 503 |
+
inflate() returns Z_OK if some progress has been made (more input processed
|
| 504 |
+
or more output produced), Z_STREAM_END if the end of the compressed data has
|
| 505 |
+
been reached and all uncompressed output has been produced, Z_NEED_DICT if a
|
| 506 |
+
preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
|
| 507 |
+
corrupted (input stream not conforming to the zlib format or incorrect check
|
| 508 |
+
value, in which case strm->msg points to a string with a more specific
|
| 509 |
+
error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
|
| 510 |
+
next_in or next_out was Z_NULL, or the state was inadvertently written over
|
| 511 |
+
by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
|
| 512 |
+
if no progress was possible or if there was not enough room in the output
|
| 513 |
+
buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
|
| 514 |
+
inflate() can be called again with more input and more output space to
|
| 515 |
+
continue decompressing. If Z_DATA_ERROR is returned, the application may
|
| 516 |
+
then call inflateSync() to look for a good compression block if a partial
|
| 517 |
+
recovery of the data is to be attempted.
|
| 518 |
+
*/
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
|
| 522 |
+
/*
|
| 523 |
+
All dynamically allocated data structures for this stream are freed.
|
| 524 |
+
This function discards any unprocessed input and does not flush any pending
|
| 525 |
+
output.
|
| 526 |
+
|
| 527 |
+
inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
|
| 528 |
+
was inconsistent.
|
| 529 |
+
*/
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
/* Advanced functions */
|
| 533 |
+
|
| 534 |
+
/*
|
| 535 |
+
The following functions are needed only in some special applications.
|
| 536 |
+
*/
|
| 537 |
+
|
| 538 |
+
/*
|
| 539 |
+
ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
|
| 540 |
+
int level,
|
| 541 |
+
int method,
|
| 542 |
+
int windowBits,
|
| 543 |
+
int memLevel,
|
| 544 |
+
int strategy);
|
| 545 |
+
|
| 546 |
+
This is another version of deflateInit with more compression options. The
|
| 547 |
+
fields zalloc, zfree and opaque must be initialized before by the caller.
|
| 548 |
+
|
| 549 |
+
The method parameter is the compression method. It must be Z_DEFLATED in
|
| 550 |
+
this version of the library.
|
| 551 |
+
|
| 552 |
+
The windowBits parameter is the base two logarithm of the window size
|
| 553 |
+
(the size of the history buffer). It should be in the range 8..15 for this
|
| 554 |
+
version of the library. Larger values of this parameter result in better
|
| 555 |
+
compression at the expense of memory usage. The default value is 15 if
|
| 556 |
+
deflateInit is used instead.
|
| 557 |
+
|
| 558 |
+
For the current implementation of deflate(), a windowBits value of 8 (a
|
| 559 |
+
window size of 256 bytes) is not supported. As a result, a request for 8
|
| 560 |
+
will result in 9 (a 512-byte window). In that case, providing 8 to
|
| 561 |
+
inflateInit2() will result in an error when the zlib header with 9 is
|
| 562 |
+
checked against the initialization of inflate(). The remedy is to not use 8
|
| 563 |
+
with deflateInit2() with this initialization, or at least in that case use 9
|
| 564 |
+
with inflateInit2().
|
| 565 |
+
|
| 566 |
+
windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
|
| 567 |
+
determines the window size. deflate() will then generate raw deflate data
|
| 568 |
+
with no zlib header or trailer, and will not compute a check value.
|
| 569 |
+
|
| 570 |
+
windowBits can also be greater than 15 for optional gzip encoding. Add
|
| 571 |
+
16 to windowBits to write a simple gzip header and trailer around the
|
| 572 |
+
compressed data instead of a zlib wrapper. The gzip header will have no
|
| 573 |
+
file name, no extra data, no comment, no modification time (set to zero), no
|
| 574 |
+
header crc, and the operating system will be set to the appropriate value,
|
| 575 |
+
if the operating system was determined at compile time. If a gzip stream is
|
| 576 |
+
being written, strm->adler is a CRC-32 instead of an Adler-32.
|
| 577 |
+
|
| 578 |
+
For raw deflate or gzip encoding, a request for a 256-byte window is
|
| 579 |
+
rejected as invalid, since only the zlib header provides a means of
|
| 580 |
+
transmitting the window size to the decompressor.
|
| 581 |
+
|
| 582 |
+
The memLevel parameter specifies how much memory should be allocated
|
| 583 |
+
for the internal compression state. memLevel=1 uses minimum memory but is
|
| 584 |
+
slow and reduces compression ratio; memLevel=9 uses maximum memory for
|
| 585 |
+
optimal speed. The default value is 8. See zconf.h for total memory usage
|
| 586 |
+
as a function of windowBits and memLevel.
|
| 587 |
+
|
| 588 |
+
The strategy parameter is used to tune the compression algorithm. Use the
|
| 589 |
+
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
|
| 590 |
+
filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
|
| 591 |
+
string match), or Z_RLE to limit match distances to one (run-length
|
| 592 |
+
encoding). Filtered data consists mostly of small values with a somewhat
|
| 593 |
+
random distribution. In this case, the compression algorithm is tuned to
|
| 594 |
+
compress them better. The effect of Z_FILTERED is to force more Huffman
|
| 595 |
+
coding and less string matching; it is somewhat intermediate between
|
| 596 |
+
Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
|
| 597 |
+
fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
|
| 598 |
+
strategy parameter only affects the compression ratio but not the
|
| 599 |
+
correctness of the compressed output even if it is not set appropriately.
|
| 600 |
+
Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
|
| 601 |
+
decoder for special applications.
|
| 602 |
+
|
| 603 |
+
deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
| 604 |
+
memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
|
| 605 |
+
method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
|
| 606 |
+
incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
|
| 607 |
+
set to null if there is no error message. deflateInit2 does not perform any
|
| 608 |
+
compression: this will be done by deflate().
|
| 609 |
+
*/
|
| 610 |
+
|
| 611 |
+
ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm,
|
| 612 |
+
const Bytef *dictionary,
|
| 613 |
+
uInt dictLength);
|
| 614 |
+
/*
|
| 615 |
+
Initializes the compression dictionary from the given byte sequence
|
| 616 |
+
without producing any compressed output. When using the zlib format, this
|
| 617 |
+
function must be called immediately after deflateInit, deflateInit2 or
|
| 618 |
+
deflateReset, and before any call of deflate. When doing raw deflate, this
|
| 619 |
+
function must be called either before any call of deflate, or immediately
|
| 620 |
+
after the completion of a deflate block, i.e. after all input has been
|
| 621 |
+
consumed and all output has been delivered when using any of the flush
|
| 622 |
+
options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
|
| 623 |
+
compressor and decompressor must use exactly the same dictionary (see
|
| 624 |
+
inflateSetDictionary).
|
| 625 |
+
|
| 626 |
+
The dictionary should consist of strings (byte sequences) that are likely
|
| 627 |
+
to be encountered later in the data to be compressed, with the most commonly
|
| 628 |
+
used strings preferably put towards the end of the dictionary. Using a
|
| 629 |
+
dictionary is most useful when the data to be compressed is short and can be
|
| 630 |
+
predicted with good accuracy; the data can then be compressed better than
|
| 631 |
+
with the default empty dictionary.
|
| 632 |
+
|
| 633 |
+
Depending on the size of the compression data structures selected by
|
| 634 |
+
deflateInit or deflateInit2, a part of the dictionary may in effect be
|
| 635 |
+
discarded, for example if the dictionary is larger than the window size
|
| 636 |
+
provided in deflateInit or deflateInit2. Thus the strings most likely to be
|
| 637 |
+
useful should be put at the end of the dictionary, not at the front. In
|
| 638 |
+
addition, the current implementation of deflate will use at most the window
|
| 639 |
+
size minus 262 bytes of the provided dictionary.
|
| 640 |
+
|
| 641 |
+
Upon return of this function, strm->adler is set to the Adler-32 value
|
| 642 |
+
of the dictionary; the decompressor may later use this value to determine
|
| 643 |
+
which dictionary has been used by the compressor. (The Adler-32 value
|
| 644 |
+
applies to the whole dictionary even if only a subset of the dictionary is
|
| 645 |
+
actually used by the compressor.) If a raw deflate was requested, then the
|
| 646 |
+
Adler-32 value is not computed and strm->adler is not set.
|
| 647 |
+
|
| 648 |
+
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
|
| 649 |
+
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
| 650 |
+
inconsistent (for example if deflate has already been called for this stream
|
| 651 |
+
or if not at a block boundary for raw deflate). deflateSetDictionary does
|
| 652 |
+
not perform any compression: this will be done by deflate().
|
| 653 |
+
*/
|
| 654 |
+
|
| 655 |
+
ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm,
|
| 656 |
+
Bytef *dictionary,
|
| 657 |
+
uInt *dictLength);
|
| 658 |
+
/*
|
| 659 |
+
Returns the sliding dictionary being maintained by deflate. dictLength is
|
| 660 |
+
set to the number of bytes in the dictionary, and that many bytes are copied
|
| 661 |
+
to dictionary. dictionary must have enough space, where 32768 bytes is
|
| 662 |
+
always enough. If deflateGetDictionary() is called with dictionary equal to
|
| 663 |
+
Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
| 664 |
+
Similarly, if dictLength is Z_NULL, then it is not set.
|
| 665 |
+
|
| 666 |
+
deflateGetDictionary() may return a length less than the window size, even
|
| 667 |
+
when more than the window size in input has been provided. It may return up
|
| 668 |
+
to 258 bytes less in that case, due to how zlib's implementation of deflate
|
| 669 |
+
manages the sliding window and lookahead for matches, where matches can be
|
| 670 |
+
up to 258 bytes long. If the application needs the last window-size bytes of
|
| 671 |
+
input, then that would need to be saved by the application outside of zlib.
|
| 672 |
+
|
| 673 |
+
deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
|
| 674 |
+
stream state is inconsistent.
|
| 675 |
+
*/
|
| 676 |
+
|
| 677 |
+
ZEXTERN int ZEXPORT deflateCopy(z_streamp dest,
|
| 678 |
+
z_streamp source);
|
| 679 |
+
/*
|
| 680 |
+
Sets the destination stream as a complete copy of the source stream.
|
| 681 |
+
|
| 682 |
+
This function can be useful when several compression strategies will be
|
| 683 |
+
tried, for example when there are several ways of pre-processing the input
|
| 684 |
+
data with a filter. The streams that will be discarded should then be freed
|
| 685 |
+
by calling deflateEnd. Note that deflateCopy duplicates the internal
|
| 686 |
+
compression state which can be quite large, so this strategy is slow and can
|
| 687 |
+
consume lots of memory.
|
| 688 |
+
|
| 689 |
+
deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
|
| 690 |
+
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
|
| 691 |
+
(such as zalloc being Z_NULL). msg is left unchanged in both source and
|
| 692 |
+
destination.
|
| 693 |
+
*/
|
| 694 |
+
|
| 695 |
+
ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
|
| 696 |
+
/*
|
| 697 |
+
This function is equivalent to deflateEnd followed by deflateInit, but
|
| 698 |
+
does not free and reallocate the internal compression state. The stream
|
| 699 |
+
will leave the compression level and any other attributes that may have been
|
| 700 |
+
set unchanged. total_in, total_out, adler, and msg are initialized.
|
| 701 |
+
|
| 702 |
+
deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 703 |
+
stream state was inconsistent (such as zalloc or state being Z_NULL).
|
| 704 |
+
*/
|
| 705 |
+
|
| 706 |
+
ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
|
| 707 |
+
int level,
|
| 708 |
+
int strategy);
|
| 709 |
+
/*
|
| 710 |
+
Dynamically update the compression level and compression strategy. The
|
| 711 |
+
interpretation of level and strategy is as in deflateInit2(). This can be
|
| 712 |
+
used to switch between compression and straight copy of the input data, or
|
| 713 |
+
to switch to a different kind of input data requiring a different strategy.
|
| 714 |
+
If the compression approach (which is a function of the level) or the
|
| 715 |
+
strategy is changed, and if there have been any deflate() calls since the
|
| 716 |
+
state was initialized or reset, then the input available so far is
|
| 717 |
+
compressed with the old level and strategy using deflate(strm, Z_BLOCK).
|
| 718 |
+
There are three approaches for the compression levels 0, 1..3, and 4..9
|
| 719 |
+
respectively. The new level and strategy will take effect at the next call
|
| 720 |
+
of deflate().
|
| 721 |
+
|
| 722 |
+
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
| 723 |
+
not have enough output space to complete, then the parameter change will not
|
| 724 |
+
take effect. In this case, deflateParams() can be called again with the
|
| 725 |
+
same parameters and more output space to try again.
|
| 726 |
+
|
| 727 |
+
In order to assure a change in the parameters on the first try, the
|
| 728 |
+
deflate stream should be flushed using deflate() with Z_BLOCK or other flush
|
| 729 |
+
request until strm.avail_out is not zero, before calling deflateParams().
|
| 730 |
+
Then no more input data should be provided before the deflateParams() call.
|
| 731 |
+
If this is done, the old level and strategy will be applied to the data
|
| 732 |
+
compressed before deflateParams(), and the new level and strategy will be
|
| 733 |
+
applied to the data compressed after deflateParams().
|
| 734 |
+
|
| 735 |
+
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
|
| 736 |
+
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
|
| 737 |
+
there was not enough output space to complete the compression of the
|
| 738 |
+
available input data before a change in the strategy or approach. Note that
|
| 739 |
+
in the case of a Z_BUF_ERROR, the parameters are not changed. A return
|
| 740 |
+
value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
|
| 741 |
+
retried with more output space.
|
| 742 |
+
*/
|
| 743 |
+
|
| 744 |
+
ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
|
| 745 |
+
int good_length,
|
| 746 |
+
int max_lazy,
|
| 747 |
+
int nice_length,
|
| 748 |
+
int max_chain);
|
| 749 |
+
/*
|
| 750 |
+
Fine tune deflate's internal compression parameters. This should only be
|
| 751 |
+
used by someone who understands the algorithm used by zlib's deflate for
|
| 752 |
+
searching for the best matching string, and even then only by the most
|
| 753 |
+
fanatic optimizer trying to squeeze out the last compressed bit for their
|
| 754 |
+
specific input data. Read the deflate.c source code for the meaning of the
|
| 755 |
+
max_lazy, good_length, nice_length, and max_chain parameters.
|
| 756 |
+
|
| 757 |
+
deflateTune() can be called after deflateInit() or deflateInit2(), and
|
| 758 |
+
returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
|
| 759 |
+
*/
|
| 760 |
+
|
| 761 |
+
ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
|
| 762 |
+
uLong sourceLen);
|
| 763 |
+
/*
|
| 764 |
+
deflateBound() returns an upper bound on the compressed size after
|
| 765 |
+
deflation of sourceLen bytes. It must be called after deflateInit() or
|
| 766 |
+
deflateInit2(), and after deflateSetHeader(), if used. This would be used
|
| 767 |
+
to allocate an output buffer for deflation in a single pass, and so would be
|
| 768 |
+
called before deflate(). If that first deflate() call is provided the
|
| 769 |
+
sourceLen input bytes, an output buffer allocated to the size returned by
|
| 770 |
+
deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
|
| 771 |
+
to return Z_STREAM_END. Note that it is possible for the compressed size to
|
| 772 |
+
be larger than the value returned by deflateBound() if flush options other
|
| 773 |
+
than Z_FINISH or Z_NO_FLUSH are used.
|
| 774 |
+
*/
|
| 775 |
+
|
| 776 |
+
ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
|
| 777 |
+
unsigned *pending,
|
| 778 |
+
int *bits);
|
| 779 |
+
/*
|
| 780 |
+
deflatePending() returns the number of bytes and bits of output that have
|
| 781 |
+
been generated, but not yet provided in the available output. The bytes not
|
| 782 |
+
provided would be due to the available output space having being consumed.
|
| 783 |
+
The number of bits of output not provided are between 0 and 7, where they
|
| 784 |
+
await more bits to join them in order to fill out a full byte. If pending
|
| 785 |
+
or bits are Z_NULL, then those values are not set.
|
| 786 |
+
|
| 787 |
+
deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 788 |
+
stream state was inconsistent.
|
| 789 |
+
*/
|
| 790 |
+
|
| 791 |
+
ZEXTERN int ZEXPORT deflatePrime(z_streamp strm,
|
| 792 |
+
int bits,
|
| 793 |
+
int value);
|
| 794 |
+
/*
|
| 795 |
+
deflatePrime() inserts bits in the deflate output stream. The intent
|
| 796 |
+
is that this function is used to start off the deflate output with the bits
|
| 797 |
+
leftover from a previous deflate stream when appending to it. As such, this
|
| 798 |
+
function can only be used for raw deflate, and must be used before the first
|
| 799 |
+
deflate() call after a deflateInit2() or deflateReset(). bits must be less
|
| 800 |
+
than or equal to 16, and that many of the least significant bits of value
|
| 801 |
+
will be inserted in the output.
|
| 802 |
+
|
| 803 |
+
deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
|
| 804 |
+
room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
|
| 805 |
+
source stream state was inconsistent.
|
| 806 |
+
*/
|
| 807 |
+
|
| 808 |
+
ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
|
| 809 |
+
gz_headerp head);
|
| 810 |
+
/*
|
| 811 |
+
deflateSetHeader() provides gzip header information for when a gzip
|
| 812 |
+
stream is requested by deflateInit2(). deflateSetHeader() may be called
|
| 813 |
+
after deflateInit2() or deflateReset() and before the first call of
|
| 814 |
+
deflate(). The text, time, os, extra field, name, and comment information
|
| 815 |
+
in the provided gz_header structure are written to the gzip header (xflag is
|
| 816 |
+
ignored -- the extra flags are set according to the compression level). The
|
| 817 |
+
caller must assure that, if not Z_NULL, name and comment are terminated with
|
| 818 |
+
a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
|
| 819 |
+
available there. If hcrc is true, a gzip header crc is included. Note that
|
| 820 |
+
the current versions of the command-line version of gzip (up through version
|
| 821 |
+
1.3.x) do not support header crc's, and will report that it is a "multi-part
|
| 822 |
+
gzip file" and give up.
|
| 823 |
+
|
| 824 |
+
If deflateSetHeader is not used, the default gzip header has text false,
|
| 825 |
+
the time set to zero, and os set to the current operating system, with no
|
| 826 |
+
extra, name, or comment fields. The gzip header is returned to the default
|
| 827 |
+
state by deflateReset().
|
| 828 |
+
|
| 829 |
+
deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 830 |
+
stream state was inconsistent.
|
| 831 |
+
*/
|
| 832 |
+
|
| 833 |
+
/*
|
| 834 |
+
ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
|
| 835 |
+
int windowBits);
|
| 836 |
+
|
| 837 |
+
This is another version of inflateInit with an extra parameter. The
|
| 838 |
+
fields next_in, avail_in, zalloc, zfree and opaque must be initialized
|
| 839 |
+
before by the caller.
|
| 840 |
+
|
| 841 |
+
The windowBits parameter is the base two logarithm of the maximum window
|
| 842 |
+
size (the size of the history buffer). It should be in the range 8..15 for
|
| 843 |
+
this version of the library. The default value is 15 if inflateInit is used
|
| 844 |
+
instead. windowBits must be greater than or equal to the windowBits value
|
| 845 |
+
provided to deflateInit2() while compressing, or it must be equal to 15 if
|
| 846 |
+
deflateInit2() was not used. If a compressed stream with a larger window
|
| 847 |
+
size is given as input, inflate() will return with the error code
|
| 848 |
+
Z_DATA_ERROR instead of trying to allocate a larger window.
|
| 849 |
+
|
| 850 |
+
windowBits can also be zero to request that inflate use the window size in
|
| 851 |
+
the zlib header of the compressed stream.
|
| 852 |
+
|
| 853 |
+
windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
|
| 854 |
+
determines the window size. inflate() will then process raw deflate data,
|
| 855 |
+
not looking for a zlib or gzip header, not generating a check value, and not
|
| 856 |
+
looking for any check values for comparison at the end of the stream. This
|
| 857 |
+
is for use with other formats that use the deflate compressed data format
|
| 858 |
+
such as zip. Those formats provide their own check values. If a custom
|
| 859 |
+
format is developed using the raw deflate format for compressed data, it is
|
| 860 |
+
recommended that a check value such as an Adler-32 or a CRC-32 be applied to
|
| 861 |
+
the uncompressed data as is done in the zlib, gzip, and zip formats. For
|
| 862 |
+
most applications, the zlib format should be used as is. Note that comments
|
| 863 |
+
above on the use in deflateInit2() applies to the magnitude of windowBits.
|
| 864 |
+
|
| 865 |
+
windowBits can also be greater than 15 for optional gzip decoding. Add
|
| 866 |
+
32 to windowBits to enable zlib and gzip decoding with automatic header
|
| 867 |
+
detection, or add 16 to decode only the gzip format (the zlib format will
|
| 868 |
+
return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
|
| 869 |
+
CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
|
| 870 |
+
below), inflate() will *not* automatically decode concatenated gzip members.
|
| 871 |
+
inflate() will return Z_STREAM_END at the end of the gzip member. The state
|
| 872 |
+
would need to be reset to continue decoding a subsequent gzip member. This
|
| 873 |
+
*must* be done if there is more data after a gzip member, in order for the
|
| 874 |
+
decompression to be compliant with the gzip standard (RFC 1952).
|
| 875 |
+
|
| 876 |
+
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
| 877 |
+
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
|
| 878 |
+
version assumed by the caller, or Z_STREAM_ERROR if the parameters are
|
| 879 |
+
invalid, such as a null pointer to the structure. msg is set to null if
|
| 880 |
+
there is no error message. inflateInit2 does not perform any decompression
|
| 881 |
+
apart from possibly reading the zlib header if present: actual decompression
|
| 882 |
+
will be done by inflate(). (So next_in and avail_in may be modified, but
|
| 883 |
+
next_out and avail_out are unused and unchanged.) The current implementation
|
| 884 |
+
of inflateInit2() does not process any header information -- that is
|
| 885 |
+
deferred until inflate() is called.
|
| 886 |
+
*/
|
| 887 |
+
|
| 888 |
+
ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm,
|
| 889 |
+
const Bytef *dictionary,
|
| 890 |
+
uInt dictLength);
|
| 891 |
+
/*
|
| 892 |
+
Initializes the decompression dictionary from the given uncompressed byte
|
| 893 |
+
sequence. This function must be called immediately after a call of inflate,
|
| 894 |
+
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
|
| 895 |
+
can be determined from the Adler-32 value returned by that call of inflate.
|
| 896 |
+
The compressor and decompressor must use exactly the same dictionary (see
|
| 897 |
+
deflateSetDictionary). For raw inflate, this function can be called at any
|
| 898 |
+
time to set the dictionary. If the provided dictionary is smaller than the
|
| 899 |
+
window and there is already data in the window, then the provided dictionary
|
| 900 |
+
will amend what's there. The application must insure that the dictionary
|
| 901 |
+
that was used for compression is provided.
|
| 902 |
+
|
| 903 |
+
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
|
| 904 |
+
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
|
| 905 |
+
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
|
| 906 |
+
expected one (incorrect Adler-32 value). inflateSetDictionary does not
|
| 907 |
+
perform any decompression: this will be done by subsequent calls of
|
| 908 |
+
inflate().
|
| 909 |
+
*/
|
| 910 |
+
|
| 911 |
+
ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm,
|
| 912 |
+
Bytef *dictionary,
|
| 913 |
+
uInt *dictLength);
|
| 914 |
+
/*
|
| 915 |
+
Returns the sliding dictionary being maintained by inflate. dictLength is
|
| 916 |
+
set to the number of bytes in the dictionary, and that many bytes are copied
|
| 917 |
+
to dictionary. dictionary must have enough space, where 32768 bytes is
|
| 918 |
+
always enough. If inflateGetDictionary() is called with dictionary equal to
|
| 919 |
+
Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
| 920 |
+
Similarly, if dictLength is Z_NULL, then it is not set.
|
| 921 |
+
|
| 922 |
+
inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
|
| 923 |
+
stream state is inconsistent.
|
| 924 |
+
*/
|
| 925 |
+
|
| 926 |
+
ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
|
| 927 |
+
/*
|
| 928 |
+
Skips invalid compressed data until a possible full flush point (see above
|
| 929 |
+
for the description of deflate with Z_FULL_FLUSH) can be found, or until all
|
| 930 |
+
available input is skipped. No output is provided.
|
| 931 |
+
|
| 932 |
+
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
|
| 933 |
+
All full flush points have this pattern, but not all occurrences of this
|
| 934 |
+
pattern are full flush points.
|
| 935 |
+
|
| 936 |
+
inflateSync returns Z_OK if a possible full flush point has been found,
|
| 937 |
+
Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
|
| 938 |
+
has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
|
| 939 |
+
In the success case, the application may save the current value of total_in
|
| 940 |
+
which indicates where valid compressed data was found. In the error case,
|
| 941 |
+
the application may repeatedly call inflateSync, providing more input each
|
| 942 |
+
time, until success or end of the input data.
|
| 943 |
+
*/
|
| 944 |
+
|
| 945 |
+
ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
|
| 946 |
+
z_streamp source);
|
| 947 |
+
/*
|
| 948 |
+
Sets the destination stream as a complete copy of the source stream.
|
| 949 |
+
|
| 950 |
+
This function can be useful when randomly accessing a large stream. The
|
| 951 |
+
first pass through the stream can periodically record the inflate state,
|
| 952 |
+
allowing restarting inflate at those points when randomly accessing the
|
| 953 |
+
stream.
|
| 954 |
+
|
| 955 |
+
inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
|
| 956 |
+
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
|
| 957 |
+
(such as zalloc being Z_NULL). msg is left unchanged in both source and
|
| 958 |
+
destination.
|
| 959 |
+
*/
|
| 960 |
+
|
| 961 |
+
ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
|
| 962 |
+
/*
|
| 963 |
+
This function is equivalent to inflateEnd followed by inflateInit,
|
| 964 |
+
but does not free and reallocate the internal decompression state. The
|
| 965 |
+
stream will keep attributes that may have been set by inflateInit2.
|
| 966 |
+
total_in, total_out, adler, and msg are initialized.
|
| 967 |
+
|
| 968 |
+
inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 969 |
+
stream state was inconsistent (such as zalloc or state being Z_NULL).
|
| 970 |
+
*/
|
| 971 |
+
|
| 972 |
+
ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
|
| 973 |
+
int windowBits);
|
| 974 |
+
/*
|
| 975 |
+
This function is the same as inflateReset, but it also permits changing
|
| 976 |
+
the wrap and window size requests. The windowBits parameter is interpreted
|
| 977 |
+
the same as it is for inflateInit2. If the window size is changed, then the
|
| 978 |
+
memory allocated for the window is freed, and the window will be reallocated
|
| 979 |
+
by inflate() if needed.
|
| 980 |
+
|
| 981 |
+
inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 982 |
+
stream state was inconsistent (such as zalloc or state being Z_NULL), or if
|
| 983 |
+
the windowBits parameter is invalid.
|
| 984 |
+
*/
|
| 985 |
+
|
| 986 |
+
ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
|
| 987 |
+
int bits,
|
| 988 |
+
int value);
|
| 989 |
+
/*
|
| 990 |
+
This function inserts bits in the inflate input stream. The intent is
|
| 991 |
+
that this function is used to start inflating at a bit position in the
|
| 992 |
+
middle of a byte. The provided bits will be used before any bytes are used
|
| 993 |
+
from next_in. This function should only be used with raw inflate, and
|
| 994 |
+
should be used before the first inflate() call after inflateInit2() or
|
| 995 |
+
inflateReset(). bits must be less than or equal to 16, and that many of the
|
| 996 |
+
least significant bits of value will be inserted in the input.
|
| 997 |
+
|
| 998 |
+
If bits is negative, then the input stream bit buffer is emptied. Then
|
| 999 |
+
inflatePrime() can be called again to put bits in the buffer. This is used
|
| 1000 |
+
to clear out bits leftover after feeding inflate a block description prior
|
| 1001 |
+
to feeding inflate codes.
|
| 1002 |
+
|
| 1003 |
+
inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 1004 |
+
stream state was inconsistent.
|
| 1005 |
+
*/
|
| 1006 |
+
|
| 1007 |
+
ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
|
| 1008 |
+
/*
|
| 1009 |
+
This function returns two values, one in the lower 16 bits of the return
|
| 1010 |
+
value, and the other in the remaining upper bits, obtained by shifting the
|
| 1011 |
+
return value down 16 bits. If the upper value is -1 and the lower value is
|
| 1012 |
+
zero, then inflate() is currently decoding information outside of a block.
|
| 1013 |
+
If the upper value is -1 and the lower value is non-zero, then inflate is in
|
| 1014 |
+
the middle of a stored block, with the lower value equaling the number of
|
| 1015 |
+
bytes from the input remaining to copy. If the upper value is not -1, then
|
| 1016 |
+
it is the number of bits back from the current bit position in the input of
|
| 1017 |
+
the code (literal or length/distance pair) currently being processed. In
|
| 1018 |
+
that case the lower value is the number of bytes already emitted for that
|
| 1019 |
+
code.
|
| 1020 |
+
|
| 1021 |
+
A code is being processed if inflate is waiting for more input to complete
|
| 1022 |
+
decoding of the code, or if it has completed decoding but is waiting for
|
| 1023 |
+
more output space to write the literal or match data.
|
| 1024 |
+
|
| 1025 |
+
inflateMark() is used to mark locations in the input data for random
|
| 1026 |
+
access, which may be at bit positions, and to note those cases where the
|
| 1027 |
+
output of a code may span boundaries of random access blocks. The current
|
| 1028 |
+
location in the input stream can be determined from avail_in and data_type
|
| 1029 |
+
as noted in the description for the Z_BLOCK flush parameter for inflate.
|
| 1030 |
+
|
| 1031 |
+
inflateMark returns the value noted above, or -65536 if the provided
|
| 1032 |
+
source stream state was inconsistent.
|
| 1033 |
+
*/
|
| 1034 |
+
|
| 1035 |
+
ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
|
| 1036 |
+
gz_headerp head);
|
| 1037 |
+
/*
|
| 1038 |
+
inflateGetHeader() requests that gzip header information be stored in the
|
| 1039 |
+
provided gz_header structure. inflateGetHeader() may be called after
|
| 1040 |
+
inflateInit2() or inflateReset(), and before the first call of inflate().
|
| 1041 |
+
As inflate() processes the gzip stream, head->done is zero until the header
|
| 1042 |
+
is completed, at which time head->done is set to one. If a zlib stream is
|
| 1043 |
+
being decoded, then head->done is set to -1 to indicate that there will be
|
| 1044 |
+
no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be
|
| 1045 |
+
used to force inflate() to return immediately after header processing is
|
| 1046 |
+
complete and before any actual data is decompressed.
|
| 1047 |
+
|
| 1048 |
+
The text, time, xflags, and os fields are filled in with the gzip header
|
| 1049 |
+
contents. hcrc is set to true if there is a header CRC. (The header CRC
|
| 1050 |
+
was valid if done is set to one.) If extra is not Z_NULL, then extra_max
|
| 1051 |
+
contains the maximum number of bytes to write to extra. Once done is true,
|
| 1052 |
+
extra_len contains the actual extra field length, and extra contains the
|
| 1053 |
+
extra field, or that field truncated if extra_max is less than extra_len.
|
| 1054 |
+
If name is not Z_NULL, then up to name_max characters are written there,
|
| 1055 |
+
terminated with a zero unless the length is greater than name_max. If
|
| 1056 |
+
comment is not Z_NULL, then up to comm_max characters are written there,
|
| 1057 |
+
terminated with a zero unless the length is greater than comm_max. When any
|
| 1058 |
+
of extra, name, or comment are not Z_NULL and the respective field is not
|
| 1059 |
+
present in the header, then that field is set to Z_NULL to signal its
|
| 1060 |
+
absence. This allows the use of deflateSetHeader() with the returned
|
| 1061 |
+
structure to duplicate the header. However if those fields are set to
|
| 1062 |
+
allocated memory, then the application will need to save those pointers
|
| 1063 |
+
elsewhere so that they can be eventually freed.
|
| 1064 |
+
|
| 1065 |
+
If inflateGetHeader is not used, then the header information is simply
|
| 1066 |
+
discarded. The header is always checked for validity, including the header
|
| 1067 |
+
CRC if present. inflateReset() will reset the process to discard the header
|
| 1068 |
+
information. The application would need to call inflateGetHeader() again to
|
| 1069 |
+
retrieve the header from the next gzip stream.
|
| 1070 |
+
|
| 1071 |
+
inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
|
| 1072 |
+
stream state was inconsistent.
|
| 1073 |
+
*/
|
| 1074 |
+
|
| 1075 |
+
/*
|
| 1076 |
+
ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
|
| 1077 |
+
unsigned char FAR *window);
|
| 1078 |
+
|
| 1079 |
+
Initialize the internal stream state for decompression using inflateBack()
|
| 1080 |
+
calls. The fields zalloc, zfree and opaque in strm must be initialized
|
| 1081 |
+
before the call. If zalloc and zfree are Z_NULL, then the default library-
|
| 1082 |
+
derived memory allocation routines are used. windowBits is the base two
|
| 1083 |
+
logarithm of the window size, in the range 8..15. window is a caller
|
| 1084 |
+
supplied buffer of that size. Except for special applications where it is
|
| 1085 |
+
assured that deflate was used with small window sizes, windowBits must be 15
|
| 1086 |
+
and a 32K byte window must be supplied to be able to decompress general
|
| 1087 |
+
deflate streams.
|
| 1088 |
+
|
| 1089 |
+
See inflateBack() for the usage of these routines.
|
| 1090 |
+
|
| 1091 |
+
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
|
| 1092 |
+
the parameters are invalid, Z_MEM_ERROR if the internal state could not be
|
| 1093 |
+
allocated, or Z_VERSION_ERROR if the version of the library does not match
|
| 1094 |
+
the version of the header file.
|
| 1095 |
+
*/
|
| 1096 |
+
|
| 1097 |
+
typedef unsigned (*in_func)(void FAR *,
|
| 1098 |
+
z_const unsigned char FAR * FAR *);
|
| 1099 |
+
typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
|
| 1100 |
+
|
| 1101 |
+
ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
|
| 1102 |
+
in_func in, void FAR *in_desc,
|
| 1103 |
+
out_func out, void FAR *out_desc);
|
| 1104 |
+
/*
|
| 1105 |
+
inflateBack() does a raw inflate with a single call using a call-back
|
| 1106 |
+
interface for input and output. This is potentially more efficient than
|
| 1107 |
+
inflate() for file i/o applications, in that it avoids copying between the
|
| 1108 |
+
output and the sliding window by simply making the window itself the output
|
| 1109 |
+
buffer. inflate() can be faster on modern CPUs when used with large
|
| 1110 |
+
buffers. inflateBack() trusts the application to not change the output
|
| 1111 |
+
buffer passed by the output function, at least until inflateBack() returns.
|
| 1112 |
+
|
| 1113 |
+
inflateBackInit() must be called first to allocate the internal state
|
| 1114 |
+
and to initialize the state with the user-provided window buffer.
|
| 1115 |
+
inflateBack() may then be used multiple times to inflate a complete, raw
|
| 1116 |
+
deflate stream with each call. inflateBackEnd() is then called to free the
|
| 1117 |
+
allocated state.
|
| 1118 |
+
|
| 1119 |
+
A raw deflate stream is one with no zlib or gzip header or trailer.
|
| 1120 |
+
This routine would normally be used in a utility that reads zip or gzip
|
| 1121 |
+
files and writes out uncompressed files. The utility would decode the
|
| 1122 |
+
header and process the trailer on its own, hence this routine expects only
|
| 1123 |
+
the raw deflate stream to decompress. This is different from the default
|
| 1124 |
+
behavior of inflate(), which expects a zlib header and trailer around the
|
| 1125 |
+
deflate stream.
|
| 1126 |
+
|
| 1127 |
+
inflateBack() uses two subroutines supplied by the caller that are then
|
| 1128 |
+
called by inflateBack() for input and output. inflateBack() calls those
|
| 1129 |
+
routines until it reads a complete deflate stream and writes out all of the
|
| 1130 |
+
uncompressed data, or until it encounters an error. The function's
|
| 1131 |
+
parameters and return types are defined above in the in_func and out_func
|
| 1132 |
+
typedefs. inflateBack() will call in(in_desc, &buf) which should return the
|
| 1133 |
+
number of bytes of provided input, and a pointer to that input in buf. If
|
| 1134 |
+
there is no input available, in() must return zero -- buf is ignored in that
|
| 1135 |
+
case -- and inflateBack() will return a buffer error. inflateBack() will
|
| 1136 |
+
call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
|
| 1137 |
+
out() should return zero on success, or non-zero on failure. If out()
|
| 1138 |
+
returns non-zero, inflateBack() will return with an error. Neither in() nor
|
| 1139 |
+
out() are permitted to change the contents of the window provided to
|
| 1140 |
+
inflateBackInit(), which is also the buffer that out() uses to write from.
|
| 1141 |
+
The length written by out() will be at most the window size. Any non-zero
|
| 1142 |
+
amount of input may be provided by in().
|
| 1143 |
+
|
| 1144 |
+
For convenience, inflateBack() can be provided input on the first call by
|
| 1145 |
+
setting strm->next_in and strm->avail_in. If that input is exhausted, then
|
| 1146 |
+
in() will be called. Therefore strm->next_in must be initialized before
|
| 1147 |
+
calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
|
| 1148 |
+
immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
|
| 1149 |
+
must also be initialized, and then if strm->avail_in is not zero, input will
|
| 1150 |
+
initially be taken from strm->next_in[0 .. strm->avail_in - 1].
|
| 1151 |
+
|
| 1152 |
+
The in_desc and out_desc parameters of inflateBack() is passed as the
|
| 1153 |
+
first parameter of in() and out() respectively when they are called. These
|
| 1154 |
+
descriptors can be optionally used to pass any information that the caller-
|
| 1155 |
+
supplied in() and out() functions need to do their job.
|
| 1156 |
+
|
| 1157 |
+
On return, inflateBack() will set strm->next_in and strm->avail_in to
|
| 1158 |
+
pass back any unused input that was provided by the last in() call. The
|
| 1159 |
+
return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
|
| 1160 |
+
if in() or out() returned an error, Z_DATA_ERROR if there was a format error
|
| 1161 |
+
in the deflate stream (in which case strm->msg is set to indicate the nature
|
| 1162 |
+
of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
|
| 1163 |
+
In the case of Z_BUF_ERROR, an input or output error can be distinguished
|
| 1164 |
+
using strm->next_in which will be Z_NULL only if in() returned an error. If
|
| 1165 |
+
strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
|
| 1166 |
+
non-zero. (in() will always be called before out(), so strm->next_in is
|
| 1167 |
+
assured to be defined if out() returns non-zero.) Note that inflateBack()
|
| 1168 |
+
cannot return Z_OK.
|
| 1169 |
+
*/
|
| 1170 |
+
|
| 1171 |
+
ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm);
|
| 1172 |
+
/*
|
| 1173 |
+
All memory allocated by inflateBackInit() is freed.
|
| 1174 |
+
|
| 1175 |
+
inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
|
| 1176 |
+
state was inconsistent.
|
| 1177 |
+
*/
|
| 1178 |
+
|
| 1179 |
+
ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
|
| 1180 |
+
/* Return flags indicating compile-time options.
|
| 1181 |
+
|
| 1182 |
+
Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
|
| 1183 |
+
1.0: size of uInt
|
| 1184 |
+
3.2: size of uLong
|
| 1185 |
+
5.4: size of voidpf (pointer)
|
| 1186 |
+
7.6: size of z_off_t
|
| 1187 |
+
|
| 1188 |
+
Compiler, assembler, and debug options:
|
| 1189 |
+
8: ZLIB_DEBUG
|
| 1190 |
+
9: ASMV or ASMINF -- use ASM code
|
| 1191 |
+
10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
|
| 1192 |
+
11: 0 (reserved)
|
| 1193 |
+
|
| 1194 |
+
One-time table building (smaller code, but not thread-safe if true):
|
| 1195 |
+
12: BUILDFIXED -- build static block decoding tables when needed
|
| 1196 |
+
13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
|
| 1197 |
+
14,15: 0 (reserved)
|
| 1198 |
+
|
| 1199 |
+
Library content (indicates missing functionality):
|
| 1200 |
+
16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
|
| 1201 |
+
deflate code when not needed)
|
| 1202 |
+
17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
|
| 1203 |
+
and decode gzip streams (to avoid linking crc code)
|
| 1204 |
+
18-19: 0 (reserved)
|
| 1205 |
+
|
| 1206 |
+
Operation variations (changes in library functionality):
|
| 1207 |
+
20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
|
| 1208 |
+
21: FASTEST -- deflate algorithm with only one, lowest compression level
|
| 1209 |
+
22,23: 0 (reserved)
|
| 1210 |
+
|
| 1211 |
+
The sprintf variant used by gzprintf (zero is best):
|
| 1212 |
+
24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
|
| 1213 |
+
25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
|
| 1214 |
+
26: 0 = returns value, 1 = void -- 1 means inferred string length returned
|
| 1215 |
+
|
| 1216 |
+
Remainder:
|
| 1217 |
+
27-31: 0 (reserved)
|
| 1218 |
+
*/
|
| 1219 |
+
|
| 1220 |
+
#ifndef Z_SOLO
|
| 1221 |
+
|
| 1222 |
+
/* utility functions */
|
| 1223 |
+
|
| 1224 |
+
/*
|
| 1225 |
+
The following utility functions are implemented on top of the basic
|
| 1226 |
+
stream-oriented functions. To simplify the interface, some default options
|
| 1227 |
+
are assumed (compression level and memory usage, standard memory allocation
|
| 1228 |
+
functions). The source code of these utility functions can be modified if
|
| 1229 |
+
you need special options.
|
| 1230 |
+
*/
|
| 1231 |
+
|
| 1232 |
+
ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
|
| 1233 |
+
const Bytef *source, uLong sourceLen);
|
| 1234 |
+
/*
|
| 1235 |
+
Compresses the source buffer into the destination buffer. sourceLen is
|
| 1236 |
+
the byte length of the source buffer. Upon entry, destLen is the total size
|
| 1237 |
+
of the destination buffer, which must be at least the value returned by
|
| 1238 |
+
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
| 1239 |
+
compressed data. compress() is equivalent to compress2() with a level
|
| 1240 |
+
parameter of Z_DEFAULT_COMPRESSION.
|
| 1241 |
+
|
| 1242 |
+
compress returns Z_OK if success, Z_MEM_ERROR if there was not
|
| 1243 |
+
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
| 1244 |
+
buffer.
|
| 1245 |
+
*/
|
| 1246 |
+
|
| 1247 |
+
ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
|
| 1248 |
+
const Bytef *source, uLong sourceLen,
|
| 1249 |
+
int level);
|
| 1250 |
+
/*
|
| 1251 |
+
Compresses the source buffer into the destination buffer. The level
|
| 1252 |
+
parameter has the same meaning as in deflateInit. sourceLen is the byte
|
| 1253 |
+
length of the source buffer. Upon entry, destLen is the total size of the
|
| 1254 |
+
destination buffer, which must be at least the value returned by
|
| 1255 |
+
compressBound(sourceLen). Upon exit, destLen is the actual size of the
|
| 1256 |
+
compressed data.
|
| 1257 |
+
|
| 1258 |
+
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
| 1259 |
+
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
|
| 1260 |
+
Z_STREAM_ERROR if the level parameter is invalid.
|
| 1261 |
+
*/
|
| 1262 |
+
|
| 1263 |
+
ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
|
| 1264 |
+
/*
|
| 1265 |
+
compressBound() returns an upper bound on the compressed size after
|
| 1266 |
+
compress() or compress2() on sourceLen bytes. It would be used before a
|
| 1267 |
+
compress() or compress2() call to allocate the destination buffer.
|
| 1268 |
+
*/
|
| 1269 |
+
|
| 1270 |
+
ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
|
| 1271 |
+
const Bytef *source, uLong sourceLen);
|
| 1272 |
+
/*
|
| 1273 |
+
Decompresses the source buffer into the destination buffer. sourceLen is
|
| 1274 |
+
the byte length of the source buffer. Upon entry, destLen is the total size
|
| 1275 |
+
of the destination buffer, which must be large enough to hold the entire
|
| 1276 |
+
uncompressed data. (The size of the uncompressed data must have been saved
|
| 1277 |
+
previously by the compressor and transmitted to the decompressor by some
|
| 1278 |
+
mechanism outside the scope of this compression library.) Upon exit, destLen
|
| 1279 |
+
is the actual size of the uncompressed data.
|
| 1280 |
+
|
| 1281 |
+
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
| 1282 |
+
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
| 1283 |
+
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
|
| 1284 |
+
the case where there is not enough room, uncompress() will fill the output
|
| 1285 |
+
buffer with the uncompressed data up to that point.
|
| 1286 |
+
*/
|
| 1287 |
+
|
| 1288 |
+
ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
|
| 1289 |
+
const Bytef *source, uLong *sourceLen);
|
| 1290 |
+
/*
|
| 1291 |
+
Same as uncompress, except that sourceLen is a pointer, where the
|
| 1292 |
+
length of the source is *sourceLen. On return, *sourceLen is the number of
|
| 1293 |
+
source bytes consumed.
|
| 1294 |
+
*/
|
| 1295 |
+
|
| 1296 |
+
/* gzip file access functions */
|
| 1297 |
+
|
| 1298 |
+
/*
|
| 1299 |
+
This library supports reading and writing files in gzip (.gz) format with
|
| 1300 |
+
an interface similar to that of stdio, using the functions that start with
|
| 1301 |
+
"gz". The gzip format is different from the zlib format. gzip is a gzip
|
| 1302 |
+
wrapper, documented in RFC 1952, wrapped around a deflate stream.
|
| 1303 |
+
*/
|
| 1304 |
+
|
| 1305 |
+
typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
|
| 1306 |
+
|
| 1307 |
+
/*
|
| 1308 |
+
ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
|
| 1309 |
+
|
| 1310 |
+
Open the gzip (.gz) file at path for reading and decompressing, or
|
| 1311 |
+
compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
|
| 1312 |
+
but can also include a compression level ("wb9") or a strategy: 'f' for
|
| 1313 |
+
filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
|
| 1314 |
+
'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
|
| 1315 |
+
as in "wb9F". (See the description of deflateInit2 for more information
|
| 1316 |
+
about the strategy parameter.) 'T' will request transparent writing or
|
| 1317 |
+
appending with no compression and not using the gzip format.
|
| 1318 |
+
|
| 1319 |
+
"a" can be used instead of "w" to request that the gzip stream that will
|
| 1320 |
+
be written be appended to the file. "+" will result in an error, since
|
| 1321 |
+
reading and writing to the same gzip file is not supported. The addition of
|
| 1322 |
+
"x" when writing will create the file exclusively, which fails if the file
|
| 1323 |
+
already exists. On systems that support it, the addition of "e" when
|
| 1324 |
+
reading or writing will set the flag to close the file on an execve() call.
|
| 1325 |
+
|
| 1326 |
+
These functions, as well as gzip, will read and decode a sequence of gzip
|
| 1327 |
+
streams in a file. The append function of gzopen() can be used to create
|
| 1328 |
+
such a file. (Also see gzflush() for another way to do this.) When
|
| 1329 |
+
appending, gzopen does not test whether the file begins with a gzip stream,
|
| 1330 |
+
nor does it look for the end of the gzip streams to begin appending. gzopen
|
| 1331 |
+
will simply append a gzip stream to the existing file.
|
| 1332 |
+
|
| 1333 |
+
gzopen can be used to read a file which is not in gzip format; in this
|
| 1334 |
+
case gzread will directly read from the file without decompression. When
|
| 1335 |
+
reading, this will be detected automatically by looking for the magic two-
|
| 1336 |
+
byte gzip header.
|
| 1337 |
+
|
| 1338 |
+
gzopen returns NULL if the file could not be opened, if there was
|
| 1339 |
+
insufficient memory to allocate the gzFile state, or if an invalid mode was
|
| 1340 |
+
specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
|
| 1341 |
+
errno can be checked to determine if the reason gzopen failed was that the
|
| 1342 |
+
file could not be opened.
|
| 1343 |
+
*/
|
| 1344 |
+
|
| 1345 |
+
ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
|
| 1346 |
+
/*
|
| 1347 |
+
Associate a gzFile with the file descriptor fd. File descriptors are
|
| 1348 |
+
obtained from calls like open, dup, creat, pipe or fileno (if the file has
|
| 1349 |
+
been previously opened with fopen). The mode parameter is as in gzopen.
|
| 1350 |
+
|
| 1351 |
+
The next call of gzclose on the returned gzFile will also close the file
|
| 1352 |
+
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
|
| 1353 |
+
fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
|
| 1354 |
+
mode);. The duplicated descriptor should be saved to avoid a leak, since
|
| 1355 |
+
gzdopen does not close fd if it fails. If you are using fileno() to get the
|
| 1356 |
+
file descriptor from a FILE *, then you will have to use dup() to avoid
|
| 1357 |
+
double-close()ing the file descriptor. Both gzclose() and fclose() will
|
| 1358 |
+
close the associated file descriptor, so they need to have different file
|
| 1359 |
+
descriptors.
|
| 1360 |
+
|
| 1361 |
+
gzdopen returns NULL if there was insufficient memory to allocate the
|
| 1362 |
+
gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
|
| 1363 |
+
provided, or '+' was provided), or if fd is -1. The file descriptor is not
|
| 1364 |
+
used until the next gz* read, write, seek, or close operation, so gzdopen
|
| 1365 |
+
will not detect if fd is invalid (unless fd is -1).
|
| 1366 |
+
*/
|
| 1367 |
+
|
| 1368 |
+
ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
|
| 1369 |
+
/*
|
| 1370 |
+
Set the internal buffer size used by this library's functions for file to
|
| 1371 |
+
size. The default buffer size is 8192 bytes. This function must be called
|
| 1372 |
+
after gzopen() or gzdopen(), and before any other calls that read or write
|
| 1373 |
+
the file. The buffer memory allocation is always deferred to the first read
|
| 1374 |
+
or write. Three times that size in buffer space is allocated. A larger
|
| 1375 |
+
buffer size of, for example, 64K or 128K bytes will noticeably increase the
|
| 1376 |
+
speed of decompression (reading).
|
| 1377 |
+
|
| 1378 |
+
The new buffer size also affects the maximum length for gzprintf().
|
| 1379 |
+
|
| 1380 |
+
gzbuffer() returns 0 on success, or -1 on failure, such as being called
|
| 1381 |
+
too late.
|
| 1382 |
+
*/
|
| 1383 |
+
|
| 1384 |
+
ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
|
| 1385 |
+
/*
|
| 1386 |
+
Dynamically update the compression level and strategy for file. See the
|
| 1387 |
+
description of deflateInit2 for the meaning of these parameters. Previously
|
| 1388 |
+
provided data is flushed before applying the parameter changes.
|
| 1389 |
+
|
| 1390 |
+
gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
|
| 1391 |
+
opened for writing, Z_ERRNO if there is an error writing the flushed data,
|
| 1392 |
+
or Z_MEM_ERROR if there is a memory allocation error.
|
| 1393 |
+
*/
|
| 1394 |
+
|
| 1395 |
+
ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
|
| 1396 |
+
/*
|
| 1397 |
+
Read and decompress up to len uncompressed bytes from file into buf. If
|
| 1398 |
+
the input file is not in gzip format, gzread copies the given number of
|
| 1399 |
+
bytes into the buffer directly from the file.
|
| 1400 |
+
|
| 1401 |
+
After reaching the end of a gzip stream in the input, gzread will continue
|
| 1402 |
+
to read, looking for another gzip stream. Any number of gzip streams may be
|
| 1403 |
+
concatenated in the input file, and will all be decompressed by gzread().
|
| 1404 |
+
If something other than a gzip stream is encountered after a gzip stream,
|
| 1405 |
+
that remaining trailing garbage is ignored (and no error is returned).
|
| 1406 |
+
|
| 1407 |
+
gzread can be used to read a gzip file that is being concurrently written.
|
| 1408 |
+
Upon reaching the end of the input, gzread will return with the available
|
| 1409 |
+
data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
|
| 1410 |
+
gzclearerr can be used to clear the end of file indicator in order to permit
|
| 1411 |
+
gzread to be tried again. Z_OK indicates that a gzip stream was completed
|
| 1412 |
+
on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
|
| 1413 |
+
middle of a gzip stream. Note that gzread does not return -1 in the event
|
| 1414 |
+
of an incomplete gzip stream. This error is deferred until gzclose(), which
|
| 1415 |
+
will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
|
| 1416 |
+
stream. Alternatively, gzerror can be used before gzclose to detect this
|
| 1417 |
+
case.
|
| 1418 |
+
|
| 1419 |
+
gzread returns the number of uncompressed bytes actually read, less than
|
| 1420 |
+
len for end of file, or -1 for error. If len is too large to fit in an int,
|
| 1421 |
+
then nothing is read, -1 is returned, and the error state is set to
|
| 1422 |
+
Z_STREAM_ERROR.
|
| 1423 |
+
*/
|
| 1424 |
+
|
| 1425 |
+
ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
|
| 1426 |
+
gzFile file);
|
| 1427 |
+
/*
|
| 1428 |
+
Read and decompress up to nitems items of size size from file into buf,
|
| 1429 |
+
otherwise operating as gzread() does. This duplicates the interface of
|
| 1430 |
+
stdio's fread(), with size_t request and return types. If the library
|
| 1431 |
+
defines size_t, then z_size_t is identical to size_t. If not, then z_size_t
|
| 1432 |
+
is an unsigned integer type that can contain a pointer.
|
| 1433 |
+
|
| 1434 |
+
gzfread() returns the number of full items read of size size, or zero if
|
| 1435 |
+
the end of the file was reached and a full item could not be read, or if
|
| 1436 |
+
there was an error. gzerror() must be consulted if zero is returned in
|
| 1437 |
+
order to determine if there was an error. If the multiplication of size and
|
| 1438 |
+
nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
|
| 1439 |
+
is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
|
| 1440 |
+
|
| 1441 |
+
In the event that the end of file is reached and only a partial item is
|
| 1442 |
+
available at the end, i.e. the remaining uncompressed data length is not a
|
| 1443 |
+
multiple of size, then the final partial item is nevertheless read into buf
|
| 1444 |
+
and the end-of-file flag is set. The length of the partial item read is not
|
| 1445 |
+
provided, but could be inferred from the result of gztell(). This behavior
|
| 1446 |
+
is the same as the behavior of fread() implementations in common libraries,
|
| 1447 |
+
but it prevents the direct use of gzfread() to read a concurrently written
|
| 1448 |
+
file, resetting and retrying on end-of-file, when size is not 1.
|
| 1449 |
+
*/
|
| 1450 |
+
|
| 1451 |
+
ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
|
| 1452 |
+
/*
|
| 1453 |
+
Compress and write the len uncompressed bytes at buf to file. gzwrite
|
| 1454 |
+
returns the number of uncompressed bytes written or 0 in case of error.
|
| 1455 |
+
*/
|
| 1456 |
+
|
| 1457 |
+
ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
|
| 1458 |
+
z_size_t nitems, gzFile file);
|
| 1459 |
+
/*
|
| 1460 |
+
Compress and write nitems items of size size from buf to file, duplicating
|
| 1461 |
+
the interface of stdio's fwrite(), with size_t request and return types. If
|
| 1462 |
+
the library defines size_t, then z_size_t is identical to size_t. If not,
|
| 1463 |
+
then z_size_t is an unsigned integer type that can contain a pointer.
|
| 1464 |
+
|
| 1465 |
+
gzfwrite() returns the number of full items written of size size, or zero
|
| 1466 |
+
if there was an error. If the multiplication of size and nitems overflows,
|
| 1467 |
+
i.e. the product does not fit in a z_size_t, then nothing is written, zero
|
| 1468 |
+
is returned, and the error state is set to Z_STREAM_ERROR.
|
| 1469 |
+
*/
|
| 1470 |
+
|
| 1471 |
+
ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
|
| 1472 |
+
/*
|
| 1473 |
+
Convert, format, compress, and write the arguments (...) to file under
|
| 1474 |
+
control of the string format, as in fprintf. gzprintf returns the number of
|
| 1475 |
+
uncompressed bytes actually written, or a negative zlib error code in case
|
| 1476 |
+
of error. The number of uncompressed bytes written is limited to 8191, or
|
| 1477 |
+
one less than the buffer size given to gzbuffer(). The caller should assure
|
| 1478 |
+
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
| 1479 |
+
return an error (0) with nothing written. In this case, there may also be a
|
| 1480 |
+
buffer overflow with unpredictable consequences, which is possible only if
|
| 1481 |
+
zlib was compiled with the insecure functions sprintf() or vsprintf(),
|
| 1482 |
+
because the secure snprintf() or vsnprintf() functions were not available.
|
| 1483 |
+
This can be determined using zlibCompileFlags().
|
| 1484 |
+
*/
|
| 1485 |
+
|
| 1486 |
+
ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
|
| 1487 |
+
/*
|
| 1488 |
+
Compress and write the given null-terminated string s to file, excluding
|
| 1489 |
+
the terminating null character.
|
| 1490 |
+
|
| 1491 |
+
gzputs returns the number of characters written, or -1 in case of error.
|
| 1492 |
+
*/
|
| 1493 |
+
|
| 1494 |
+
ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
|
| 1495 |
+
/*
|
| 1496 |
+
Read and decompress bytes from file into buf, until len-1 characters are
|
| 1497 |
+
read, or until a newline character is read and transferred to buf, or an
|
| 1498 |
+
end-of-file condition is encountered. If any characters are read or if len
|
| 1499 |
+
is one, the string is terminated with a null character. If no characters
|
| 1500 |
+
are read due to an end-of-file or len is less than one, then the buffer is
|
| 1501 |
+
left untouched.
|
| 1502 |
+
|
| 1503 |
+
gzgets returns buf which is a null-terminated string, or it returns NULL
|
| 1504 |
+
for end-of-file or in case of error. If there was an error, the contents at
|
| 1505 |
+
buf are indeterminate.
|
| 1506 |
+
*/
|
| 1507 |
+
|
| 1508 |
+
ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
|
| 1509 |
+
/*
|
| 1510 |
+
Compress and write c, converted to an unsigned char, into file. gzputc
|
| 1511 |
+
returns the value that was written, or -1 in case of error.
|
| 1512 |
+
*/
|
| 1513 |
+
|
| 1514 |
+
ZEXTERN int ZEXPORT gzgetc(gzFile file);
|
| 1515 |
+
/*
|
| 1516 |
+
Read and decompress one byte from file. gzgetc returns this byte or -1
|
| 1517 |
+
in case of end of file or error. This is implemented as a macro for speed.
|
| 1518 |
+
As such, it does not do all of the checking the other functions do. I.e.
|
| 1519 |
+
it does not check to see if file is NULL, nor whether the structure file
|
| 1520 |
+
points to has been clobbered or not.
|
| 1521 |
+
*/
|
| 1522 |
+
|
| 1523 |
+
ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
|
| 1524 |
+
/*
|
| 1525 |
+
Push c back onto the stream for file to be read as the first character on
|
| 1526 |
+
the next read. At least one character of push-back is always allowed.
|
| 1527 |
+
gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
|
| 1528 |
+
fail if c is -1, and may fail if a character has been pushed but not read
|
| 1529 |
+
yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
|
| 1530 |
+
output buffer size of pushed characters is allowed. (See gzbuffer above.)
|
| 1531 |
+
The pushed character will be discarded if the stream is repositioned with
|
| 1532 |
+
gzseek() or gzrewind().
|
| 1533 |
+
*/
|
| 1534 |
+
|
| 1535 |
+
ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
|
| 1536 |
+
/*
|
| 1537 |
+
Flush all pending output to file. The parameter flush is as in the
|
| 1538 |
+
deflate() function. The return value is the zlib error number (see function
|
| 1539 |
+
gzerror below). gzflush is only permitted when writing.
|
| 1540 |
+
|
| 1541 |
+
If the flush parameter is Z_FINISH, the remaining data is written and the
|
| 1542 |
+
gzip stream is completed in the output. If gzwrite() is called again, a new
|
| 1543 |
+
gzip stream will be started in the output. gzread() is able to read such
|
| 1544 |
+
concatenated gzip streams.
|
| 1545 |
+
|
| 1546 |
+
gzflush should be called only when strictly necessary because it will
|
| 1547 |
+
degrade compression if called too often.
|
| 1548 |
+
*/
|
| 1549 |
+
|
| 1550 |
+
/*
|
| 1551 |
+
ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
|
| 1552 |
+
z_off_t offset, int whence);
|
| 1553 |
+
|
| 1554 |
+
Set the starting position to offset relative to whence for the next gzread
|
| 1555 |
+
or gzwrite on file. The offset represents a number of bytes in the
|
| 1556 |
+
uncompressed data stream. The whence parameter is defined as in lseek(2);
|
| 1557 |
+
the value SEEK_END is not supported.
|
| 1558 |
+
|
| 1559 |
+
If the file is opened for reading, this function is emulated but can be
|
| 1560 |
+
extremely slow. If the file is opened for writing, only forward seeks are
|
| 1561 |
+
supported; gzseek then compresses a sequence of zeroes up to the new
|
| 1562 |
+
starting position.
|
| 1563 |
+
|
| 1564 |
+
gzseek returns the resulting offset location as measured in bytes from
|
| 1565 |
+
the beginning of the uncompressed stream, or -1 in case of error, in
|
| 1566 |
+
particular if the file is opened for writing and the new starting position
|
| 1567 |
+
would be before the current position.
|
| 1568 |
+
*/
|
| 1569 |
+
|
| 1570 |
+
ZEXTERN int ZEXPORT gzrewind(gzFile file);
|
| 1571 |
+
/*
|
| 1572 |
+
Rewind file. This function is supported only for reading.
|
| 1573 |
+
|
| 1574 |
+
gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
|
| 1575 |
+
*/
|
| 1576 |
+
|
| 1577 |
+
/*
|
| 1578 |
+
ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
|
| 1579 |
+
|
| 1580 |
+
Return the starting position for the next gzread or gzwrite on file.
|
| 1581 |
+
This position represents a number of bytes in the uncompressed data stream,
|
| 1582 |
+
and is zero when starting, even if appending or reading a gzip stream from
|
| 1583 |
+
the middle of a file using gzdopen().
|
| 1584 |
+
|
| 1585 |
+
gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
|
| 1586 |
+
*/
|
| 1587 |
+
|
| 1588 |
+
/*
|
| 1589 |
+
ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
|
| 1590 |
+
|
| 1591 |
+
Return the current compressed (actual) read or write offset of file. This
|
| 1592 |
+
offset includes the count of bytes that precede the gzip stream, for example
|
| 1593 |
+
when appending or when using gzdopen() for reading. When reading, the
|
| 1594 |
+
offset does not include as yet unused buffered input. This information can
|
| 1595 |
+
be used for a progress indicator. On error, gzoffset() returns -1.
|
| 1596 |
+
*/
|
| 1597 |
+
|
| 1598 |
+
ZEXTERN int ZEXPORT gzeof(gzFile file);
|
| 1599 |
+
/*
|
| 1600 |
+
Return true (1) if the end-of-file indicator for file has been set while
|
| 1601 |
+
reading, false (0) otherwise. Note that the end-of-file indicator is set
|
| 1602 |
+
only if the read tried to go past the end of the input, but came up short.
|
| 1603 |
+
Therefore, just like feof(), gzeof() may return false even if there is no
|
| 1604 |
+
more data to read, in the event that the last read request was for the exact
|
| 1605 |
+
number of bytes remaining in the input file. This will happen if the input
|
| 1606 |
+
file size is an exact multiple of the buffer size.
|
| 1607 |
+
|
| 1608 |
+
If gzeof() returns true, then the read functions will return no more data,
|
| 1609 |
+
unless the end-of-file indicator is reset by gzclearerr() and the input file
|
| 1610 |
+
has grown since the previous end of file was detected.
|
| 1611 |
+
*/
|
| 1612 |
+
|
| 1613 |
+
ZEXTERN int ZEXPORT gzdirect(gzFile file);
|
| 1614 |
+
/*
|
| 1615 |
+
Return true (1) if file is being copied directly while reading, or false
|
| 1616 |
+
(0) if file is a gzip stream being decompressed.
|
| 1617 |
+
|
| 1618 |
+
If the input file is empty, gzdirect() will return true, since the input
|
| 1619 |
+
does not contain a gzip stream.
|
| 1620 |
+
|
| 1621 |
+
If gzdirect() is used immediately after gzopen() or gzdopen() it will
|
| 1622 |
+
cause buffers to be allocated to allow reading the file to determine if it
|
| 1623 |
+
is a gzip file. Therefore if gzbuffer() is used, it should be called before
|
| 1624 |
+
gzdirect().
|
| 1625 |
+
|
| 1626 |
+
When writing, gzdirect() returns true (1) if transparent writing was
|
| 1627 |
+
requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
|
| 1628 |
+
gzdirect() is not needed when writing. Transparent writing must be
|
| 1629 |
+
explicitly requested, so the application already knows the answer. When
|
| 1630 |
+
linking statically, using gzdirect() will include all of the zlib code for
|
| 1631 |
+
gzip file reading and decompression, which may not be desired.)
|
| 1632 |
+
*/
|
| 1633 |
+
|
| 1634 |
+
ZEXTERN int ZEXPORT gzclose(gzFile file);
|
| 1635 |
+
/*
|
| 1636 |
+
Flush all pending output for file, if necessary, close file and
|
| 1637 |
+
deallocate the (de)compression state. Note that once file is closed, you
|
| 1638 |
+
cannot call gzerror with file, since its structures have been deallocated.
|
| 1639 |
+
gzclose must not be called more than once on the same file, just as free
|
| 1640 |
+
must not be called more than once on the same allocation.
|
| 1641 |
+
|
| 1642 |
+
gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
|
| 1643 |
+
file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
|
| 1644 |
+
last read ended in the middle of a gzip stream, or Z_OK on success.
|
| 1645 |
+
*/
|
| 1646 |
+
|
| 1647 |
+
ZEXTERN int ZEXPORT gzclose_r(gzFile file);
|
| 1648 |
+
ZEXTERN int ZEXPORT gzclose_w(gzFile file);
|
| 1649 |
+
/*
|
| 1650 |
+
Same as gzclose(), but gzclose_r() is only for use when reading, and
|
| 1651 |
+
gzclose_w() is only for use when writing or appending. The advantage to
|
| 1652 |
+
using these instead of gzclose() is that they avoid linking in zlib
|
| 1653 |
+
compression or decompression code that is not used when only reading or only
|
| 1654 |
+
writing respectively. If gzclose() is used, then both compression and
|
| 1655 |
+
decompression code will be included the application when linking to a static
|
| 1656 |
+
zlib library.
|
| 1657 |
+
*/
|
| 1658 |
+
|
| 1659 |
+
ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
|
| 1660 |
+
/*
|
| 1661 |
+
Return the error message for the last error which occurred on file.
|
| 1662 |
+
errnum is set to zlib error number. If an error occurred in the file system
|
| 1663 |
+
and not in the compression library, errnum is set to Z_ERRNO and the
|
| 1664 |
+
application may consult errno to get the exact error code.
|
| 1665 |
+
|
| 1666 |
+
The application must not modify the returned string. Future calls to
|
| 1667 |
+
this function may invalidate the previously returned string. If file is
|
| 1668 |
+
closed, then the string previously returned by gzerror will no longer be
|
| 1669 |
+
available.
|
| 1670 |
+
|
| 1671 |
+
gzerror() should be used to distinguish errors from end-of-file for those
|
| 1672 |
+
functions above that do not distinguish those cases in their return values.
|
| 1673 |
+
*/
|
| 1674 |
+
|
| 1675 |
+
ZEXTERN void ZEXPORT gzclearerr(gzFile file);
|
| 1676 |
+
/*
|
| 1677 |
+
Clear the error and end-of-file flags for file. This is analogous to the
|
| 1678 |
+
clearerr() function in stdio. This is useful for continuing to read a gzip
|
| 1679 |
+
file that is being written concurrently.
|
| 1680 |
+
*/
|
| 1681 |
+
|
| 1682 |
+
#endif /* !Z_SOLO */
|
| 1683 |
+
|
| 1684 |
+
/* checksum functions */
|
| 1685 |
+
|
| 1686 |
+
/*
|
| 1687 |
+
These functions are not related to compression but are exported
|
| 1688 |
+
anyway because they might be useful in applications using the compression
|
| 1689 |
+
library.
|
| 1690 |
+
*/
|
| 1691 |
+
|
| 1692 |
+
ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
|
| 1693 |
+
/*
|
| 1694 |
+
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
| 1695 |
+
return the updated checksum. An Adler-32 value is in the range of a 32-bit
|
| 1696 |
+
unsigned integer. If buf is Z_NULL, this function returns the required
|
| 1697 |
+
initial value for the checksum.
|
| 1698 |
+
|
| 1699 |
+
An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
|
| 1700 |
+
much faster.
|
| 1701 |
+
|
| 1702 |
+
Usage example:
|
| 1703 |
+
|
| 1704 |
+
uLong adler = adler32(0L, Z_NULL, 0);
|
| 1705 |
+
|
| 1706 |
+
while (read_buffer(buffer, length) != EOF) {
|
| 1707 |
+
adler = adler32(adler, buffer, length);
|
| 1708 |
+
}
|
| 1709 |
+
if (adler != original_adler) error();
|
| 1710 |
+
*/
|
| 1711 |
+
|
| 1712 |
+
ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
|
| 1713 |
+
z_size_t len);
|
| 1714 |
+
/*
|
| 1715 |
+
Same as adler32(), but with a size_t length.
|
| 1716 |
+
*/
|
| 1717 |
+
|
| 1718 |
+
/*
|
| 1719 |
+
ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
|
| 1720 |
+
z_off_t len2);
|
| 1721 |
+
|
| 1722 |
+
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
|
| 1723 |
+
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
|
| 1724 |
+
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
|
| 1725 |
+
seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
|
| 1726 |
+
that the z_off_t type (like off_t) is a signed integer. If len2 is
|
| 1727 |
+
negative, the result has no meaning or utility.
|
| 1728 |
+
*/
|
| 1729 |
+
|
| 1730 |
+
ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
|
| 1731 |
+
/*
|
| 1732 |
+
Update a running CRC-32 with the bytes buf[0..len-1] and return the
|
| 1733 |
+
updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
|
| 1734 |
+
If buf is Z_NULL, this function returns the required initial value for the
|
| 1735 |
+
crc. Pre- and post-conditioning (one's complement) is performed within this
|
| 1736 |
+
function so it shouldn't be done by the application.
|
| 1737 |
+
|
| 1738 |
+
Usage example:
|
| 1739 |
+
|
| 1740 |
+
uLong crc = crc32(0L, Z_NULL, 0);
|
| 1741 |
+
|
| 1742 |
+
while (read_buffer(buffer, length) != EOF) {
|
| 1743 |
+
crc = crc32(crc, buffer, length);
|
| 1744 |
+
}
|
| 1745 |
+
if (crc != original_crc) error();
|
| 1746 |
+
*/
|
| 1747 |
+
|
| 1748 |
+
ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
|
| 1749 |
+
z_size_t len);
|
| 1750 |
+
/*
|
| 1751 |
+
Same as crc32(), but with a size_t length.
|
| 1752 |
+
*/
|
| 1753 |
+
|
| 1754 |
+
/*
|
| 1755 |
+
ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
|
| 1756 |
+
|
| 1757 |
+
Combine two CRC-32 check values into one. For two sequences of bytes,
|
| 1758 |
+
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
|
| 1759 |
+
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
|
| 1760 |
+
check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
|
| 1761 |
+
len2. len2 must be non-negative.
|
| 1762 |
+
*/
|
| 1763 |
+
|
| 1764 |
+
/*
|
| 1765 |
+
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
|
| 1766 |
+
|
| 1767 |
+
Return the operator corresponding to length len2, to be used with
|
| 1768 |
+
crc32_combine_op(). len2 must be non-negative.
|
| 1769 |
+
*/
|
| 1770 |
+
|
| 1771 |
+
ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
|
| 1772 |
+
/*
|
| 1773 |
+
Give the same result as crc32_combine(), using op in place of len2. op is
|
| 1774 |
+
is generated from len2 by crc32_combine_gen(). This will be faster than
|
| 1775 |
+
crc32_combine() if the generated op is used more than once.
|
| 1776 |
+
*/
|
| 1777 |
+
|
| 1778 |
+
|
| 1779 |
+
/* various hacks, don't look :) */
|
| 1780 |
+
|
| 1781 |
+
/* deflateInit and inflateInit are macros to allow checking the zlib version
|
| 1782 |
+
* and the compiler's view of z_stream:
|
| 1783 |
+
*/
|
| 1784 |
+
ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level,
|
| 1785 |
+
const char *version, int stream_size);
|
| 1786 |
+
ZEXTERN int ZEXPORT inflateInit_(z_streamp strm,
|
| 1787 |
+
const char *version, int stream_size);
|
| 1788 |
+
ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
|
| 1789 |
+
int windowBits, int memLevel,
|
| 1790 |
+
int strategy, const char *version,
|
| 1791 |
+
int stream_size);
|
| 1792 |
+
ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
|
| 1793 |
+
const char *version, int stream_size);
|
| 1794 |
+
ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
|
| 1795 |
+
unsigned char FAR *window,
|
| 1796 |
+
const char *version,
|
| 1797 |
+
int stream_size);
|
| 1798 |
+
#ifdef Z_PREFIX_SET
|
| 1799 |
+
# define z_deflateInit(strm, level) \
|
| 1800 |
+
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1801 |
+
# define z_inflateInit(strm) \
|
| 1802 |
+
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1803 |
+
# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
| 1804 |
+
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
| 1805 |
+
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1806 |
+
# define z_inflateInit2(strm, windowBits) \
|
| 1807 |
+
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
| 1808 |
+
(int)sizeof(z_stream))
|
| 1809 |
+
# define z_inflateBackInit(strm, windowBits, window) \
|
| 1810 |
+
inflateBackInit_((strm), (windowBits), (window), \
|
| 1811 |
+
ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1812 |
+
#else
|
| 1813 |
+
# define deflateInit(strm, level) \
|
| 1814 |
+
deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1815 |
+
# define inflateInit(strm) \
|
| 1816 |
+
inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1817 |
+
# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
|
| 1818 |
+
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
|
| 1819 |
+
(strategy), ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1820 |
+
# define inflateInit2(strm, windowBits) \
|
| 1821 |
+
inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
|
| 1822 |
+
(int)sizeof(z_stream))
|
| 1823 |
+
# define inflateBackInit(strm, windowBits, window) \
|
| 1824 |
+
inflateBackInit_((strm), (windowBits), (window), \
|
| 1825 |
+
ZLIB_VERSION, (int)sizeof(z_stream))
|
| 1826 |
+
#endif
|
| 1827 |
+
|
| 1828 |
+
#ifndef Z_SOLO
|
| 1829 |
+
|
| 1830 |
+
/* gzgetc() macro and its supporting function and exposed data structure. Note
|
| 1831 |
+
* that the real internal state is much larger than the exposed structure.
|
| 1832 |
+
* This abbreviated structure exposes just enough for the gzgetc() macro. The
|
| 1833 |
+
* user should not mess with these exposed elements, since their names or
|
| 1834 |
+
* behavior could change in the future, perhaps even capriciously. They can
|
| 1835 |
+
* only be used by the gzgetc() macro. You have been warned.
|
| 1836 |
+
*/
|
| 1837 |
+
struct gzFile_s {
|
| 1838 |
+
unsigned have;
|
| 1839 |
+
unsigned char *next;
|
| 1840 |
+
z_off64_t pos;
|
| 1841 |
+
};
|
| 1842 |
+
ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
|
| 1843 |
+
#ifdef Z_PREFIX_SET
|
| 1844 |
+
# undef z_gzgetc
|
| 1845 |
+
# define z_gzgetc(g) \
|
| 1846 |
+
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
| 1847 |
+
#else
|
| 1848 |
+
# define gzgetc(g) \
|
| 1849 |
+
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
|
| 1850 |
+
#endif
|
| 1851 |
+
|
| 1852 |
+
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
|
| 1853 |
+
* change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
|
| 1854 |
+
* both are true, the application gets the *64 functions, and the regular
|
| 1855 |
+
* functions are changed to 64 bits) -- in case these are set on systems
|
| 1856 |
+
* without large file support, _LFS64_LARGEFILE must also be true
|
| 1857 |
+
*/
|
| 1858 |
+
#ifdef Z_LARGE64
|
| 1859 |
+
ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
|
| 1860 |
+
ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
|
| 1861 |
+
ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
|
| 1862 |
+
ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
|
| 1863 |
+
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
|
| 1864 |
+
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
|
| 1865 |
+
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
|
| 1866 |
+
#endif
|
| 1867 |
+
|
| 1868 |
+
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
|
| 1869 |
+
# ifdef Z_PREFIX_SET
|
| 1870 |
+
# define z_gzopen z_gzopen64
|
| 1871 |
+
# define z_gzseek z_gzseek64
|
| 1872 |
+
# define z_gztell z_gztell64
|
| 1873 |
+
# define z_gzoffset z_gzoffset64
|
| 1874 |
+
# define z_adler32_combine z_adler32_combine64
|
| 1875 |
+
# define z_crc32_combine z_crc32_combine64
|
| 1876 |
+
# define z_crc32_combine_gen z_crc32_combine_gen64
|
| 1877 |
+
# else
|
| 1878 |
+
# define gzopen gzopen64
|
| 1879 |
+
# define gzseek gzseek64
|
| 1880 |
+
# define gztell gztell64
|
| 1881 |
+
# define gzoffset gzoffset64
|
| 1882 |
+
# define adler32_combine adler32_combine64
|
| 1883 |
+
# define crc32_combine crc32_combine64
|
| 1884 |
+
# define crc32_combine_gen crc32_combine_gen64
|
| 1885 |
+
# endif
|
| 1886 |
+
# ifndef Z_LARGE64
|
| 1887 |
+
ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
|
| 1888 |
+
ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
|
| 1889 |
+
ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
|
| 1890 |
+
ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
|
| 1891 |
+
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
|
| 1892 |
+
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
|
| 1893 |
+
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
|
| 1894 |
+
# endif
|
| 1895 |
+
#else
|
| 1896 |
+
ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
|
| 1897 |
+
ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
|
| 1898 |
+
ZEXTERN z_off_t ZEXPORT gztell(gzFile);
|
| 1899 |
+
ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
|
| 1900 |
+
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
|
| 1901 |
+
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
|
| 1902 |
+
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
|
| 1903 |
+
#endif
|
| 1904 |
+
|
| 1905 |
+
#else /* Z_SOLO */
|
| 1906 |
+
|
| 1907 |
+
ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
|
| 1908 |
+
ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
|
| 1909 |
+
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
|
| 1910 |
+
|
| 1911 |
+
#endif /* !Z_SOLO */
|
| 1912 |
+
|
| 1913 |
+
/* undocumented functions */
|
| 1914 |
+
ZEXTERN const char * ZEXPORT zError(int);
|
| 1915 |
+
ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp);
|
| 1916 |
+
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
|
| 1917 |
+
ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int);
|
| 1918 |
+
ZEXTERN int ZEXPORT inflateValidate(z_streamp, int);
|
| 1919 |
+
ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp);
|
| 1920 |
+
ZEXTERN int ZEXPORT inflateResetKeep(z_streamp);
|
| 1921 |
+
ZEXTERN int ZEXPORT deflateResetKeep(z_streamp);
|
| 1922 |
+
#if defined(_WIN32) && !defined(Z_SOLO)
|
| 1923 |
+
ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path,
|
| 1924 |
+
const char *mode);
|
| 1925 |
+
#endif
|
| 1926 |
+
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
| 1927 |
+
# ifndef Z_SOLO
|
| 1928 |
+
ZEXTERN int ZEXPORTVA gzvprintf(gzFile file,
|
| 1929 |
+
const char *format,
|
| 1930 |
+
va_list va);
|
| 1931 |
+
# endif
|
| 1932 |
+
#endif
|
| 1933 |
+
|
| 1934 |
+
#ifdef __cplusplus
|
| 1935 |
+
}
|
| 1936 |
+
#endif
|
| 1937 |
+
|
| 1938 |
+
#endif /* ZLIB_H */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py
ADDED
|
File without changes
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: main header file
|
| 3 |
+
*
|
| 4 |
+
* Copy: See Copyright for the status of this software.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
#ifndef __EXSLT_H__
|
| 9 |
+
#define __EXSLT_H__
|
| 10 |
+
|
| 11 |
+
#include <libxml/tree.h>
|
| 12 |
+
#include <libxml/xpath.h>
|
| 13 |
+
#include "exsltexports.h"
|
| 14 |
+
#include <libexslt/exsltconfig.h>
|
| 15 |
+
|
| 16 |
+
#ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
EXSLTPUBVAR const char *exsltLibraryVersion;
|
| 21 |
+
EXSLTPUBVAR const int exsltLibexsltVersion;
|
| 22 |
+
EXSLTPUBVAR const int exsltLibxsltVersion;
|
| 23 |
+
EXSLTPUBVAR const int exsltLibxmlVersion;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* EXSLT_COMMON_NAMESPACE:
|
| 27 |
+
*
|
| 28 |
+
* Namespace for EXSLT common functions
|
| 29 |
+
*/
|
| 30 |
+
#define EXSLT_COMMON_NAMESPACE ((const xmlChar *) "http://exslt.org/common")
|
| 31 |
+
/**
|
| 32 |
+
* EXSLT_CRYPTO_NAMESPACE:
|
| 33 |
+
*
|
| 34 |
+
* Namespace for EXSLT crypto functions
|
| 35 |
+
*/
|
| 36 |
+
#define EXSLT_CRYPTO_NAMESPACE ((const xmlChar *) "http://exslt.org/crypto")
|
| 37 |
+
/**
|
| 38 |
+
* EXSLT_MATH_NAMESPACE:
|
| 39 |
+
*
|
| 40 |
+
* Namespace for EXSLT math functions
|
| 41 |
+
*/
|
| 42 |
+
#define EXSLT_MATH_NAMESPACE ((const xmlChar *) "http://exslt.org/math")
|
| 43 |
+
/**
|
| 44 |
+
* EXSLT_SETS_NAMESPACE:
|
| 45 |
+
*
|
| 46 |
+
* Namespace for EXSLT set functions
|
| 47 |
+
*/
|
| 48 |
+
#define EXSLT_SETS_NAMESPACE ((const xmlChar *) "http://exslt.org/sets")
|
| 49 |
+
/**
|
| 50 |
+
* EXSLT_FUNCTIONS_NAMESPACE:
|
| 51 |
+
*
|
| 52 |
+
* Namespace for EXSLT functions extension functions
|
| 53 |
+
*/
|
| 54 |
+
#define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *) "http://exslt.org/functions")
|
| 55 |
+
/**
|
| 56 |
+
* EXSLT_STRINGS_NAMESPACE:
|
| 57 |
+
*
|
| 58 |
+
* Namespace for EXSLT strings functions
|
| 59 |
+
*/
|
| 60 |
+
#define EXSLT_STRINGS_NAMESPACE ((const xmlChar *) "http://exslt.org/strings")
|
| 61 |
+
/**
|
| 62 |
+
* EXSLT_DATE_NAMESPACE:
|
| 63 |
+
*
|
| 64 |
+
* Namespace for EXSLT date functions
|
| 65 |
+
*/
|
| 66 |
+
#define EXSLT_DATE_NAMESPACE ((const xmlChar *) "http://exslt.org/dates-and-times")
|
| 67 |
+
/**
|
| 68 |
+
* EXSLT_DYNAMIC_NAMESPACE:
|
| 69 |
+
*
|
| 70 |
+
* Namespace for EXSLT dynamic functions
|
| 71 |
+
*/
|
| 72 |
+
#define EXSLT_DYNAMIC_NAMESPACE ((const xmlChar *) "http://exslt.org/dynamic")
|
| 73 |
+
|
| 74 |
+
/**
|
| 75 |
+
* SAXON_NAMESPACE:
|
| 76 |
+
*
|
| 77 |
+
* Namespace for SAXON extensions functions
|
| 78 |
+
*/
|
| 79 |
+
#define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon")
|
| 80 |
+
|
| 81 |
+
EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void);
|
| 82 |
+
#ifdef EXSLT_CRYPTO_ENABLED
|
| 83 |
+
EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void);
|
| 84 |
+
#endif
|
| 85 |
+
EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void);
|
| 86 |
+
EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void);
|
| 87 |
+
EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void);
|
| 88 |
+
EXSLTPUBFUN void EXSLTCALL exsltStrRegister (void);
|
| 89 |
+
EXSLTPUBFUN void EXSLTCALL exsltDateRegister (void);
|
| 90 |
+
EXSLTPUBFUN void EXSLTCALL exsltSaxonRegister (void);
|
| 91 |
+
EXSLTPUBFUN void EXSLTCALL exsltDynRegister(void);
|
| 92 |
+
|
| 93 |
+
EXSLTPUBFUN void EXSLTCALL exsltRegisterAll (void);
|
| 94 |
+
|
| 95 |
+
EXSLTPUBFUN int EXSLTCALL exsltDateXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
| 96 |
+
const xmlChar *prefix);
|
| 97 |
+
EXSLTPUBFUN int EXSLTCALL exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
| 98 |
+
const xmlChar *prefix);
|
| 99 |
+
EXSLTPUBFUN int EXSLTCALL exsltSetsXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
| 100 |
+
const xmlChar *prefix);
|
| 101 |
+
EXSLTPUBFUN int EXSLTCALL exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt,
|
| 102 |
+
const xmlChar *prefix);
|
| 103 |
+
|
| 104 |
+
#ifdef __cplusplus
|
| 105 |
+
}
|
| 106 |
+
#endif
|
| 107 |
+
#endif /* __EXSLT_H__ */
|
| 108 |
+
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* exsltconfig.h: compile-time version information for the EXSLT library
|
| 3 |
+
*
|
| 4 |
+
* See Copyright for the status of this software.
|
| 5 |
+
*
|
| 6 |
+
* daniel@veillard.com
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
#ifndef __XML_EXSLTCONFIG_H__
|
| 10 |
+
#define __XML_EXSLTCONFIG_H__
|
| 11 |
+
|
| 12 |
+
#ifdef __cplusplus
|
| 13 |
+
extern "C" {
|
| 14 |
+
#endif
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* LIBEXSLT_DOTTED_VERSION:
|
| 18 |
+
*
|
| 19 |
+
* the version string like "1.2.3"
|
| 20 |
+
*/
|
| 21 |
+
#define LIBEXSLT_DOTTED_VERSION "0.8.24"
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* LIBEXSLT_VERSION:
|
| 25 |
+
*
|
| 26 |
+
* the version number: 1.2.3 value is 10203
|
| 27 |
+
*/
|
| 28 |
+
#define LIBEXSLT_VERSION 824
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* LIBEXSLT_VERSION_STRING:
|
| 32 |
+
*
|
| 33 |
+
* the version number string, 1.2.3 value is "10203"
|
| 34 |
+
*/
|
| 35 |
+
#define LIBEXSLT_VERSION_STRING "824"
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* LIBEXSLT_VERSION_EXTRA:
|
| 39 |
+
*
|
| 40 |
+
* extra version information, used to show a Git commit description
|
| 41 |
+
*/
|
| 42 |
+
#define LIBEXSLT_VERSION_EXTRA ""
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* WITH_CRYPTO:
|
| 46 |
+
*
|
| 47 |
+
* Whether crypto support is configured into exslt
|
| 48 |
+
*/
|
| 49 |
+
#if 0
|
| 50 |
+
#define EXSLT_CRYPTO_ENABLED
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
/**
|
| 54 |
+
* ATTRIBUTE_UNUSED:
|
| 55 |
+
*
|
| 56 |
+
* This macro is used to flag unused function parameters to GCC
|
| 57 |
+
*/
|
| 58 |
+
#ifdef __GNUC__
|
| 59 |
+
#ifndef ATTRIBUTE_UNUSED
|
| 60 |
+
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
| 61 |
+
#endif
|
| 62 |
+
#else
|
| 63 |
+
#define ATTRIBUTE_UNUSED
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#ifdef __cplusplus
|
| 67 |
+
}
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
#endif /* __XML_EXSLTCONFIG_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltexports.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: macros for marking symbols as exportable/importable.
|
| 3 |
+
*
|
| 4 |
+
* Copy: See Copyright for the status of this software.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
#ifndef __EXSLT_EXPORTS_H__
|
| 8 |
+
#define __EXSLT_EXPORTS_H__
|
| 9 |
+
|
| 10 |
+
#if defined(_WIN32) || defined(__CYGWIN__)
|
| 11 |
+
/** DOC_DISABLE */
|
| 12 |
+
|
| 13 |
+
#ifdef LIBEXSLT_STATIC
|
| 14 |
+
#define EXSLTPUBLIC
|
| 15 |
+
#elif defined(IN_LIBEXSLT)
|
| 16 |
+
#define EXSLTPUBLIC __declspec(dllexport)
|
| 17 |
+
#else
|
| 18 |
+
#define EXSLTPUBLIC __declspec(dllimport)
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
#define EXSLTCALL __cdecl
|
| 22 |
+
|
| 23 |
+
/** DOC_ENABLE */
|
| 24 |
+
#else /* not Windows */
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* EXSLTPUBLIC:
|
| 28 |
+
*
|
| 29 |
+
* Macro which declares a public symbol
|
| 30 |
+
*/
|
| 31 |
+
#define EXSLTPUBLIC
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* EXSLTCALL:
|
| 35 |
+
*
|
| 36 |
+
* Macro which declares the calling convention for exported functions
|
| 37 |
+
*/
|
| 38 |
+
#define EXSLTCALL
|
| 39 |
+
|
| 40 |
+
#endif /* platform switch */
|
| 41 |
+
|
| 42 |
+
/*
|
| 43 |
+
* EXSLTPUBFUN:
|
| 44 |
+
*
|
| 45 |
+
* Macro which declares an exportable function
|
| 46 |
+
*/
|
| 47 |
+
#define EXSLTPUBFUN EXSLTPUBLIC
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* EXSLTPUBVAR:
|
| 51 |
+
*
|
| 52 |
+
* Macro which declares an exportable variable
|
| 53 |
+
*/
|
| 54 |
+
#define EXSLTPUBVAR EXSLTPUBLIC extern
|
| 55 |
+
|
| 56 |
+
/* Compatibility */
|
| 57 |
+
#if !defined(LIBEXSLT_PUBLIC)
|
| 58 |
+
#define LIBEXSLT_PUBLIC EXSLTPUBVAR
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#endif /* __EXSLT_EXPORTS_H__ */
|
| 62 |
+
|
| 63 |
+
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLparser.h
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: interface for an HTML 4.0 non-verifying parser
|
| 3 |
+
* Description: this module implements an HTML 4.0 non-verifying parser
|
| 4 |
+
* with API compatible with the XML parser ones. It should
|
| 5 |
+
* be able to parse "real world" HTML, even if severely
|
| 6 |
+
* broken from a specification point of view.
|
| 7 |
+
*
|
| 8 |
+
* Copy: See Copyright for the status of this software.
|
| 9 |
+
*
|
| 10 |
+
* Author: Daniel Veillard
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifndef __HTML_PARSER_H__
|
| 14 |
+
#define __HTML_PARSER_H__
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#include <libxml/parser.h>
|
| 17 |
+
|
| 18 |
+
#ifdef LIBXML_HTML_ENABLED
|
| 19 |
+
|
| 20 |
+
#ifdef __cplusplus
|
| 21 |
+
extern "C" {
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
* Backward compatibility
|
| 26 |
+
*/
|
| 27 |
+
#define UTF8ToHtml htmlUTF8ToHtml
|
| 28 |
+
|
| 29 |
+
/*
|
| 30 |
+
* Most of the back-end structures from XML and HTML are shared.
|
| 31 |
+
*/
|
| 32 |
+
typedef xmlParserCtxt htmlParserCtxt;
|
| 33 |
+
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
|
| 34 |
+
typedef xmlParserNodeInfo htmlParserNodeInfo;
|
| 35 |
+
typedef xmlSAXHandler htmlSAXHandler;
|
| 36 |
+
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
|
| 37 |
+
typedef xmlParserInput htmlParserInput;
|
| 38 |
+
typedef xmlParserInputPtr htmlParserInputPtr;
|
| 39 |
+
typedef xmlDocPtr htmlDocPtr;
|
| 40 |
+
typedef xmlNodePtr htmlNodePtr;
|
| 41 |
+
|
| 42 |
+
/*
|
| 43 |
+
* Internal description of an HTML element, representing HTML 4.01
|
| 44 |
+
* and XHTML 1.0 (which share the same structure).
|
| 45 |
+
*/
|
| 46 |
+
typedef struct _htmlElemDesc htmlElemDesc;
|
| 47 |
+
typedef htmlElemDesc *htmlElemDescPtr;
|
| 48 |
+
struct _htmlElemDesc {
|
| 49 |
+
const char *name; /* The tag name */
|
| 50 |
+
char startTag; /* unused */
|
| 51 |
+
char endTag; /* Whether the end tag can be implied */
|
| 52 |
+
char saveEndTag; /* Whether the end tag should be saved */
|
| 53 |
+
char empty; /* Is this an empty element ? */
|
| 54 |
+
char depr; /* unused */
|
| 55 |
+
char dtd; /* unused */
|
| 56 |
+
char isinline; /* is this a block 0 or inline 1 element */
|
| 57 |
+
const char *desc; /* the description */
|
| 58 |
+
|
| 59 |
+
const char** subelts XML_DEPRECATED_MEMBER;
|
| 60 |
+
const char* defaultsubelt XML_DEPRECATED_MEMBER;
|
| 61 |
+
const char** attrs_opt XML_DEPRECATED_MEMBER;
|
| 62 |
+
const char** attrs_depr XML_DEPRECATED_MEMBER;
|
| 63 |
+
const char** attrs_req XML_DEPRECATED_MEMBER;
|
| 64 |
+
|
| 65 |
+
int dataMode;
|
| 66 |
+
};
|
| 67 |
+
|
| 68 |
+
/*
|
| 69 |
+
* Internal description of an HTML entity.
|
| 70 |
+
*/
|
| 71 |
+
typedef struct _htmlEntityDesc htmlEntityDesc;
|
| 72 |
+
typedef htmlEntityDesc *htmlEntityDescPtr;
|
| 73 |
+
struct _htmlEntityDesc {
|
| 74 |
+
unsigned int value; /* the UNICODE value for the character */
|
| 75 |
+
const char *name; /* The entity name */
|
| 76 |
+
const char *desc; /* the description */
|
| 77 |
+
};
|
| 78 |
+
|
| 79 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 80 |
+
|
| 81 |
+
XML_DEPRECATED
|
| 82 |
+
XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
| 83 |
+
|
| 84 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 85 |
+
|
| 86 |
+
/*
|
| 87 |
+
* There is only few public functions.
|
| 88 |
+
*/
|
| 89 |
+
XML_DEPRECATED
|
| 90 |
+
XMLPUBFUN void
|
| 91 |
+
htmlInitAutoClose (void);
|
| 92 |
+
XMLPUBFUN const htmlElemDesc *
|
| 93 |
+
htmlTagLookup (const xmlChar *tag);
|
| 94 |
+
XMLPUBFUN const htmlEntityDesc *
|
| 95 |
+
htmlEntityLookup(const xmlChar *name);
|
| 96 |
+
XMLPUBFUN const htmlEntityDesc *
|
| 97 |
+
htmlEntityValueLookup(unsigned int value);
|
| 98 |
+
|
| 99 |
+
XML_DEPRECATED
|
| 100 |
+
XMLPUBFUN int
|
| 101 |
+
htmlIsAutoClosed(htmlDocPtr doc,
|
| 102 |
+
htmlNodePtr elem);
|
| 103 |
+
XML_DEPRECATED
|
| 104 |
+
XMLPUBFUN int
|
| 105 |
+
htmlAutoCloseTag(htmlDocPtr doc,
|
| 106 |
+
const xmlChar *name,
|
| 107 |
+
htmlNodePtr elem);
|
| 108 |
+
XML_DEPRECATED
|
| 109 |
+
XMLPUBFUN const htmlEntityDesc *
|
| 110 |
+
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
|
| 111 |
+
const xmlChar **str);
|
| 112 |
+
XML_DEPRECATED
|
| 113 |
+
XMLPUBFUN int
|
| 114 |
+
htmlParseCharRef(htmlParserCtxtPtr ctxt);
|
| 115 |
+
XML_DEPRECATED
|
| 116 |
+
XMLPUBFUN void
|
| 117 |
+
htmlParseElement(htmlParserCtxtPtr ctxt);
|
| 118 |
+
|
| 119 |
+
XMLPUBFUN htmlParserCtxtPtr
|
| 120 |
+
htmlNewParserCtxt(void);
|
| 121 |
+
XMLPUBFUN htmlParserCtxtPtr
|
| 122 |
+
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
|
| 123 |
+
void *userData);
|
| 124 |
+
|
| 125 |
+
XMLPUBFUN htmlParserCtxtPtr
|
| 126 |
+
htmlCreateMemoryParserCtxt(const char *buffer,
|
| 127 |
+
int size);
|
| 128 |
+
|
| 129 |
+
XMLPUBFUN int
|
| 130 |
+
htmlParseDocument(htmlParserCtxtPtr ctxt);
|
| 131 |
+
XML_DEPRECATED
|
| 132 |
+
XMLPUBFUN htmlDocPtr
|
| 133 |
+
htmlSAXParseDoc (const xmlChar *cur,
|
| 134 |
+
const char *encoding,
|
| 135 |
+
htmlSAXHandlerPtr sax,
|
| 136 |
+
void *userData);
|
| 137 |
+
XMLPUBFUN htmlDocPtr
|
| 138 |
+
htmlParseDoc (const xmlChar *cur,
|
| 139 |
+
const char *encoding);
|
| 140 |
+
XMLPUBFUN htmlParserCtxtPtr
|
| 141 |
+
htmlCreateFileParserCtxt(const char *filename,
|
| 142 |
+
const char *encoding);
|
| 143 |
+
XML_DEPRECATED
|
| 144 |
+
XMLPUBFUN htmlDocPtr
|
| 145 |
+
htmlSAXParseFile(const char *filename,
|
| 146 |
+
const char *encoding,
|
| 147 |
+
htmlSAXHandlerPtr sax,
|
| 148 |
+
void *userData);
|
| 149 |
+
XMLPUBFUN htmlDocPtr
|
| 150 |
+
htmlParseFile (const char *filename,
|
| 151 |
+
const char *encoding);
|
| 152 |
+
XMLPUBFUN int
|
| 153 |
+
htmlUTF8ToHtml (unsigned char *out,
|
| 154 |
+
int *outlen,
|
| 155 |
+
const unsigned char *in,
|
| 156 |
+
int *inlen);
|
| 157 |
+
XMLPUBFUN int
|
| 158 |
+
htmlEncodeEntities(unsigned char *out,
|
| 159 |
+
int *outlen,
|
| 160 |
+
const unsigned char *in,
|
| 161 |
+
int *inlen, int quoteChar);
|
| 162 |
+
XMLPUBFUN int
|
| 163 |
+
htmlIsScriptAttribute(const xmlChar *name);
|
| 164 |
+
XML_DEPRECATED
|
| 165 |
+
XMLPUBFUN int
|
| 166 |
+
htmlHandleOmittedElem(int val);
|
| 167 |
+
|
| 168 |
+
#ifdef LIBXML_PUSH_ENABLED
|
| 169 |
+
/**
|
| 170 |
+
* Interfaces for the Push mode.
|
| 171 |
+
*/
|
| 172 |
+
XMLPUBFUN htmlParserCtxtPtr
|
| 173 |
+
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
|
| 174 |
+
void *user_data,
|
| 175 |
+
const char *chunk,
|
| 176 |
+
int size,
|
| 177 |
+
const char *filename,
|
| 178 |
+
xmlCharEncoding enc);
|
| 179 |
+
XMLPUBFUN int
|
| 180 |
+
htmlParseChunk (htmlParserCtxtPtr ctxt,
|
| 181 |
+
const char *chunk,
|
| 182 |
+
int size,
|
| 183 |
+
int terminate);
|
| 184 |
+
#endif /* LIBXML_PUSH_ENABLED */
|
| 185 |
+
|
| 186 |
+
XMLPUBFUN void
|
| 187 |
+
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
|
| 188 |
+
|
| 189 |
+
/*
|
| 190 |
+
* New set of simpler/more flexible APIs
|
| 191 |
+
*/
|
| 192 |
+
/**
|
| 193 |
+
* xmlParserOption:
|
| 194 |
+
*
|
| 195 |
+
* This is the set of XML parser options that can be passed down
|
| 196 |
+
* to the xmlReadDoc() and similar calls.
|
| 197 |
+
*/
|
| 198 |
+
typedef enum {
|
| 199 |
+
HTML_PARSE_RECOVER = 1<<0, /* No effect */
|
| 200 |
+
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
|
| 201 |
+
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
| 202 |
+
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
| 203 |
+
HTML_PARSE_PEDANTIC = 1<<7, /* No effect */
|
| 204 |
+
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
| 205 |
+
HTML_PARSE_NONET = 1<<11,/* No effect */
|
| 206 |
+
HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
|
| 207 |
+
HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
|
| 208 |
+
HTML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
| 209 |
+
HTML_PARSE_IGNORE_ENC=1<<21,/* ignore internal document encoding hint */
|
| 210 |
+
HTML_PARSE_BIG_LINES= 1<<22,/* Store big lines numbers in text PSVI field */
|
| 211 |
+
HTML_PARSE_HTML5 = 1<<26 /* HTML5 support */
|
| 212 |
+
} htmlParserOption;
|
| 213 |
+
|
| 214 |
+
XMLPUBFUN void
|
| 215 |
+
htmlCtxtReset (htmlParserCtxtPtr ctxt);
|
| 216 |
+
XMLPUBFUN int
|
| 217 |
+
htmlCtxtSetOptions (htmlParserCtxtPtr ctxt,
|
| 218 |
+
int options);
|
| 219 |
+
XMLPUBFUN int
|
| 220 |
+
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
|
| 221 |
+
int options);
|
| 222 |
+
XMLPUBFUN htmlDocPtr
|
| 223 |
+
htmlReadDoc (const xmlChar *cur,
|
| 224 |
+
const char *URL,
|
| 225 |
+
const char *encoding,
|
| 226 |
+
int options);
|
| 227 |
+
XMLPUBFUN htmlDocPtr
|
| 228 |
+
htmlReadFile (const char *URL,
|
| 229 |
+
const char *encoding,
|
| 230 |
+
int options);
|
| 231 |
+
XMLPUBFUN htmlDocPtr
|
| 232 |
+
htmlReadMemory (const char *buffer,
|
| 233 |
+
int size,
|
| 234 |
+
const char *URL,
|
| 235 |
+
const char *encoding,
|
| 236 |
+
int options);
|
| 237 |
+
XMLPUBFUN htmlDocPtr
|
| 238 |
+
htmlReadFd (int fd,
|
| 239 |
+
const char *URL,
|
| 240 |
+
const char *encoding,
|
| 241 |
+
int options);
|
| 242 |
+
XMLPUBFUN htmlDocPtr
|
| 243 |
+
htmlReadIO (xmlInputReadCallback ioread,
|
| 244 |
+
xmlInputCloseCallback ioclose,
|
| 245 |
+
void *ioctx,
|
| 246 |
+
const char *URL,
|
| 247 |
+
const char *encoding,
|
| 248 |
+
int options);
|
| 249 |
+
XMLPUBFUN htmlDocPtr
|
| 250 |
+
htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
|
| 251 |
+
xmlParserInputPtr input);
|
| 252 |
+
XMLPUBFUN htmlDocPtr
|
| 253 |
+
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
| 254 |
+
const xmlChar *cur,
|
| 255 |
+
const char *URL,
|
| 256 |
+
const char *encoding,
|
| 257 |
+
int options);
|
| 258 |
+
XMLPUBFUN htmlDocPtr
|
| 259 |
+
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
|
| 260 |
+
const char *filename,
|
| 261 |
+
const char *encoding,
|
| 262 |
+
int options);
|
| 263 |
+
XMLPUBFUN htmlDocPtr
|
| 264 |
+
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
|
| 265 |
+
const char *buffer,
|
| 266 |
+
int size,
|
| 267 |
+
const char *URL,
|
| 268 |
+
const char *encoding,
|
| 269 |
+
int options);
|
| 270 |
+
XMLPUBFUN htmlDocPtr
|
| 271 |
+
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
|
| 272 |
+
int fd,
|
| 273 |
+
const char *URL,
|
| 274 |
+
const char *encoding,
|
| 275 |
+
int options);
|
| 276 |
+
XMLPUBFUN htmlDocPtr
|
| 277 |
+
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
|
| 278 |
+
xmlInputReadCallback ioread,
|
| 279 |
+
xmlInputCloseCallback ioclose,
|
| 280 |
+
void *ioctx,
|
| 281 |
+
const char *URL,
|
| 282 |
+
const char *encoding,
|
| 283 |
+
int options);
|
| 284 |
+
|
| 285 |
+
/* deprecated content model
|
| 286 |
+
*/
|
| 287 |
+
typedef enum {
|
| 288 |
+
HTML_NA = 0 , /* something we don't check at all */
|
| 289 |
+
HTML_INVALID = 0x1 ,
|
| 290 |
+
HTML_DEPRECATED = 0x2 ,
|
| 291 |
+
HTML_VALID = 0x4 ,
|
| 292 |
+
HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
|
| 293 |
+
} htmlStatus ;
|
| 294 |
+
|
| 295 |
+
/* Using htmlElemDesc rather than name here, to emphasise the fact
|
| 296 |
+
that otherwise there's a lookup overhead
|
| 297 |
+
*/
|
| 298 |
+
XML_DEPRECATED
|
| 299 |
+
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
| 300 |
+
XML_DEPRECATED
|
| 301 |
+
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
| 302 |
+
XML_DEPRECATED
|
| 303 |
+
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
| 304 |
+
XML_DEPRECATED
|
| 305 |
+
XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
|
| 306 |
+
/**
|
| 307 |
+
* htmlDefaultSubelement:
|
| 308 |
+
* @elt: HTML element
|
| 309 |
+
*
|
| 310 |
+
* Returns the default subelement for this element
|
| 311 |
+
*/
|
| 312 |
+
#define htmlDefaultSubelement(elt) elt->defaultsubelt
|
| 313 |
+
/**
|
| 314 |
+
* htmlElementAllowedHereDesc:
|
| 315 |
+
* @parent: HTML parent element
|
| 316 |
+
* @elt: HTML element
|
| 317 |
+
*
|
| 318 |
+
* Checks whether an HTML element description may be a
|
| 319 |
+
* direct child of the specified element.
|
| 320 |
+
*
|
| 321 |
+
* Returns 1 if allowed; 0 otherwise.
|
| 322 |
+
*/
|
| 323 |
+
#define htmlElementAllowedHereDesc(parent,elt) \
|
| 324 |
+
htmlElementAllowedHere((parent), (elt)->name)
|
| 325 |
+
/**
|
| 326 |
+
* htmlRequiredAttrs:
|
| 327 |
+
* @elt: HTML element
|
| 328 |
+
*
|
| 329 |
+
* Returns the attributes required for the specified element.
|
| 330 |
+
*/
|
| 331 |
+
#define htmlRequiredAttrs(elt) (elt)->attrs_req
|
| 332 |
+
|
| 333 |
+
|
| 334 |
+
#ifdef __cplusplus
|
| 335 |
+
}
|
| 336 |
+
#endif
|
| 337 |
+
|
| 338 |
+
#endif /* LIBXML_HTML_ENABLED */
|
| 339 |
+
#endif /* __HTML_PARSER_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLtree.h
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: specific APIs to process HTML tree, especially serialization
|
| 3 |
+
* Description: this module implements a few function needed to process
|
| 4 |
+
* tree in an HTML specific way.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __HTML_TREE_H__
|
| 12 |
+
#define __HTML_TREE_H__
|
| 13 |
+
|
| 14 |
+
#include <stdio.h>
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#include <libxml/tree.h>
|
| 17 |
+
#include <libxml/HTMLparser.h>
|
| 18 |
+
|
| 19 |
+
#ifdef LIBXML_HTML_ENABLED
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* HTML_TEXT_NODE:
|
| 28 |
+
*
|
| 29 |
+
* Macro. A text node in a HTML document is really implemented
|
| 30 |
+
* the same way as a text node in an XML document.
|
| 31 |
+
*/
|
| 32 |
+
#define HTML_TEXT_NODE XML_TEXT_NODE
|
| 33 |
+
/**
|
| 34 |
+
* HTML_ENTITY_REF_NODE:
|
| 35 |
+
*
|
| 36 |
+
* Macro. An entity reference in a HTML document is really implemented
|
| 37 |
+
* the same way as an entity reference in an XML document.
|
| 38 |
+
*/
|
| 39 |
+
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
| 40 |
+
/**
|
| 41 |
+
* HTML_COMMENT_NODE:
|
| 42 |
+
*
|
| 43 |
+
* Macro. A comment in a HTML document is really implemented
|
| 44 |
+
* the same way as a comment in an XML document.
|
| 45 |
+
*/
|
| 46 |
+
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
| 47 |
+
/**
|
| 48 |
+
* HTML_PRESERVE_NODE:
|
| 49 |
+
*
|
| 50 |
+
* Macro. A preserved node in a HTML document is really implemented
|
| 51 |
+
* the same way as a CDATA section in an XML document.
|
| 52 |
+
*/
|
| 53 |
+
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
| 54 |
+
/**
|
| 55 |
+
* HTML_PI_NODE:
|
| 56 |
+
*
|
| 57 |
+
* Macro. A processing instruction in a HTML document is really implemented
|
| 58 |
+
* the same way as a processing instruction in an XML document.
|
| 59 |
+
*/
|
| 60 |
+
#define HTML_PI_NODE XML_PI_NODE
|
| 61 |
+
|
| 62 |
+
XMLPUBFUN htmlDocPtr
|
| 63 |
+
htmlNewDoc (const xmlChar *URI,
|
| 64 |
+
const xmlChar *ExternalID);
|
| 65 |
+
XMLPUBFUN htmlDocPtr
|
| 66 |
+
htmlNewDocNoDtD (const xmlChar *URI,
|
| 67 |
+
const xmlChar *ExternalID);
|
| 68 |
+
XMLPUBFUN const xmlChar *
|
| 69 |
+
htmlGetMetaEncoding (htmlDocPtr doc);
|
| 70 |
+
XMLPUBFUN int
|
| 71 |
+
htmlSetMetaEncoding (htmlDocPtr doc,
|
| 72 |
+
const xmlChar *encoding);
|
| 73 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 74 |
+
XMLPUBFUN void
|
| 75 |
+
htmlDocDumpMemory (xmlDocPtr cur,
|
| 76 |
+
xmlChar **mem,
|
| 77 |
+
int *size);
|
| 78 |
+
XMLPUBFUN void
|
| 79 |
+
htmlDocDumpMemoryFormat (xmlDocPtr cur,
|
| 80 |
+
xmlChar **mem,
|
| 81 |
+
int *size,
|
| 82 |
+
int format);
|
| 83 |
+
XMLPUBFUN int
|
| 84 |
+
htmlDocDump (FILE *f,
|
| 85 |
+
xmlDocPtr cur);
|
| 86 |
+
XMLPUBFUN int
|
| 87 |
+
htmlSaveFile (const char *filename,
|
| 88 |
+
xmlDocPtr cur);
|
| 89 |
+
XMLPUBFUN int
|
| 90 |
+
htmlNodeDump (xmlBufferPtr buf,
|
| 91 |
+
xmlDocPtr doc,
|
| 92 |
+
xmlNodePtr cur);
|
| 93 |
+
XMLPUBFUN void
|
| 94 |
+
htmlNodeDumpFile (FILE *out,
|
| 95 |
+
xmlDocPtr doc,
|
| 96 |
+
xmlNodePtr cur);
|
| 97 |
+
XMLPUBFUN int
|
| 98 |
+
htmlNodeDumpFileFormat (FILE *out,
|
| 99 |
+
xmlDocPtr doc,
|
| 100 |
+
xmlNodePtr cur,
|
| 101 |
+
const char *encoding,
|
| 102 |
+
int format);
|
| 103 |
+
XMLPUBFUN int
|
| 104 |
+
htmlSaveFileEnc (const char *filename,
|
| 105 |
+
xmlDocPtr cur,
|
| 106 |
+
const char *encoding);
|
| 107 |
+
XMLPUBFUN int
|
| 108 |
+
htmlSaveFileFormat (const char *filename,
|
| 109 |
+
xmlDocPtr cur,
|
| 110 |
+
const char *encoding,
|
| 111 |
+
int format);
|
| 112 |
+
|
| 113 |
+
XMLPUBFUN void
|
| 114 |
+
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
|
| 115 |
+
xmlDocPtr doc,
|
| 116 |
+
xmlNodePtr cur,
|
| 117 |
+
const char *encoding,
|
| 118 |
+
int format);
|
| 119 |
+
XMLPUBFUN void
|
| 120 |
+
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
|
| 121 |
+
xmlDocPtr cur,
|
| 122 |
+
const char *encoding);
|
| 123 |
+
XMLPUBFUN void
|
| 124 |
+
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
|
| 125 |
+
xmlDocPtr cur,
|
| 126 |
+
const char *encoding,
|
| 127 |
+
int format);
|
| 128 |
+
XMLPUBFUN void
|
| 129 |
+
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
| 130 |
+
xmlDocPtr doc,
|
| 131 |
+
xmlNodePtr cur,
|
| 132 |
+
const char *encoding);
|
| 133 |
+
|
| 134 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 135 |
+
|
| 136 |
+
XML_DEPRECATED
|
| 137 |
+
XMLPUBFUN int
|
| 138 |
+
htmlIsBooleanAttr (const xmlChar *name);
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
#ifdef __cplusplus
|
| 142 |
+
}
|
| 143 |
+
#endif
|
| 144 |
+
|
| 145 |
+
#endif /* LIBXML_HTML_ENABLED */
|
| 146 |
+
|
| 147 |
+
#endif /* __HTML_TREE_H__ */
|
| 148 |
+
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX.h
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Old SAX version 1 handler, deprecated
|
| 3 |
+
* Description: DEPRECATED set of SAX version 1 interfaces used to
|
| 4 |
+
* build the DOM tree.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_SAX_H__
|
| 12 |
+
#define __XML_SAX_H__
|
| 13 |
+
|
| 14 |
+
#ifdef __GNUC__
|
| 15 |
+
#warning "libxml/SAX.h is deprecated"
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
#endif /* __XML_SAX_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX2.h
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: SAX2 parser interface used to build the DOM tree
|
| 3 |
+
* Description: those are the default SAX2 interfaces used by
|
| 4 |
+
* the library when building DOM tree.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
#ifndef __XML_SAX2_H__
|
| 13 |
+
#define __XML_SAX2_H__
|
| 14 |
+
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#include <libxml/parser.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
XMLPUBFUN const xmlChar *
|
| 22 |
+
xmlSAX2GetPublicId (void *ctx);
|
| 23 |
+
XMLPUBFUN const xmlChar *
|
| 24 |
+
xmlSAX2GetSystemId (void *ctx);
|
| 25 |
+
XMLPUBFUN void
|
| 26 |
+
xmlSAX2SetDocumentLocator (void *ctx,
|
| 27 |
+
xmlSAXLocatorPtr loc);
|
| 28 |
+
|
| 29 |
+
XMLPUBFUN int
|
| 30 |
+
xmlSAX2GetLineNumber (void *ctx);
|
| 31 |
+
XMLPUBFUN int
|
| 32 |
+
xmlSAX2GetColumnNumber (void *ctx);
|
| 33 |
+
|
| 34 |
+
XMLPUBFUN int
|
| 35 |
+
xmlSAX2IsStandalone (void *ctx);
|
| 36 |
+
XMLPUBFUN int
|
| 37 |
+
xmlSAX2HasInternalSubset (void *ctx);
|
| 38 |
+
XMLPUBFUN int
|
| 39 |
+
xmlSAX2HasExternalSubset (void *ctx);
|
| 40 |
+
|
| 41 |
+
XMLPUBFUN void
|
| 42 |
+
xmlSAX2InternalSubset (void *ctx,
|
| 43 |
+
const xmlChar *name,
|
| 44 |
+
const xmlChar *ExternalID,
|
| 45 |
+
const xmlChar *SystemID);
|
| 46 |
+
XMLPUBFUN void
|
| 47 |
+
xmlSAX2ExternalSubset (void *ctx,
|
| 48 |
+
const xmlChar *name,
|
| 49 |
+
const xmlChar *ExternalID,
|
| 50 |
+
const xmlChar *SystemID);
|
| 51 |
+
XMLPUBFUN xmlEntityPtr
|
| 52 |
+
xmlSAX2GetEntity (void *ctx,
|
| 53 |
+
const xmlChar *name);
|
| 54 |
+
XMLPUBFUN xmlEntityPtr
|
| 55 |
+
xmlSAX2GetParameterEntity (void *ctx,
|
| 56 |
+
const xmlChar *name);
|
| 57 |
+
XMLPUBFUN xmlParserInputPtr
|
| 58 |
+
xmlSAX2ResolveEntity (void *ctx,
|
| 59 |
+
const xmlChar *publicId,
|
| 60 |
+
const xmlChar *systemId);
|
| 61 |
+
|
| 62 |
+
XMLPUBFUN void
|
| 63 |
+
xmlSAX2EntityDecl (void *ctx,
|
| 64 |
+
const xmlChar *name,
|
| 65 |
+
int type,
|
| 66 |
+
const xmlChar *publicId,
|
| 67 |
+
const xmlChar *systemId,
|
| 68 |
+
xmlChar *content);
|
| 69 |
+
XMLPUBFUN void
|
| 70 |
+
xmlSAX2AttributeDecl (void *ctx,
|
| 71 |
+
const xmlChar *elem,
|
| 72 |
+
const xmlChar *fullname,
|
| 73 |
+
int type,
|
| 74 |
+
int def,
|
| 75 |
+
const xmlChar *defaultValue,
|
| 76 |
+
xmlEnumerationPtr tree);
|
| 77 |
+
XMLPUBFUN void
|
| 78 |
+
xmlSAX2ElementDecl (void *ctx,
|
| 79 |
+
const xmlChar *name,
|
| 80 |
+
int type,
|
| 81 |
+
xmlElementContentPtr content);
|
| 82 |
+
XMLPUBFUN void
|
| 83 |
+
xmlSAX2NotationDecl (void *ctx,
|
| 84 |
+
const xmlChar *name,
|
| 85 |
+
const xmlChar *publicId,
|
| 86 |
+
const xmlChar *systemId);
|
| 87 |
+
XMLPUBFUN void
|
| 88 |
+
xmlSAX2UnparsedEntityDecl (void *ctx,
|
| 89 |
+
const xmlChar *name,
|
| 90 |
+
const xmlChar *publicId,
|
| 91 |
+
const xmlChar *systemId,
|
| 92 |
+
const xmlChar *notationName);
|
| 93 |
+
|
| 94 |
+
XMLPUBFUN void
|
| 95 |
+
xmlSAX2StartDocument (void *ctx);
|
| 96 |
+
XMLPUBFUN void
|
| 97 |
+
xmlSAX2EndDocument (void *ctx);
|
| 98 |
+
XML_DEPRECATED
|
| 99 |
+
XMLPUBFUN void
|
| 100 |
+
xmlSAX2StartElement (void *ctx,
|
| 101 |
+
const xmlChar *fullname,
|
| 102 |
+
const xmlChar **atts);
|
| 103 |
+
XML_DEPRECATED
|
| 104 |
+
XMLPUBFUN void
|
| 105 |
+
xmlSAX2EndElement (void *ctx,
|
| 106 |
+
const xmlChar *name);
|
| 107 |
+
XMLPUBFUN void
|
| 108 |
+
xmlSAX2StartElementNs (void *ctx,
|
| 109 |
+
const xmlChar *localname,
|
| 110 |
+
const xmlChar *prefix,
|
| 111 |
+
const xmlChar *URI,
|
| 112 |
+
int nb_namespaces,
|
| 113 |
+
const xmlChar **namespaces,
|
| 114 |
+
int nb_attributes,
|
| 115 |
+
int nb_defaulted,
|
| 116 |
+
const xmlChar **attributes);
|
| 117 |
+
XMLPUBFUN void
|
| 118 |
+
xmlSAX2EndElementNs (void *ctx,
|
| 119 |
+
const xmlChar *localname,
|
| 120 |
+
const xmlChar *prefix,
|
| 121 |
+
const xmlChar *URI);
|
| 122 |
+
XMLPUBFUN void
|
| 123 |
+
xmlSAX2Reference (void *ctx,
|
| 124 |
+
const xmlChar *name);
|
| 125 |
+
XMLPUBFUN void
|
| 126 |
+
xmlSAX2Characters (void *ctx,
|
| 127 |
+
const xmlChar *ch,
|
| 128 |
+
int len);
|
| 129 |
+
XMLPUBFUN void
|
| 130 |
+
xmlSAX2IgnorableWhitespace (void *ctx,
|
| 131 |
+
const xmlChar *ch,
|
| 132 |
+
int len);
|
| 133 |
+
XMLPUBFUN void
|
| 134 |
+
xmlSAX2ProcessingInstruction (void *ctx,
|
| 135 |
+
const xmlChar *target,
|
| 136 |
+
const xmlChar *data);
|
| 137 |
+
XMLPUBFUN void
|
| 138 |
+
xmlSAX2Comment (void *ctx,
|
| 139 |
+
const xmlChar *value);
|
| 140 |
+
XMLPUBFUN void
|
| 141 |
+
xmlSAX2CDataBlock (void *ctx,
|
| 142 |
+
const xmlChar *value,
|
| 143 |
+
int len);
|
| 144 |
+
|
| 145 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 146 |
+
XML_DEPRECATED
|
| 147 |
+
XMLPUBFUN int
|
| 148 |
+
xmlSAXDefaultVersion (int version);
|
| 149 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 150 |
+
|
| 151 |
+
XMLPUBFUN int
|
| 152 |
+
xmlSAXVersion (xmlSAXHandler *hdlr,
|
| 153 |
+
int version);
|
| 154 |
+
XMLPUBFUN void
|
| 155 |
+
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
|
| 156 |
+
int warning);
|
| 157 |
+
#ifdef LIBXML_HTML_ENABLED
|
| 158 |
+
XMLPUBFUN void
|
| 159 |
+
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
|
| 160 |
+
XML_DEPRECATED
|
| 161 |
+
XMLPUBFUN void
|
| 162 |
+
htmlDefaultSAXHandlerInit (void);
|
| 163 |
+
#endif
|
| 164 |
+
XML_DEPRECATED
|
| 165 |
+
XMLPUBFUN void
|
| 166 |
+
xmlDefaultSAXHandlerInit (void);
|
| 167 |
+
#ifdef __cplusplus
|
| 168 |
+
}
|
| 169 |
+
#endif
|
| 170 |
+
#endif /* __XML_SAX2_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__init__.py
ADDED
|
File without changes
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/c14n.h
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
|
| 3 |
+
* Description: the c14n modules provides a
|
| 4 |
+
*
|
| 5 |
+
* "Canonical XML" implementation
|
| 6 |
+
* http://www.w3.org/TR/xml-c14n
|
| 7 |
+
*
|
| 8 |
+
* and an
|
| 9 |
+
*
|
| 10 |
+
* "Exclusive XML Canonicalization" implementation
|
| 11 |
+
* http://www.w3.org/TR/xml-exc-c14n
|
| 12 |
+
|
| 13 |
+
* Copy: See Copyright for the status of this software.
|
| 14 |
+
*
|
| 15 |
+
* Author: Aleksey Sanin <aleksey@aleksey.com>
|
| 16 |
+
*/
|
| 17 |
+
#ifndef __XML_C14N_H__
|
| 18 |
+
#define __XML_C14N_H__
|
| 19 |
+
|
| 20 |
+
#include <libxml/xmlversion.h>
|
| 21 |
+
|
| 22 |
+
#ifdef LIBXML_C14N_ENABLED
|
| 23 |
+
|
| 24 |
+
#include <libxml/tree.h>
|
| 25 |
+
#include <libxml/xpath.h>
|
| 26 |
+
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif /* __cplusplus */
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
* XML Canonicalization
|
| 33 |
+
* http://www.w3.org/TR/xml-c14n
|
| 34 |
+
*
|
| 35 |
+
* Exclusive XML Canonicalization
|
| 36 |
+
* http://www.w3.org/TR/xml-exc-c14n
|
| 37 |
+
*
|
| 38 |
+
* Canonical form of an XML document could be created if and only if
|
| 39 |
+
* a) default attributes (if any) are added to all nodes
|
| 40 |
+
* b) all character and parsed entity references are resolved
|
| 41 |
+
* In order to achieve this in libxml2 the document MUST be loaded with
|
| 42 |
+
* following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
|
| 43 |
+
*/
|
| 44 |
+
|
| 45 |
+
/*
|
| 46 |
+
* xmlC14NMode:
|
| 47 |
+
*
|
| 48 |
+
* Predefined values for C14N modes
|
| 49 |
+
*
|
| 50 |
+
*/
|
| 51 |
+
typedef enum {
|
| 52 |
+
XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
|
| 53 |
+
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
|
| 54 |
+
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
|
| 55 |
+
} xmlC14NMode;
|
| 56 |
+
|
| 57 |
+
XMLPUBFUN int
|
| 58 |
+
xmlC14NDocSaveTo (xmlDocPtr doc,
|
| 59 |
+
xmlNodeSetPtr nodes,
|
| 60 |
+
int mode, /* a xmlC14NMode */
|
| 61 |
+
xmlChar **inclusive_ns_prefixes,
|
| 62 |
+
int with_comments,
|
| 63 |
+
xmlOutputBufferPtr buf);
|
| 64 |
+
|
| 65 |
+
XMLPUBFUN int
|
| 66 |
+
xmlC14NDocDumpMemory (xmlDocPtr doc,
|
| 67 |
+
xmlNodeSetPtr nodes,
|
| 68 |
+
int mode, /* a xmlC14NMode */
|
| 69 |
+
xmlChar **inclusive_ns_prefixes,
|
| 70 |
+
int with_comments,
|
| 71 |
+
xmlChar **doc_txt_ptr);
|
| 72 |
+
|
| 73 |
+
XMLPUBFUN int
|
| 74 |
+
xmlC14NDocSave (xmlDocPtr doc,
|
| 75 |
+
xmlNodeSetPtr nodes,
|
| 76 |
+
int mode, /* a xmlC14NMode */
|
| 77 |
+
xmlChar **inclusive_ns_prefixes,
|
| 78 |
+
int with_comments,
|
| 79 |
+
const char* filename,
|
| 80 |
+
int compression);
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* This is the core C14N function
|
| 85 |
+
*/
|
| 86 |
+
/**
|
| 87 |
+
* xmlC14NIsVisibleCallback:
|
| 88 |
+
* @user_data: user data
|
| 89 |
+
* @node: the current node
|
| 90 |
+
* @parent: the parent node
|
| 91 |
+
*
|
| 92 |
+
* Signature for a C14N callback on visible nodes
|
| 93 |
+
*
|
| 94 |
+
* Returns 1 if the node should be included
|
| 95 |
+
*/
|
| 96 |
+
typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
|
| 97 |
+
xmlNodePtr node,
|
| 98 |
+
xmlNodePtr parent);
|
| 99 |
+
|
| 100 |
+
XMLPUBFUN int
|
| 101 |
+
xmlC14NExecute (xmlDocPtr doc,
|
| 102 |
+
xmlC14NIsVisibleCallback is_visible_callback,
|
| 103 |
+
void* user_data,
|
| 104 |
+
int mode, /* a xmlC14NMode */
|
| 105 |
+
xmlChar **inclusive_ns_prefixes,
|
| 106 |
+
int with_comments,
|
| 107 |
+
xmlOutputBufferPtr buf);
|
| 108 |
+
|
| 109 |
+
#ifdef __cplusplus
|
| 110 |
+
}
|
| 111 |
+
#endif /* __cplusplus */
|
| 112 |
+
|
| 113 |
+
#endif /* LIBXML_C14N_ENABLED */
|
| 114 |
+
#endif /* __XML_C14N_H__ */
|
| 115 |
+
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/catalog.h
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Summary: interfaces to the Catalog handling system
|
| 3 |
+
* Description: the catalog module implements the support for
|
| 4 |
+
* XML Catalogs and SGML catalogs
|
| 5 |
+
*
|
| 6 |
+
* SGML Open Technical Resolution TR9401:1997.
|
| 7 |
+
* http://www.jclark.com/sp/catalog.htm
|
| 8 |
+
*
|
| 9 |
+
* XML Catalogs Working Draft 06 August 2001
|
| 10 |
+
* http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
|
| 11 |
+
*
|
| 12 |
+
* Copy: See Copyright for the status of this software.
|
| 13 |
+
*
|
| 14 |
+
* Author: Daniel Veillard
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#ifndef __XML_CATALOG_H__
|
| 18 |
+
#define __XML_CATALOG_H__
|
| 19 |
+
|
| 20 |
+
#include <stdio.h>
|
| 21 |
+
|
| 22 |
+
#include <libxml/xmlversion.h>
|
| 23 |
+
#include <libxml/xmlstring.h>
|
| 24 |
+
#include <libxml/tree.h>
|
| 25 |
+
|
| 26 |
+
#ifdef LIBXML_CATALOG_ENABLED
|
| 27 |
+
|
| 28 |
+
#ifdef __cplusplus
|
| 29 |
+
extern "C" {
|
| 30 |
+
#endif
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* XML_CATALOGS_NAMESPACE:
|
| 34 |
+
*
|
| 35 |
+
* The namespace for the XML Catalogs elements.
|
| 36 |
+
*/
|
| 37 |
+
#define XML_CATALOGS_NAMESPACE \
|
| 38 |
+
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
| 39 |
+
/**
|
| 40 |
+
* XML_CATALOG_PI:
|
| 41 |
+
*
|
| 42 |
+
* The specific XML Catalog Processing Instruction name.
|
| 43 |
+
*/
|
| 44 |
+
#define XML_CATALOG_PI \
|
| 45 |
+
(const xmlChar *) "oasis-xml-catalog"
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* The API is voluntarily limited to general cataloging.
|
| 49 |
+
*/
|
| 50 |
+
typedef enum {
|
| 51 |
+
XML_CATA_PREFER_NONE = 0,
|
| 52 |
+
XML_CATA_PREFER_PUBLIC = 1,
|
| 53 |
+
XML_CATA_PREFER_SYSTEM
|
| 54 |
+
} xmlCatalogPrefer;
|
| 55 |
+
|
| 56 |
+
typedef enum {
|
| 57 |
+
XML_CATA_ALLOW_NONE = 0,
|
| 58 |
+
XML_CATA_ALLOW_GLOBAL = 1,
|
| 59 |
+
XML_CATA_ALLOW_DOCUMENT = 2,
|
| 60 |
+
XML_CATA_ALLOW_ALL = 3
|
| 61 |
+
} xmlCatalogAllow;
|
| 62 |
+
|
| 63 |
+
typedef struct _xmlCatalog xmlCatalog;
|
| 64 |
+
typedef xmlCatalog *xmlCatalogPtr;
|
| 65 |
+
|
| 66 |
+
/*
|
| 67 |
+
* Operations on a given catalog.
|
| 68 |
+
*/
|
| 69 |
+
XMLPUBFUN xmlCatalogPtr
|
| 70 |
+
xmlNewCatalog (int sgml);
|
| 71 |
+
XMLPUBFUN xmlCatalogPtr
|
| 72 |
+
xmlLoadACatalog (const char *filename);
|
| 73 |
+
XMLPUBFUN xmlCatalogPtr
|
| 74 |
+
xmlLoadSGMLSuperCatalog (const char *filename);
|
| 75 |
+
XMLPUBFUN int
|
| 76 |
+
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
| 77 |
+
XMLPUBFUN int
|
| 78 |
+
xmlACatalogAdd (xmlCatalogPtr catal,
|
| 79 |
+
const xmlChar *type,
|
| 80 |
+
const xmlChar *orig,
|
| 81 |
+
const xmlChar *replace);
|
| 82 |
+
XMLPUBFUN int
|
| 83 |
+
xmlACatalogRemove (xmlCatalogPtr catal,
|
| 84 |
+
const xmlChar *value);
|
| 85 |
+
XMLPUBFUN xmlChar *
|
| 86 |
+
xmlACatalogResolve (xmlCatalogPtr catal,
|
| 87 |
+
const xmlChar *pubID,
|
| 88 |
+
const xmlChar *sysID);
|
| 89 |
+
XMLPUBFUN xmlChar *
|
| 90 |
+
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
| 91 |
+
const xmlChar *sysID);
|
| 92 |
+
XMLPUBFUN xmlChar *
|
| 93 |
+
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
| 94 |
+
const xmlChar *pubID);
|
| 95 |
+
XMLPUBFUN xmlChar *
|
| 96 |
+
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
| 97 |
+
const xmlChar *URI);
|
| 98 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 99 |
+
XMLPUBFUN void
|
| 100 |
+
xmlACatalogDump (xmlCatalogPtr catal,
|
| 101 |
+
FILE *out);
|
| 102 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 103 |
+
XMLPUBFUN void
|
| 104 |
+
xmlFreeCatalog (xmlCatalogPtr catal);
|
| 105 |
+
XMLPUBFUN int
|
| 106 |
+
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
| 107 |
+
|
| 108 |
+
/*
|
| 109 |
+
* Global operations.
|
| 110 |
+
*/
|
| 111 |
+
XMLPUBFUN void
|
| 112 |
+
xmlInitializeCatalog (void);
|
| 113 |
+
XMLPUBFUN int
|
| 114 |
+
xmlLoadCatalog (const char *filename);
|
| 115 |
+
XMLPUBFUN void
|
| 116 |
+
xmlLoadCatalogs (const char *paths);
|
| 117 |
+
XMLPUBFUN void
|
| 118 |
+
xmlCatalogCleanup (void);
|
| 119 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 120 |
+
XMLPUBFUN void
|
| 121 |
+
xmlCatalogDump (FILE *out);
|
| 122 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 123 |
+
XMLPUBFUN xmlChar *
|
| 124 |
+
xmlCatalogResolve (const xmlChar *pubID,
|
| 125 |
+
const xmlChar *sysID);
|
| 126 |
+
XMLPUBFUN xmlChar *
|
| 127 |
+
xmlCatalogResolveSystem (const xmlChar *sysID);
|
| 128 |
+
XMLPUBFUN xmlChar *
|
| 129 |
+
xmlCatalogResolvePublic (const xmlChar *pubID);
|
| 130 |
+
XMLPUBFUN xmlChar *
|
| 131 |
+
xmlCatalogResolveURI (const xmlChar *URI);
|
| 132 |
+
XMLPUBFUN int
|
| 133 |
+
xmlCatalogAdd (const xmlChar *type,
|
| 134 |
+
const xmlChar *orig,
|
| 135 |
+
const xmlChar *replace);
|
| 136 |
+
XMLPUBFUN int
|
| 137 |
+
xmlCatalogRemove (const xmlChar *value);
|
| 138 |
+
XMLPUBFUN xmlDocPtr
|
| 139 |
+
xmlParseCatalogFile (const char *filename);
|
| 140 |
+
XMLPUBFUN int
|
| 141 |
+
xmlCatalogConvert (void);
|
| 142 |
+
|
| 143 |
+
/*
|
| 144 |
+
* Strictly minimal interfaces for per-document catalogs used
|
| 145 |
+
* by the parser.
|
| 146 |
+
*/
|
| 147 |
+
XMLPUBFUN void
|
| 148 |
+
xmlCatalogFreeLocal (void *catalogs);
|
| 149 |
+
XMLPUBFUN void *
|
| 150 |
+
xmlCatalogAddLocal (void *catalogs,
|
| 151 |
+
const xmlChar *URL);
|
| 152 |
+
XMLPUBFUN xmlChar *
|
| 153 |
+
xmlCatalogLocalResolve (void *catalogs,
|
| 154 |
+
const xmlChar *pubID,
|
| 155 |
+
const xmlChar *sysID);
|
| 156 |
+
XMLPUBFUN xmlChar *
|
| 157 |
+
xmlCatalogLocalResolveURI(void *catalogs,
|
| 158 |
+
const xmlChar *URI);
|
| 159 |
+
/*
|
| 160 |
+
* Preference settings.
|
| 161 |
+
*/
|
| 162 |
+
XMLPUBFUN int
|
| 163 |
+
xmlCatalogSetDebug (int level);
|
| 164 |
+
XML_DEPRECATED
|
| 165 |
+
XMLPUBFUN xmlCatalogPrefer
|
| 166 |
+
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
| 167 |
+
XMLPUBFUN void
|
| 168 |
+
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
| 169 |
+
XMLPUBFUN xmlCatalogAllow
|
| 170 |
+
xmlCatalogGetDefaults (void);
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
/* DEPRECATED interfaces */
|
| 174 |
+
XMLPUBFUN const xmlChar *
|
| 175 |
+
xmlCatalogGetSystem (const xmlChar *sysID);
|
| 176 |
+
XMLPUBFUN const xmlChar *
|
| 177 |
+
xmlCatalogGetPublic (const xmlChar *pubID);
|
| 178 |
+
|
| 179 |
+
#ifdef __cplusplus
|
| 180 |
+
}
|
| 181 |
+
#endif
|
| 182 |
+
#endif /* LIBXML_CATALOG_ENABLED */
|
| 183 |
+
#endif /* __XML_CATALOG_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/chvalid.h
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Unicode character range checking
|
| 3 |
+
* Description: this module exports interfaces for the character
|
| 4 |
+
* range validation APIs
|
| 5 |
+
*
|
| 6 |
+
* This file is automatically generated from the cvs source
|
| 7 |
+
* definition files using the genChRanges.py Python script
|
| 8 |
+
*
|
| 9 |
+
* Generation date: Mon Mar 27 11:09:48 2006
|
| 10 |
+
* Sources: chvalid.def
|
| 11 |
+
* Author: William Brack <wbrack@mmm.com.hk>
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef __XML_CHVALID_H__
|
| 15 |
+
#define __XML_CHVALID_H__
|
| 16 |
+
|
| 17 |
+
#include <libxml/xmlversion.h>
|
| 18 |
+
#include <libxml/xmlstring.h>
|
| 19 |
+
|
| 20 |
+
#ifdef __cplusplus
|
| 21 |
+
extern "C" {
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
* Define our typedefs and structures
|
| 26 |
+
*
|
| 27 |
+
*/
|
| 28 |
+
typedef struct _xmlChSRange xmlChSRange;
|
| 29 |
+
typedef xmlChSRange *xmlChSRangePtr;
|
| 30 |
+
struct _xmlChSRange {
|
| 31 |
+
unsigned short low;
|
| 32 |
+
unsigned short high;
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
typedef struct _xmlChLRange xmlChLRange;
|
| 36 |
+
typedef xmlChLRange *xmlChLRangePtr;
|
| 37 |
+
struct _xmlChLRange {
|
| 38 |
+
unsigned int low;
|
| 39 |
+
unsigned int high;
|
| 40 |
+
};
|
| 41 |
+
|
| 42 |
+
typedef struct _xmlChRangeGroup xmlChRangeGroup;
|
| 43 |
+
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
|
| 44 |
+
struct _xmlChRangeGroup {
|
| 45 |
+
int nbShortRange;
|
| 46 |
+
int nbLongRange;
|
| 47 |
+
const xmlChSRange *shortRange; /* points to an array of ranges */
|
| 48 |
+
const xmlChLRange *longRange;
|
| 49 |
+
};
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Range checking routine
|
| 53 |
+
*/
|
| 54 |
+
XMLPUBFUN int
|
| 55 |
+
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
/**
|
| 59 |
+
* xmlIsBaseChar_ch:
|
| 60 |
+
* @c: char to validate
|
| 61 |
+
*
|
| 62 |
+
* Automatically generated by genChRanges.py
|
| 63 |
+
*/
|
| 64 |
+
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
| 65 |
+
((0x61 <= (c)) && ((c) <= 0x7a)) || \
|
| 66 |
+
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
|
| 67 |
+
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
|
| 68 |
+
(0xf8 <= (c)))
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* xmlIsBaseCharQ:
|
| 72 |
+
* @c: char to validate
|
| 73 |
+
*
|
| 74 |
+
* Automatically generated by genChRanges.py
|
| 75 |
+
*/
|
| 76 |
+
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
|
| 77 |
+
xmlIsBaseChar_ch((c)) : \
|
| 78 |
+
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
| 79 |
+
|
| 80 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
|
| 81 |
+
|
| 82 |
+
/**
|
| 83 |
+
* xmlIsBlank_ch:
|
| 84 |
+
* @c: char to validate
|
| 85 |
+
*
|
| 86 |
+
* Automatically generated by genChRanges.py
|
| 87 |
+
*/
|
| 88 |
+
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
|
| 89 |
+
((0x9 <= (c)) && ((c) <= 0xa)) || \
|
| 90 |
+
((c) == 0xd))
|
| 91 |
+
|
| 92 |
+
/**
|
| 93 |
+
* xmlIsBlankQ:
|
| 94 |
+
* @c: char to validate
|
| 95 |
+
*
|
| 96 |
+
* Automatically generated by genChRanges.py
|
| 97 |
+
*/
|
| 98 |
+
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
|
| 99 |
+
xmlIsBlank_ch((c)) : 0)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
/**
|
| 103 |
+
* xmlIsChar_ch:
|
| 104 |
+
* @c: char to validate
|
| 105 |
+
*
|
| 106 |
+
* Automatically generated by genChRanges.py
|
| 107 |
+
*/
|
| 108 |
+
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
|
| 109 |
+
((c) == 0xd) || \
|
| 110 |
+
(0x20 <= (c)))
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* xmlIsCharQ:
|
| 114 |
+
* @c: char to validate
|
| 115 |
+
*
|
| 116 |
+
* Automatically generated by genChRanges.py
|
| 117 |
+
*/
|
| 118 |
+
#define xmlIsCharQ(c) (((c) < 0x100) ? \
|
| 119 |
+
xmlIsChar_ch((c)) :\
|
| 120 |
+
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
|
| 121 |
+
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
| 122 |
+
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
| 123 |
+
|
| 124 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
|
| 125 |
+
|
| 126 |
+
/**
|
| 127 |
+
* xmlIsCombiningQ:
|
| 128 |
+
* @c: char to validate
|
| 129 |
+
*
|
| 130 |
+
* Automatically generated by genChRanges.py
|
| 131 |
+
*/
|
| 132 |
+
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
|
| 133 |
+
0 : \
|
| 134 |
+
xmlCharInRange((c), &xmlIsCombiningGroup))
|
| 135 |
+
|
| 136 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
|
| 137 |
+
|
| 138 |
+
/**
|
| 139 |
+
* xmlIsDigit_ch:
|
| 140 |
+
* @c: char to validate
|
| 141 |
+
*
|
| 142 |
+
* Automatically generated by genChRanges.py
|
| 143 |
+
*/
|
| 144 |
+
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
|
| 145 |
+
|
| 146 |
+
/**
|
| 147 |
+
* xmlIsDigitQ:
|
| 148 |
+
* @c: char to validate
|
| 149 |
+
*
|
| 150 |
+
* Automatically generated by genChRanges.py
|
| 151 |
+
*/
|
| 152 |
+
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
|
| 153 |
+
xmlIsDigit_ch((c)) : \
|
| 154 |
+
xmlCharInRange((c), &xmlIsDigitGroup))
|
| 155 |
+
|
| 156 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* xmlIsExtender_ch:
|
| 160 |
+
* @c: char to validate
|
| 161 |
+
*
|
| 162 |
+
* Automatically generated by genChRanges.py
|
| 163 |
+
*/
|
| 164 |
+
#define xmlIsExtender_ch(c) (((c) == 0xb7))
|
| 165 |
+
|
| 166 |
+
/**
|
| 167 |
+
* xmlIsExtenderQ:
|
| 168 |
+
* @c: char to validate
|
| 169 |
+
*
|
| 170 |
+
* Automatically generated by genChRanges.py
|
| 171 |
+
*/
|
| 172 |
+
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
|
| 173 |
+
xmlIsExtender_ch((c)) : \
|
| 174 |
+
xmlCharInRange((c), &xmlIsExtenderGroup))
|
| 175 |
+
|
| 176 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
|
| 177 |
+
|
| 178 |
+
/**
|
| 179 |
+
* xmlIsIdeographicQ:
|
| 180 |
+
* @c: char to validate
|
| 181 |
+
*
|
| 182 |
+
* Automatically generated by genChRanges.py
|
| 183 |
+
*/
|
| 184 |
+
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
|
| 185 |
+
0 :\
|
| 186 |
+
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
|
| 187 |
+
((c) == 0x3007) || \
|
| 188 |
+
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
| 189 |
+
|
| 190 |
+
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
|
| 191 |
+
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
| 192 |
+
|
| 193 |
+
/**
|
| 194 |
+
* xmlIsPubidChar_ch:
|
| 195 |
+
* @c: char to validate
|
| 196 |
+
*
|
| 197 |
+
* Automatically generated by genChRanges.py
|
| 198 |
+
*/
|
| 199 |
+
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
|
| 200 |
+
|
| 201 |
+
/**
|
| 202 |
+
* xmlIsPubidCharQ:
|
| 203 |
+
* @c: char to validate
|
| 204 |
+
*
|
| 205 |
+
* Automatically generated by genChRanges.py
|
| 206 |
+
*/
|
| 207 |
+
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
|
| 208 |
+
xmlIsPubidChar_ch((c)) : 0)
|
| 209 |
+
|
| 210 |
+
XMLPUBFUN int
|
| 211 |
+
xmlIsBaseChar(unsigned int ch);
|
| 212 |
+
XMLPUBFUN int
|
| 213 |
+
xmlIsBlank(unsigned int ch);
|
| 214 |
+
XMLPUBFUN int
|
| 215 |
+
xmlIsChar(unsigned int ch);
|
| 216 |
+
XMLPUBFUN int
|
| 217 |
+
xmlIsCombining(unsigned int ch);
|
| 218 |
+
XMLPUBFUN int
|
| 219 |
+
xmlIsDigit(unsigned int ch);
|
| 220 |
+
XMLPUBFUN int
|
| 221 |
+
xmlIsExtender(unsigned int ch);
|
| 222 |
+
XMLPUBFUN int
|
| 223 |
+
xmlIsIdeographic(unsigned int ch);
|
| 224 |
+
XMLPUBFUN int
|
| 225 |
+
xmlIsPubidChar(unsigned int ch);
|
| 226 |
+
|
| 227 |
+
#ifdef __cplusplus
|
| 228 |
+
}
|
| 229 |
+
#endif
|
| 230 |
+
#endif /* __XML_CHVALID_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/debugXML.h
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Tree debugging APIs
|
| 3 |
+
* Description: Interfaces to a set of routines used for debugging the tree
|
| 4 |
+
* produced by the XML parser.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __DEBUG_XML__
|
| 12 |
+
#define __DEBUG_XML__
|
| 13 |
+
#include <stdio.h>
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
#include <libxml/tree.h>
|
| 16 |
+
|
| 17 |
+
#ifdef LIBXML_DEBUG_ENABLED
|
| 18 |
+
|
| 19 |
+
#include <libxml/xpath.h>
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* The standard Dump routines.
|
| 27 |
+
*/
|
| 28 |
+
XMLPUBFUN void
|
| 29 |
+
xmlDebugDumpString (FILE *output,
|
| 30 |
+
const xmlChar *str);
|
| 31 |
+
XMLPUBFUN void
|
| 32 |
+
xmlDebugDumpAttr (FILE *output,
|
| 33 |
+
xmlAttrPtr attr,
|
| 34 |
+
int depth);
|
| 35 |
+
XMLPUBFUN void
|
| 36 |
+
xmlDebugDumpAttrList (FILE *output,
|
| 37 |
+
xmlAttrPtr attr,
|
| 38 |
+
int depth);
|
| 39 |
+
XMLPUBFUN void
|
| 40 |
+
xmlDebugDumpOneNode (FILE *output,
|
| 41 |
+
xmlNodePtr node,
|
| 42 |
+
int depth);
|
| 43 |
+
XMLPUBFUN void
|
| 44 |
+
xmlDebugDumpNode (FILE *output,
|
| 45 |
+
xmlNodePtr node,
|
| 46 |
+
int depth);
|
| 47 |
+
XMLPUBFUN void
|
| 48 |
+
xmlDebugDumpNodeList (FILE *output,
|
| 49 |
+
xmlNodePtr node,
|
| 50 |
+
int depth);
|
| 51 |
+
XMLPUBFUN void
|
| 52 |
+
xmlDebugDumpDocumentHead(FILE *output,
|
| 53 |
+
xmlDocPtr doc);
|
| 54 |
+
XMLPUBFUN void
|
| 55 |
+
xmlDebugDumpDocument (FILE *output,
|
| 56 |
+
xmlDocPtr doc);
|
| 57 |
+
XMLPUBFUN void
|
| 58 |
+
xmlDebugDumpDTD (FILE *output,
|
| 59 |
+
xmlDtdPtr dtd);
|
| 60 |
+
XMLPUBFUN void
|
| 61 |
+
xmlDebugDumpEntities (FILE *output,
|
| 62 |
+
xmlDocPtr doc);
|
| 63 |
+
|
| 64 |
+
/****************************************************************
|
| 65 |
+
* *
|
| 66 |
+
* Checking routines *
|
| 67 |
+
* *
|
| 68 |
+
****************************************************************/
|
| 69 |
+
|
| 70 |
+
XMLPUBFUN int
|
| 71 |
+
xmlDebugCheckDocument (FILE * output,
|
| 72 |
+
xmlDocPtr doc);
|
| 73 |
+
|
| 74 |
+
#ifdef __cplusplus
|
| 75 |
+
}
|
| 76 |
+
#endif
|
| 77 |
+
|
| 78 |
+
#endif /* LIBXML_DEBUG_ENABLED */
|
| 79 |
+
#endif /* __DEBUG_XML__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/dict.h
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: string dictionary
|
| 3 |
+
* Description: dictionary of reusable strings, just used to avoid allocation
|
| 4 |
+
* and freeing operations.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_DICT_H__
|
| 12 |
+
#define __XML_DICT_H__
|
| 13 |
+
|
| 14 |
+
#include <stddef.h>
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#include <libxml/xmlstring.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* The dictionary.
|
| 24 |
+
*/
|
| 25 |
+
typedef struct _xmlDict xmlDict;
|
| 26 |
+
typedef xmlDict *xmlDictPtr;
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* Initializer
|
| 30 |
+
*/
|
| 31 |
+
XML_DEPRECATED
|
| 32 |
+
XMLPUBFUN int xmlInitializeDict(void);
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Constructor and destructor.
|
| 36 |
+
*/
|
| 37 |
+
XMLPUBFUN xmlDictPtr
|
| 38 |
+
xmlDictCreate (void);
|
| 39 |
+
XMLPUBFUN size_t
|
| 40 |
+
xmlDictSetLimit (xmlDictPtr dict,
|
| 41 |
+
size_t limit);
|
| 42 |
+
XMLPUBFUN size_t
|
| 43 |
+
xmlDictGetUsage (xmlDictPtr dict);
|
| 44 |
+
XMLPUBFUN xmlDictPtr
|
| 45 |
+
xmlDictCreateSub(xmlDictPtr sub);
|
| 46 |
+
XMLPUBFUN int
|
| 47 |
+
xmlDictReference(xmlDictPtr dict);
|
| 48 |
+
XMLPUBFUN void
|
| 49 |
+
xmlDictFree (xmlDictPtr dict);
|
| 50 |
+
|
| 51 |
+
/*
|
| 52 |
+
* Lookup of entry in the dictionary.
|
| 53 |
+
*/
|
| 54 |
+
XMLPUBFUN const xmlChar *
|
| 55 |
+
xmlDictLookup (xmlDictPtr dict,
|
| 56 |
+
const xmlChar *name,
|
| 57 |
+
int len);
|
| 58 |
+
XMLPUBFUN const xmlChar *
|
| 59 |
+
xmlDictExists (xmlDictPtr dict,
|
| 60 |
+
const xmlChar *name,
|
| 61 |
+
int len);
|
| 62 |
+
XMLPUBFUN const xmlChar *
|
| 63 |
+
xmlDictQLookup (xmlDictPtr dict,
|
| 64 |
+
const xmlChar *prefix,
|
| 65 |
+
const xmlChar *name);
|
| 66 |
+
XMLPUBFUN int
|
| 67 |
+
xmlDictOwns (xmlDictPtr dict,
|
| 68 |
+
const xmlChar *str);
|
| 69 |
+
XMLPUBFUN int
|
| 70 |
+
xmlDictSize (xmlDictPtr dict);
|
| 71 |
+
|
| 72 |
+
/*
|
| 73 |
+
* Cleanup function
|
| 74 |
+
*/
|
| 75 |
+
XML_DEPRECATED
|
| 76 |
+
XMLPUBFUN void
|
| 77 |
+
xmlDictCleanup (void);
|
| 78 |
+
|
| 79 |
+
#ifdef __cplusplus
|
| 80 |
+
}
|
| 81 |
+
#endif
|
| 82 |
+
#endif /* ! __XML_DICT_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/encoding.h
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: interface for the encoding conversion functions
|
| 3 |
+
* Description: interface for the encoding conversion functions needed for
|
| 4 |
+
* XML basic encoding and iconv() support.
|
| 5 |
+
*
|
| 6 |
+
* Related specs are
|
| 7 |
+
* rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
|
| 8 |
+
* [ISO-10646] UTF-8 and UTF-16 in Annexes
|
| 9 |
+
* [ISO-8859-1] ISO Latin-1 characters codes.
|
| 10 |
+
* [UNICODE] The Unicode Consortium, "The Unicode Standard --
|
| 11 |
+
* Worldwide Character Encoding -- Version 1.0", Addison-
|
| 12 |
+
* Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
|
| 13 |
+
* described in Unicode Technical Report #4.
|
| 14 |
+
* [US-ASCII] Coded Character Set--7-bit American Standard Code for
|
| 15 |
+
* Information Interchange, ANSI X3.4-1986.
|
| 16 |
+
*
|
| 17 |
+
* Copy: See Copyright for the status of this software.
|
| 18 |
+
*
|
| 19 |
+
* Author: Daniel Veillard
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#ifndef __XML_CHAR_ENCODING_H__
|
| 23 |
+
#define __XML_CHAR_ENCODING_H__
|
| 24 |
+
|
| 25 |
+
#include <libxml/xmlversion.h>
|
| 26 |
+
#include <libxml/xmlerror.h>
|
| 27 |
+
|
| 28 |
+
#ifdef __cplusplus
|
| 29 |
+
extern "C" {
|
| 30 |
+
#endif
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* Backward compatibility
|
| 34 |
+
*/
|
| 35 |
+
#define UTF8Toisolat1 xmlUTF8ToIsolat1
|
| 36 |
+
#define isolat1ToUTF8 xmlIsolat1ToUTF8
|
| 37 |
+
|
| 38 |
+
typedef enum {
|
| 39 |
+
XML_ENC_ERR_SUCCESS = 0,
|
| 40 |
+
XML_ENC_ERR_INTERNAL = -1,
|
| 41 |
+
XML_ENC_ERR_INPUT = -2,
|
| 42 |
+
XML_ENC_ERR_SPACE = -3,
|
| 43 |
+
XML_ENC_ERR_MEMORY = -4
|
| 44 |
+
} xmlCharEncError;
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* xmlCharEncoding:
|
| 48 |
+
*
|
| 49 |
+
* Predefined values for some standard encodings.
|
| 50 |
+
*/
|
| 51 |
+
typedef enum {
|
| 52 |
+
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
|
| 53 |
+
XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
|
| 54 |
+
XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
|
| 55 |
+
XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
|
| 56 |
+
XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
|
| 57 |
+
XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
|
| 58 |
+
XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
|
| 59 |
+
XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
|
| 60 |
+
XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
|
| 61 |
+
XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
|
| 62 |
+
XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
|
| 63 |
+
XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
|
| 64 |
+
XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
|
| 65 |
+
XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
|
| 66 |
+
XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
|
| 67 |
+
XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
|
| 68 |
+
XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
|
| 69 |
+
XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
|
| 70 |
+
XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
|
| 71 |
+
XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
|
| 72 |
+
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
|
| 73 |
+
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
|
| 74 |
+
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
|
| 75 |
+
XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
|
| 76 |
+
/* Available since 2.14.0 */
|
| 77 |
+
XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
|
| 78 |
+
XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
|
| 79 |
+
XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
|
| 80 |
+
XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
|
| 81 |
+
XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
|
| 82 |
+
XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
|
| 83 |
+
XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
|
| 84 |
+
XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
|
| 85 |
+
} xmlCharEncoding;
|
| 86 |
+
|
| 87 |
+
typedef enum {
|
| 88 |
+
XML_ENC_INPUT = (1 << 0),
|
| 89 |
+
XML_ENC_OUTPUT = (1 << 1)
|
| 90 |
+
} xmlCharEncFlags;
|
| 91 |
+
|
| 92 |
+
/**
|
| 93 |
+
* xmlCharEncodingInputFunc:
|
| 94 |
+
* @out: a pointer to an array of bytes to store the UTF-8 result
|
| 95 |
+
* @outlen: the length of @out
|
| 96 |
+
* @in: a pointer to an array of chars in the original encoding
|
| 97 |
+
* @inlen: the length of @in
|
| 98 |
+
*
|
| 99 |
+
* Convert characters to UTF-8.
|
| 100 |
+
*
|
| 101 |
+
* On success, the value of @inlen after return is the number of
|
| 102 |
+
* bytes consumed and @outlen is the number of bytes produced.
|
| 103 |
+
*
|
| 104 |
+
* Returns the number of bytes written or an XML_ENC_ERR code.
|
| 105 |
+
*/
|
| 106 |
+
typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
| 107 |
+
const unsigned char *in, int *inlen);
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
/**
|
| 111 |
+
* xmlCharEncodingOutputFunc:
|
| 112 |
+
* @out: a pointer to an array of bytes to store the result
|
| 113 |
+
* @outlen: the length of @out
|
| 114 |
+
* @in: a pointer to an array of UTF-8 chars
|
| 115 |
+
* @inlen: the length of @in
|
| 116 |
+
*
|
| 117 |
+
* Convert characters from UTF-8.
|
| 118 |
+
*
|
| 119 |
+
* On success, the value of @inlen after return is the number of
|
| 120 |
+
* bytes consumed and @outlen is the number of bytes produced.
|
| 121 |
+
*
|
| 122 |
+
* Returns the number of bytes written or an XML_ENC_ERR code.
|
| 123 |
+
*/
|
| 124 |
+
typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
| 125 |
+
const unsigned char *in, int *inlen);
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* xmlCharEncConvFunc:
|
| 130 |
+
* @vctxt: conversion context
|
| 131 |
+
* @out: a pointer to an array of bytes to store the result
|
| 132 |
+
* @outlen: the length of @out
|
| 133 |
+
* @in: a pointer to an array of input bytes
|
| 134 |
+
* @inlen: the length of @in
|
| 135 |
+
* @flush: end of input
|
| 136 |
+
*
|
| 137 |
+
* Convert between character encodings.
|
| 138 |
+
*
|
| 139 |
+
* The value of @inlen after return is the number of bytes consumed
|
| 140 |
+
* and @outlen is the number of bytes produced.
|
| 141 |
+
*
|
| 142 |
+
* If the converter can consume partial multi-byte sequences, the
|
| 143 |
+
* @flush flag can be used to detect truncated sequences at EOF.
|
| 144 |
+
* Otherwise, the flag can be ignored.
|
| 145 |
+
*
|
| 146 |
+
* Returns an XML_ENC_ERR code.
|
| 147 |
+
*/
|
| 148 |
+
typedef xmlCharEncError
|
| 149 |
+
(*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
|
| 150 |
+
const unsigned char *in, int *inlen, int flush);
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* xmlCharEncConvCtxtDtor:
|
| 154 |
+
* @vctxt: conversion context
|
| 155 |
+
*
|
| 156 |
+
* Free a conversion context.
|
| 157 |
+
*/
|
| 158 |
+
typedef void
|
| 159 |
+
(*xmlCharEncConvCtxtDtor)(void *vctxt);
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* Block defining the handlers for non UTF-8 encodings.
|
| 163 |
+
*
|
| 164 |
+
* This structure will be made private.
|
| 165 |
+
*/
|
| 166 |
+
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
|
| 167 |
+
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
|
| 168 |
+
struct _xmlCharEncodingHandler {
|
| 169 |
+
char *name XML_DEPRECATED_MEMBER;
|
| 170 |
+
union {
|
| 171 |
+
xmlCharEncConvFunc func;
|
| 172 |
+
xmlCharEncodingInputFunc legacyFunc;
|
| 173 |
+
} input XML_DEPRECATED_MEMBER;
|
| 174 |
+
union {
|
| 175 |
+
xmlCharEncConvFunc func;
|
| 176 |
+
xmlCharEncodingOutputFunc legacyFunc;
|
| 177 |
+
} output XML_DEPRECATED_MEMBER;
|
| 178 |
+
void *inputCtxt XML_DEPRECATED_MEMBER;
|
| 179 |
+
void *outputCtxt XML_DEPRECATED_MEMBER;
|
| 180 |
+
xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
|
| 181 |
+
int flags XML_DEPRECATED_MEMBER;
|
| 182 |
+
};
|
| 183 |
+
|
| 184 |
+
/**
|
| 185 |
+
* xmlCharEncConvImpl:
|
| 186 |
+
* @vctxt: user data
|
| 187 |
+
* @name: encoding name
|
| 188 |
+
* @flags: bit mask of flags
|
| 189 |
+
* @out: pointer to resulting handler
|
| 190 |
+
*
|
| 191 |
+
* If this function returns XML_ERR_OK, it must fill the @out
|
| 192 |
+
* pointer with an encoding handler. The handler can be obtained
|
| 193 |
+
* from xmlCharEncNewCustomHandler.
|
| 194 |
+
*
|
| 195 |
+
* @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
|
| 196 |
+
*
|
| 197 |
+
* Returns an xmlParserErrors code.
|
| 198 |
+
*/
|
| 199 |
+
typedef xmlParserErrors
|
| 200 |
+
(*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
|
| 201 |
+
xmlCharEncodingHandler **out);
|
| 202 |
+
|
| 203 |
+
/*
|
| 204 |
+
* Interfaces for encoding handlers.
|
| 205 |
+
*/
|
| 206 |
+
XML_DEPRECATED
|
| 207 |
+
XMLPUBFUN void
|
| 208 |
+
xmlInitCharEncodingHandlers (void);
|
| 209 |
+
XML_DEPRECATED
|
| 210 |
+
XMLPUBFUN void
|
| 211 |
+
xmlCleanupCharEncodingHandlers (void);
|
| 212 |
+
XMLPUBFUN void
|
| 213 |
+
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
| 214 |
+
XMLPUBFUN xmlParserErrors
|
| 215 |
+
xmlLookupCharEncodingHandler (xmlCharEncoding enc,
|
| 216 |
+
xmlCharEncodingHandlerPtr *out);
|
| 217 |
+
XMLPUBFUN xmlParserErrors
|
| 218 |
+
xmlOpenCharEncodingHandler (const char *name,
|
| 219 |
+
int output,
|
| 220 |
+
xmlCharEncodingHandlerPtr *out);
|
| 221 |
+
XMLPUBFUN xmlParserErrors
|
| 222 |
+
xmlCreateCharEncodingHandler (const char *name,
|
| 223 |
+
xmlCharEncFlags flags,
|
| 224 |
+
xmlCharEncConvImpl impl,
|
| 225 |
+
void *implCtxt,
|
| 226 |
+
xmlCharEncodingHandlerPtr *out);
|
| 227 |
+
XMLPUBFUN xmlCharEncodingHandlerPtr
|
| 228 |
+
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
| 229 |
+
XMLPUBFUN xmlCharEncodingHandlerPtr
|
| 230 |
+
xmlFindCharEncodingHandler (const char *name);
|
| 231 |
+
XMLPUBFUN xmlCharEncodingHandlerPtr
|
| 232 |
+
xmlNewCharEncodingHandler (const char *name,
|
| 233 |
+
xmlCharEncodingInputFunc input,
|
| 234 |
+
xmlCharEncodingOutputFunc output);
|
| 235 |
+
XMLPUBFUN xmlParserErrors
|
| 236 |
+
xmlCharEncNewCustomHandler (const char *name,
|
| 237 |
+
xmlCharEncConvFunc input,
|
| 238 |
+
xmlCharEncConvFunc output,
|
| 239 |
+
xmlCharEncConvCtxtDtor ctxtDtor,
|
| 240 |
+
void *inputCtxt,
|
| 241 |
+
void *outputCtxt,
|
| 242 |
+
xmlCharEncodingHandler **out);
|
| 243 |
+
|
| 244 |
+
/*
|
| 245 |
+
* Interfaces for encoding names and aliases.
|
| 246 |
+
*/
|
| 247 |
+
XMLPUBFUN int
|
| 248 |
+
xmlAddEncodingAlias (const char *name,
|
| 249 |
+
const char *alias);
|
| 250 |
+
XMLPUBFUN int
|
| 251 |
+
xmlDelEncodingAlias (const char *alias);
|
| 252 |
+
XMLPUBFUN const char *
|
| 253 |
+
xmlGetEncodingAlias (const char *alias);
|
| 254 |
+
XMLPUBFUN void
|
| 255 |
+
xmlCleanupEncodingAliases (void);
|
| 256 |
+
XMLPUBFUN xmlCharEncoding
|
| 257 |
+
xmlParseCharEncoding (const char *name);
|
| 258 |
+
XMLPUBFUN const char *
|
| 259 |
+
xmlGetCharEncodingName (xmlCharEncoding enc);
|
| 260 |
+
|
| 261 |
+
/*
|
| 262 |
+
* Interfaces directly used by the parsers.
|
| 263 |
+
*/
|
| 264 |
+
XMLPUBFUN xmlCharEncoding
|
| 265 |
+
xmlDetectCharEncoding (const unsigned char *in,
|
| 266 |
+
int len);
|
| 267 |
+
|
| 268 |
+
/** DOC_DISABLE */
|
| 269 |
+
struct _xmlBuffer;
|
| 270 |
+
/** DOC_ENABLE */
|
| 271 |
+
XMLPUBFUN int
|
| 272 |
+
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
| 273 |
+
struct _xmlBuffer *out,
|
| 274 |
+
struct _xmlBuffer *in);
|
| 275 |
+
|
| 276 |
+
XMLPUBFUN int
|
| 277 |
+
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
| 278 |
+
struct _xmlBuffer *out,
|
| 279 |
+
struct _xmlBuffer *in);
|
| 280 |
+
XML_DEPRECATED
|
| 281 |
+
XMLPUBFUN int
|
| 282 |
+
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
| 283 |
+
struct _xmlBuffer *out,
|
| 284 |
+
struct _xmlBuffer *in);
|
| 285 |
+
XMLPUBFUN int
|
| 286 |
+
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
|
| 287 |
+
|
| 288 |
+
/*
|
| 289 |
+
* Export a few useful functions
|
| 290 |
+
*/
|
| 291 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 292 |
+
XMLPUBFUN int
|
| 293 |
+
xmlUTF8ToIsolat1 (unsigned char *out,
|
| 294 |
+
int *outlen,
|
| 295 |
+
const unsigned char *in,
|
| 296 |
+
int *inlen);
|
| 297 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 298 |
+
XMLPUBFUN int
|
| 299 |
+
xmlIsolat1ToUTF8 (unsigned char *out,
|
| 300 |
+
int *outlen,
|
| 301 |
+
const unsigned char *in,
|
| 302 |
+
int *inlen);
|
| 303 |
+
#ifdef __cplusplus
|
| 304 |
+
}
|
| 305 |
+
#endif
|
| 306 |
+
|
| 307 |
+
#endif /* __XML_CHAR_ENCODING_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/entities.h
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: interface for the XML entities handling
|
| 3 |
+
* Description: this module provides some of the entity API needed
|
| 4 |
+
* for the parser and applications.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_ENTITIES_H__
|
| 12 |
+
#define __XML_ENTITIES_H__
|
| 13 |
+
|
| 14 |
+
/** DOC_DISABLE */
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#define XML_TREE_INTERNALS
|
| 17 |
+
#include <libxml/tree.h>
|
| 18 |
+
#undef XML_TREE_INTERNALS
|
| 19 |
+
/** DOC_ENABLE */
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* The different valid entity types.
|
| 27 |
+
*/
|
| 28 |
+
typedef enum {
|
| 29 |
+
XML_INTERNAL_GENERAL_ENTITY = 1,
|
| 30 |
+
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
|
| 31 |
+
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
|
| 32 |
+
XML_INTERNAL_PARAMETER_ENTITY = 4,
|
| 33 |
+
XML_EXTERNAL_PARAMETER_ENTITY = 5,
|
| 34 |
+
XML_INTERNAL_PREDEFINED_ENTITY = 6
|
| 35 |
+
} xmlEntityType;
|
| 36 |
+
|
| 37 |
+
/*
|
| 38 |
+
* An unit of storage for an entity, contains the string, the value
|
| 39 |
+
* and the linkind data needed for the linking in the hash table.
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
struct _xmlEntity {
|
| 43 |
+
void *_private; /* application data */
|
| 44 |
+
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
|
| 45 |
+
const xmlChar *name; /* Entity name */
|
| 46 |
+
struct _xmlNode *children; /* First child link */
|
| 47 |
+
struct _xmlNode *last; /* Last child link */
|
| 48 |
+
struct _xmlDtd *parent; /* -> DTD */
|
| 49 |
+
struct _xmlNode *next; /* next sibling link */
|
| 50 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 51 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 52 |
+
|
| 53 |
+
xmlChar *orig; /* content without ref substitution */
|
| 54 |
+
xmlChar *content; /* content or ndata if unparsed */
|
| 55 |
+
int length; /* the content length */
|
| 56 |
+
xmlEntityType etype; /* The entity type */
|
| 57 |
+
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
| 58 |
+
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
| 59 |
+
|
| 60 |
+
struct _xmlEntity *nexte; /* unused */
|
| 61 |
+
const xmlChar *URI; /* the full URI as computed */
|
| 62 |
+
int owner; /* unused */
|
| 63 |
+
int flags; /* various flags */
|
| 64 |
+
unsigned long expandedSize; /* expanded size */
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* All entities are stored in an hash table.
|
| 69 |
+
* There is 2 separate hash tables for global and parameter entities.
|
| 70 |
+
*/
|
| 71 |
+
|
| 72 |
+
typedef struct _xmlHashTable xmlEntitiesTable;
|
| 73 |
+
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
| 74 |
+
|
| 75 |
+
/*
|
| 76 |
+
* External functions:
|
| 77 |
+
*/
|
| 78 |
+
|
| 79 |
+
XMLPUBFUN xmlEntityPtr
|
| 80 |
+
xmlNewEntity (xmlDocPtr doc,
|
| 81 |
+
const xmlChar *name,
|
| 82 |
+
int type,
|
| 83 |
+
const xmlChar *ExternalID,
|
| 84 |
+
const xmlChar *SystemID,
|
| 85 |
+
const xmlChar *content);
|
| 86 |
+
XMLPUBFUN void
|
| 87 |
+
xmlFreeEntity (xmlEntityPtr entity);
|
| 88 |
+
XMLPUBFUN int
|
| 89 |
+
xmlAddEntity (xmlDocPtr doc,
|
| 90 |
+
int extSubset,
|
| 91 |
+
const xmlChar *name,
|
| 92 |
+
int type,
|
| 93 |
+
const xmlChar *ExternalID,
|
| 94 |
+
const xmlChar *SystemID,
|
| 95 |
+
const xmlChar *content,
|
| 96 |
+
xmlEntityPtr *out);
|
| 97 |
+
XMLPUBFUN xmlEntityPtr
|
| 98 |
+
xmlAddDocEntity (xmlDocPtr doc,
|
| 99 |
+
const xmlChar *name,
|
| 100 |
+
int type,
|
| 101 |
+
const xmlChar *ExternalID,
|
| 102 |
+
const xmlChar *SystemID,
|
| 103 |
+
const xmlChar *content);
|
| 104 |
+
XMLPUBFUN xmlEntityPtr
|
| 105 |
+
xmlAddDtdEntity (xmlDocPtr doc,
|
| 106 |
+
const xmlChar *name,
|
| 107 |
+
int type,
|
| 108 |
+
const xmlChar *ExternalID,
|
| 109 |
+
const xmlChar *SystemID,
|
| 110 |
+
const xmlChar *content);
|
| 111 |
+
XMLPUBFUN xmlEntityPtr
|
| 112 |
+
xmlGetPredefinedEntity (const xmlChar *name);
|
| 113 |
+
XMLPUBFUN xmlEntityPtr
|
| 114 |
+
xmlGetDocEntity (const xmlDoc *doc,
|
| 115 |
+
const xmlChar *name);
|
| 116 |
+
XMLPUBFUN xmlEntityPtr
|
| 117 |
+
xmlGetDtdEntity (xmlDocPtr doc,
|
| 118 |
+
const xmlChar *name);
|
| 119 |
+
XMLPUBFUN xmlEntityPtr
|
| 120 |
+
xmlGetParameterEntity (xmlDocPtr doc,
|
| 121 |
+
const xmlChar *name);
|
| 122 |
+
XMLPUBFUN xmlChar *
|
| 123 |
+
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
| 124 |
+
const xmlChar *input);
|
| 125 |
+
XMLPUBFUN xmlChar *
|
| 126 |
+
xmlEncodeSpecialChars (const xmlDoc *doc,
|
| 127 |
+
const xmlChar *input);
|
| 128 |
+
XMLPUBFUN xmlEntitiesTablePtr
|
| 129 |
+
xmlCreateEntitiesTable (void);
|
| 130 |
+
XMLPUBFUN xmlEntitiesTablePtr
|
| 131 |
+
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
| 132 |
+
XMLPUBFUN void
|
| 133 |
+
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
| 134 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 135 |
+
XMLPUBFUN void
|
| 136 |
+
xmlDumpEntitiesTable (xmlBufferPtr buf,
|
| 137 |
+
xmlEntitiesTablePtr table);
|
| 138 |
+
XMLPUBFUN void
|
| 139 |
+
xmlDumpEntityDecl (xmlBufferPtr buf,
|
| 140 |
+
xmlEntityPtr ent);
|
| 141 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 142 |
+
|
| 143 |
+
#ifdef __cplusplus
|
| 144 |
+
}
|
| 145 |
+
#endif
|
| 146 |
+
|
| 147 |
+
# endif /* __XML_ENTITIES_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/globals.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: interface for all global variables of the library
|
| 3 |
+
* Description: Deprecated, don't use
|
| 4 |
+
*
|
| 5 |
+
* Copy: See Copyright for the status of this software.
|
| 6 |
+
*/
|
| 7 |
+
|
| 8 |
+
#ifndef __XML_GLOBALS_H
|
| 9 |
+
#define __XML_GLOBALS_H
|
| 10 |
+
|
| 11 |
+
#include <libxml/xmlversion.h>
|
| 12 |
+
|
| 13 |
+
/*
|
| 14 |
+
* This file was required to access global variables until version v2.12.0.
|
| 15 |
+
*
|
| 16 |
+
* These includes are for backward compatibility.
|
| 17 |
+
*/
|
| 18 |
+
#include <libxml/HTMLparser.h>
|
| 19 |
+
#include <libxml/parser.h>
|
| 20 |
+
#include <libxml/xmlerror.h>
|
| 21 |
+
#include <libxml/xmlIO.h>
|
| 22 |
+
#include <libxml/xmlsave.h>
|
| 23 |
+
#include <libxml/threads.h>
|
| 24 |
+
|
| 25 |
+
#endif /* __XML_GLOBALS_H */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/hash.h
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Chained hash tables
|
| 3 |
+
* Description: This module implements the hash table support used in
|
| 4 |
+
* various places in the library.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Bjorn Reese <bjorn.reese@systematic.dk>
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_HASH_H__
|
| 12 |
+
#define __XML_HASH_H__
|
| 13 |
+
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
#include <libxml/dict.h>
|
| 16 |
+
#include <libxml/xmlstring.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* The hash table.
|
| 24 |
+
*/
|
| 25 |
+
typedef struct _xmlHashTable xmlHashTable;
|
| 26 |
+
typedef xmlHashTable *xmlHashTablePtr;
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* Recent version of gcc produce a warning when a function pointer is assigned
|
| 30 |
+
* to an object pointer, or vice versa. The following macro is a dirty hack
|
| 31 |
+
* to allow suppression of the warning. If your architecture has function
|
| 32 |
+
* pointers which are a different size than a void pointer, there may be some
|
| 33 |
+
* serious trouble within the library.
|
| 34 |
+
*/
|
| 35 |
+
/**
|
| 36 |
+
* XML_CAST_FPTR:
|
| 37 |
+
* @fptr: pointer to a function
|
| 38 |
+
*
|
| 39 |
+
* Macro to do a casting from an object pointer to a
|
| 40 |
+
* function pointer without encountering a warning from
|
| 41 |
+
* gcc
|
| 42 |
+
*
|
| 43 |
+
* #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
|
| 44 |
+
* This macro violated ISO C aliasing rules (gcc4 on s390 broke)
|
| 45 |
+
* so it is disabled now
|
| 46 |
+
*/
|
| 47 |
+
|
| 48 |
+
#define XML_CAST_FPTR(fptr) fptr
|
| 49 |
+
|
| 50 |
+
/*
|
| 51 |
+
* function types:
|
| 52 |
+
*/
|
| 53 |
+
/**
|
| 54 |
+
* xmlHashDeallocator:
|
| 55 |
+
* @payload: the data in the hash
|
| 56 |
+
* @name: the name associated
|
| 57 |
+
*
|
| 58 |
+
* Callback to free data from a hash.
|
| 59 |
+
*/
|
| 60 |
+
typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name);
|
| 61 |
+
/**
|
| 62 |
+
* xmlHashCopier:
|
| 63 |
+
* @payload: the data in the hash
|
| 64 |
+
* @name: the name associated
|
| 65 |
+
*
|
| 66 |
+
* Callback to copy data from a hash.
|
| 67 |
+
*
|
| 68 |
+
* Returns a copy of the data or NULL in case of error.
|
| 69 |
+
*/
|
| 70 |
+
typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name);
|
| 71 |
+
/**
|
| 72 |
+
* xmlHashScanner:
|
| 73 |
+
* @payload: the data in the hash
|
| 74 |
+
* @data: extra scanner data
|
| 75 |
+
* @name: the name associated
|
| 76 |
+
*
|
| 77 |
+
* Callback when scanning data in a hash with the simple scanner.
|
| 78 |
+
*/
|
| 79 |
+
typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name);
|
| 80 |
+
/**
|
| 81 |
+
* xmlHashScannerFull:
|
| 82 |
+
* @payload: the data in the hash
|
| 83 |
+
* @data: extra scanner data
|
| 84 |
+
* @name: the name associated
|
| 85 |
+
* @name2: the second name associated
|
| 86 |
+
* @name3: the third name associated
|
| 87 |
+
*
|
| 88 |
+
* Callback when scanning data in a hash with the full scanner.
|
| 89 |
+
*/
|
| 90 |
+
typedef void (*xmlHashScannerFull)(void *payload, void *data,
|
| 91 |
+
const xmlChar *name, const xmlChar *name2,
|
| 92 |
+
const xmlChar *name3);
|
| 93 |
+
|
| 94 |
+
/*
|
| 95 |
+
* Constructor and destructor.
|
| 96 |
+
*/
|
| 97 |
+
XMLPUBFUN xmlHashTablePtr
|
| 98 |
+
xmlHashCreate (int size);
|
| 99 |
+
XMLPUBFUN xmlHashTablePtr
|
| 100 |
+
xmlHashCreateDict (int size,
|
| 101 |
+
xmlDictPtr dict);
|
| 102 |
+
XMLPUBFUN void
|
| 103 |
+
xmlHashFree (xmlHashTablePtr hash,
|
| 104 |
+
xmlHashDeallocator dealloc);
|
| 105 |
+
XMLPUBFUN void
|
| 106 |
+
xmlHashDefaultDeallocator(void *entry,
|
| 107 |
+
const xmlChar *name);
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* Add a new entry to the hash table.
|
| 111 |
+
*/
|
| 112 |
+
XMLPUBFUN int
|
| 113 |
+
xmlHashAdd (xmlHashTablePtr hash,
|
| 114 |
+
const xmlChar *name,
|
| 115 |
+
void *userdata);
|
| 116 |
+
XMLPUBFUN int
|
| 117 |
+
xmlHashAddEntry (xmlHashTablePtr hash,
|
| 118 |
+
const xmlChar *name,
|
| 119 |
+
void *userdata);
|
| 120 |
+
XMLPUBFUN int
|
| 121 |
+
xmlHashUpdateEntry (xmlHashTablePtr hash,
|
| 122 |
+
const xmlChar *name,
|
| 123 |
+
void *userdata,
|
| 124 |
+
xmlHashDeallocator dealloc);
|
| 125 |
+
XMLPUBFUN int
|
| 126 |
+
xmlHashAdd2 (xmlHashTablePtr hash,
|
| 127 |
+
const xmlChar *name,
|
| 128 |
+
const xmlChar *name2,
|
| 129 |
+
void *userdata);
|
| 130 |
+
XMLPUBFUN int
|
| 131 |
+
xmlHashAddEntry2 (xmlHashTablePtr hash,
|
| 132 |
+
const xmlChar *name,
|
| 133 |
+
const xmlChar *name2,
|
| 134 |
+
void *userdata);
|
| 135 |
+
XMLPUBFUN int
|
| 136 |
+
xmlHashUpdateEntry2 (xmlHashTablePtr hash,
|
| 137 |
+
const xmlChar *name,
|
| 138 |
+
const xmlChar *name2,
|
| 139 |
+
void *userdata,
|
| 140 |
+
xmlHashDeallocator dealloc);
|
| 141 |
+
XMLPUBFUN int
|
| 142 |
+
xmlHashAdd3 (xmlHashTablePtr hash,
|
| 143 |
+
const xmlChar *name,
|
| 144 |
+
const xmlChar *name2,
|
| 145 |
+
const xmlChar *name3,
|
| 146 |
+
void *userdata);
|
| 147 |
+
XMLPUBFUN int
|
| 148 |
+
xmlHashAddEntry3 (xmlHashTablePtr hash,
|
| 149 |
+
const xmlChar *name,
|
| 150 |
+
const xmlChar *name2,
|
| 151 |
+
const xmlChar *name3,
|
| 152 |
+
void *userdata);
|
| 153 |
+
XMLPUBFUN int
|
| 154 |
+
xmlHashUpdateEntry3 (xmlHashTablePtr hash,
|
| 155 |
+
const xmlChar *name,
|
| 156 |
+
const xmlChar *name2,
|
| 157 |
+
const xmlChar *name3,
|
| 158 |
+
void *userdata,
|
| 159 |
+
xmlHashDeallocator dealloc);
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* Remove an entry from the hash table.
|
| 163 |
+
*/
|
| 164 |
+
XMLPUBFUN int
|
| 165 |
+
xmlHashRemoveEntry (xmlHashTablePtr hash,
|
| 166 |
+
const xmlChar *name,
|
| 167 |
+
xmlHashDeallocator dealloc);
|
| 168 |
+
XMLPUBFUN int
|
| 169 |
+
xmlHashRemoveEntry2 (xmlHashTablePtr hash,
|
| 170 |
+
const xmlChar *name,
|
| 171 |
+
const xmlChar *name2,
|
| 172 |
+
xmlHashDeallocator dealloc);
|
| 173 |
+
XMLPUBFUN int
|
| 174 |
+
xmlHashRemoveEntry3 (xmlHashTablePtr hash,
|
| 175 |
+
const xmlChar *name,
|
| 176 |
+
const xmlChar *name2,
|
| 177 |
+
const xmlChar *name3,
|
| 178 |
+
xmlHashDeallocator dealloc);
|
| 179 |
+
|
| 180 |
+
/*
|
| 181 |
+
* Retrieve the payload.
|
| 182 |
+
*/
|
| 183 |
+
XMLPUBFUN void *
|
| 184 |
+
xmlHashLookup (xmlHashTablePtr hash,
|
| 185 |
+
const xmlChar *name);
|
| 186 |
+
XMLPUBFUN void *
|
| 187 |
+
xmlHashLookup2 (xmlHashTablePtr hash,
|
| 188 |
+
const xmlChar *name,
|
| 189 |
+
const xmlChar *name2);
|
| 190 |
+
XMLPUBFUN void *
|
| 191 |
+
xmlHashLookup3 (xmlHashTablePtr hash,
|
| 192 |
+
const xmlChar *name,
|
| 193 |
+
const xmlChar *name2,
|
| 194 |
+
const xmlChar *name3);
|
| 195 |
+
XMLPUBFUN void *
|
| 196 |
+
xmlHashQLookup (xmlHashTablePtr hash,
|
| 197 |
+
const xmlChar *prefix,
|
| 198 |
+
const xmlChar *name);
|
| 199 |
+
XMLPUBFUN void *
|
| 200 |
+
xmlHashQLookup2 (xmlHashTablePtr hash,
|
| 201 |
+
const xmlChar *prefix,
|
| 202 |
+
const xmlChar *name,
|
| 203 |
+
const xmlChar *prefix2,
|
| 204 |
+
const xmlChar *name2);
|
| 205 |
+
XMLPUBFUN void *
|
| 206 |
+
xmlHashQLookup3 (xmlHashTablePtr hash,
|
| 207 |
+
const xmlChar *prefix,
|
| 208 |
+
const xmlChar *name,
|
| 209 |
+
const xmlChar *prefix2,
|
| 210 |
+
const xmlChar *name2,
|
| 211 |
+
const xmlChar *prefix3,
|
| 212 |
+
const xmlChar *name3);
|
| 213 |
+
|
| 214 |
+
/*
|
| 215 |
+
* Helpers.
|
| 216 |
+
*/
|
| 217 |
+
XMLPUBFUN xmlHashTablePtr
|
| 218 |
+
xmlHashCopySafe (xmlHashTablePtr hash,
|
| 219 |
+
xmlHashCopier copy,
|
| 220 |
+
xmlHashDeallocator dealloc);
|
| 221 |
+
XMLPUBFUN xmlHashTablePtr
|
| 222 |
+
xmlHashCopy (xmlHashTablePtr hash,
|
| 223 |
+
xmlHashCopier copy);
|
| 224 |
+
XMLPUBFUN int
|
| 225 |
+
xmlHashSize (xmlHashTablePtr hash);
|
| 226 |
+
XMLPUBFUN void
|
| 227 |
+
xmlHashScan (xmlHashTablePtr hash,
|
| 228 |
+
xmlHashScanner scan,
|
| 229 |
+
void *data);
|
| 230 |
+
XMLPUBFUN void
|
| 231 |
+
xmlHashScan3 (xmlHashTablePtr hash,
|
| 232 |
+
const xmlChar *name,
|
| 233 |
+
const xmlChar *name2,
|
| 234 |
+
const xmlChar *name3,
|
| 235 |
+
xmlHashScanner scan,
|
| 236 |
+
void *data);
|
| 237 |
+
XMLPUBFUN void
|
| 238 |
+
xmlHashScanFull (xmlHashTablePtr hash,
|
| 239 |
+
xmlHashScannerFull scan,
|
| 240 |
+
void *data);
|
| 241 |
+
XMLPUBFUN void
|
| 242 |
+
xmlHashScanFull3 (xmlHashTablePtr hash,
|
| 243 |
+
const xmlChar *name,
|
| 244 |
+
const xmlChar *name2,
|
| 245 |
+
const xmlChar *name3,
|
| 246 |
+
xmlHashScannerFull scan,
|
| 247 |
+
void *data);
|
| 248 |
+
#ifdef __cplusplus
|
| 249 |
+
}
|
| 250 |
+
#endif
|
| 251 |
+
#endif /* ! __XML_HASH_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/list.h
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: lists interfaces
|
| 3 |
+
* Description: this module implement the list support used in
|
| 4 |
+
* various place in the library.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Gary Pennington <Gary.Pennington@uk.sun.com>
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_LINK_INCLUDE__
|
| 12 |
+
#define __XML_LINK_INCLUDE__
|
| 13 |
+
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
|
| 16 |
+
#ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
typedef struct _xmlLink xmlLink;
|
| 21 |
+
typedef xmlLink *xmlLinkPtr;
|
| 22 |
+
|
| 23 |
+
typedef struct _xmlList xmlList;
|
| 24 |
+
typedef xmlList *xmlListPtr;
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* xmlListDeallocator:
|
| 28 |
+
* @lk: the data to deallocate
|
| 29 |
+
*
|
| 30 |
+
* Callback function used to free data from a list.
|
| 31 |
+
*/
|
| 32 |
+
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
|
| 33 |
+
/**
|
| 34 |
+
* xmlListDataCompare:
|
| 35 |
+
* @data0: the first data
|
| 36 |
+
* @data1: the second data
|
| 37 |
+
*
|
| 38 |
+
* Callback function used to compare 2 data.
|
| 39 |
+
*
|
| 40 |
+
* Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
|
| 41 |
+
*/
|
| 42 |
+
typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
|
| 43 |
+
/**
|
| 44 |
+
* xmlListWalker:
|
| 45 |
+
* @data: the data found in the list
|
| 46 |
+
* @user: extra user provided data to the walker
|
| 47 |
+
*
|
| 48 |
+
* Callback function used when walking a list with xmlListWalk().
|
| 49 |
+
*
|
| 50 |
+
* Returns 0 to stop walking the list, 1 otherwise.
|
| 51 |
+
*/
|
| 52 |
+
typedef int (*xmlListWalker) (const void *data, void *user);
|
| 53 |
+
|
| 54 |
+
/* Creation/Deletion */
|
| 55 |
+
XMLPUBFUN xmlListPtr
|
| 56 |
+
xmlListCreate (xmlListDeallocator deallocator,
|
| 57 |
+
xmlListDataCompare compare);
|
| 58 |
+
XMLPUBFUN void
|
| 59 |
+
xmlListDelete (xmlListPtr l);
|
| 60 |
+
|
| 61 |
+
/* Basic Operators */
|
| 62 |
+
XMLPUBFUN void *
|
| 63 |
+
xmlListSearch (xmlListPtr l,
|
| 64 |
+
void *data);
|
| 65 |
+
XMLPUBFUN void *
|
| 66 |
+
xmlListReverseSearch (xmlListPtr l,
|
| 67 |
+
void *data);
|
| 68 |
+
XMLPUBFUN int
|
| 69 |
+
xmlListInsert (xmlListPtr l,
|
| 70 |
+
void *data) ;
|
| 71 |
+
XMLPUBFUN int
|
| 72 |
+
xmlListAppend (xmlListPtr l,
|
| 73 |
+
void *data) ;
|
| 74 |
+
XMLPUBFUN int
|
| 75 |
+
xmlListRemoveFirst (xmlListPtr l,
|
| 76 |
+
void *data);
|
| 77 |
+
XMLPUBFUN int
|
| 78 |
+
xmlListRemoveLast (xmlListPtr l,
|
| 79 |
+
void *data);
|
| 80 |
+
XMLPUBFUN int
|
| 81 |
+
xmlListRemoveAll (xmlListPtr l,
|
| 82 |
+
void *data);
|
| 83 |
+
XMLPUBFUN void
|
| 84 |
+
xmlListClear (xmlListPtr l);
|
| 85 |
+
XMLPUBFUN int
|
| 86 |
+
xmlListEmpty (xmlListPtr l);
|
| 87 |
+
XMLPUBFUN xmlLinkPtr
|
| 88 |
+
xmlListFront (xmlListPtr l);
|
| 89 |
+
XMLPUBFUN xmlLinkPtr
|
| 90 |
+
xmlListEnd (xmlListPtr l);
|
| 91 |
+
XMLPUBFUN int
|
| 92 |
+
xmlListSize (xmlListPtr l);
|
| 93 |
+
|
| 94 |
+
XMLPUBFUN void
|
| 95 |
+
xmlListPopFront (xmlListPtr l);
|
| 96 |
+
XMLPUBFUN void
|
| 97 |
+
xmlListPopBack (xmlListPtr l);
|
| 98 |
+
XMLPUBFUN int
|
| 99 |
+
xmlListPushFront (xmlListPtr l,
|
| 100 |
+
void *data);
|
| 101 |
+
XMLPUBFUN int
|
| 102 |
+
xmlListPushBack (xmlListPtr l,
|
| 103 |
+
void *data);
|
| 104 |
+
|
| 105 |
+
/* Advanced Operators */
|
| 106 |
+
XMLPUBFUN void
|
| 107 |
+
xmlListReverse (xmlListPtr l);
|
| 108 |
+
XMLPUBFUN void
|
| 109 |
+
xmlListSort (xmlListPtr l);
|
| 110 |
+
XMLPUBFUN void
|
| 111 |
+
xmlListWalk (xmlListPtr l,
|
| 112 |
+
xmlListWalker walker,
|
| 113 |
+
void *user);
|
| 114 |
+
XMLPUBFUN void
|
| 115 |
+
xmlListReverseWalk (xmlListPtr l,
|
| 116 |
+
xmlListWalker walker,
|
| 117 |
+
void *user);
|
| 118 |
+
XMLPUBFUN void
|
| 119 |
+
xmlListMerge (xmlListPtr l1,
|
| 120 |
+
xmlListPtr l2);
|
| 121 |
+
XMLPUBFUN xmlListPtr
|
| 122 |
+
xmlListDup (xmlListPtr old);
|
| 123 |
+
XMLPUBFUN int
|
| 124 |
+
xmlListCopy (xmlListPtr cur,
|
| 125 |
+
xmlListPtr old);
|
| 126 |
+
/* Link operators */
|
| 127 |
+
XMLPUBFUN void *
|
| 128 |
+
xmlLinkGetData (xmlLinkPtr lk);
|
| 129 |
+
|
| 130 |
+
/* xmlListUnique() */
|
| 131 |
+
/* xmlListSwap */
|
| 132 |
+
|
| 133 |
+
#ifdef __cplusplus
|
| 134 |
+
}
|
| 135 |
+
#endif
|
| 136 |
+
|
| 137 |
+
#endif /* __XML_LINK_INCLUDE__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanoftp.h
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: Removed legacy symbols for an outdated FTP client
|
| 3 |
+
*
|
| 4 |
+
* Copy: See Copyright for the status of this software.
|
| 5 |
+
*
|
| 6 |
+
* Author: Daniel Veillard
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
#ifndef __NANO_FTP_H__
|
| 10 |
+
#define __NANO_FTP_H__
|
| 11 |
+
|
| 12 |
+
#ifdef __GNUC__
|
| 13 |
+
#warning "libxml/nanoftp.h is deprecated"
|
| 14 |
+
#endif
|
| 15 |
+
|
| 16 |
+
#endif /* __NANO_FTP_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanohttp.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: minimal HTTP implementation
|
| 3 |
+
* Description: minimal HTTP implementation allowing to fetch resources
|
| 4 |
+
* like external subset.
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __NANO_HTTP_H__
|
| 12 |
+
#define __NANO_HTTP_H__
|
| 13 |
+
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
|
| 16 |
+
#ifdef LIBXML_HTTP_ENABLED
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
XML_DEPRECATED
|
| 22 |
+
XMLPUBFUN void
|
| 23 |
+
xmlNanoHTTPInit (void);
|
| 24 |
+
XML_DEPRECATED
|
| 25 |
+
XMLPUBFUN void
|
| 26 |
+
xmlNanoHTTPCleanup (void);
|
| 27 |
+
XML_DEPRECATED
|
| 28 |
+
XMLPUBFUN void
|
| 29 |
+
xmlNanoHTTPScanProxy (const char *URL);
|
| 30 |
+
XML_DEPRECATED
|
| 31 |
+
XMLPUBFUN int
|
| 32 |
+
xmlNanoHTTPFetch (const char *URL,
|
| 33 |
+
const char *filename,
|
| 34 |
+
char **contentType);
|
| 35 |
+
XML_DEPRECATED
|
| 36 |
+
XMLPUBFUN void *
|
| 37 |
+
xmlNanoHTTPMethod (const char *URL,
|
| 38 |
+
const char *method,
|
| 39 |
+
const char *input,
|
| 40 |
+
char **contentType,
|
| 41 |
+
const char *headers,
|
| 42 |
+
int ilen);
|
| 43 |
+
XML_DEPRECATED
|
| 44 |
+
XMLPUBFUN void *
|
| 45 |
+
xmlNanoHTTPMethodRedir (const char *URL,
|
| 46 |
+
const char *method,
|
| 47 |
+
const char *input,
|
| 48 |
+
char **contentType,
|
| 49 |
+
char **redir,
|
| 50 |
+
const char *headers,
|
| 51 |
+
int ilen);
|
| 52 |
+
XML_DEPRECATED
|
| 53 |
+
XMLPUBFUN void *
|
| 54 |
+
xmlNanoHTTPOpen (const char *URL,
|
| 55 |
+
char **contentType);
|
| 56 |
+
XML_DEPRECATED
|
| 57 |
+
XMLPUBFUN void *
|
| 58 |
+
xmlNanoHTTPOpenRedir (const char *URL,
|
| 59 |
+
char **contentType,
|
| 60 |
+
char **redir);
|
| 61 |
+
XML_DEPRECATED
|
| 62 |
+
XMLPUBFUN int
|
| 63 |
+
xmlNanoHTTPReturnCode (void *ctx);
|
| 64 |
+
XML_DEPRECATED
|
| 65 |
+
XMLPUBFUN const char *
|
| 66 |
+
xmlNanoHTTPAuthHeader (void *ctx);
|
| 67 |
+
XML_DEPRECATED
|
| 68 |
+
XMLPUBFUN const char *
|
| 69 |
+
xmlNanoHTTPRedir (void *ctx);
|
| 70 |
+
XML_DEPRECATED
|
| 71 |
+
XMLPUBFUN int
|
| 72 |
+
xmlNanoHTTPContentLength( void * ctx );
|
| 73 |
+
XML_DEPRECATED
|
| 74 |
+
XMLPUBFUN const char *
|
| 75 |
+
xmlNanoHTTPEncoding (void *ctx);
|
| 76 |
+
XML_DEPRECATED
|
| 77 |
+
XMLPUBFUN const char *
|
| 78 |
+
xmlNanoHTTPMimeType (void *ctx);
|
| 79 |
+
XML_DEPRECATED
|
| 80 |
+
XMLPUBFUN int
|
| 81 |
+
xmlNanoHTTPRead (void *ctx,
|
| 82 |
+
void *dest,
|
| 83 |
+
int len);
|
| 84 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 85 |
+
XML_DEPRECATED
|
| 86 |
+
XMLPUBFUN int
|
| 87 |
+
xmlNanoHTTPSave (void *ctxt,
|
| 88 |
+
const char *filename);
|
| 89 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 90 |
+
XML_DEPRECATED
|
| 91 |
+
XMLPUBFUN void
|
| 92 |
+
xmlNanoHTTPClose (void *ctx);
|
| 93 |
+
#ifdef __cplusplus
|
| 94 |
+
}
|
| 95 |
+
#endif
|
| 96 |
+
|
| 97 |
+
#endif /* LIBXML_HTTP_ENABLED */
|
| 98 |
+
#endif /* __NANO_HTTP_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parser.h
ADDED
|
@@ -0,0 +1,1633 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: the core parser module
|
| 3 |
+
* Description: Interfaces, constants and types related to the XML parser
|
| 4 |
+
*
|
| 5 |
+
* Copy: See Copyright for the status of this software.
|
| 6 |
+
*
|
| 7 |
+
* Author: Daniel Veillard
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef __XML_PARSER_H__
|
| 11 |
+
#define __XML_PARSER_H__
|
| 12 |
+
|
| 13 |
+
/** DOC_DISABLE */
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
#define XML_TREE_INTERNALS
|
| 16 |
+
#include <libxml/tree.h>
|
| 17 |
+
#undef XML_TREE_INTERNALS
|
| 18 |
+
#include <libxml/dict.h>
|
| 19 |
+
#include <libxml/hash.h>
|
| 20 |
+
#include <libxml/valid.h>
|
| 21 |
+
#include <libxml/entities.h>
|
| 22 |
+
#include <libxml/xmlerror.h>
|
| 23 |
+
#include <libxml/xmlstring.h>
|
| 24 |
+
#include <libxml/xmlmemory.h>
|
| 25 |
+
#include <libxml/encoding.h>
|
| 26 |
+
#include <libxml/xmlIO.h>
|
| 27 |
+
/* for compatibility */
|
| 28 |
+
#include <libxml/SAX2.h>
|
| 29 |
+
#include <libxml/threads.h>
|
| 30 |
+
/** DOC_ENABLE */
|
| 31 |
+
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* XML_DEFAULT_VERSION:
|
| 38 |
+
*
|
| 39 |
+
* The default version of XML used: 1.0
|
| 40 |
+
*/
|
| 41 |
+
#define XML_DEFAULT_VERSION "1.0"
|
| 42 |
+
|
| 43 |
+
typedef enum {
|
| 44 |
+
XML_STATUS_NOT_WELL_FORMED = (1 << 0),
|
| 45 |
+
XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
|
| 46 |
+
XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
|
| 47 |
+
XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
|
| 48 |
+
} xmlParserStatus;
|
| 49 |
+
|
| 50 |
+
typedef enum {
|
| 51 |
+
XML_RESOURCE_UNKNOWN = 0,
|
| 52 |
+
XML_RESOURCE_MAIN_DOCUMENT,
|
| 53 |
+
XML_RESOURCE_DTD,
|
| 54 |
+
XML_RESOURCE_GENERAL_ENTITY,
|
| 55 |
+
XML_RESOURCE_PARAMETER_ENTITY,
|
| 56 |
+
XML_RESOURCE_XINCLUDE,
|
| 57 |
+
XML_RESOURCE_XINCLUDE_TEXT
|
| 58 |
+
} xmlResourceType;
|
| 59 |
+
|
| 60 |
+
typedef enum {
|
| 61 |
+
XML_INPUT_BUF_STATIC = (1 << 1),
|
| 62 |
+
XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
|
| 63 |
+
XML_INPUT_UNZIP = (1 << 3),
|
| 64 |
+
XML_INPUT_NETWORK = (1 << 4)
|
| 65 |
+
} xmlParserInputFlags;
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* xmlParserInput:
|
| 69 |
+
*
|
| 70 |
+
* An xmlParserInput is an input flow for the XML processor.
|
| 71 |
+
* Each entity parsed is associated an xmlParserInput (except the
|
| 72 |
+
* few predefined ones). This is the case both for internal entities
|
| 73 |
+
* - in which case the flow is already completely in memory - or
|
| 74 |
+
* external entities - in which case we use the buf structure for
|
| 75 |
+
* progressive reading and I18N conversions to the internal UTF-8 format.
|
| 76 |
+
*/
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* xmlParserInputDeallocate:
|
| 80 |
+
* @str: the string to deallocate
|
| 81 |
+
*
|
| 82 |
+
* Callback for freeing some parser input allocations.
|
| 83 |
+
*/
|
| 84 |
+
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
|
| 85 |
+
|
| 86 |
+
struct _xmlParserInput {
|
| 87 |
+
/* Input buffer */
|
| 88 |
+
xmlParserInputBufferPtr buf;
|
| 89 |
+
/* The file analyzed, if any */
|
| 90 |
+
const char *filename;
|
| 91 |
+
/* unused */
|
| 92 |
+
const char *directory XML_DEPRECATED_MEMBER;
|
| 93 |
+
/* Base of the array to parse */
|
| 94 |
+
const xmlChar *base;
|
| 95 |
+
/* Current char being parsed */
|
| 96 |
+
const xmlChar *cur;
|
| 97 |
+
/* end of the array to parse */
|
| 98 |
+
const xmlChar *end;
|
| 99 |
+
/* unused */
|
| 100 |
+
int length XML_DEPRECATED_MEMBER;
|
| 101 |
+
/* Current line */
|
| 102 |
+
int line;
|
| 103 |
+
/* Current column */
|
| 104 |
+
int col;
|
| 105 |
+
/* How many xmlChars already consumed */
|
| 106 |
+
unsigned long consumed;
|
| 107 |
+
/* function to deallocate the base */
|
| 108 |
+
xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
|
| 109 |
+
/* unused */
|
| 110 |
+
const xmlChar *encoding XML_DEPRECATED_MEMBER;
|
| 111 |
+
/* the version string for entity */
|
| 112 |
+
const xmlChar *version XML_DEPRECATED_MEMBER;
|
| 113 |
+
/* Flags */
|
| 114 |
+
int flags XML_DEPRECATED_MEMBER;
|
| 115 |
+
/* an unique identifier for the entity */
|
| 116 |
+
int id XML_DEPRECATED_MEMBER;
|
| 117 |
+
/* unused */
|
| 118 |
+
unsigned long parentConsumed XML_DEPRECATED_MEMBER;
|
| 119 |
+
/* entity, if any */
|
| 120 |
+
xmlEntityPtr entity XML_DEPRECATED_MEMBER;
|
| 121 |
+
};
|
| 122 |
+
|
| 123 |
+
/**
|
| 124 |
+
* xmlParserNodeInfo:
|
| 125 |
+
*
|
| 126 |
+
* The parser can be asked to collect Node information, i.e. at what
|
| 127 |
+
* place in the file they were detected.
|
| 128 |
+
* NOTE: This is off by default and not very well tested.
|
| 129 |
+
*/
|
| 130 |
+
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
|
| 131 |
+
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
|
| 132 |
+
|
| 133 |
+
struct _xmlParserNodeInfo {
|
| 134 |
+
const struct _xmlNode* node;
|
| 135 |
+
/* Position & line # that text that created the node begins & ends on */
|
| 136 |
+
unsigned long begin_pos;
|
| 137 |
+
unsigned long begin_line;
|
| 138 |
+
unsigned long end_pos;
|
| 139 |
+
unsigned long end_line;
|
| 140 |
+
};
|
| 141 |
+
|
| 142 |
+
typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
|
| 143 |
+
typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
|
| 144 |
+
struct _xmlParserNodeInfoSeq {
|
| 145 |
+
unsigned long maximum;
|
| 146 |
+
unsigned long length;
|
| 147 |
+
xmlParserNodeInfo* buffer;
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
/**
|
| 151 |
+
* xmlParserInputState:
|
| 152 |
+
*
|
| 153 |
+
* The parser is now working also as a state based parser.
|
| 154 |
+
* The recursive one use the state info for entities processing.
|
| 155 |
+
*/
|
| 156 |
+
typedef enum {
|
| 157 |
+
XML_PARSER_EOF = -1, /* nothing is to be parsed */
|
| 158 |
+
XML_PARSER_START = 0, /* nothing has been parsed */
|
| 159 |
+
XML_PARSER_MISC, /* Misc* before int subset */
|
| 160 |
+
XML_PARSER_PI, /* Within a processing instruction */
|
| 161 |
+
XML_PARSER_DTD, /* within some DTD content */
|
| 162 |
+
XML_PARSER_PROLOG, /* Misc* after internal subset */
|
| 163 |
+
XML_PARSER_COMMENT, /* within a comment */
|
| 164 |
+
XML_PARSER_START_TAG, /* within a start tag */
|
| 165 |
+
XML_PARSER_CONTENT, /* within the content */
|
| 166 |
+
XML_PARSER_CDATA_SECTION, /* within a CDATA section */
|
| 167 |
+
XML_PARSER_END_TAG, /* within a closing tag */
|
| 168 |
+
XML_PARSER_ENTITY_DECL, /* within an entity declaration */
|
| 169 |
+
XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
|
| 170 |
+
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
|
| 171 |
+
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
|
| 172 |
+
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
| 173 |
+
XML_PARSER_IGNORE, /* within an IGNORED section */
|
| 174 |
+
XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */
|
| 175 |
+
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
|
| 176 |
+
} xmlParserInputState;
|
| 177 |
+
|
| 178 |
+
/** DOC_DISABLE */
|
| 179 |
+
/*
|
| 180 |
+
* Internal bits in the 'loadsubset' context member
|
| 181 |
+
*/
|
| 182 |
+
#define XML_DETECT_IDS 2
|
| 183 |
+
#define XML_COMPLETE_ATTRS 4
|
| 184 |
+
#define XML_SKIP_IDS 8
|
| 185 |
+
/** DOC_ENABLE */
|
| 186 |
+
|
| 187 |
+
/**
|
| 188 |
+
* xmlParserMode:
|
| 189 |
+
*
|
| 190 |
+
* A parser can operate in various modes
|
| 191 |
+
*/
|
| 192 |
+
typedef enum {
|
| 193 |
+
XML_PARSE_UNKNOWN = 0,
|
| 194 |
+
XML_PARSE_DOM = 1,
|
| 195 |
+
XML_PARSE_SAX = 2,
|
| 196 |
+
XML_PARSE_PUSH_DOM = 3,
|
| 197 |
+
XML_PARSE_PUSH_SAX = 4,
|
| 198 |
+
XML_PARSE_READER = 5
|
| 199 |
+
} xmlParserMode;
|
| 200 |
+
|
| 201 |
+
typedef struct _xmlStartTag xmlStartTag;
|
| 202 |
+
typedef struct _xmlParserNsData xmlParserNsData;
|
| 203 |
+
typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
| 204 |
+
|
| 205 |
+
/**
|
| 206 |
+
* xmlResourceLoader:
|
| 207 |
+
* @ctxt: parser context
|
| 208 |
+
* @url: URL to load
|
| 209 |
+
* @publicId: publid ID from DTD (optional)
|
| 210 |
+
* @type: resource type
|
| 211 |
+
* @flags: flags
|
| 212 |
+
* @out: result pointer
|
| 213 |
+
*
|
| 214 |
+
* Callback for custom resource loaders.
|
| 215 |
+
*
|
| 216 |
+
* @flags can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
|
| 217 |
+
*
|
| 218 |
+
* On success, @out should be set to a new parser input object and
|
| 219 |
+
* XML_ERR_OK should be returned.
|
| 220 |
+
*
|
| 221 |
+
* Returns an xmlParserErrors code.
|
| 222 |
+
*/
|
| 223 |
+
typedef xmlParserErrors
|
| 224 |
+
(*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
|
| 225 |
+
xmlResourceType type, xmlParserInputFlags flags,
|
| 226 |
+
xmlParserInputPtr *out);
|
| 227 |
+
|
| 228 |
+
/**
|
| 229 |
+
* xmlParserCtxt:
|
| 230 |
+
*
|
| 231 |
+
* The parser context.
|
| 232 |
+
* NOTE This doesn't completely define the parser state, the (current ?)
|
| 233 |
+
* design of the parser uses recursive function calls since this allow
|
| 234 |
+
* and easy mapping from the production rules of the specification
|
| 235 |
+
* to the actual code. The drawback is that the actual function call
|
| 236 |
+
* also reflect the parser state. However most of the parsing routines
|
| 237 |
+
* takes as the only argument the parser context pointer, so migrating
|
| 238 |
+
* to a state based parser for progressive parsing shouldn't be too hard.
|
| 239 |
+
*/
|
| 240 |
+
struct _xmlParserCtxt {
|
| 241 |
+
/* The SAX handler */
|
| 242 |
+
struct _xmlSAXHandler *sax;
|
| 243 |
+
/* For SAX interface only, used by DOM build */
|
| 244 |
+
void *userData;
|
| 245 |
+
/* the document being built */
|
| 246 |
+
xmlDocPtr myDoc;
|
| 247 |
+
/* is the document well formed */
|
| 248 |
+
int wellFormed;
|
| 249 |
+
/* shall we replace entities ? */
|
| 250 |
+
int replaceEntities XML_DEPRECATED_MEMBER;
|
| 251 |
+
/* the XML version string */
|
| 252 |
+
const xmlChar *version;
|
| 253 |
+
/* the declared encoding, if any */
|
| 254 |
+
const xmlChar *encoding;
|
| 255 |
+
/* standalone document */
|
| 256 |
+
int standalone;
|
| 257 |
+
|
| 258 |
+
/* an HTML(1) document
|
| 259 |
+
* 3 is HTML after <head>
|
| 260 |
+
* 10 is HTML after <body>
|
| 261 |
+
*/
|
| 262 |
+
int html;
|
| 263 |
+
|
| 264 |
+
/* Input stream stack */
|
| 265 |
+
|
| 266 |
+
/* Current input stream */
|
| 267 |
+
xmlParserInputPtr input;
|
| 268 |
+
/* Number of current input streams */
|
| 269 |
+
int inputNr;
|
| 270 |
+
/* Max number of input streams */
|
| 271 |
+
int inputMax XML_DEPRECATED_MEMBER;
|
| 272 |
+
/* stack of inputs */
|
| 273 |
+
xmlParserInputPtr *inputTab;
|
| 274 |
+
|
| 275 |
+
/* Node analysis stack only used for DOM building */
|
| 276 |
+
|
| 277 |
+
/* Current parsed Node */
|
| 278 |
+
xmlNodePtr node;
|
| 279 |
+
/* Depth of the parsing stack */
|
| 280 |
+
int nodeNr XML_DEPRECATED_MEMBER;
|
| 281 |
+
/* Max depth of the parsing stack */
|
| 282 |
+
int nodeMax XML_DEPRECATED_MEMBER;
|
| 283 |
+
/* array of nodes */
|
| 284 |
+
xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
|
| 285 |
+
|
| 286 |
+
/* Whether node info should be kept */
|
| 287 |
+
int record_info;
|
| 288 |
+
/* info about each node parsed */
|
| 289 |
+
xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
|
| 290 |
+
|
| 291 |
+
/* error code */
|
| 292 |
+
int errNo;
|
| 293 |
+
|
| 294 |
+
/* reference and external subset */
|
| 295 |
+
int hasExternalSubset XML_DEPRECATED_MEMBER;
|
| 296 |
+
/* the internal subset has PE refs */
|
| 297 |
+
int hasPErefs XML_DEPRECATED_MEMBER;
|
| 298 |
+
/* unused */
|
| 299 |
+
int external XML_DEPRECATED_MEMBER;
|
| 300 |
+
|
| 301 |
+
/* is the document valid */
|
| 302 |
+
int valid;
|
| 303 |
+
/* shall we try to validate ? */
|
| 304 |
+
int validate XML_DEPRECATED_MEMBER;
|
| 305 |
+
/* The validity context */
|
| 306 |
+
xmlValidCtxt vctxt;
|
| 307 |
+
|
| 308 |
+
/* push parser state */
|
| 309 |
+
xmlParserInputState instate XML_DEPRECATED_MEMBER;
|
| 310 |
+
/* unused */
|
| 311 |
+
int token XML_DEPRECATED_MEMBER;
|
| 312 |
+
|
| 313 |
+
/* unused internally, still used downstream */
|
| 314 |
+
char *directory;
|
| 315 |
+
|
| 316 |
+
/* Node name stack */
|
| 317 |
+
|
| 318 |
+
/* Current parsed Node */
|
| 319 |
+
const xmlChar *name XML_DEPRECATED_MEMBER;
|
| 320 |
+
/* Depth of the parsing stack */
|
| 321 |
+
int nameNr XML_DEPRECATED_MEMBER;
|
| 322 |
+
/* Max depth of the parsing stack */
|
| 323 |
+
int nameMax XML_DEPRECATED_MEMBER;
|
| 324 |
+
/* array of nodes */
|
| 325 |
+
const xmlChar **nameTab XML_DEPRECATED_MEMBER;
|
| 326 |
+
|
| 327 |
+
/* unused */
|
| 328 |
+
long nbChars XML_DEPRECATED_MEMBER;
|
| 329 |
+
/* used by progressive parsing lookup */
|
| 330 |
+
long checkIndex XML_DEPRECATED_MEMBER;
|
| 331 |
+
/* ugly but ... */
|
| 332 |
+
int keepBlanks XML_DEPRECATED_MEMBER;
|
| 333 |
+
/* SAX callbacks are disabled */
|
| 334 |
+
int disableSAX;
|
| 335 |
+
/* Parsing is in int 1/ext 2 subset */
|
| 336 |
+
int inSubset;
|
| 337 |
+
/* name of subset */
|
| 338 |
+
const xmlChar *intSubName;
|
| 339 |
+
/* URI of external subset */
|
| 340 |
+
xmlChar *extSubURI;
|
| 341 |
+
/* SYSTEM ID of external subset */
|
| 342 |
+
xmlChar *extSubSystem;
|
| 343 |
+
|
| 344 |
+
/* xml:space values */
|
| 345 |
+
|
| 346 |
+
/* Should the parser preserve spaces */
|
| 347 |
+
int *space XML_DEPRECATED_MEMBER;
|
| 348 |
+
/* Depth of the parsing stack */
|
| 349 |
+
int spaceNr XML_DEPRECATED_MEMBER;
|
| 350 |
+
/* Max depth of the parsing stack */
|
| 351 |
+
int spaceMax XML_DEPRECATED_MEMBER;
|
| 352 |
+
/* array of space infos */
|
| 353 |
+
int *spaceTab XML_DEPRECATED_MEMBER;
|
| 354 |
+
|
| 355 |
+
/* to prevent entity substitution loops */
|
| 356 |
+
int depth XML_DEPRECATED_MEMBER;
|
| 357 |
+
/* unused */
|
| 358 |
+
xmlParserInputPtr entity XML_DEPRECATED_MEMBER;
|
| 359 |
+
/* unused */
|
| 360 |
+
int charset XML_DEPRECATED_MEMBER;
|
| 361 |
+
/* Those two fields are there to */
|
| 362 |
+
int nodelen XML_DEPRECATED_MEMBER;
|
| 363 |
+
/* Speed up large node parsing */
|
| 364 |
+
int nodemem XML_DEPRECATED_MEMBER;
|
| 365 |
+
/* signal pedantic warnings */
|
| 366 |
+
int pedantic XML_DEPRECATED_MEMBER;
|
| 367 |
+
/* For user data, libxml won't touch it */
|
| 368 |
+
void *_private;
|
| 369 |
+
|
| 370 |
+
/* should the external subset be loaded */
|
| 371 |
+
int loadsubset;
|
| 372 |
+
/* set line number in element content */
|
| 373 |
+
int linenumbers XML_DEPRECATED_MEMBER;
|
| 374 |
+
/* document's own catalog */
|
| 375 |
+
void *catalogs XML_DEPRECATED_MEMBER;
|
| 376 |
+
/* run in recovery mode */
|
| 377 |
+
int recovery XML_DEPRECATED_MEMBER;
|
| 378 |
+
/* unused */
|
| 379 |
+
int progressive XML_DEPRECATED_MEMBER;
|
| 380 |
+
/* dictionary for the parser */
|
| 381 |
+
xmlDictPtr dict;
|
| 382 |
+
/* array for the attributes callbacks */
|
| 383 |
+
const xmlChar **atts XML_DEPRECATED_MEMBER;
|
| 384 |
+
/* the size of the array */
|
| 385 |
+
int maxatts XML_DEPRECATED_MEMBER;
|
| 386 |
+
/* unused */
|
| 387 |
+
int docdict XML_DEPRECATED_MEMBER;
|
| 388 |
+
|
| 389 |
+
/*
|
| 390 |
+
* pre-interned strings
|
| 391 |
+
*/
|
| 392 |
+
const xmlChar *str_xml XML_DEPRECATED_MEMBER;
|
| 393 |
+
const xmlChar *str_xmlns XML_DEPRECATED_MEMBER;
|
| 394 |
+
const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER;
|
| 395 |
+
|
| 396 |
+
/*
|
| 397 |
+
* Everything below is used only by the new SAX mode
|
| 398 |
+
*/
|
| 399 |
+
|
| 400 |
+
/* operating in the new SAX mode */
|
| 401 |
+
int sax2 XML_DEPRECATED_MEMBER;
|
| 402 |
+
/* the number of inherited namespaces */
|
| 403 |
+
int nsNr XML_DEPRECATED_MEMBER;
|
| 404 |
+
/* the size of the arrays */
|
| 405 |
+
int nsMax XML_DEPRECATED_MEMBER;
|
| 406 |
+
/* the array of prefix/namespace name */
|
| 407 |
+
const xmlChar **nsTab XML_DEPRECATED_MEMBER;
|
| 408 |
+
/* which attribute were allocated */
|
| 409 |
+
unsigned *attallocs XML_DEPRECATED_MEMBER;
|
| 410 |
+
/* array of data for push */
|
| 411 |
+
xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
|
| 412 |
+
/* defaulted attributes if any */
|
| 413 |
+
xmlHashTablePtr attsDefault XML_DEPRECATED_MEMBER;
|
| 414 |
+
/* non-CDATA attributes if any */
|
| 415 |
+
xmlHashTablePtr attsSpecial XML_DEPRECATED_MEMBER;
|
| 416 |
+
/* is the document XML Namespace okay */
|
| 417 |
+
int nsWellFormed;
|
| 418 |
+
/* Extra options */
|
| 419 |
+
int options;
|
| 420 |
+
|
| 421 |
+
/*
|
| 422 |
+
* Those fields are needed only for streaming parsing so far
|
| 423 |
+
*/
|
| 424 |
+
|
| 425 |
+
/* Use dictionary names for the tree */
|
| 426 |
+
int dictNames XML_DEPRECATED_MEMBER;
|
| 427 |
+
/* number of freed element nodes */
|
| 428 |
+
int freeElemsNr XML_DEPRECATED_MEMBER;
|
| 429 |
+
/* List of freed element nodes */
|
| 430 |
+
xmlNodePtr freeElems XML_DEPRECATED_MEMBER;
|
| 431 |
+
/* number of freed attributes nodes */
|
| 432 |
+
int freeAttrsNr XML_DEPRECATED_MEMBER;
|
| 433 |
+
/* List of freed attributes nodes */
|
| 434 |
+
xmlAttrPtr freeAttrs XML_DEPRECATED_MEMBER;
|
| 435 |
+
|
| 436 |
+
/*
|
| 437 |
+
* the complete error information for the last error.
|
| 438 |
+
*/
|
| 439 |
+
xmlError lastError XML_DEPRECATED_MEMBER;
|
| 440 |
+
/* the parser mode */
|
| 441 |
+
xmlParserMode parseMode XML_DEPRECATED_MEMBER;
|
| 442 |
+
/* unused */
|
| 443 |
+
unsigned long nbentities XML_DEPRECATED_MEMBER;
|
| 444 |
+
/* size of external entities */
|
| 445 |
+
unsigned long sizeentities XML_DEPRECATED_MEMBER;
|
| 446 |
+
|
| 447 |
+
/* for use by HTML non-recursive parser */
|
| 448 |
+
/* Current NodeInfo */
|
| 449 |
+
xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER;
|
| 450 |
+
/* Depth of the parsing stack */
|
| 451 |
+
int nodeInfoNr XML_DEPRECATED_MEMBER;
|
| 452 |
+
/* Max depth of the parsing stack */
|
| 453 |
+
int nodeInfoMax XML_DEPRECATED_MEMBER;
|
| 454 |
+
/* array of nodeInfos */
|
| 455 |
+
xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER;
|
| 456 |
+
|
| 457 |
+
/* we need to label inputs */
|
| 458 |
+
int input_id XML_DEPRECATED_MEMBER;
|
| 459 |
+
/* volume of entity copy */
|
| 460 |
+
unsigned long sizeentcopy XML_DEPRECATED_MEMBER;
|
| 461 |
+
|
| 462 |
+
/* quote state for push parser */
|
| 463 |
+
int endCheckState XML_DEPRECATED_MEMBER;
|
| 464 |
+
/* number of errors */
|
| 465 |
+
unsigned short nbErrors XML_DEPRECATED_MEMBER;
|
| 466 |
+
/* number of warnings */
|
| 467 |
+
unsigned short nbWarnings XML_DEPRECATED_MEMBER;
|
| 468 |
+
/* maximum amplification factor */
|
| 469 |
+
unsigned maxAmpl XML_DEPRECATED_MEMBER;
|
| 470 |
+
|
| 471 |
+
/* namespace database */
|
| 472 |
+
xmlParserNsData *nsdb XML_DEPRECATED_MEMBER;
|
| 473 |
+
/* allocated size */
|
| 474 |
+
unsigned attrHashMax XML_DEPRECATED_MEMBER;
|
| 475 |
+
/* atttribute hash table */
|
| 476 |
+
xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER;
|
| 477 |
+
|
| 478 |
+
xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER;
|
| 479 |
+
void *errorCtxt XML_DEPRECATED_MEMBER;
|
| 480 |
+
|
| 481 |
+
xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER;
|
| 482 |
+
void *resourceCtxt XML_DEPRECATED_MEMBER;
|
| 483 |
+
|
| 484 |
+
xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER;
|
| 485 |
+
void *convCtxt XML_DEPRECATED_MEMBER;
|
| 486 |
+
};
|
| 487 |
+
|
| 488 |
+
/**
|
| 489 |
+
* xmlSAXLocator:
|
| 490 |
+
*
|
| 491 |
+
* A SAX Locator.
|
| 492 |
+
*/
|
| 493 |
+
struct _xmlSAXLocator {
|
| 494 |
+
const xmlChar *(*getPublicId)(void *ctx);
|
| 495 |
+
const xmlChar *(*getSystemId)(void *ctx);
|
| 496 |
+
int (*getLineNumber)(void *ctx);
|
| 497 |
+
int (*getColumnNumber)(void *ctx);
|
| 498 |
+
};
|
| 499 |
+
|
| 500 |
+
/**
|
| 501 |
+
* xmlSAXHandler:
|
| 502 |
+
*
|
| 503 |
+
* A SAX handler is bunch of callbacks called by the parser when processing
|
| 504 |
+
* of the input generate data or structure information.
|
| 505 |
+
*/
|
| 506 |
+
|
| 507 |
+
/**
|
| 508 |
+
* resolveEntitySAXFunc:
|
| 509 |
+
* @ctx: the user data (XML parser context)
|
| 510 |
+
* @publicId: The public ID of the entity
|
| 511 |
+
* @systemId: The system ID of the entity
|
| 512 |
+
*
|
| 513 |
+
* Callback:
|
| 514 |
+
* The entity loader, to control the loading of external entities,
|
| 515 |
+
* the application can either:
|
| 516 |
+
* - override this resolveEntity() callback in the SAX block
|
| 517 |
+
* - or better use the xmlSetExternalEntityLoader() function to
|
| 518 |
+
* set up it's own entity resolution routine
|
| 519 |
+
*
|
| 520 |
+
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
|
| 521 |
+
*/
|
| 522 |
+
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
|
| 523 |
+
const xmlChar *publicId,
|
| 524 |
+
const xmlChar *systemId);
|
| 525 |
+
/**
|
| 526 |
+
* internalSubsetSAXFunc:
|
| 527 |
+
* @ctx: the user data (XML parser context)
|
| 528 |
+
* @name: the root element name
|
| 529 |
+
* @ExternalID: the external ID
|
| 530 |
+
* @SystemID: the SYSTEM ID (e.g. filename or URL)
|
| 531 |
+
*
|
| 532 |
+
* Callback on internal subset declaration.
|
| 533 |
+
*/
|
| 534 |
+
typedef void (*internalSubsetSAXFunc) (void *ctx,
|
| 535 |
+
const xmlChar *name,
|
| 536 |
+
const xmlChar *ExternalID,
|
| 537 |
+
const xmlChar *SystemID);
|
| 538 |
+
/**
|
| 539 |
+
* externalSubsetSAXFunc:
|
| 540 |
+
* @ctx: the user data (XML parser context)
|
| 541 |
+
* @name: the root element name
|
| 542 |
+
* @ExternalID: the external ID
|
| 543 |
+
* @SystemID: the SYSTEM ID (e.g. filename or URL)
|
| 544 |
+
*
|
| 545 |
+
* Callback on external subset declaration.
|
| 546 |
+
*/
|
| 547 |
+
typedef void (*externalSubsetSAXFunc) (void *ctx,
|
| 548 |
+
const xmlChar *name,
|
| 549 |
+
const xmlChar *ExternalID,
|
| 550 |
+
const xmlChar *SystemID);
|
| 551 |
+
/**
|
| 552 |
+
* getEntitySAXFunc:
|
| 553 |
+
* @ctx: the user data (XML parser context)
|
| 554 |
+
* @name: The entity name
|
| 555 |
+
*
|
| 556 |
+
* Get an entity by name.
|
| 557 |
+
*
|
| 558 |
+
* Returns the xmlEntityPtr if found.
|
| 559 |
+
*/
|
| 560 |
+
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
|
| 561 |
+
const xmlChar *name);
|
| 562 |
+
/**
|
| 563 |
+
* getParameterEntitySAXFunc:
|
| 564 |
+
* @ctx: the user data (XML parser context)
|
| 565 |
+
* @name: The entity name
|
| 566 |
+
*
|
| 567 |
+
* Get a parameter entity by name.
|
| 568 |
+
*
|
| 569 |
+
* Returns the xmlEntityPtr if found.
|
| 570 |
+
*/
|
| 571 |
+
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
|
| 572 |
+
const xmlChar *name);
|
| 573 |
+
/**
|
| 574 |
+
* entityDeclSAXFunc:
|
| 575 |
+
* @ctx: the user data (XML parser context)
|
| 576 |
+
* @name: the entity name
|
| 577 |
+
* @type: the entity type
|
| 578 |
+
* @publicId: The public ID of the entity
|
| 579 |
+
* @systemId: The system ID of the entity
|
| 580 |
+
* @content: the entity value (without processing).
|
| 581 |
+
*
|
| 582 |
+
* An entity definition has been parsed.
|
| 583 |
+
*/
|
| 584 |
+
typedef void (*entityDeclSAXFunc) (void *ctx,
|
| 585 |
+
const xmlChar *name,
|
| 586 |
+
int type,
|
| 587 |
+
const xmlChar *publicId,
|
| 588 |
+
const xmlChar *systemId,
|
| 589 |
+
xmlChar *content);
|
| 590 |
+
/**
|
| 591 |
+
* notationDeclSAXFunc:
|
| 592 |
+
* @ctx: the user data (XML parser context)
|
| 593 |
+
* @name: The name of the notation
|
| 594 |
+
* @publicId: The public ID of the entity
|
| 595 |
+
* @systemId: The system ID of the entity
|
| 596 |
+
*
|
| 597 |
+
* What to do when a notation declaration has been parsed.
|
| 598 |
+
*/
|
| 599 |
+
typedef void (*notationDeclSAXFunc)(void *ctx,
|
| 600 |
+
const xmlChar *name,
|
| 601 |
+
const xmlChar *publicId,
|
| 602 |
+
const xmlChar *systemId);
|
| 603 |
+
/**
|
| 604 |
+
* attributeDeclSAXFunc:
|
| 605 |
+
* @ctx: the user data (XML parser context)
|
| 606 |
+
* @elem: the name of the element
|
| 607 |
+
* @fullname: the attribute name
|
| 608 |
+
* @type: the attribute type
|
| 609 |
+
* @def: the type of default value
|
| 610 |
+
* @defaultValue: the attribute default value
|
| 611 |
+
* @tree: the tree of enumerated value set
|
| 612 |
+
*
|
| 613 |
+
* An attribute definition has been parsed.
|
| 614 |
+
*/
|
| 615 |
+
typedef void (*attributeDeclSAXFunc)(void *ctx,
|
| 616 |
+
const xmlChar *elem,
|
| 617 |
+
const xmlChar *fullname,
|
| 618 |
+
int type,
|
| 619 |
+
int def,
|
| 620 |
+
const xmlChar *defaultValue,
|
| 621 |
+
xmlEnumerationPtr tree);
|
| 622 |
+
/**
|
| 623 |
+
* elementDeclSAXFunc:
|
| 624 |
+
* @ctx: the user data (XML parser context)
|
| 625 |
+
* @name: the element name
|
| 626 |
+
* @type: the element type
|
| 627 |
+
* @content: the element value tree
|
| 628 |
+
*
|
| 629 |
+
* An element definition has been parsed.
|
| 630 |
+
*/
|
| 631 |
+
typedef void (*elementDeclSAXFunc)(void *ctx,
|
| 632 |
+
const xmlChar *name,
|
| 633 |
+
int type,
|
| 634 |
+
xmlElementContentPtr content);
|
| 635 |
+
/**
|
| 636 |
+
* unparsedEntityDeclSAXFunc:
|
| 637 |
+
* @ctx: the user data (XML parser context)
|
| 638 |
+
* @name: The name of the entity
|
| 639 |
+
* @publicId: The public ID of the entity
|
| 640 |
+
* @systemId: The system ID of the entity
|
| 641 |
+
* @notationName: the name of the notation
|
| 642 |
+
*
|
| 643 |
+
* What to do when an unparsed entity declaration is parsed.
|
| 644 |
+
*/
|
| 645 |
+
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
|
| 646 |
+
const xmlChar *name,
|
| 647 |
+
const xmlChar *publicId,
|
| 648 |
+
const xmlChar *systemId,
|
| 649 |
+
const xmlChar *notationName);
|
| 650 |
+
/**
|
| 651 |
+
* setDocumentLocatorSAXFunc:
|
| 652 |
+
* @ctx: the user data (XML parser context)
|
| 653 |
+
* @loc: A SAX Locator
|
| 654 |
+
*
|
| 655 |
+
* Receive the document locator at startup, actually xmlDefaultSAXLocator.
|
| 656 |
+
* Everything is available on the context, so this is useless in our case.
|
| 657 |
+
*/
|
| 658 |
+
typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
|
| 659 |
+
xmlSAXLocatorPtr loc);
|
| 660 |
+
/**
|
| 661 |
+
* startDocumentSAXFunc:
|
| 662 |
+
* @ctx: the user data (XML parser context)
|
| 663 |
+
*
|
| 664 |
+
* Called when the document start being processed.
|
| 665 |
+
*/
|
| 666 |
+
typedef void (*startDocumentSAXFunc) (void *ctx);
|
| 667 |
+
/**
|
| 668 |
+
* endDocumentSAXFunc:
|
| 669 |
+
* @ctx: the user data (XML parser context)
|
| 670 |
+
*
|
| 671 |
+
* Called when the document end has been detected.
|
| 672 |
+
*/
|
| 673 |
+
typedef void (*endDocumentSAXFunc) (void *ctx);
|
| 674 |
+
/**
|
| 675 |
+
* startElementSAXFunc:
|
| 676 |
+
* @ctx: the user data (XML parser context)
|
| 677 |
+
* @name: The element name, including namespace prefix
|
| 678 |
+
* @atts: An array of name/value attributes pairs, NULL terminated
|
| 679 |
+
*
|
| 680 |
+
* Called when an opening tag has been processed.
|
| 681 |
+
*/
|
| 682 |
+
typedef void (*startElementSAXFunc) (void *ctx,
|
| 683 |
+
const xmlChar *name,
|
| 684 |
+
const xmlChar **atts);
|
| 685 |
+
/**
|
| 686 |
+
* endElementSAXFunc:
|
| 687 |
+
* @ctx: the user data (XML parser context)
|
| 688 |
+
* @name: The element name
|
| 689 |
+
*
|
| 690 |
+
* Called when the end of an element has been detected.
|
| 691 |
+
*/
|
| 692 |
+
typedef void (*endElementSAXFunc) (void *ctx,
|
| 693 |
+
const xmlChar *name);
|
| 694 |
+
/**
|
| 695 |
+
* attributeSAXFunc:
|
| 696 |
+
* @ctx: the user data (XML parser context)
|
| 697 |
+
* @name: The attribute name, including namespace prefix
|
| 698 |
+
* @value: The attribute value
|
| 699 |
+
*
|
| 700 |
+
* Handle an attribute that has been read by the parser.
|
| 701 |
+
* The default handling is to convert the attribute into an
|
| 702 |
+
* DOM subtree and past it in a new xmlAttr element added to
|
| 703 |
+
* the element.
|
| 704 |
+
*/
|
| 705 |
+
typedef void (*attributeSAXFunc) (void *ctx,
|
| 706 |
+
const xmlChar *name,
|
| 707 |
+
const xmlChar *value);
|
| 708 |
+
/**
|
| 709 |
+
* referenceSAXFunc:
|
| 710 |
+
* @ctx: the user data (XML parser context)
|
| 711 |
+
* @name: The entity name
|
| 712 |
+
*
|
| 713 |
+
* Called when an entity reference is detected.
|
| 714 |
+
*/
|
| 715 |
+
typedef void (*referenceSAXFunc) (void *ctx,
|
| 716 |
+
const xmlChar *name);
|
| 717 |
+
/**
|
| 718 |
+
* charactersSAXFunc:
|
| 719 |
+
* @ctx: the user data (XML parser context)
|
| 720 |
+
* @ch: a xmlChar string
|
| 721 |
+
* @len: the number of xmlChar
|
| 722 |
+
*
|
| 723 |
+
* Receiving some chars from the parser.
|
| 724 |
+
*/
|
| 725 |
+
typedef void (*charactersSAXFunc) (void *ctx,
|
| 726 |
+
const xmlChar *ch,
|
| 727 |
+
int len);
|
| 728 |
+
/**
|
| 729 |
+
* ignorableWhitespaceSAXFunc:
|
| 730 |
+
* @ctx: the user data (XML parser context)
|
| 731 |
+
* @ch: a xmlChar string
|
| 732 |
+
* @len: the number of xmlChar
|
| 733 |
+
*
|
| 734 |
+
* Receiving some ignorable whitespaces from the parser.
|
| 735 |
+
* UNUSED: by default the DOM building will use characters.
|
| 736 |
+
*/
|
| 737 |
+
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
|
| 738 |
+
const xmlChar *ch,
|
| 739 |
+
int len);
|
| 740 |
+
/**
|
| 741 |
+
* processingInstructionSAXFunc:
|
| 742 |
+
* @ctx: the user data (XML parser context)
|
| 743 |
+
* @target: the target name
|
| 744 |
+
* @data: the PI data's
|
| 745 |
+
*
|
| 746 |
+
* A processing instruction has been parsed.
|
| 747 |
+
*/
|
| 748 |
+
typedef void (*processingInstructionSAXFunc) (void *ctx,
|
| 749 |
+
const xmlChar *target,
|
| 750 |
+
const xmlChar *data);
|
| 751 |
+
/**
|
| 752 |
+
* commentSAXFunc:
|
| 753 |
+
* @ctx: the user data (XML parser context)
|
| 754 |
+
* @value: the comment content
|
| 755 |
+
*
|
| 756 |
+
* A comment has been parsed.
|
| 757 |
+
*/
|
| 758 |
+
typedef void (*commentSAXFunc) (void *ctx,
|
| 759 |
+
const xmlChar *value);
|
| 760 |
+
/**
|
| 761 |
+
* cdataBlockSAXFunc:
|
| 762 |
+
* @ctx: the user data (XML parser context)
|
| 763 |
+
* @value: The pcdata content
|
| 764 |
+
* @len: the block length
|
| 765 |
+
*
|
| 766 |
+
* Called when a pcdata block has been parsed.
|
| 767 |
+
*/
|
| 768 |
+
typedef void (*cdataBlockSAXFunc) (
|
| 769 |
+
void *ctx,
|
| 770 |
+
const xmlChar *value,
|
| 771 |
+
int len);
|
| 772 |
+
/**
|
| 773 |
+
* warningSAXFunc:
|
| 774 |
+
* @ctx: an XML parser context
|
| 775 |
+
* @msg: the message to display/transmit
|
| 776 |
+
* @...: extra parameters for the message display
|
| 777 |
+
*
|
| 778 |
+
* Display and format a warning messages, callback.
|
| 779 |
+
*/
|
| 780 |
+
typedef void (*warningSAXFunc) (void *ctx,
|
| 781 |
+
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
| 782 |
+
/**
|
| 783 |
+
* errorSAXFunc:
|
| 784 |
+
* @ctx: an XML parser context
|
| 785 |
+
* @msg: the message to display/transmit
|
| 786 |
+
* @...: extra parameters for the message display
|
| 787 |
+
*
|
| 788 |
+
* Display and format an error messages, callback.
|
| 789 |
+
*/
|
| 790 |
+
typedef void (*errorSAXFunc) (void *ctx,
|
| 791 |
+
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
| 792 |
+
/**
|
| 793 |
+
* fatalErrorSAXFunc:
|
| 794 |
+
* @ctx: an XML parser context
|
| 795 |
+
* @msg: the message to display/transmit
|
| 796 |
+
* @...: extra parameters for the message display
|
| 797 |
+
*
|
| 798 |
+
* Display and format fatal error messages, callback.
|
| 799 |
+
* Note: so far fatalError() SAX callbacks are not used, error()
|
| 800 |
+
* get all the callbacks for errors.
|
| 801 |
+
*/
|
| 802 |
+
typedef void (*fatalErrorSAXFunc) (void *ctx,
|
| 803 |
+
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
| 804 |
+
/**
|
| 805 |
+
* isStandaloneSAXFunc:
|
| 806 |
+
* @ctx: the user data (XML parser context)
|
| 807 |
+
*
|
| 808 |
+
* Is this document tagged standalone?
|
| 809 |
+
*
|
| 810 |
+
* Returns 1 if true
|
| 811 |
+
*/
|
| 812 |
+
typedef int (*isStandaloneSAXFunc) (void *ctx);
|
| 813 |
+
/**
|
| 814 |
+
* hasInternalSubsetSAXFunc:
|
| 815 |
+
* @ctx: the user data (XML parser context)
|
| 816 |
+
*
|
| 817 |
+
* Does this document has an internal subset.
|
| 818 |
+
*
|
| 819 |
+
* Returns 1 if true
|
| 820 |
+
*/
|
| 821 |
+
typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
|
| 822 |
+
|
| 823 |
+
/**
|
| 824 |
+
* hasExternalSubsetSAXFunc:
|
| 825 |
+
* @ctx: the user data (XML parser context)
|
| 826 |
+
*
|
| 827 |
+
* Does this document has an external subset?
|
| 828 |
+
*
|
| 829 |
+
* Returns 1 if true
|
| 830 |
+
*/
|
| 831 |
+
typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
|
| 832 |
+
|
| 833 |
+
/************************************************************************
|
| 834 |
+
* *
|
| 835 |
+
* The SAX version 2 API extensions *
|
| 836 |
+
* *
|
| 837 |
+
************************************************************************/
|
| 838 |
+
/**
|
| 839 |
+
* XML_SAX2_MAGIC:
|
| 840 |
+
*
|
| 841 |
+
* Special constant found in SAX2 blocks initialized fields
|
| 842 |
+
*/
|
| 843 |
+
#define XML_SAX2_MAGIC 0xDEEDBEAF
|
| 844 |
+
|
| 845 |
+
/**
|
| 846 |
+
* startElementNsSAX2Func:
|
| 847 |
+
* @ctx: the user data (XML parser context)
|
| 848 |
+
* @localname: the local name of the element
|
| 849 |
+
* @prefix: the element namespace prefix if available
|
| 850 |
+
* @URI: the element namespace name if available
|
| 851 |
+
* @nb_namespaces: number of namespace definitions on that node
|
| 852 |
+
* @namespaces: pointer to the array of prefix/URI pairs namespace definitions
|
| 853 |
+
* @nb_attributes: the number of attributes on that node
|
| 854 |
+
* @nb_defaulted: the number of defaulted attributes. The defaulted
|
| 855 |
+
* ones are at the end of the array
|
| 856 |
+
* @attributes: pointer to the array of (localname/prefix/URI/value/end)
|
| 857 |
+
* attribute values.
|
| 858 |
+
*
|
| 859 |
+
* SAX2 callback when an element start has been detected by the parser.
|
| 860 |
+
* It provides the namespace information for the element, as well as
|
| 861 |
+
* the new namespace declarations on the element.
|
| 862 |
+
*/
|
| 863 |
+
|
| 864 |
+
typedef void (*startElementNsSAX2Func) (void *ctx,
|
| 865 |
+
const xmlChar *localname,
|
| 866 |
+
const xmlChar *prefix,
|
| 867 |
+
const xmlChar *URI,
|
| 868 |
+
int nb_namespaces,
|
| 869 |
+
const xmlChar **namespaces,
|
| 870 |
+
int nb_attributes,
|
| 871 |
+
int nb_defaulted,
|
| 872 |
+
const xmlChar **attributes);
|
| 873 |
+
|
| 874 |
+
/**
|
| 875 |
+
* endElementNsSAX2Func:
|
| 876 |
+
* @ctx: the user data (XML parser context)
|
| 877 |
+
* @localname: the local name of the element
|
| 878 |
+
* @prefix: the element namespace prefix if available
|
| 879 |
+
* @URI: the element namespace name if available
|
| 880 |
+
*
|
| 881 |
+
* SAX2 callback when an element end has been detected by the parser.
|
| 882 |
+
* It provides the namespace information for the element.
|
| 883 |
+
*/
|
| 884 |
+
|
| 885 |
+
typedef void (*endElementNsSAX2Func) (void *ctx,
|
| 886 |
+
const xmlChar *localname,
|
| 887 |
+
const xmlChar *prefix,
|
| 888 |
+
const xmlChar *URI);
|
| 889 |
+
|
| 890 |
+
|
| 891 |
+
struct _xmlSAXHandler {
|
| 892 |
+
/*
|
| 893 |
+
* For DTD-related handlers, it's recommended to either use the
|
| 894 |
+
* original libxml2 handler or set them to NULL if DTDs can be
|
| 895 |
+
* ignored.
|
| 896 |
+
*/
|
| 897 |
+
internalSubsetSAXFunc internalSubset; /* DTD */
|
| 898 |
+
isStandaloneSAXFunc isStandalone; /* unused */
|
| 899 |
+
hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
|
| 900 |
+
hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
|
| 901 |
+
resolveEntitySAXFunc resolveEntity; /* DTD */
|
| 902 |
+
getEntitySAXFunc getEntity; /* DTD */
|
| 903 |
+
entityDeclSAXFunc entityDecl; /* DTD */
|
| 904 |
+
notationDeclSAXFunc notationDecl; /* DTD */
|
| 905 |
+
attributeDeclSAXFunc attributeDecl; /* DTD */
|
| 906 |
+
elementDeclSAXFunc elementDecl; /* DTD */
|
| 907 |
+
unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
|
| 908 |
+
setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
|
| 909 |
+
startDocumentSAXFunc startDocument;
|
| 910 |
+
endDocumentSAXFunc endDocument;
|
| 911 |
+
/*
|
| 912 |
+
* `startElement` and `endElement` are only used by the legacy SAX1
|
| 913 |
+
* interface and should not be used in new software. If you really
|
| 914 |
+
* have to enable SAX1, the preferred way is set the `initialized`
|
| 915 |
+
* member to 1 instead of XML_SAX2_MAGIC.
|
| 916 |
+
*
|
| 917 |
+
* For backward compatibility, it's also possible to set the
|
| 918 |
+
* `startElementNs` and `endElementNs` handlers to NULL.
|
| 919 |
+
*
|
| 920 |
+
* You can also set the XML_PARSE_SAX1 parser option, but versions
|
| 921 |
+
* older than 2.12.0 will probably crash if this option is provided
|
| 922 |
+
* together with custom SAX callbacks.
|
| 923 |
+
*/
|
| 924 |
+
startElementSAXFunc startElement;
|
| 925 |
+
endElementSAXFunc endElement;
|
| 926 |
+
referenceSAXFunc reference;
|
| 927 |
+
charactersSAXFunc characters;
|
| 928 |
+
/*
|
| 929 |
+
* `ignorableWhitespace` should always be set to the same value
|
| 930 |
+
* as `characters`. Otherwise, the parser will try to detect
|
| 931 |
+
* whitespace which is unreliable.
|
| 932 |
+
*/
|
| 933 |
+
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
| 934 |
+
processingInstructionSAXFunc processingInstruction;
|
| 935 |
+
commentSAXFunc comment;
|
| 936 |
+
warningSAXFunc warning;
|
| 937 |
+
errorSAXFunc error;
|
| 938 |
+
fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
|
| 939 |
+
getParameterEntitySAXFunc getParameterEntity; /* DTD */
|
| 940 |
+
cdataBlockSAXFunc cdataBlock;
|
| 941 |
+
externalSubsetSAXFunc externalSubset; /* DTD */
|
| 942 |
+
/*
|
| 943 |
+
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
| 944 |
+
* modern SAX2 interface.
|
| 945 |
+
*/
|
| 946 |
+
unsigned int initialized;
|
| 947 |
+
/*
|
| 948 |
+
* The following members are only used by the SAX2 interface.
|
| 949 |
+
*/
|
| 950 |
+
void *_private;
|
| 951 |
+
startElementNsSAX2Func startElementNs;
|
| 952 |
+
endElementNsSAX2Func endElementNs;
|
| 953 |
+
/*
|
| 954 |
+
* Takes precedence over `error` or `warning`, but modern code
|
| 955 |
+
* should use xmlCtxtSetErrorHandler.
|
| 956 |
+
*/
|
| 957 |
+
xmlStructuredErrorFunc serror;
|
| 958 |
+
};
|
| 959 |
+
|
| 960 |
+
/*
|
| 961 |
+
* SAX Version 1
|
| 962 |
+
*/
|
| 963 |
+
typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
|
| 964 |
+
typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
|
| 965 |
+
struct _xmlSAXHandlerV1 {
|
| 966 |
+
internalSubsetSAXFunc internalSubset;
|
| 967 |
+
isStandaloneSAXFunc isStandalone;
|
| 968 |
+
hasInternalSubsetSAXFunc hasInternalSubset;
|
| 969 |
+
hasExternalSubsetSAXFunc hasExternalSubset;
|
| 970 |
+
resolveEntitySAXFunc resolveEntity;
|
| 971 |
+
getEntitySAXFunc getEntity;
|
| 972 |
+
entityDeclSAXFunc entityDecl;
|
| 973 |
+
notationDeclSAXFunc notationDecl;
|
| 974 |
+
attributeDeclSAXFunc attributeDecl;
|
| 975 |
+
elementDeclSAXFunc elementDecl;
|
| 976 |
+
unparsedEntityDeclSAXFunc unparsedEntityDecl;
|
| 977 |
+
setDocumentLocatorSAXFunc setDocumentLocator;
|
| 978 |
+
startDocumentSAXFunc startDocument;
|
| 979 |
+
endDocumentSAXFunc endDocument;
|
| 980 |
+
startElementSAXFunc startElement;
|
| 981 |
+
endElementSAXFunc endElement;
|
| 982 |
+
referenceSAXFunc reference;
|
| 983 |
+
charactersSAXFunc characters;
|
| 984 |
+
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
| 985 |
+
processingInstructionSAXFunc processingInstruction;
|
| 986 |
+
commentSAXFunc comment;
|
| 987 |
+
warningSAXFunc warning;
|
| 988 |
+
errorSAXFunc error;
|
| 989 |
+
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
|
| 990 |
+
getParameterEntitySAXFunc getParameterEntity;
|
| 991 |
+
cdataBlockSAXFunc cdataBlock;
|
| 992 |
+
externalSubsetSAXFunc externalSubset;
|
| 993 |
+
unsigned int initialized;
|
| 994 |
+
};
|
| 995 |
+
|
| 996 |
+
|
| 997 |
+
/**
|
| 998 |
+
* xmlExternalEntityLoader:
|
| 999 |
+
* @URL: The System ID of the resource requested
|
| 1000 |
+
* @ID: The Public ID of the resource requested
|
| 1001 |
+
* @context: the XML parser context
|
| 1002 |
+
*
|
| 1003 |
+
* External entity loaders types.
|
| 1004 |
+
*
|
| 1005 |
+
* Returns the entity input parser.
|
| 1006 |
+
*/
|
| 1007 |
+
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
| 1008 |
+
const char *ID,
|
| 1009 |
+
xmlParserCtxtPtr context);
|
| 1010 |
+
|
| 1011 |
+
/*
|
| 1012 |
+
* Variables
|
| 1013 |
+
*/
|
| 1014 |
+
|
| 1015 |
+
XMLPUBVAR const char *const xmlParserVersion;
|
| 1016 |
+
|
| 1017 |
+
/** DOC_DISABLE */
|
| 1018 |
+
XML_DEPRECATED
|
| 1019 |
+
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
|
| 1020 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1021 |
+
XML_DEPRECATED
|
| 1022 |
+
XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
| 1023 |
+
#endif
|
| 1024 |
+
|
| 1025 |
+
XML_DEPRECATED
|
| 1026 |
+
XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void);
|
| 1027 |
+
XML_DEPRECATED
|
| 1028 |
+
XMLPUBFUN int *__xmlGetWarningsDefaultValue(void);
|
| 1029 |
+
XML_DEPRECATED
|
| 1030 |
+
XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void);
|
| 1031 |
+
XML_DEPRECATED
|
| 1032 |
+
XMLPUBFUN int *__xmlLineNumbersDefaultValue(void);
|
| 1033 |
+
XML_DEPRECATED
|
| 1034 |
+
XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void);
|
| 1035 |
+
XML_DEPRECATED
|
| 1036 |
+
XMLPUBFUN int *__xmlPedanticParserDefaultValue(void);
|
| 1037 |
+
XML_DEPRECATED
|
| 1038 |
+
XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
|
| 1039 |
+
|
| 1040 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 1041 |
+
XMLPUBFUN int *__xmlIndentTreeOutput(void);
|
| 1042 |
+
XMLPUBFUN const char **__xmlTreeIndentString(void);
|
| 1043 |
+
XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
|
| 1044 |
+
#endif
|
| 1045 |
+
|
| 1046 |
+
#ifndef XML_GLOBALS_NO_REDEFINITION
|
| 1047 |
+
#define xmlDoValidityCheckingDefaultValue \
|
| 1048 |
+
(*__xmlDoValidityCheckingDefaultValue())
|
| 1049 |
+
#define xmlGetWarningsDefaultValue \
|
| 1050 |
+
(*__xmlGetWarningsDefaultValue())
|
| 1051 |
+
#define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
|
| 1052 |
+
#define xmlLineNumbersDefaultValue \
|
| 1053 |
+
(*__xmlLineNumbersDefaultValue())
|
| 1054 |
+
#define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
|
| 1055 |
+
#define xmlPedanticParserDefaultValue \
|
| 1056 |
+
(*__xmlPedanticParserDefaultValue())
|
| 1057 |
+
#define xmlSubstituteEntitiesDefaultValue \
|
| 1058 |
+
(*__xmlSubstituteEntitiesDefaultValue())
|
| 1059 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 1060 |
+
#define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
|
| 1061 |
+
#define xmlTreeIndentString (*__xmlTreeIndentString())
|
| 1062 |
+
#define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
|
| 1063 |
+
#endif
|
| 1064 |
+
#endif
|
| 1065 |
+
/** DOC_ENABLE */
|
| 1066 |
+
|
| 1067 |
+
/*
|
| 1068 |
+
* Init/Cleanup
|
| 1069 |
+
*/
|
| 1070 |
+
XMLPUBFUN void
|
| 1071 |
+
xmlInitParser (void);
|
| 1072 |
+
XMLPUBFUN void
|
| 1073 |
+
xmlCleanupParser (void);
|
| 1074 |
+
XML_DEPRECATED
|
| 1075 |
+
XMLPUBFUN void
|
| 1076 |
+
xmlInitGlobals (void);
|
| 1077 |
+
XML_DEPRECATED
|
| 1078 |
+
XMLPUBFUN void
|
| 1079 |
+
xmlCleanupGlobals (void);
|
| 1080 |
+
|
| 1081 |
+
/*
|
| 1082 |
+
* Input functions
|
| 1083 |
+
*/
|
| 1084 |
+
XML_DEPRECATED
|
| 1085 |
+
XMLPUBFUN int
|
| 1086 |
+
xmlParserInputRead (xmlParserInputPtr in,
|
| 1087 |
+
int len);
|
| 1088 |
+
XMLPUBFUN int
|
| 1089 |
+
xmlParserInputGrow (xmlParserInputPtr in,
|
| 1090 |
+
int len);
|
| 1091 |
+
|
| 1092 |
+
/*
|
| 1093 |
+
* Basic parsing Interfaces
|
| 1094 |
+
*/
|
| 1095 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1096 |
+
XMLPUBFUN xmlDocPtr
|
| 1097 |
+
xmlParseDoc (const xmlChar *cur);
|
| 1098 |
+
XMLPUBFUN xmlDocPtr
|
| 1099 |
+
xmlParseFile (const char *filename);
|
| 1100 |
+
XMLPUBFUN xmlDocPtr
|
| 1101 |
+
xmlParseMemory (const char *buffer,
|
| 1102 |
+
int size);
|
| 1103 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1104 |
+
XML_DEPRECATED
|
| 1105 |
+
XMLPUBFUN int
|
| 1106 |
+
xmlSubstituteEntitiesDefault(int val);
|
| 1107 |
+
XML_DEPRECATED
|
| 1108 |
+
XMLPUBFUN int
|
| 1109 |
+
xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
| 1110 |
+
XMLPUBFUN int
|
| 1111 |
+
xmlKeepBlanksDefault (int val);
|
| 1112 |
+
XML_DEPRECATED
|
| 1113 |
+
XMLPUBFUN int
|
| 1114 |
+
xmlThrDefKeepBlanksDefaultValue(int v);
|
| 1115 |
+
XMLPUBFUN void
|
| 1116 |
+
xmlStopParser (xmlParserCtxtPtr ctxt);
|
| 1117 |
+
XML_DEPRECATED
|
| 1118 |
+
XMLPUBFUN int
|
| 1119 |
+
xmlPedanticParserDefault(int val);
|
| 1120 |
+
XML_DEPRECATED
|
| 1121 |
+
XMLPUBFUN int
|
| 1122 |
+
xmlThrDefPedanticParserDefaultValue(int v);
|
| 1123 |
+
XML_DEPRECATED
|
| 1124 |
+
XMLPUBFUN int
|
| 1125 |
+
xmlLineNumbersDefault (int val);
|
| 1126 |
+
XML_DEPRECATED
|
| 1127 |
+
XMLPUBFUN int
|
| 1128 |
+
xmlThrDefLineNumbersDefaultValue(int v);
|
| 1129 |
+
XML_DEPRECATED
|
| 1130 |
+
XMLPUBFUN int
|
| 1131 |
+
xmlThrDefDoValidityCheckingDefaultValue(int v);
|
| 1132 |
+
XML_DEPRECATED
|
| 1133 |
+
XMLPUBFUN int
|
| 1134 |
+
xmlThrDefGetWarningsDefaultValue(int v);
|
| 1135 |
+
XML_DEPRECATED
|
| 1136 |
+
XMLPUBFUN int
|
| 1137 |
+
xmlThrDefLoadExtDtdDefaultValue(int v);
|
| 1138 |
+
|
| 1139 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1140 |
+
/*
|
| 1141 |
+
* Recovery mode
|
| 1142 |
+
*/
|
| 1143 |
+
XML_DEPRECATED
|
| 1144 |
+
XMLPUBFUN xmlDocPtr
|
| 1145 |
+
xmlRecoverDoc (const xmlChar *cur);
|
| 1146 |
+
XML_DEPRECATED
|
| 1147 |
+
XMLPUBFUN xmlDocPtr
|
| 1148 |
+
xmlRecoverMemory (const char *buffer,
|
| 1149 |
+
int size);
|
| 1150 |
+
XML_DEPRECATED
|
| 1151 |
+
XMLPUBFUN xmlDocPtr
|
| 1152 |
+
xmlRecoverFile (const char *filename);
|
| 1153 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1154 |
+
|
| 1155 |
+
/*
|
| 1156 |
+
* Less common routines and SAX interfaces
|
| 1157 |
+
*/
|
| 1158 |
+
XMLPUBFUN int
|
| 1159 |
+
xmlParseDocument (xmlParserCtxtPtr ctxt);
|
| 1160 |
+
XML_DEPRECATED
|
| 1161 |
+
XMLPUBFUN int
|
| 1162 |
+
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
| 1163 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1164 |
+
XML_DEPRECATED
|
| 1165 |
+
XMLPUBFUN int
|
| 1166 |
+
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
|
| 1167 |
+
void *user_data,
|
| 1168 |
+
const char *filename);
|
| 1169 |
+
XML_DEPRECATED
|
| 1170 |
+
XMLPUBFUN int
|
| 1171 |
+
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
|
| 1172 |
+
void *user_data,
|
| 1173 |
+
const char *buffer,
|
| 1174 |
+
int size);
|
| 1175 |
+
XML_DEPRECATED
|
| 1176 |
+
XMLPUBFUN xmlDocPtr
|
| 1177 |
+
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
|
| 1178 |
+
const xmlChar *cur,
|
| 1179 |
+
int recovery);
|
| 1180 |
+
XML_DEPRECATED
|
| 1181 |
+
XMLPUBFUN xmlDocPtr
|
| 1182 |
+
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
| 1183 |
+
const char *buffer,
|
| 1184 |
+
int size,
|
| 1185 |
+
int recovery);
|
| 1186 |
+
XML_DEPRECATED
|
| 1187 |
+
XMLPUBFUN xmlDocPtr
|
| 1188 |
+
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
| 1189 |
+
const char *buffer,
|
| 1190 |
+
int size,
|
| 1191 |
+
int recovery,
|
| 1192 |
+
void *data);
|
| 1193 |
+
XML_DEPRECATED
|
| 1194 |
+
XMLPUBFUN xmlDocPtr
|
| 1195 |
+
xmlSAXParseFile (xmlSAXHandlerPtr sax,
|
| 1196 |
+
const char *filename,
|
| 1197 |
+
int recovery);
|
| 1198 |
+
XML_DEPRECATED
|
| 1199 |
+
XMLPUBFUN xmlDocPtr
|
| 1200 |
+
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
|
| 1201 |
+
const char *filename,
|
| 1202 |
+
int recovery,
|
| 1203 |
+
void *data);
|
| 1204 |
+
XML_DEPRECATED
|
| 1205 |
+
XMLPUBFUN xmlDocPtr
|
| 1206 |
+
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
|
| 1207 |
+
const char *filename);
|
| 1208 |
+
XML_DEPRECATED
|
| 1209 |
+
XMLPUBFUN xmlDocPtr
|
| 1210 |
+
xmlParseEntity (const char *filename);
|
| 1211 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1212 |
+
|
| 1213 |
+
#ifdef LIBXML_VALID_ENABLED
|
| 1214 |
+
XMLPUBFUN xmlDtdPtr
|
| 1215 |
+
xmlCtxtParseDtd (xmlParserCtxtPtr ctxt,
|
| 1216 |
+
xmlParserInputPtr input,
|
| 1217 |
+
const xmlChar *ExternalID,
|
| 1218 |
+
const xmlChar *SystemID);
|
| 1219 |
+
XMLPUBFUN int
|
| 1220 |
+
xmlCtxtValidateDocument (xmlParserCtxtPtr ctxt,
|
| 1221 |
+
xmlDocPtr doc);
|
| 1222 |
+
XMLPUBFUN int
|
| 1223 |
+
xmlCtxtValidateDtd (xmlParserCtxtPtr ctxt,
|
| 1224 |
+
xmlDocPtr doc,
|
| 1225 |
+
xmlDtdPtr dtd);
|
| 1226 |
+
XML_DEPRECATED
|
| 1227 |
+
XMLPUBFUN xmlDtdPtr
|
| 1228 |
+
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
| 1229 |
+
const xmlChar *ExternalID,
|
| 1230 |
+
const xmlChar *SystemID);
|
| 1231 |
+
XMLPUBFUN xmlDtdPtr
|
| 1232 |
+
xmlParseDTD (const xmlChar *ExternalID,
|
| 1233 |
+
const xmlChar *SystemID);
|
| 1234 |
+
XMLPUBFUN xmlDtdPtr
|
| 1235 |
+
xmlIOParseDTD (xmlSAXHandlerPtr sax,
|
| 1236 |
+
xmlParserInputBufferPtr input,
|
| 1237 |
+
xmlCharEncoding enc);
|
| 1238 |
+
#endif /* LIBXML_VALID_ENABLE */
|
| 1239 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1240 |
+
XMLPUBFUN int
|
| 1241 |
+
xmlParseBalancedChunkMemory(xmlDocPtr doc,
|
| 1242 |
+
xmlSAXHandlerPtr sax,
|
| 1243 |
+
void *user_data,
|
| 1244 |
+
int depth,
|
| 1245 |
+
const xmlChar *string,
|
| 1246 |
+
xmlNodePtr *lst);
|
| 1247 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1248 |
+
XMLPUBFUN xmlParserErrors
|
| 1249 |
+
xmlParseInNodeContext (xmlNodePtr node,
|
| 1250 |
+
const char *data,
|
| 1251 |
+
int datalen,
|
| 1252 |
+
int options,
|
| 1253 |
+
xmlNodePtr *lst);
|
| 1254 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1255 |
+
XMLPUBFUN int
|
| 1256 |
+
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
|
| 1257 |
+
xmlSAXHandlerPtr sax,
|
| 1258 |
+
void *user_data,
|
| 1259 |
+
int depth,
|
| 1260 |
+
const xmlChar *string,
|
| 1261 |
+
xmlNodePtr *lst,
|
| 1262 |
+
int recover);
|
| 1263 |
+
XML_DEPRECATED
|
| 1264 |
+
XMLPUBFUN int
|
| 1265 |
+
xmlParseExternalEntity (xmlDocPtr doc,
|
| 1266 |
+
xmlSAXHandlerPtr sax,
|
| 1267 |
+
void *user_data,
|
| 1268 |
+
int depth,
|
| 1269 |
+
const xmlChar *URL,
|
| 1270 |
+
const xmlChar *ID,
|
| 1271 |
+
xmlNodePtr *lst);
|
| 1272 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1273 |
+
XMLPUBFUN int
|
| 1274 |
+
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
|
| 1275 |
+
const xmlChar *URL,
|
| 1276 |
+
const xmlChar *ID,
|
| 1277 |
+
xmlNodePtr *lst);
|
| 1278 |
+
|
| 1279 |
+
/*
|
| 1280 |
+
* Parser contexts handling.
|
| 1281 |
+
*/
|
| 1282 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 1283 |
+
xmlNewParserCtxt (void);
|
| 1284 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 1285 |
+
xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
|
| 1286 |
+
void *userData);
|
| 1287 |
+
XMLPUBFUN int
|
| 1288 |
+
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
|
| 1289 |
+
XMLPUBFUN void
|
| 1290 |
+
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
|
| 1291 |
+
XMLPUBFUN void
|
| 1292 |
+
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
|
| 1293 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 1294 |
+
XML_DEPRECATED
|
| 1295 |
+
XMLPUBFUN void
|
| 1296 |
+
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
|
| 1297 |
+
const xmlChar* buffer,
|
| 1298 |
+
const char *filename);
|
| 1299 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 1300 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 1301 |
+
xmlCreateDocParserCtxt (const xmlChar *cur);
|
| 1302 |
+
|
| 1303 |
+
#ifdef LIBXML_PUSH_ENABLED
|
| 1304 |
+
/*
|
| 1305 |
+
* Interfaces for the Push mode.
|
| 1306 |
+
*/
|
| 1307 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 1308 |
+
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
|
| 1309 |
+
void *user_data,
|
| 1310 |
+
const char *chunk,
|
| 1311 |
+
int size,
|
| 1312 |
+
const char *filename);
|
| 1313 |
+
XMLPUBFUN int
|
| 1314 |
+
xmlParseChunk (xmlParserCtxtPtr ctxt,
|
| 1315 |
+
const char *chunk,
|
| 1316 |
+
int size,
|
| 1317 |
+
int terminate);
|
| 1318 |
+
#endif /* LIBXML_PUSH_ENABLED */
|
| 1319 |
+
|
| 1320 |
+
/*
|
| 1321 |
+
* Special I/O mode.
|
| 1322 |
+
*/
|
| 1323 |
+
|
| 1324 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 1325 |
+
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
|
| 1326 |
+
void *user_data,
|
| 1327 |
+
xmlInputReadCallback ioread,
|
| 1328 |
+
xmlInputCloseCallback ioclose,
|
| 1329 |
+
void *ioctx,
|
| 1330 |
+
xmlCharEncoding enc);
|
| 1331 |
+
|
| 1332 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1333 |
+
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
|
| 1334 |
+
xmlParserInputBufferPtr input,
|
| 1335 |
+
xmlCharEncoding enc);
|
| 1336 |
+
|
| 1337 |
+
/*
|
| 1338 |
+
* Node infos.
|
| 1339 |
+
*/
|
| 1340 |
+
XML_DEPRECATED
|
| 1341 |
+
XMLPUBFUN const xmlParserNodeInfo*
|
| 1342 |
+
xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
|
| 1343 |
+
xmlNodePtr node);
|
| 1344 |
+
XML_DEPRECATED
|
| 1345 |
+
XMLPUBFUN void
|
| 1346 |
+
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
| 1347 |
+
XML_DEPRECATED
|
| 1348 |
+
XMLPUBFUN void
|
| 1349 |
+
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
| 1350 |
+
XML_DEPRECATED
|
| 1351 |
+
XMLPUBFUN unsigned long
|
| 1352 |
+
xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
|
| 1353 |
+
xmlNodePtr node);
|
| 1354 |
+
XML_DEPRECATED
|
| 1355 |
+
XMLPUBFUN void
|
| 1356 |
+
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
| 1357 |
+
xmlParserNodeInfoPtr info);
|
| 1358 |
+
|
| 1359 |
+
/*
|
| 1360 |
+
* External entities handling actually implemented in xmlIO.
|
| 1361 |
+
*/
|
| 1362 |
+
|
| 1363 |
+
XMLPUBFUN void
|
| 1364 |
+
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
|
| 1365 |
+
XMLPUBFUN xmlExternalEntityLoader
|
| 1366 |
+
xmlGetExternalEntityLoader(void);
|
| 1367 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1368 |
+
xmlLoadExternalEntity (const char *URL,
|
| 1369 |
+
const char *ID,
|
| 1370 |
+
xmlParserCtxtPtr ctxt);
|
| 1371 |
+
|
| 1372 |
+
XML_DEPRECATED
|
| 1373 |
+
XMLPUBFUN long
|
| 1374 |
+
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
| 1375 |
+
|
| 1376 |
+
/*
|
| 1377 |
+
* New set of simpler/more flexible APIs
|
| 1378 |
+
*/
|
| 1379 |
+
/**
|
| 1380 |
+
* xmlParserOption:
|
| 1381 |
+
*
|
| 1382 |
+
* This is the set of XML parser options that can be passed down
|
| 1383 |
+
* to the xmlReadDoc() and similar calls.
|
| 1384 |
+
*/
|
| 1385 |
+
typedef enum {
|
| 1386 |
+
XML_PARSE_RECOVER = 1<<0, /* recover on errors */
|
| 1387 |
+
XML_PARSE_NOENT = 1<<1, /* substitute entities */
|
| 1388 |
+
XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
|
| 1389 |
+
XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
|
| 1390 |
+
XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
|
| 1391 |
+
XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
| 1392 |
+
XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
|
| 1393 |
+
XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
| 1394 |
+
XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
| 1395 |
+
XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
|
| 1396 |
+
XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
|
| 1397 |
+
XML_PARSE_NONET = 1<<11,/* Forbid network access */
|
| 1398 |
+
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
|
| 1399 |
+
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
|
| 1400 |
+
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
|
| 1401 |
+
XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
|
| 1402 |
+
XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
|
| 1403 |
+
the tree allowed afterwards (will possibly
|
| 1404 |
+
crash if you try to modify the tree) */
|
| 1405 |
+
XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
|
| 1406 |
+
XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
|
| 1407 |
+
XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
| 1408 |
+
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
|
| 1409 |
+
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
|
| 1410 |
+
XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
|
| 1411 |
+
/* since 2.13.0 */
|
| 1412 |
+
XML_PARSE_NO_XXE = 1<<23,/* disable loading of external content */
|
| 1413 |
+
/* since 2.14.0 */
|
| 1414 |
+
XML_PARSE_UNZIP = 1<<24,/* allow compressed content */
|
| 1415 |
+
XML_PARSE_NO_SYS_CATALOG = 1<<25,/* disable global system catalog */
|
| 1416 |
+
XML_PARSE_CATALOG_PI = 1<<26 /* allow catalog PIs */
|
| 1417 |
+
} xmlParserOption;
|
| 1418 |
+
|
| 1419 |
+
XMLPUBFUN void
|
| 1420 |
+
xmlCtxtReset (xmlParserCtxtPtr ctxt);
|
| 1421 |
+
XMLPUBFUN int
|
| 1422 |
+
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
|
| 1423 |
+
const char *chunk,
|
| 1424 |
+
int size,
|
| 1425 |
+
const char *filename,
|
| 1426 |
+
const char *encoding);
|
| 1427 |
+
XMLPUBFUN int
|
| 1428 |
+
xmlCtxtGetOptions (xmlParserCtxtPtr ctxt);
|
| 1429 |
+
XMLPUBFUN int
|
| 1430 |
+
xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
|
| 1431 |
+
int options);
|
| 1432 |
+
XMLPUBFUN int
|
| 1433 |
+
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
|
| 1434 |
+
int options);
|
| 1435 |
+
XMLPUBFUN void *
|
| 1436 |
+
xmlCtxtGetPrivate (xmlParserCtxtPtr ctxt);
|
| 1437 |
+
XMLPUBFUN void
|
| 1438 |
+
xmlCtxtSetPrivate (xmlParserCtxtPtr ctxt,
|
| 1439 |
+
void *priv);
|
| 1440 |
+
XMLPUBFUN void *
|
| 1441 |
+
xmlCtxtGetCatalogs (xmlParserCtxtPtr ctxt);
|
| 1442 |
+
XMLPUBFUN void
|
| 1443 |
+
xmlCtxtSetCatalogs (xmlParserCtxtPtr ctxt,
|
| 1444 |
+
void *catalogs);
|
| 1445 |
+
XMLPUBFUN xmlDictPtr
|
| 1446 |
+
xmlCtxtGetDict (xmlParserCtxtPtr ctxt);
|
| 1447 |
+
XMLPUBFUN void
|
| 1448 |
+
xmlCtxtSetDict (xmlParserCtxtPtr ctxt,
|
| 1449 |
+
xmlDictPtr);
|
| 1450 |
+
XMLPUBFUN xmlSAXHandler *
|
| 1451 |
+
xmlCtxtGetSaxHandler (xmlParserCtxtPtr ctxt);
|
| 1452 |
+
XMLPUBFUN int
|
| 1453 |
+
xmlCtxtSetSaxHandler (xmlParserCtxtPtr ctxt,
|
| 1454 |
+
const xmlSAXHandler *sax);
|
| 1455 |
+
XMLPUBFUN xmlDocPtr
|
| 1456 |
+
xmlCtxtGetDocument (xmlParserCtxtPtr ctxt);
|
| 1457 |
+
XMLPUBFUN int
|
| 1458 |
+
xmlCtxtIsHtml (xmlParserCtxtPtr ctxt);
|
| 1459 |
+
XMLPUBFUN int
|
| 1460 |
+
xmlCtxtIsStopped (xmlParserCtxtPtr ctxt);
|
| 1461 |
+
#ifdef LIBXML_VALID_ENABLED
|
| 1462 |
+
XMLPUBFUN xmlValidCtxtPtr
|
| 1463 |
+
xmlCtxtGetValidCtxt (xmlParserCtxtPtr ctxt);
|
| 1464 |
+
#endif
|
| 1465 |
+
XMLPUBFUN const xmlChar *
|
| 1466 |
+
xmlCtxtGetVersion (xmlParserCtxtPtr ctxt);
|
| 1467 |
+
XMLPUBFUN const xmlChar *
|
| 1468 |
+
xmlCtxtGetDeclaredEncoding(xmlParserCtxtPtr ctxt);
|
| 1469 |
+
XMLPUBFUN int
|
| 1470 |
+
xmlCtxtGetStandalone (xmlParserCtxtPtr ctxt);
|
| 1471 |
+
XMLPUBFUN xmlParserStatus
|
| 1472 |
+
xmlCtxtGetStatus (xmlParserCtxtPtr ctxt);
|
| 1473 |
+
XMLPUBFUN void
|
| 1474 |
+
xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
|
| 1475 |
+
xmlStructuredErrorFunc handler,
|
| 1476 |
+
void *data);
|
| 1477 |
+
XMLPUBFUN void
|
| 1478 |
+
xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt,
|
| 1479 |
+
xmlResourceLoader loader,
|
| 1480 |
+
void *vctxt);
|
| 1481 |
+
XMLPUBFUN void
|
| 1482 |
+
xmlCtxtSetCharEncConvImpl(xmlParserCtxtPtr ctxt,
|
| 1483 |
+
xmlCharEncConvImpl impl,
|
| 1484 |
+
void *vctxt);
|
| 1485 |
+
XMLPUBFUN void
|
| 1486 |
+
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
|
| 1487 |
+
unsigned maxAmpl);
|
| 1488 |
+
XMLPUBFUN xmlDocPtr
|
| 1489 |
+
xmlReadDoc (const xmlChar *cur,
|
| 1490 |
+
const char *URL,
|
| 1491 |
+
const char *encoding,
|
| 1492 |
+
int options);
|
| 1493 |
+
XMLPUBFUN xmlDocPtr
|
| 1494 |
+
xmlReadFile (const char *URL,
|
| 1495 |
+
const char *encoding,
|
| 1496 |
+
int options);
|
| 1497 |
+
XMLPUBFUN xmlDocPtr
|
| 1498 |
+
xmlReadMemory (const char *buffer,
|
| 1499 |
+
int size,
|
| 1500 |
+
const char *URL,
|
| 1501 |
+
const char *encoding,
|
| 1502 |
+
int options);
|
| 1503 |
+
XMLPUBFUN xmlDocPtr
|
| 1504 |
+
xmlReadFd (int fd,
|
| 1505 |
+
const char *URL,
|
| 1506 |
+
const char *encoding,
|
| 1507 |
+
int options);
|
| 1508 |
+
XMLPUBFUN xmlDocPtr
|
| 1509 |
+
xmlReadIO (xmlInputReadCallback ioread,
|
| 1510 |
+
xmlInputCloseCallback ioclose,
|
| 1511 |
+
void *ioctx,
|
| 1512 |
+
const char *URL,
|
| 1513 |
+
const char *encoding,
|
| 1514 |
+
int options);
|
| 1515 |
+
XMLPUBFUN xmlDocPtr
|
| 1516 |
+
xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
|
| 1517 |
+
xmlParserInputPtr input);
|
| 1518 |
+
XMLPUBFUN xmlNodePtr
|
| 1519 |
+
xmlCtxtParseContent (xmlParserCtxtPtr ctxt,
|
| 1520 |
+
xmlParserInputPtr input,
|
| 1521 |
+
xmlNodePtr node,
|
| 1522 |
+
int hasTextDecl);
|
| 1523 |
+
XMLPUBFUN xmlDocPtr
|
| 1524 |
+
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
| 1525 |
+
const xmlChar *cur,
|
| 1526 |
+
const char *URL,
|
| 1527 |
+
const char *encoding,
|
| 1528 |
+
int options);
|
| 1529 |
+
XMLPUBFUN xmlDocPtr
|
| 1530 |
+
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
|
| 1531 |
+
const char *filename,
|
| 1532 |
+
const char *encoding,
|
| 1533 |
+
int options);
|
| 1534 |
+
XMLPUBFUN xmlDocPtr
|
| 1535 |
+
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
|
| 1536 |
+
const char *buffer,
|
| 1537 |
+
int size,
|
| 1538 |
+
const char *URL,
|
| 1539 |
+
const char *encoding,
|
| 1540 |
+
int options);
|
| 1541 |
+
XMLPUBFUN xmlDocPtr
|
| 1542 |
+
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
|
| 1543 |
+
int fd,
|
| 1544 |
+
const char *URL,
|
| 1545 |
+
const char *encoding,
|
| 1546 |
+
int options);
|
| 1547 |
+
XMLPUBFUN xmlDocPtr
|
| 1548 |
+
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
|
| 1549 |
+
xmlInputReadCallback ioread,
|
| 1550 |
+
xmlInputCloseCallback ioclose,
|
| 1551 |
+
void *ioctx,
|
| 1552 |
+
const char *URL,
|
| 1553 |
+
const char *encoding,
|
| 1554 |
+
int options);
|
| 1555 |
+
|
| 1556 |
+
/**
|
| 1557 |
+
* New input API
|
| 1558 |
+
*/
|
| 1559 |
+
|
| 1560 |
+
XMLPUBFUN xmlParserErrors
|
| 1561 |
+
xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
|
| 1562 |
+
xmlParserInputPtr *out);
|
| 1563 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1564 |
+
xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
|
| 1565 |
+
xmlParserInputFlags flags);
|
| 1566 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1567 |
+
xmlNewInputFromString(const char *url, const char *str,
|
| 1568 |
+
xmlParserInputFlags flags);
|
| 1569 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1570 |
+
xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
|
| 1571 |
+
XMLPUBFUN xmlParserInputPtr
|
| 1572 |
+
xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
|
| 1573 |
+
xmlInputCloseCallback ioClose, void *ioCtxt,
|
| 1574 |
+
xmlParserInputFlags flags);
|
| 1575 |
+
XMLPUBFUN xmlParserErrors
|
| 1576 |
+
xmlInputSetEncodingHandler(xmlParserInputPtr input,
|
| 1577 |
+
xmlCharEncodingHandlerPtr handler);
|
| 1578 |
+
|
| 1579 |
+
/*
|
| 1580 |
+
* Library wide options
|
| 1581 |
+
*/
|
| 1582 |
+
/**
|
| 1583 |
+
* xmlFeature:
|
| 1584 |
+
*
|
| 1585 |
+
* Used to examine the existence of features that can be enabled
|
| 1586 |
+
* or disabled at compile-time.
|
| 1587 |
+
* They used to be called XML_FEATURE_xxx but this clashed with Expat
|
| 1588 |
+
*/
|
| 1589 |
+
typedef enum {
|
| 1590 |
+
XML_WITH_THREAD = 1,
|
| 1591 |
+
XML_WITH_TREE = 2,
|
| 1592 |
+
XML_WITH_OUTPUT = 3,
|
| 1593 |
+
XML_WITH_PUSH = 4,
|
| 1594 |
+
XML_WITH_READER = 5,
|
| 1595 |
+
XML_WITH_PATTERN = 6,
|
| 1596 |
+
XML_WITH_WRITER = 7,
|
| 1597 |
+
XML_WITH_SAX1 = 8,
|
| 1598 |
+
XML_WITH_FTP = 9,
|
| 1599 |
+
XML_WITH_HTTP = 10,
|
| 1600 |
+
XML_WITH_VALID = 11,
|
| 1601 |
+
XML_WITH_HTML = 12,
|
| 1602 |
+
XML_WITH_LEGACY = 13,
|
| 1603 |
+
XML_WITH_C14N = 14,
|
| 1604 |
+
XML_WITH_CATALOG = 15,
|
| 1605 |
+
XML_WITH_XPATH = 16,
|
| 1606 |
+
XML_WITH_XPTR = 17,
|
| 1607 |
+
XML_WITH_XINCLUDE = 18,
|
| 1608 |
+
XML_WITH_ICONV = 19,
|
| 1609 |
+
XML_WITH_ISO8859X = 20,
|
| 1610 |
+
XML_WITH_UNICODE = 21,
|
| 1611 |
+
XML_WITH_REGEXP = 22,
|
| 1612 |
+
XML_WITH_AUTOMATA = 23,
|
| 1613 |
+
XML_WITH_EXPR = 24,
|
| 1614 |
+
XML_WITH_SCHEMAS = 25,
|
| 1615 |
+
XML_WITH_SCHEMATRON = 26,
|
| 1616 |
+
XML_WITH_MODULES = 27,
|
| 1617 |
+
XML_WITH_DEBUG = 28,
|
| 1618 |
+
XML_WITH_DEBUG_MEM = 29,
|
| 1619 |
+
XML_WITH_DEBUG_RUN = 30, /* unused */
|
| 1620 |
+
XML_WITH_ZLIB = 31,
|
| 1621 |
+
XML_WITH_ICU = 32,
|
| 1622 |
+
XML_WITH_LZMA = 33,
|
| 1623 |
+
XML_WITH_RELAXNG = 34, /* since 2.14.0 */
|
| 1624 |
+
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
| 1625 |
+
} xmlFeature;
|
| 1626 |
+
|
| 1627 |
+
XMLPUBFUN int
|
| 1628 |
+
xmlHasFeature (xmlFeature feature);
|
| 1629 |
+
|
| 1630 |
+
#ifdef __cplusplus
|
| 1631 |
+
}
|
| 1632 |
+
#endif
|
| 1633 |
+
#endif /* __XML_PARSER_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parserInternals.h
ADDED
|
@@ -0,0 +1,591 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: internals routines and limits exported by the parser.
|
| 3 |
+
* Description: this module exports a number of internal parsing routines
|
| 4 |
+
* they are not really all intended for applications but
|
| 5 |
+
* can prove useful doing low level processing.
|
| 6 |
+
*
|
| 7 |
+
* Copy: See Copyright for the status of this software.
|
| 8 |
+
*
|
| 9 |
+
* Author: Daniel Veillard
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef __XML_PARSER_INTERNALS_H__
|
| 13 |
+
#define __XML_PARSER_INTERNALS_H__
|
| 14 |
+
|
| 15 |
+
#include <libxml/xmlversion.h>
|
| 16 |
+
#include <libxml/parser.h>
|
| 17 |
+
#include <libxml/HTMLparser.h>
|
| 18 |
+
#include <libxml/chvalid.h>
|
| 19 |
+
#include <libxml/SAX2.h>
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* Backward compatibility
|
| 27 |
+
*/
|
| 28 |
+
#define inputPush xmlCtxtPushInput
|
| 29 |
+
#define inputPop xmlCtxtPopInput
|
| 30 |
+
#define xmlParserMaxDepth 256
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* XML_MAX_TEXT_LENGTH:
|
| 34 |
+
*
|
| 35 |
+
* Maximum size allowed for a single text node when building a tree.
|
| 36 |
+
* This is not a limitation of the parser but a safety boundary feature,
|
| 37 |
+
* use XML_PARSE_HUGE option to override it.
|
| 38 |
+
* Introduced in 2.9.0
|
| 39 |
+
*/
|
| 40 |
+
#define XML_MAX_TEXT_LENGTH 10000000
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* XML_MAX_HUGE_LENGTH:
|
| 44 |
+
*
|
| 45 |
+
* Maximum size allowed when XML_PARSE_HUGE is set.
|
| 46 |
+
*/
|
| 47 |
+
#define XML_MAX_HUGE_LENGTH 1000000000
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* XML_MAX_NAME_LENGTH:
|
| 51 |
+
*
|
| 52 |
+
* Maximum size allowed for a markup identifier.
|
| 53 |
+
* This is not a limitation of the parser but a safety boundary feature,
|
| 54 |
+
* use XML_PARSE_HUGE option to override it.
|
| 55 |
+
* Note that with the use of parsing dictionaries overriding the limit
|
| 56 |
+
* may result in more runtime memory usage in face of "unfriendly' content
|
| 57 |
+
* Introduced in 2.9.0
|
| 58 |
+
*/
|
| 59 |
+
#define XML_MAX_NAME_LENGTH 50000
|
| 60 |
+
|
| 61 |
+
/**
|
| 62 |
+
* XML_MAX_DICTIONARY_LIMIT:
|
| 63 |
+
*
|
| 64 |
+
* Maximum size allowed by the parser for a dictionary by default
|
| 65 |
+
* This is not a limitation of the parser but a safety boundary feature,
|
| 66 |
+
* use XML_PARSE_HUGE option to override it.
|
| 67 |
+
* Introduced in 2.9.0
|
| 68 |
+
*/
|
| 69 |
+
#define XML_MAX_DICTIONARY_LIMIT 100000000
|
| 70 |
+
|
| 71 |
+
/**
|
| 72 |
+
* XML_MAX_LOOKUP_LIMIT:
|
| 73 |
+
*
|
| 74 |
+
* Maximum size allowed by the parser for ahead lookup
|
| 75 |
+
* This is an upper boundary enforced by the parser to avoid bad
|
| 76 |
+
* behaviour on "unfriendly' content
|
| 77 |
+
* Introduced in 2.9.0
|
| 78 |
+
*/
|
| 79 |
+
#define XML_MAX_LOOKUP_LIMIT 10000000
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* XML_MAX_NAMELEN:
|
| 83 |
+
*
|
| 84 |
+
* Identifiers can be longer, but this will be more costly
|
| 85 |
+
* at runtime.
|
| 86 |
+
*/
|
| 87 |
+
#define XML_MAX_NAMELEN 100
|
| 88 |
+
|
| 89 |
+
/************************************************************************
|
| 90 |
+
* *
|
| 91 |
+
* UNICODE version of the macros. *
|
| 92 |
+
* *
|
| 93 |
+
************************************************************************/
|
| 94 |
+
/**
|
| 95 |
+
* IS_BYTE_CHAR:
|
| 96 |
+
* @c: an byte value (int)
|
| 97 |
+
*
|
| 98 |
+
* Macro to check the following production in the XML spec:
|
| 99 |
+
*
|
| 100 |
+
* [2] Char ::= #x9 | #xA | #xD | [#x20...]
|
| 101 |
+
* any byte character in the accepted range
|
| 102 |
+
*/
|
| 103 |
+
#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* IS_CHAR:
|
| 107 |
+
* @c: an UNICODE value (int)
|
| 108 |
+
*
|
| 109 |
+
* Macro to check the following production in the XML spec:
|
| 110 |
+
*
|
| 111 |
+
* [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
|
| 112 |
+
* | [#x10000-#x10FFFF]
|
| 113 |
+
* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
|
| 114 |
+
*/
|
| 115 |
+
#define IS_CHAR(c) xmlIsCharQ(c)
|
| 116 |
+
|
| 117 |
+
/**
|
| 118 |
+
* IS_CHAR_CH:
|
| 119 |
+
* @c: an xmlChar (usually an unsigned char)
|
| 120 |
+
*
|
| 121 |
+
* Behaves like IS_CHAR on single-byte value
|
| 122 |
+
*/
|
| 123 |
+
#define IS_CHAR_CH(c) xmlIsChar_ch(c)
|
| 124 |
+
|
| 125 |
+
/**
|
| 126 |
+
* IS_BLANK:
|
| 127 |
+
* @c: an UNICODE value (int)
|
| 128 |
+
*
|
| 129 |
+
* Macro to check the following production in the XML spec:
|
| 130 |
+
*
|
| 131 |
+
* [3] S ::= (#x20 | #x9 | #xD | #xA)+
|
| 132 |
+
*/
|
| 133 |
+
#define IS_BLANK(c) xmlIsBlankQ(c)
|
| 134 |
+
|
| 135 |
+
/**
|
| 136 |
+
* IS_BLANK_CH:
|
| 137 |
+
* @c: an xmlChar value (normally unsigned char)
|
| 138 |
+
*
|
| 139 |
+
* Behaviour same as IS_BLANK
|
| 140 |
+
*/
|
| 141 |
+
#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
|
| 142 |
+
|
| 143 |
+
/**
|
| 144 |
+
* IS_BASECHAR:
|
| 145 |
+
* @c: an UNICODE value (int)
|
| 146 |
+
*
|
| 147 |
+
* Macro to check the following production in the XML spec:
|
| 148 |
+
*
|
| 149 |
+
* [85] BaseChar ::= ... long list see REC ...
|
| 150 |
+
*/
|
| 151 |
+
#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
|
| 152 |
+
|
| 153 |
+
/**
|
| 154 |
+
* IS_DIGIT:
|
| 155 |
+
* @c: an UNICODE value (int)
|
| 156 |
+
*
|
| 157 |
+
* Macro to check the following production in the XML spec:
|
| 158 |
+
*
|
| 159 |
+
* [88] Digit ::= ... long list see REC ...
|
| 160 |
+
*/
|
| 161 |
+
#define IS_DIGIT(c) xmlIsDigitQ(c)
|
| 162 |
+
|
| 163 |
+
/**
|
| 164 |
+
* IS_DIGIT_CH:
|
| 165 |
+
* @c: an xmlChar value (usually an unsigned char)
|
| 166 |
+
*
|
| 167 |
+
* Behaves like IS_DIGIT but with a single byte argument
|
| 168 |
+
*/
|
| 169 |
+
#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
|
| 170 |
+
|
| 171 |
+
/**
|
| 172 |
+
* IS_COMBINING:
|
| 173 |
+
* @c: an UNICODE value (int)
|
| 174 |
+
*
|
| 175 |
+
* Macro to check the following production in the XML spec:
|
| 176 |
+
*
|
| 177 |
+
* [87] CombiningChar ::= ... long list see REC ...
|
| 178 |
+
*/
|
| 179 |
+
#define IS_COMBINING(c) xmlIsCombiningQ(c)
|
| 180 |
+
|
| 181 |
+
/**
|
| 182 |
+
* IS_COMBINING_CH:
|
| 183 |
+
* @c: an xmlChar (usually an unsigned char)
|
| 184 |
+
*
|
| 185 |
+
* Always false (all combining chars > 0xff)
|
| 186 |
+
*/
|
| 187 |
+
#define IS_COMBINING_CH(c) 0
|
| 188 |
+
|
| 189 |
+
/**
|
| 190 |
+
* IS_EXTENDER:
|
| 191 |
+
* @c: an UNICODE value (int)
|
| 192 |
+
*
|
| 193 |
+
* Macro to check the following production in the XML spec:
|
| 194 |
+
*
|
| 195 |
+
*
|
| 196 |
+
* [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
|
| 197 |
+
* #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
|
| 198 |
+
* [#x309D-#x309E] | [#x30FC-#x30FE]
|
| 199 |
+
*/
|
| 200 |
+
#define IS_EXTENDER(c) xmlIsExtenderQ(c)
|
| 201 |
+
|
| 202 |
+
/**
|
| 203 |
+
* IS_EXTENDER_CH:
|
| 204 |
+
* @c: an xmlChar value (usually an unsigned char)
|
| 205 |
+
*
|
| 206 |
+
* Behaves like IS_EXTENDER but with a single-byte argument
|
| 207 |
+
*/
|
| 208 |
+
#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
|
| 209 |
+
|
| 210 |
+
/**
|
| 211 |
+
* IS_IDEOGRAPHIC:
|
| 212 |
+
* @c: an UNICODE value (int)
|
| 213 |
+
*
|
| 214 |
+
* Macro to check the following production in the XML spec:
|
| 215 |
+
*
|
| 216 |
+
*
|
| 217 |
+
* [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
|
| 218 |
+
*/
|
| 219 |
+
#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
|
| 220 |
+
|
| 221 |
+
/**
|
| 222 |
+
* IS_LETTER:
|
| 223 |
+
* @c: an UNICODE value (int)
|
| 224 |
+
*
|
| 225 |
+
* Macro to check the following production in the XML spec:
|
| 226 |
+
*
|
| 227 |
+
*
|
| 228 |
+
* [84] Letter ::= BaseChar | Ideographic
|
| 229 |
+
*/
|
| 230 |
+
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
|
| 231 |
+
|
| 232 |
+
/**
|
| 233 |
+
* IS_LETTER_CH:
|
| 234 |
+
* @c: an xmlChar value (normally unsigned char)
|
| 235 |
+
*
|
| 236 |
+
* Macro behaves like IS_LETTER, but only check base chars
|
| 237 |
+
*
|
| 238 |
+
*/
|
| 239 |
+
#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
|
| 240 |
+
|
| 241 |
+
/**
|
| 242 |
+
* IS_ASCII_LETTER:
|
| 243 |
+
* @c: an xmlChar value
|
| 244 |
+
*
|
| 245 |
+
* Macro to check [a-zA-Z]
|
| 246 |
+
*
|
| 247 |
+
*/
|
| 248 |
+
#define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \
|
| 249 |
+
(((c) | 0x20) <= 0x7a))
|
| 250 |
+
|
| 251 |
+
/**
|
| 252 |
+
* IS_ASCII_DIGIT:
|
| 253 |
+
* @c: an xmlChar value
|
| 254 |
+
*
|
| 255 |
+
* Macro to check [0-9]
|
| 256 |
+
*
|
| 257 |
+
*/
|
| 258 |
+
#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
|
| 259 |
+
|
| 260 |
+
/**
|
| 261 |
+
* IS_PUBIDCHAR:
|
| 262 |
+
* @c: an UNICODE value (int)
|
| 263 |
+
*
|
| 264 |
+
* Macro to check the following production in the XML spec:
|
| 265 |
+
*
|
| 266 |
+
*
|
| 267 |
+
* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
|
| 268 |
+
*/
|
| 269 |
+
#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
|
| 270 |
+
|
| 271 |
+
/**
|
| 272 |
+
* IS_PUBIDCHAR_CH:
|
| 273 |
+
* @c: an xmlChar value (normally unsigned char)
|
| 274 |
+
*
|
| 275 |
+
* Same as IS_PUBIDCHAR but for single-byte value
|
| 276 |
+
*/
|
| 277 |
+
#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
|
| 278 |
+
|
| 279 |
+
/**
|
| 280 |
+
* Global variables used for predefined strings.
|
| 281 |
+
*/
|
| 282 |
+
XMLPUBVAR const xmlChar xmlStringText[];
|
| 283 |
+
XMLPUBVAR const xmlChar xmlStringTextNoenc[];
|
| 284 |
+
XML_DEPRECATED
|
| 285 |
+
XMLPUBVAR const xmlChar xmlStringComment[];
|
| 286 |
+
|
| 287 |
+
XML_DEPRECATED
|
| 288 |
+
XMLPUBFUN int xmlIsLetter (int c);
|
| 289 |
+
|
| 290 |
+
/**
|
| 291 |
+
* Parser context.
|
| 292 |
+
*/
|
| 293 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 294 |
+
xmlCreateFileParserCtxt (const char *filename);
|
| 295 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 296 |
+
xmlCreateURLParserCtxt (const char *filename,
|
| 297 |
+
int options);
|
| 298 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 299 |
+
xmlCreateMemoryParserCtxt(const char *buffer,
|
| 300 |
+
int size);
|
| 301 |
+
XML_DEPRECATED
|
| 302 |
+
XMLPUBFUN xmlParserCtxtPtr
|
| 303 |
+
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
| 304 |
+
const xmlChar *ID,
|
| 305 |
+
const xmlChar *base);
|
| 306 |
+
XMLPUBFUN void
|
| 307 |
+
xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
|
| 308 |
+
XMLPUBFUN int
|
| 309 |
+
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
| 310 |
+
xmlCharEncoding enc);
|
| 311 |
+
XMLPUBFUN int
|
| 312 |
+
xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
|
| 313 |
+
const char *encoding);
|
| 314 |
+
XMLPUBFUN int
|
| 315 |
+
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
| 316 |
+
xmlCharEncodingHandlerPtr handler);
|
| 317 |
+
XML_DEPRECATED
|
| 318 |
+
XMLPUBFUN int
|
| 319 |
+
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
|
| 320 |
+
xmlParserInputPtr input,
|
| 321 |
+
xmlCharEncodingHandlerPtr handler);
|
| 322 |
+
|
| 323 |
+
/**
|
| 324 |
+
* Input Streams.
|
| 325 |
+
*/
|
| 326 |
+
XMLPUBFUN xmlParserInputPtr
|
| 327 |
+
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
|
| 328 |
+
const xmlChar *buffer);
|
| 329 |
+
XML_DEPRECATED
|
| 330 |
+
XMLPUBFUN xmlParserInputPtr
|
| 331 |
+
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
|
| 332 |
+
xmlEntityPtr entity);
|
| 333 |
+
XMLPUBFUN int
|
| 334 |
+
xmlCtxtPushInput (xmlParserCtxtPtr ctxt,
|
| 335 |
+
xmlParserInputPtr input);
|
| 336 |
+
XMLPUBFUN xmlParserInputPtr
|
| 337 |
+
xmlCtxtPopInput (xmlParserCtxtPtr ctxt);
|
| 338 |
+
XML_DEPRECATED
|
| 339 |
+
XMLPUBFUN int
|
| 340 |
+
xmlPushInput (xmlParserCtxtPtr ctxt,
|
| 341 |
+
xmlParserInputPtr input);
|
| 342 |
+
XML_DEPRECATED
|
| 343 |
+
XMLPUBFUN xmlChar
|
| 344 |
+
xmlPopInput (xmlParserCtxtPtr ctxt);
|
| 345 |
+
XMLPUBFUN void
|
| 346 |
+
xmlFreeInputStream (xmlParserInputPtr input);
|
| 347 |
+
XMLPUBFUN xmlParserInputPtr
|
| 348 |
+
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
|
| 349 |
+
const char *filename);
|
| 350 |
+
XMLPUBFUN xmlParserInputPtr
|
| 351 |
+
xmlNewInputStream (xmlParserCtxtPtr ctxt);
|
| 352 |
+
|
| 353 |
+
/**
|
| 354 |
+
* Namespaces.
|
| 355 |
+
*/
|
| 356 |
+
XMLPUBFUN xmlChar *
|
| 357 |
+
xmlSplitQName (xmlParserCtxtPtr ctxt,
|
| 358 |
+
const xmlChar *name,
|
| 359 |
+
xmlChar **prefix);
|
| 360 |
+
|
| 361 |
+
/**
|
| 362 |
+
* Generic production rules.
|
| 363 |
+
*/
|
| 364 |
+
XML_DEPRECATED
|
| 365 |
+
XMLPUBFUN const xmlChar *
|
| 366 |
+
xmlParseName (xmlParserCtxtPtr ctxt);
|
| 367 |
+
XML_DEPRECATED
|
| 368 |
+
XMLPUBFUN xmlChar *
|
| 369 |
+
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
|
| 370 |
+
XML_DEPRECATED
|
| 371 |
+
XMLPUBFUN xmlChar *
|
| 372 |
+
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
|
| 373 |
+
xmlChar **orig);
|
| 374 |
+
XML_DEPRECATED
|
| 375 |
+
XMLPUBFUN xmlChar *
|
| 376 |
+
xmlParseAttValue (xmlParserCtxtPtr ctxt);
|
| 377 |
+
XML_DEPRECATED
|
| 378 |
+
XMLPUBFUN xmlChar *
|
| 379 |
+
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
|
| 380 |
+
XML_DEPRECATED
|
| 381 |
+
XMLPUBFUN xmlChar *
|
| 382 |
+
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
|
| 383 |
+
XML_DEPRECATED
|
| 384 |
+
XMLPUBFUN void
|
| 385 |
+
xmlParseCharData (xmlParserCtxtPtr ctxt,
|
| 386 |
+
int cdata);
|
| 387 |
+
XML_DEPRECATED
|
| 388 |
+
XMLPUBFUN xmlChar *
|
| 389 |
+
xmlParseExternalID (xmlParserCtxtPtr ctxt,
|
| 390 |
+
xmlChar **publicID,
|
| 391 |
+
int strict);
|
| 392 |
+
XML_DEPRECATED
|
| 393 |
+
XMLPUBFUN void
|
| 394 |
+
xmlParseComment (xmlParserCtxtPtr ctxt);
|
| 395 |
+
XML_DEPRECATED
|
| 396 |
+
XMLPUBFUN const xmlChar *
|
| 397 |
+
xmlParsePITarget (xmlParserCtxtPtr ctxt);
|
| 398 |
+
XML_DEPRECATED
|
| 399 |
+
XMLPUBFUN void
|
| 400 |
+
xmlParsePI (xmlParserCtxtPtr ctxt);
|
| 401 |
+
XML_DEPRECATED
|
| 402 |
+
XMLPUBFUN void
|
| 403 |
+
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
|
| 404 |
+
XML_DEPRECATED
|
| 405 |
+
XMLPUBFUN void
|
| 406 |
+
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
|
| 407 |
+
XML_DEPRECATED
|
| 408 |
+
XMLPUBFUN int
|
| 409 |
+
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
|
| 410 |
+
xmlChar **value);
|
| 411 |
+
XML_DEPRECATED
|
| 412 |
+
XMLPUBFUN xmlEnumerationPtr
|
| 413 |
+
xmlParseNotationType (xmlParserCtxtPtr ctxt);
|
| 414 |
+
XML_DEPRECATED
|
| 415 |
+
XMLPUBFUN xmlEnumerationPtr
|
| 416 |
+
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
|
| 417 |
+
XML_DEPRECATED
|
| 418 |
+
XMLPUBFUN int
|
| 419 |
+
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
|
| 420 |
+
xmlEnumerationPtr *tree);
|
| 421 |
+
XML_DEPRECATED
|
| 422 |
+
XMLPUBFUN int
|
| 423 |
+
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
|
| 424 |
+
xmlEnumerationPtr *tree);
|
| 425 |
+
XML_DEPRECATED
|
| 426 |
+
XMLPUBFUN void
|
| 427 |
+
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
|
| 428 |
+
XML_DEPRECATED
|
| 429 |
+
XMLPUBFUN xmlElementContentPtr
|
| 430 |
+
xmlParseElementMixedContentDecl
|
| 431 |
+
(xmlParserCtxtPtr ctxt,
|
| 432 |
+
int inputchk);
|
| 433 |
+
XML_DEPRECATED
|
| 434 |
+
XMLPUBFUN xmlElementContentPtr
|
| 435 |
+
xmlParseElementChildrenContentDecl
|
| 436 |
+
(xmlParserCtxtPtr ctxt,
|
| 437 |
+
int inputchk);
|
| 438 |
+
XML_DEPRECATED
|
| 439 |
+
XMLPUBFUN int
|
| 440 |
+
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
|
| 441 |
+
const xmlChar *name,
|
| 442 |
+
xmlElementContentPtr *result);
|
| 443 |
+
XML_DEPRECATED
|
| 444 |
+
XMLPUBFUN int
|
| 445 |
+
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
|
| 446 |
+
XML_DEPRECATED
|
| 447 |
+
XMLPUBFUN void
|
| 448 |
+
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
|
| 449 |
+
XML_DEPRECATED
|
| 450 |
+
XMLPUBFUN int
|
| 451 |
+
xmlParseCharRef (xmlParserCtxtPtr ctxt);
|
| 452 |
+
XML_DEPRECATED
|
| 453 |
+
XMLPUBFUN xmlEntityPtr
|
| 454 |
+
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
|
| 455 |
+
XML_DEPRECATED
|
| 456 |
+
XMLPUBFUN void
|
| 457 |
+
xmlParseReference (xmlParserCtxtPtr ctxt);
|
| 458 |
+
XML_DEPRECATED
|
| 459 |
+
XMLPUBFUN void
|
| 460 |
+
xmlParsePEReference (xmlParserCtxtPtr ctxt);
|
| 461 |
+
XML_DEPRECATED
|
| 462 |
+
XMLPUBFUN void
|
| 463 |
+
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
|
| 464 |
+
#ifdef LIBXML_SAX1_ENABLED
|
| 465 |
+
XML_DEPRECATED
|
| 466 |
+
XMLPUBFUN const xmlChar *
|
| 467 |
+
xmlParseAttribute (xmlParserCtxtPtr ctxt,
|
| 468 |
+
xmlChar **value);
|
| 469 |
+
XML_DEPRECATED
|
| 470 |
+
XMLPUBFUN const xmlChar *
|
| 471 |
+
xmlParseStartTag (xmlParserCtxtPtr ctxt);
|
| 472 |
+
XML_DEPRECATED
|
| 473 |
+
XMLPUBFUN void
|
| 474 |
+
xmlParseEndTag (xmlParserCtxtPtr ctxt);
|
| 475 |
+
#endif /* LIBXML_SAX1_ENABLED */
|
| 476 |
+
XML_DEPRECATED
|
| 477 |
+
XMLPUBFUN void
|
| 478 |
+
xmlParseCDSect (xmlParserCtxtPtr ctxt);
|
| 479 |
+
XMLPUBFUN void
|
| 480 |
+
xmlParseContent (xmlParserCtxtPtr ctxt);
|
| 481 |
+
XML_DEPRECATED
|
| 482 |
+
XMLPUBFUN void
|
| 483 |
+
xmlParseElement (xmlParserCtxtPtr ctxt);
|
| 484 |
+
XML_DEPRECATED
|
| 485 |
+
XMLPUBFUN xmlChar *
|
| 486 |
+
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
|
| 487 |
+
XML_DEPRECATED
|
| 488 |
+
XMLPUBFUN xmlChar *
|
| 489 |
+
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
|
| 490 |
+
XML_DEPRECATED
|
| 491 |
+
XMLPUBFUN xmlChar *
|
| 492 |
+
xmlParseEncName (xmlParserCtxtPtr ctxt);
|
| 493 |
+
XML_DEPRECATED
|
| 494 |
+
XMLPUBFUN const xmlChar *
|
| 495 |
+
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
|
| 496 |
+
XML_DEPRECATED
|
| 497 |
+
XMLPUBFUN int
|
| 498 |
+
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
|
| 499 |
+
XML_DEPRECATED
|
| 500 |
+
XMLPUBFUN void
|
| 501 |
+
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
|
| 502 |
+
XML_DEPRECATED
|
| 503 |
+
XMLPUBFUN void
|
| 504 |
+
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
|
| 505 |
+
XML_DEPRECATED
|
| 506 |
+
XMLPUBFUN void
|
| 507 |
+
xmlParseMisc (xmlParserCtxtPtr ctxt);
|
| 508 |
+
XML_DEPRECATED
|
| 509 |
+
XMLPUBFUN void
|
| 510 |
+
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
|
| 511 |
+
const xmlChar *ExternalID,
|
| 512 |
+
const xmlChar *SystemID);
|
| 513 |
+
/**
|
| 514 |
+
* XML_SUBSTITUTE_NONE:
|
| 515 |
+
*
|
| 516 |
+
* If no entities need to be substituted.
|
| 517 |
+
*/
|
| 518 |
+
#define XML_SUBSTITUTE_NONE 0
|
| 519 |
+
/**
|
| 520 |
+
* XML_SUBSTITUTE_REF:
|
| 521 |
+
*
|
| 522 |
+
* Whether general entities need to be substituted.
|
| 523 |
+
*/
|
| 524 |
+
#define XML_SUBSTITUTE_REF 1
|
| 525 |
+
/**
|
| 526 |
+
* XML_SUBSTITUTE_PEREF:
|
| 527 |
+
*
|
| 528 |
+
* Whether parameter entities need to be substituted.
|
| 529 |
+
*/
|
| 530 |
+
#define XML_SUBSTITUTE_PEREF 2
|
| 531 |
+
/**
|
| 532 |
+
* XML_SUBSTITUTE_BOTH:
|
| 533 |
+
*
|
| 534 |
+
* Both general and parameter entities need to be substituted.
|
| 535 |
+
*/
|
| 536 |
+
#define XML_SUBSTITUTE_BOTH 3
|
| 537 |
+
|
| 538 |
+
XML_DEPRECATED
|
| 539 |
+
XMLPUBFUN xmlChar *
|
| 540 |
+
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
|
| 541 |
+
const xmlChar *str,
|
| 542 |
+
int what,
|
| 543 |
+
xmlChar end,
|
| 544 |
+
xmlChar end2,
|
| 545 |
+
xmlChar end3);
|
| 546 |
+
XML_DEPRECATED
|
| 547 |
+
XMLPUBFUN xmlChar *
|
| 548 |
+
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
|
| 549 |
+
const xmlChar *str,
|
| 550 |
+
int len,
|
| 551 |
+
int what,
|
| 552 |
+
xmlChar end,
|
| 553 |
+
xmlChar end2,
|
| 554 |
+
xmlChar end3);
|
| 555 |
+
|
| 556 |
+
/*
|
| 557 |
+
* other commodities shared between parser.c and parserInternals.
|
| 558 |
+
*/
|
| 559 |
+
XML_DEPRECATED
|
| 560 |
+
XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
|
| 561 |
+
XML_DEPRECATED
|
| 562 |
+
XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
|
| 563 |
+
const xmlChar *cur,
|
| 564 |
+
int *len);
|
| 565 |
+
XML_DEPRECATED
|
| 566 |
+
XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
|
| 567 |
+
XML_DEPRECATED
|
| 568 |
+
XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
|
| 569 |
+
|
| 570 |
+
/*
|
| 571 |
+
* Really core function shared with HTML parser.
|
| 572 |
+
*/
|
| 573 |
+
XML_DEPRECATED
|
| 574 |
+
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
| 575 |
+
int *len);
|
| 576 |
+
XML_DEPRECATED
|
| 577 |
+
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
|
| 578 |
+
int val);
|
| 579 |
+
XML_DEPRECATED
|
| 580 |
+
XMLPUBFUN int xmlCopyChar (int len,
|
| 581 |
+
xmlChar *out,
|
| 582 |
+
int val);
|
| 583 |
+
XML_DEPRECATED
|
| 584 |
+
XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
|
| 585 |
+
XML_DEPRECATED
|
| 586 |
+
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
|
| 587 |
+
|
| 588 |
+
#ifdef __cplusplus
|
| 589 |
+
}
|
| 590 |
+
#endif
|
| 591 |
+
#endif /* __XML_PARSER_INTERNALS_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/relaxng.h
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: implementation of the Relax-NG validation
|
| 3 |
+
* Description: implementation of the Relax-NG validation
|
| 4 |
+
*
|
| 5 |
+
* Copy: See Copyright for the status of this software.
|
| 6 |
+
*
|
| 7 |
+
* Author: Daniel Veillard
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef __XML_RELAX_NG__
|
| 11 |
+
#define __XML_RELAX_NG__
|
| 12 |
+
|
| 13 |
+
#include <libxml/xmlversion.h>
|
| 14 |
+
#include <libxml/xmlerror.h>
|
| 15 |
+
#include <libxml/xmlstring.h>
|
| 16 |
+
#include <libxml/tree.h>
|
| 17 |
+
#include <libxml/parser.h>
|
| 18 |
+
|
| 19 |
+
#ifdef LIBXML_RELAXNG_ENABLED
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
typedef struct _xmlRelaxNG xmlRelaxNG;
|
| 26 |
+
typedef xmlRelaxNG *xmlRelaxNGPtr;
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* xmlRelaxNGValidityErrorFunc:
|
| 31 |
+
* @ctx: the validation context
|
| 32 |
+
* @msg: the message
|
| 33 |
+
* @...: extra arguments
|
| 34 |
+
*
|
| 35 |
+
* Signature of an error callback from a Relax-NG validation
|
| 36 |
+
*/
|
| 37 |
+
typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
|
| 38 |
+
const char *msg,
|
| 39 |
+
...) LIBXML_ATTR_FORMAT(2,3);
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* xmlRelaxNGValidityWarningFunc:
|
| 43 |
+
* @ctx: the validation context
|
| 44 |
+
* @msg: the message
|
| 45 |
+
* @...: extra arguments
|
| 46 |
+
*
|
| 47 |
+
* Signature of a warning callback from a Relax-NG validation
|
| 48 |
+
*/
|
| 49 |
+
typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
|
| 50 |
+
const char *msg,
|
| 51 |
+
...) LIBXML_ATTR_FORMAT(2,3);
|
| 52 |
+
|
| 53 |
+
/**
|
| 54 |
+
* A schemas validation context
|
| 55 |
+
*/
|
| 56 |
+
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
|
| 57 |
+
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
|
| 58 |
+
|
| 59 |
+
typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
|
| 60 |
+
typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
|
| 61 |
+
|
| 62 |
+
/*
|
| 63 |
+
* xmlRelaxNGValidErr:
|
| 64 |
+
*
|
| 65 |
+
* List of possible Relax NG validation errors
|
| 66 |
+
*/
|
| 67 |
+
typedef enum {
|
| 68 |
+
XML_RELAXNG_OK = 0,
|
| 69 |
+
XML_RELAXNG_ERR_MEMORY,
|
| 70 |
+
XML_RELAXNG_ERR_TYPE,
|
| 71 |
+
XML_RELAXNG_ERR_TYPEVAL,
|
| 72 |
+
XML_RELAXNG_ERR_DUPID,
|
| 73 |
+
XML_RELAXNG_ERR_TYPECMP,
|
| 74 |
+
XML_RELAXNG_ERR_NOSTATE,
|
| 75 |
+
XML_RELAXNG_ERR_NODEFINE,
|
| 76 |
+
XML_RELAXNG_ERR_LISTEXTRA,
|
| 77 |
+
XML_RELAXNG_ERR_LISTEMPTY,
|
| 78 |
+
XML_RELAXNG_ERR_INTERNODATA,
|
| 79 |
+
XML_RELAXNG_ERR_INTERSEQ,
|
| 80 |
+
XML_RELAXNG_ERR_INTEREXTRA,
|
| 81 |
+
XML_RELAXNG_ERR_ELEMNAME,
|
| 82 |
+
XML_RELAXNG_ERR_ATTRNAME,
|
| 83 |
+
XML_RELAXNG_ERR_ELEMNONS,
|
| 84 |
+
XML_RELAXNG_ERR_ATTRNONS,
|
| 85 |
+
XML_RELAXNG_ERR_ELEMWRONGNS,
|
| 86 |
+
XML_RELAXNG_ERR_ATTRWRONGNS,
|
| 87 |
+
XML_RELAXNG_ERR_ELEMEXTRANS,
|
| 88 |
+
XML_RELAXNG_ERR_ATTREXTRANS,
|
| 89 |
+
XML_RELAXNG_ERR_ELEMNOTEMPTY,
|
| 90 |
+
XML_RELAXNG_ERR_NOELEM,
|
| 91 |
+
XML_RELAXNG_ERR_NOTELEM,
|
| 92 |
+
XML_RELAXNG_ERR_ATTRVALID,
|
| 93 |
+
XML_RELAXNG_ERR_CONTENTVALID,
|
| 94 |
+
XML_RELAXNG_ERR_EXTRACONTENT,
|
| 95 |
+
XML_RELAXNG_ERR_INVALIDATTR,
|
| 96 |
+
XML_RELAXNG_ERR_DATAELEM,
|
| 97 |
+
XML_RELAXNG_ERR_VALELEM,
|
| 98 |
+
XML_RELAXNG_ERR_LISTELEM,
|
| 99 |
+
XML_RELAXNG_ERR_DATATYPE,
|
| 100 |
+
XML_RELAXNG_ERR_VALUE,
|
| 101 |
+
XML_RELAXNG_ERR_LIST,
|
| 102 |
+
XML_RELAXNG_ERR_NOGRAMMAR,
|
| 103 |
+
XML_RELAXNG_ERR_EXTRADATA,
|
| 104 |
+
XML_RELAXNG_ERR_LACKDATA,
|
| 105 |
+
XML_RELAXNG_ERR_INTERNAL,
|
| 106 |
+
XML_RELAXNG_ERR_ELEMWRONG,
|
| 107 |
+
XML_RELAXNG_ERR_TEXTWRONG
|
| 108 |
+
} xmlRelaxNGValidErr;
|
| 109 |
+
|
| 110 |
+
/*
|
| 111 |
+
* xmlRelaxNGParserFlags:
|
| 112 |
+
*
|
| 113 |
+
* List of possible Relax NG Parser flags
|
| 114 |
+
*/
|
| 115 |
+
typedef enum {
|
| 116 |
+
XML_RELAXNGP_NONE = 0,
|
| 117 |
+
XML_RELAXNGP_FREE_DOC = 1,
|
| 118 |
+
XML_RELAXNGP_CRNG = 2
|
| 119 |
+
} xmlRelaxNGParserFlag;
|
| 120 |
+
|
| 121 |
+
XMLPUBFUN int
|
| 122 |
+
xmlRelaxNGInitTypes (void);
|
| 123 |
+
XML_DEPRECATED
|
| 124 |
+
XMLPUBFUN void
|
| 125 |
+
xmlRelaxNGCleanupTypes (void);
|
| 126 |
+
|
| 127 |
+
/*
|
| 128 |
+
* Interfaces for parsing.
|
| 129 |
+
*/
|
| 130 |
+
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
| 131 |
+
xmlRelaxNGNewParserCtxt (const char *URL);
|
| 132 |
+
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
| 133 |
+
xmlRelaxNGNewMemParserCtxt (const char *buffer,
|
| 134 |
+
int size);
|
| 135 |
+
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
| 136 |
+
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
|
| 137 |
+
|
| 138 |
+
XMLPUBFUN int
|
| 139 |
+
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
|
| 140 |
+
int flag);
|
| 141 |
+
|
| 142 |
+
XMLPUBFUN void
|
| 143 |
+
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
|
| 144 |
+
XMLPUBFUN void
|
| 145 |
+
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
| 146 |
+
xmlRelaxNGValidityErrorFunc err,
|
| 147 |
+
xmlRelaxNGValidityWarningFunc warn,
|
| 148 |
+
void *ctx);
|
| 149 |
+
XMLPUBFUN int
|
| 150 |
+
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
| 151 |
+
xmlRelaxNGValidityErrorFunc *err,
|
| 152 |
+
xmlRelaxNGValidityWarningFunc *warn,
|
| 153 |
+
void **ctx);
|
| 154 |
+
XMLPUBFUN void
|
| 155 |
+
xmlRelaxNGSetParserStructuredErrors(
|
| 156 |
+
xmlRelaxNGParserCtxtPtr ctxt,
|
| 157 |
+
xmlStructuredErrorFunc serror,
|
| 158 |
+
void *ctx);
|
| 159 |
+
XMLPUBFUN void
|
| 160 |
+
xmlRelaxNGSetResourceLoader (xmlRelaxNGParserCtxtPtr ctxt,
|
| 161 |
+
xmlResourceLoader loader,
|
| 162 |
+
void *vctxt);
|
| 163 |
+
XMLPUBFUN xmlRelaxNGPtr
|
| 164 |
+
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
| 165 |
+
XMLPUBFUN void
|
| 166 |
+
xmlRelaxNGFree (xmlRelaxNGPtr schema);
|
| 167 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 168 |
+
XMLPUBFUN void
|
| 169 |
+
xmlRelaxNGDump (FILE *output,
|
| 170 |
+
xmlRelaxNGPtr schema);
|
| 171 |
+
XMLPUBFUN void
|
| 172 |
+
xmlRelaxNGDumpTree (FILE * output,
|
| 173 |
+
xmlRelaxNGPtr schema);
|
| 174 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 175 |
+
/*
|
| 176 |
+
* Interfaces for validating
|
| 177 |
+
*/
|
| 178 |
+
XMLPUBFUN void
|
| 179 |
+
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
| 180 |
+
xmlRelaxNGValidityErrorFunc err,
|
| 181 |
+
xmlRelaxNGValidityWarningFunc warn,
|
| 182 |
+
void *ctx);
|
| 183 |
+
XMLPUBFUN int
|
| 184 |
+
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
| 185 |
+
xmlRelaxNGValidityErrorFunc *err,
|
| 186 |
+
xmlRelaxNGValidityWarningFunc *warn,
|
| 187 |
+
void **ctx);
|
| 188 |
+
XMLPUBFUN void
|
| 189 |
+
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
| 190 |
+
xmlStructuredErrorFunc serror, void *ctx);
|
| 191 |
+
XMLPUBFUN xmlRelaxNGValidCtxtPtr
|
| 192 |
+
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
|
| 193 |
+
XMLPUBFUN void
|
| 194 |
+
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
|
| 195 |
+
XMLPUBFUN int
|
| 196 |
+
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
|
| 197 |
+
xmlDocPtr doc);
|
| 198 |
+
/*
|
| 199 |
+
* Interfaces for progressive validation when possible
|
| 200 |
+
*/
|
| 201 |
+
XMLPUBFUN int
|
| 202 |
+
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
|
| 203 |
+
xmlDocPtr doc,
|
| 204 |
+
xmlNodePtr elem);
|
| 205 |
+
XMLPUBFUN int
|
| 206 |
+
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
|
| 207 |
+
const xmlChar *data,
|
| 208 |
+
int len);
|
| 209 |
+
XMLPUBFUN int
|
| 210 |
+
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
|
| 211 |
+
xmlDocPtr doc,
|
| 212 |
+
xmlNodePtr elem);
|
| 213 |
+
XMLPUBFUN int
|
| 214 |
+
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
|
| 215 |
+
xmlDocPtr doc,
|
| 216 |
+
xmlNodePtr elem);
|
| 217 |
+
|
| 218 |
+
#ifdef __cplusplus
|
| 219 |
+
}
|
| 220 |
+
#endif
|
| 221 |
+
|
| 222 |
+
#endif /* LIBXML_RELAXNG_ENABLED */
|
| 223 |
+
|
| 224 |
+
#endif /* __XML_RELAX_NG__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schemasInternals.h
ADDED
|
@@ -0,0 +1,959 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: internal interfaces for XML Schemas
|
| 3 |
+
* Description: internal interfaces for the XML Schemas handling
|
| 4 |
+
* and schema validity checking
|
| 5 |
+
* The Schemas development is a Work In Progress.
|
| 6 |
+
* Some of those interfaces are not guaranteed to be API or ABI stable !
|
| 7 |
+
*
|
| 8 |
+
* Copy: See Copyright for the status of this software.
|
| 9 |
+
*
|
| 10 |
+
* Author: Daniel Veillard
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
#ifndef __XML_SCHEMA_INTERNALS_H__
|
| 15 |
+
#define __XML_SCHEMA_INTERNALS_H__
|
| 16 |
+
|
| 17 |
+
#include <libxml/xmlversion.h>
|
| 18 |
+
|
| 19 |
+
#ifdef LIBXML_SCHEMAS_ENABLED
|
| 20 |
+
|
| 21 |
+
#include <libxml/xmlregexp.h>
|
| 22 |
+
#include <libxml/hash.h>
|
| 23 |
+
#include <libxml/dict.h>
|
| 24 |
+
#include <libxml/tree.h>
|
| 25 |
+
|
| 26 |
+
#ifdef __cplusplus
|
| 27 |
+
extern "C" {
|
| 28 |
+
#endif
|
| 29 |
+
|
| 30 |
+
typedef enum {
|
| 31 |
+
XML_SCHEMAS_UNKNOWN = 0,
|
| 32 |
+
XML_SCHEMAS_STRING = 1,
|
| 33 |
+
XML_SCHEMAS_NORMSTRING = 2,
|
| 34 |
+
XML_SCHEMAS_DECIMAL = 3,
|
| 35 |
+
XML_SCHEMAS_TIME = 4,
|
| 36 |
+
XML_SCHEMAS_GDAY = 5,
|
| 37 |
+
XML_SCHEMAS_GMONTH = 6,
|
| 38 |
+
XML_SCHEMAS_GMONTHDAY = 7,
|
| 39 |
+
XML_SCHEMAS_GYEAR = 8,
|
| 40 |
+
XML_SCHEMAS_GYEARMONTH = 9,
|
| 41 |
+
XML_SCHEMAS_DATE = 10,
|
| 42 |
+
XML_SCHEMAS_DATETIME = 11,
|
| 43 |
+
XML_SCHEMAS_DURATION = 12,
|
| 44 |
+
XML_SCHEMAS_FLOAT = 13,
|
| 45 |
+
XML_SCHEMAS_DOUBLE = 14,
|
| 46 |
+
XML_SCHEMAS_BOOLEAN = 15,
|
| 47 |
+
XML_SCHEMAS_TOKEN = 16,
|
| 48 |
+
XML_SCHEMAS_LANGUAGE = 17,
|
| 49 |
+
XML_SCHEMAS_NMTOKEN = 18,
|
| 50 |
+
XML_SCHEMAS_NMTOKENS = 19,
|
| 51 |
+
XML_SCHEMAS_NAME = 20,
|
| 52 |
+
XML_SCHEMAS_QNAME = 21,
|
| 53 |
+
XML_SCHEMAS_NCNAME = 22,
|
| 54 |
+
XML_SCHEMAS_ID = 23,
|
| 55 |
+
XML_SCHEMAS_IDREF = 24,
|
| 56 |
+
XML_SCHEMAS_IDREFS = 25,
|
| 57 |
+
XML_SCHEMAS_ENTITY = 26,
|
| 58 |
+
XML_SCHEMAS_ENTITIES = 27,
|
| 59 |
+
XML_SCHEMAS_NOTATION = 28,
|
| 60 |
+
XML_SCHEMAS_ANYURI = 29,
|
| 61 |
+
XML_SCHEMAS_INTEGER = 30,
|
| 62 |
+
XML_SCHEMAS_NPINTEGER = 31,
|
| 63 |
+
XML_SCHEMAS_NINTEGER = 32,
|
| 64 |
+
XML_SCHEMAS_NNINTEGER = 33,
|
| 65 |
+
XML_SCHEMAS_PINTEGER = 34,
|
| 66 |
+
XML_SCHEMAS_INT = 35,
|
| 67 |
+
XML_SCHEMAS_UINT = 36,
|
| 68 |
+
XML_SCHEMAS_LONG = 37,
|
| 69 |
+
XML_SCHEMAS_ULONG = 38,
|
| 70 |
+
XML_SCHEMAS_SHORT = 39,
|
| 71 |
+
XML_SCHEMAS_USHORT = 40,
|
| 72 |
+
XML_SCHEMAS_BYTE = 41,
|
| 73 |
+
XML_SCHEMAS_UBYTE = 42,
|
| 74 |
+
XML_SCHEMAS_HEXBINARY = 43,
|
| 75 |
+
XML_SCHEMAS_BASE64BINARY = 44,
|
| 76 |
+
XML_SCHEMAS_ANYTYPE = 45,
|
| 77 |
+
XML_SCHEMAS_ANYSIMPLETYPE = 46
|
| 78 |
+
} xmlSchemaValType;
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* XML Schemas defines multiple type of types.
|
| 82 |
+
*/
|
| 83 |
+
typedef enum {
|
| 84 |
+
XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
|
| 85 |
+
XML_SCHEMA_TYPE_ANY,
|
| 86 |
+
XML_SCHEMA_TYPE_FACET,
|
| 87 |
+
XML_SCHEMA_TYPE_SIMPLE,
|
| 88 |
+
XML_SCHEMA_TYPE_COMPLEX,
|
| 89 |
+
XML_SCHEMA_TYPE_SEQUENCE = 6,
|
| 90 |
+
XML_SCHEMA_TYPE_CHOICE,
|
| 91 |
+
XML_SCHEMA_TYPE_ALL,
|
| 92 |
+
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
|
| 93 |
+
XML_SCHEMA_TYPE_COMPLEX_CONTENT,
|
| 94 |
+
XML_SCHEMA_TYPE_UR,
|
| 95 |
+
XML_SCHEMA_TYPE_RESTRICTION,
|
| 96 |
+
XML_SCHEMA_TYPE_EXTENSION,
|
| 97 |
+
XML_SCHEMA_TYPE_ELEMENT,
|
| 98 |
+
XML_SCHEMA_TYPE_ATTRIBUTE,
|
| 99 |
+
XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
|
| 100 |
+
XML_SCHEMA_TYPE_GROUP,
|
| 101 |
+
XML_SCHEMA_TYPE_NOTATION,
|
| 102 |
+
XML_SCHEMA_TYPE_LIST,
|
| 103 |
+
XML_SCHEMA_TYPE_UNION,
|
| 104 |
+
XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
|
| 105 |
+
XML_SCHEMA_TYPE_IDC_UNIQUE,
|
| 106 |
+
XML_SCHEMA_TYPE_IDC_KEY,
|
| 107 |
+
XML_SCHEMA_TYPE_IDC_KEYREF,
|
| 108 |
+
XML_SCHEMA_TYPE_PARTICLE = 25,
|
| 109 |
+
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
|
| 110 |
+
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
|
| 111 |
+
XML_SCHEMA_FACET_MINEXCLUSIVE,
|
| 112 |
+
XML_SCHEMA_FACET_MAXINCLUSIVE,
|
| 113 |
+
XML_SCHEMA_FACET_MAXEXCLUSIVE,
|
| 114 |
+
XML_SCHEMA_FACET_TOTALDIGITS,
|
| 115 |
+
XML_SCHEMA_FACET_FRACTIONDIGITS,
|
| 116 |
+
XML_SCHEMA_FACET_PATTERN,
|
| 117 |
+
XML_SCHEMA_FACET_ENUMERATION,
|
| 118 |
+
XML_SCHEMA_FACET_WHITESPACE,
|
| 119 |
+
XML_SCHEMA_FACET_LENGTH,
|
| 120 |
+
XML_SCHEMA_FACET_MAXLENGTH,
|
| 121 |
+
XML_SCHEMA_FACET_MINLENGTH,
|
| 122 |
+
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
|
| 123 |
+
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
|
| 124 |
+
} xmlSchemaTypeType;
|
| 125 |
+
|
| 126 |
+
typedef enum {
|
| 127 |
+
XML_SCHEMA_CONTENT_UNKNOWN = 0,
|
| 128 |
+
XML_SCHEMA_CONTENT_EMPTY = 1,
|
| 129 |
+
XML_SCHEMA_CONTENT_ELEMENTS,
|
| 130 |
+
XML_SCHEMA_CONTENT_MIXED,
|
| 131 |
+
XML_SCHEMA_CONTENT_SIMPLE,
|
| 132 |
+
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
|
| 133 |
+
XML_SCHEMA_CONTENT_BASIC,
|
| 134 |
+
XML_SCHEMA_CONTENT_ANY
|
| 135 |
+
} xmlSchemaContentType;
|
| 136 |
+
|
| 137 |
+
typedef struct _xmlSchemaVal xmlSchemaVal;
|
| 138 |
+
typedef xmlSchemaVal *xmlSchemaValPtr;
|
| 139 |
+
|
| 140 |
+
typedef struct _xmlSchemaType xmlSchemaType;
|
| 141 |
+
typedef xmlSchemaType *xmlSchemaTypePtr;
|
| 142 |
+
|
| 143 |
+
typedef struct _xmlSchemaFacet xmlSchemaFacet;
|
| 144 |
+
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
|
| 145 |
+
|
| 146 |
+
/**
|
| 147 |
+
* Annotation
|
| 148 |
+
*/
|
| 149 |
+
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
|
| 150 |
+
typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
|
| 151 |
+
struct _xmlSchemaAnnot {
|
| 152 |
+
struct _xmlSchemaAnnot *next;
|
| 153 |
+
xmlNodePtr content; /* the annotation */
|
| 154 |
+
};
|
| 155 |
+
|
| 156 |
+
/**
|
| 157 |
+
* XML_SCHEMAS_ANYATTR_SKIP:
|
| 158 |
+
*
|
| 159 |
+
* Skip unknown attribute from validation
|
| 160 |
+
* Obsolete, not used anymore.
|
| 161 |
+
*/
|
| 162 |
+
#define XML_SCHEMAS_ANYATTR_SKIP 1
|
| 163 |
+
/**
|
| 164 |
+
* XML_SCHEMAS_ANYATTR_LAX:
|
| 165 |
+
*
|
| 166 |
+
* Ignore validation non definition on attributes
|
| 167 |
+
* Obsolete, not used anymore.
|
| 168 |
+
*/
|
| 169 |
+
#define XML_SCHEMAS_ANYATTR_LAX 2
|
| 170 |
+
/**
|
| 171 |
+
* XML_SCHEMAS_ANYATTR_STRICT:
|
| 172 |
+
*
|
| 173 |
+
* Apply strict validation rules on attributes
|
| 174 |
+
* Obsolete, not used anymore.
|
| 175 |
+
*/
|
| 176 |
+
#define XML_SCHEMAS_ANYATTR_STRICT 3
|
| 177 |
+
/**
|
| 178 |
+
* XML_SCHEMAS_ANY_SKIP:
|
| 179 |
+
*
|
| 180 |
+
* Skip unknown attribute from validation
|
| 181 |
+
*/
|
| 182 |
+
#define XML_SCHEMAS_ANY_SKIP 1
|
| 183 |
+
/**
|
| 184 |
+
* XML_SCHEMAS_ANY_LAX:
|
| 185 |
+
*
|
| 186 |
+
* Used by wildcards.
|
| 187 |
+
* Validate if type found, don't worry if not found
|
| 188 |
+
*/
|
| 189 |
+
#define XML_SCHEMAS_ANY_LAX 2
|
| 190 |
+
/**
|
| 191 |
+
* XML_SCHEMAS_ANY_STRICT:
|
| 192 |
+
*
|
| 193 |
+
* Used by wildcards.
|
| 194 |
+
* Apply strict validation rules
|
| 195 |
+
*/
|
| 196 |
+
#define XML_SCHEMAS_ANY_STRICT 3
|
| 197 |
+
/**
|
| 198 |
+
* XML_SCHEMAS_ATTR_USE_PROHIBITED:
|
| 199 |
+
*
|
| 200 |
+
* Used by wildcards.
|
| 201 |
+
* The attribute is prohibited.
|
| 202 |
+
*/
|
| 203 |
+
#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
|
| 204 |
+
/**
|
| 205 |
+
* XML_SCHEMAS_ATTR_USE_REQUIRED:
|
| 206 |
+
*
|
| 207 |
+
* The attribute is required.
|
| 208 |
+
*/
|
| 209 |
+
#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
|
| 210 |
+
/**
|
| 211 |
+
* XML_SCHEMAS_ATTR_USE_OPTIONAL:
|
| 212 |
+
*
|
| 213 |
+
* The attribute is optional.
|
| 214 |
+
*/
|
| 215 |
+
#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
|
| 216 |
+
/**
|
| 217 |
+
* XML_SCHEMAS_ATTR_GLOBAL:
|
| 218 |
+
*
|
| 219 |
+
* allow elements in no namespace
|
| 220 |
+
*/
|
| 221 |
+
#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
|
| 222 |
+
/**
|
| 223 |
+
* XML_SCHEMAS_ATTR_NSDEFAULT:
|
| 224 |
+
*
|
| 225 |
+
* allow elements in no namespace
|
| 226 |
+
*/
|
| 227 |
+
#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
|
| 228 |
+
/**
|
| 229 |
+
* XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
|
| 230 |
+
*
|
| 231 |
+
* this is set when the "type" and "ref" references
|
| 232 |
+
* have been resolved.
|
| 233 |
+
*/
|
| 234 |
+
#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
|
| 235 |
+
/**
|
| 236 |
+
* XML_SCHEMAS_ATTR_FIXED:
|
| 237 |
+
*
|
| 238 |
+
* the attribute has a fixed value
|
| 239 |
+
*/
|
| 240 |
+
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
|
| 241 |
+
|
| 242 |
+
/**
|
| 243 |
+
* xmlSchemaAttribute:
|
| 244 |
+
* An attribute definition.
|
| 245 |
+
*/
|
| 246 |
+
|
| 247 |
+
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
|
| 248 |
+
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
|
| 249 |
+
struct _xmlSchemaAttribute {
|
| 250 |
+
xmlSchemaTypeType type;
|
| 251 |
+
struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
|
| 252 |
+
const xmlChar *name; /* the name of the declaration */
|
| 253 |
+
const xmlChar *id; /* Deprecated; not used */
|
| 254 |
+
const xmlChar *ref; /* Deprecated; not used */
|
| 255 |
+
const xmlChar *refNs; /* Deprecated; not used */
|
| 256 |
+
const xmlChar *typeName; /* the local name of the type definition */
|
| 257 |
+
const xmlChar *typeNs; /* the ns URI of the type definition */
|
| 258 |
+
xmlSchemaAnnotPtr annot;
|
| 259 |
+
|
| 260 |
+
xmlSchemaTypePtr base; /* Deprecated; not used */
|
| 261 |
+
int occurs; /* Deprecated; not used */
|
| 262 |
+
const xmlChar *defValue; /* The initial value of the value constraint */
|
| 263 |
+
xmlSchemaTypePtr subtypes; /* the type definition */
|
| 264 |
+
xmlNodePtr node;
|
| 265 |
+
const xmlChar *targetNamespace;
|
| 266 |
+
int flags;
|
| 267 |
+
const xmlChar *refPrefix; /* Deprecated; not used */
|
| 268 |
+
xmlSchemaValPtr defVal; /* The compiled value constraint */
|
| 269 |
+
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
|
| 270 |
+
};
|
| 271 |
+
|
| 272 |
+
/**
|
| 273 |
+
* xmlSchemaAttributeLink:
|
| 274 |
+
* Used to build a list of attribute uses on complexType definitions.
|
| 275 |
+
* WARNING: Deprecated; not used.
|
| 276 |
+
*/
|
| 277 |
+
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
|
| 278 |
+
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
|
| 279 |
+
struct _xmlSchemaAttributeLink {
|
| 280 |
+
struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
|
| 281 |
+
struct _xmlSchemaAttribute *attr;/* the linked attribute */
|
| 282 |
+
};
|
| 283 |
+
|
| 284 |
+
/**
|
| 285 |
+
* XML_SCHEMAS_WILDCARD_COMPLETE:
|
| 286 |
+
*
|
| 287 |
+
* If the wildcard is complete.
|
| 288 |
+
*/
|
| 289 |
+
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
|
| 290 |
+
|
| 291 |
+
/**
|
| 292 |
+
* xmlSchemaCharValueLink:
|
| 293 |
+
* Used to build a list of namespaces on wildcards.
|
| 294 |
+
*/
|
| 295 |
+
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
|
| 296 |
+
typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
|
| 297 |
+
struct _xmlSchemaWildcardNs {
|
| 298 |
+
struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
|
| 299 |
+
const xmlChar *value;/* the value */
|
| 300 |
+
};
|
| 301 |
+
|
| 302 |
+
/**
|
| 303 |
+
* xmlSchemaWildcard.
|
| 304 |
+
* A wildcard.
|
| 305 |
+
*/
|
| 306 |
+
typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
|
| 307 |
+
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
|
| 308 |
+
struct _xmlSchemaWildcard {
|
| 309 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 310 |
+
const xmlChar *id; /* Deprecated; not used */
|
| 311 |
+
xmlSchemaAnnotPtr annot;
|
| 312 |
+
xmlNodePtr node;
|
| 313 |
+
int minOccurs; /* Deprecated; not used */
|
| 314 |
+
int maxOccurs; /* Deprecated; not used */
|
| 315 |
+
int processContents;
|
| 316 |
+
int any; /* Indicates if the ns constraint is of ##any */
|
| 317 |
+
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
|
| 318 |
+
xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
|
| 319 |
+
int flags;
|
| 320 |
+
};
|
| 321 |
+
|
| 322 |
+
/**
|
| 323 |
+
* XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
|
| 324 |
+
*
|
| 325 |
+
* The attribute wildcard has been built.
|
| 326 |
+
*/
|
| 327 |
+
#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
|
| 328 |
+
/**
|
| 329 |
+
* XML_SCHEMAS_ATTRGROUP_GLOBAL:
|
| 330 |
+
*
|
| 331 |
+
* The attribute group has been defined.
|
| 332 |
+
*/
|
| 333 |
+
#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
|
| 334 |
+
/**
|
| 335 |
+
* XML_SCHEMAS_ATTRGROUP_MARKED:
|
| 336 |
+
*
|
| 337 |
+
* Marks the attr group as marked; used for circular checks.
|
| 338 |
+
*/
|
| 339 |
+
#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
|
| 340 |
+
|
| 341 |
+
/**
|
| 342 |
+
* XML_SCHEMAS_ATTRGROUP_REDEFINED:
|
| 343 |
+
*
|
| 344 |
+
* The attr group was redefined.
|
| 345 |
+
*/
|
| 346 |
+
#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
|
| 347 |
+
/**
|
| 348 |
+
* XML_SCHEMAS_ATTRGROUP_HAS_REFS:
|
| 349 |
+
*
|
| 350 |
+
* Whether this attr. group contains attr. group references.
|
| 351 |
+
*/
|
| 352 |
+
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
|
| 353 |
+
|
| 354 |
+
/**
|
| 355 |
+
* An attribute group definition.
|
| 356 |
+
*
|
| 357 |
+
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
|
| 358 |
+
* must be kept similar
|
| 359 |
+
*/
|
| 360 |
+
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
|
| 361 |
+
typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
|
| 362 |
+
struct _xmlSchemaAttributeGroup {
|
| 363 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 364 |
+
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
|
| 365 |
+
const xmlChar *name;
|
| 366 |
+
const xmlChar *id;
|
| 367 |
+
const xmlChar *ref; /* Deprecated; not used */
|
| 368 |
+
const xmlChar *refNs; /* Deprecated; not used */
|
| 369 |
+
xmlSchemaAnnotPtr annot;
|
| 370 |
+
|
| 371 |
+
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
| 372 |
+
xmlNodePtr node;
|
| 373 |
+
int flags;
|
| 374 |
+
xmlSchemaWildcardPtr attributeWildcard;
|
| 375 |
+
const xmlChar *refPrefix; /* Deprecated; not used */
|
| 376 |
+
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
|
| 377 |
+
const xmlChar *targetNamespace;
|
| 378 |
+
void *attrUses;
|
| 379 |
+
};
|
| 380 |
+
|
| 381 |
+
/**
|
| 382 |
+
* xmlSchemaTypeLink:
|
| 383 |
+
* Used to build a list of types (e.g. member types of
|
| 384 |
+
* simpleType with variety "union").
|
| 385 |
+
*/
|
| 386 |
+
typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
|
| 387 |
+
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
|
| 388 |
+
struct _xmlSchemaTypeLink {
|
| 389 |
+
struct _xmlSchemaTypeLink *next;/* the next type link ... */
|
| 390 |
+
xmlSchemaTypePtr type;/* the linked type */
|
| 391 |
+
};
|
| 392 |
+
|
| 393 |
+
/**
|
| 394 |
+
* xmlSchemaFacetLink:
|
| 395 |
+
* Used to build a list of facets.
|
| 396 |
+
*/
|
| 397 |
+
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
|
| 398 |
+
typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
|
| 399 |
+
struct _xmlSchemaFacetLink {
|
| 400 |
+
struct _xmlSchemaFacetLink *next;/* the next facet link ... */
|
| 401 |
+
xmlSchemaFacetPtr facet;/* the linked facet */
|
| 402 |
+
};
|
| 403 |
+
|
| 404 |
+
/**
|
| 405 |
+
* XML_SCHEMAS_TYPE_MIXED:
|
| 406 |
+
*
|
| 407 |
+
* the element content type is mixed
|
| 408 |
+
*/
|
| 409 |
+
#define XML_SCHEMAS_TYPE_MIXED 1 << 0
|
| 410 |
+
/**
|
| 411 |
+
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
|
| 412 |
+
*
|
| 413 |
+
* the simple or complex type has a derivation method of "extension".
|
| 414 |
+
*/
|
| 415 |
+
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
|
| 416 |
+
/**
|
| 417 |
+
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
|
| 418 |
+
*
|
| 419 |
+
* the simple or complex type has a derivation method of "restriction".
|
| 420 |
+
*/
|
| 421 |
+
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
|
| 422 |
+
/**
|
| 423 |
+
* XML_SCHEMAS_TYPE_GLOBAL:
|
| 424 |
+
*
|
| 425 |
+
* the type is global
|
| 426 |
+
*/
|
| 427 |
+
#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
|
| 428 |
+
/**
|
| 429 |
+
* XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
|
| 430 |
+
*
|
| 431 |
+
* the complexType owns an attribute wildcard, i.e.
|
| 432 |
+
* it can be freed by the complexType
|
| 433 |
+
*/
|
| 434 |
+
#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
|
| 435 |
+
/**
|
| 436 |
+
* XML_SCHEMAS_TYPE_VARIETY_ABSENT:
|
| 437 |
+
*
|
| 438 |
+
* the simpleType has a variety of "absent".
|
| 439 |
+
* TODO: Actually not necessary :-/, since if
|
| 440 |
+
* none of the variety flags occur then it's
|
| 441 |
+
* automatically absent.
|
| 442 |
+
*/
|
| 443 |
+
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
|
| 444 |
+
/**
|
| 445 |
+
* XML_SCHEMAS_TYPE_VARIETY_LIST:
|
| 446 |
+
*
|
| 447 |
+
* the simpleType has a variety of "list".
|
| 448 |
+
*/
|
| 449 |
+
#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
|
| 450 |
+
/**
|
| 451 |
+
* XML_SCHEMAS_TYPE_VARIETY_UNION:
|
| 452 |
+
*
|
| 453 |
+
* the simpleType has a variety of "union".
|
| 454 |
+
*/
|
| 455 |
+
#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
|
| 456 |
+
/**
|
| 457 |
+
* XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
|
| 458 |
+
*
|
| 459 |
+
* the simpleType has a variety of "union".
|
| 460 |
+
*/
|
| 461 |
+
#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
|
| 462 |
+
/**
|
| 463 |
+
* XML_SCHEMAS_TYPE_FINAL_EXTENSION:
|
| 464 |
+
*
|
| 465 |
+
* the complexType has a final of "extension".
|
| 466 |
+
*/
|
| 467 |
+
#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
|
| 468 |
+
/**
|
| 469 |
+
* XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
|
| 470 |
+
*
|
| 471 |
+
* the simpleType/complexType has a final of "restriction".
|
| 472 |
+
*/
|
| 473 |
+
#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
|
| 474 |
+
/**
|
| 475 |
+
* XML_SCHEMAS_TYPE_FINAL_LIST:
|
| 476 |
+
*
|
| 477 |
+
* the simpleType has a final of "list".
|
| 478 |
+
*/
|
| 479 |
+
#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
|
| 480 |
+
/**
|
| 481 |
+
* XML_SCHEMAS_TYPE_FINAL_UNION:
|
| 482 |
+
*
|
| 483 |
+
* the simpleType has a final of "union".
|
| 484 |
+
*/
|
| 485 |
+
#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
|
| 486 |
+
/**
|
| 487 |
+
* XML_SCHEMAS_TYPE_FINAL_DEFAULT:
|
| 488 |
+
*
|
| 489 |
+
* the simpleType has a final of "default".
|
| 490 |
+
*/
|
| 491 |
+
#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
|
| 492 |
+
/**
|
| 493 |
+
* XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
|
| 494 |
+
*
|
| 495 |
+
* Marks the item as a builtin primitive.
|
| 496 |
+
*/
|
| 497 |
+
#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
|
| 498 |
+
/**
|
| 499 |
+
* XML_SCHEMAS_TYPE_MARKED:
|
| 500 |
+
*
|
| 501 |
+
* Marks the item as marked; used for circular checks.
|
| 502 |
+
*/
|
| 503 |
+
#define XML_SCHEMAS_TYPE_MARKED 1 << 16
|
| 504 |
+
/**
|
| 505 |
+
* XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
|
| 506 |
+
*
|
| 507 |
+
* the complexType did not specify 'block' so use the default of the
|
| 508 |
+
* <schema> item.
|
| 509 |
+
*/
|
| 510 |
+
#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
|
| 511 |
+
/**
|
| 512 |
+
* XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
|
| 513 |
+
*
|
| 514 |
+
* the complexType has a 'block' of "extension".
|
| 515 |
+
*/
|
| 516 |
+
#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
|
| 517 |
+
/**
|
| 518 |
+
* XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
|
| 519 |
+
*
|
| 520 |
+
* the complexType has a 'block' of "restriction".
|
| 521 |
+
*/
|
| 522 |
+
#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
|
| 523 |
+
/**
|
| 524 |
+
* XML_SCHEMAS_TYPE_ABSTRACT:
|
| 525 |
+
*
|
| 526 |
+
* the simple/complexType is abstract.
|
| 527 |
+
*/
|
| 528 |
+
#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
|
| 529 |
+
/**
|
| 530 |
+
* XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
|
| 531 |
+
*
|
| 532 |
+
* indicates if the facets need a computed value
|
| 533 |
+
*/
|
| 534 |
+
#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
|
| 535 |
+
/**
|
| 536 |
+
* XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
|
| 537 |
+
*
|
| 538 |
+
* indicates that the type was typefixed
|
| 539 |
+
*/
|
| 540 |
+
#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
|
| 541 |
+
/**
|
| 542 |
+
* XML_SCHEMAS_TYPE_INTERNAL_INVALID:
|
| 543 |
+
*
|
| 544 |
+
* indicates that the type is invalid
|
| 545 |
+
*/
|
| 546 |
+
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
|
| 547 |
+
/**
|
| 548 |
+
* XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
|
| 549 |
+
*
|
| 550 |
+
* a whitespace-facet value of "preserve"
|
| 551 |
+
*/
|
| 552 |
+
#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
|
| 553 |
+
/**
|
| 554 |
+
* XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
|
| 555 |
+
*
|
| 556 |
+
* a whitespace-facet value of "replace"
|
| 557 |
+
*/
|
| 558 |
+
#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
|
| 559 |
+
/**
|
| 560 |
+
* XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
|
| 561 |
+
*
|
| 562 |
+
* a whitespace-facet value of "collapse"
|
| 563 |
+
*/
|
| 564 |
+
#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
|
| 565 |
+
/**
|
| 566 |
+
* XML_SCHEMAS_TYPE_HAS_FACETS:
|
| 567 |
+
*
|
| 568 |
+
* has facets
|
| 569 |
+
*/
|
| 570 |
+
#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
|
| 571 |
+
/**
|
| 572 |
+
* XML_SCHEMAS_TYPE_NORMVALUENEEDED:
|
| 573 |
+
*
|
| 574 |
+
* indicates if the facets (pattern) need a normalized value
|
| 575 |
+
*/
|
| 576 |
+
#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
|
| 577 |
+
|
| 578 |
+
/**
|
| 579 |
+
* XML_SCHEMAS_TYPE_FIXUP_1:
|
| 580 |
+
*
|
| 581 |
+
* First stage of fixup was done.
|
| 582 |
+
*/
|
| 583 |
+
#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
|
| 584 |
+
|
| 585 |
+
/**
|
| 586 |
+
* XML_SCHEMAS_TYPE_REDEFINED:
|
| 587 |
+
*
|
| 588 |
+
* The type was redefined.
|
| 589 |
+
*/
|
| 590 |
+
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
|
| 591 |
+
/**
|
| 592 |
+
* XML_SCHEMAS_TYPE_REDEFINING:
|
| 593 |
+
*
|
| 594 |
+
* The type redefines an other type.
|
| 595 |
+
*/
|
| 596 |
+
/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
|
| 597 |
+
|
| 598 |
+
/**
|
| 599 |
+
* _xmlSchemaType:
|
| 600 |
+
*
|
| 601 |
+
* Schemas type definition.
|
| 602 |
+
*/
|
| 603 |
+
struct _xmlSchemaType {
|
| 604 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 605 |
+
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
|
| 606 |
+
const xmlChar *name;
|
| 607 |
+
const xmlChar *id ; /* Deprecated; not used */
|
| 608 |
+
const xmlChar *ref; /* Deprecated; not used */
|
| 609 |
+
const xmlChar *refNs; /* Deprecated; not used */
|
| 610 |
+
xmlSchemaAnnotPtr annot;
|
| 611 |
+
xmlSchemaTypePtr subtypes;
|
| 612 |
+
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
| 613 |
+
xmlNodePtr node;
|
| 614 |
+
int minOccurs; /* Deprecated; not used */
|
| 615 |
+
int maxOccurs; /* Deprecated; not used */
|
| 616 |
+
|
| 617 |
+
int flags;
|
| 618 |
+
xmlSchemaContentType contentType;
|
| 619 |
+
const xmlChar *base; /* Base type's local name */
|
| 620 |
+
const xmlChar *baseNs; /* Base type's target namespace */
|
| 621 |
+
xmlSchemaTypePtr baseType; /* The base type component */
|
| 622 |
+
xmlSchemaFacetPtr facets; /* Local facets */
|
| 623 |
+
struct _xmlSchemaType *redef; /* Deprecated; not used */
|
| 624 |
+
int recurse; /* Obsolete */
|
| 625 |
+
xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
|
| 626 |
+
xmlSchemaWildcardPtr attributeWildcard;
|
| 627 |
+
int builtInType; /* Type of built-in types. */
|
| 628 |
+
xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
|
| 629 |
+
xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
|
| 630 |
+
const xmlChar *refPrefix; /* Deprecated; not used */
|
| 631 |
+
xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
|
| 632 |
+
Could we use @subtypes for this? */
|
| 633 |
+
xmlRegexpPtr contModel; /* Holds the automaton of the content model */
|
| 634 |
+
const xmlChar *targetNamespace;
|
| 635 |
+
void *attrUses;
|
| 636 |
+
};
|
| 637 |
+
|
| 638 |
+
/*
|
| 639 |
+
* xmlSchemaElement:
|
| 640 |
+
* An element definition.
|
| 641 |
+
*
|
| 642 |
+
* xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
|
| 643 |
+
* structures must be kept similar
|
| 644 |
+
*/
|
| 645 |
+
/**
|
| 646 |
+
* XML_SCHEMAS_ELEM_NILLABLE:
|
| 647 |
+
*
|
| 648 |
+
* the element is nillable
|
| 649 |
+
*/
|
| 650 |
+
#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
|
| 651 |
+
/**
|
| 652 |
+
* XML_SCHEMAS_ELEM_GLOBAL:
|
| 653 |
+
*
|
| 654 |
+
* the element is global
|
| 655 |
+
*/
|
| 656 |
+
#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
|
| 657 |
+
/**
|
| 658 |
+
* XML_SCHEMAS_ELEM_DEFAULT:
|
| 659 |
+
*
|
| 660 |
+
* the element has a default value
|
| 661 |
+
*/
|
| 662 |
+
#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
|
| 663 |
+
/**
|
| 664 |
+
* XML_SCHEMAS_ELEM_FIXED:
|
| 665 |
+
*
|
| 666 |
+
* the element has a fixed value
|
| 667 |
+
*/
|
| 668 |
+
#define XML_SCHEMAS_ELEM_FIXED 1 << 3
|
| 669 |
+
/**
|
| 670 |
+
* XML_SCHEMAS_ELEM_ABSTRACT:
|
| 671 |
+
*
|
| 672 |
+
* the element is abstract
|
| 673 |
+
*/
|
| 674 |
+
#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
|
| 675 |
+
/**
|
| 676 |
+
* XML_SCHEMAS_ELEM_TOPLEVEL:
|
| 677 |
+
*
|
| 678 |
+
* the element is top level
|
| 679 |
+
* obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
|
| 680 |
+
*/
|
| 681 |
+
#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
|
| 682 |
+
/**
|
| 683 |
+
* XML_SCHEMAS_ELEM_REF:
|
| 684 |
+
*
|
| 685 |
+
* the element is a reference to a type
|
| 686 |
+
*/
|
| 687 |
+
#define XML_SCHEMAS_ELEM_REF 1 << 6
|
| 688 |
+
/**
|
| 689 |
+
* XML_SCHEMAS_ELEM_NSDEFAULT:
|
| 690 |
+
*
|
| 691 |
+
* allow elements in no namespace
|
| 692 |
+
* Obsolete, not used anymore.
|
| 693 |
+
*/
|
| 694 |
+
#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
|
| 695 |
+
/**
|
| 696 |
+
* XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
|
| 697 |
+
*
|
| 698 |
+
* this is set when "type", "ref", "substitutionGroup"
|
| 699 |
+
* references have been resolved.
|
| 700 |
+
*/
|
| 701 |
+
#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
|
| 702 |
+
/**
|
| 703 |
+
* XML_SCHEMAS_ELEM_CIRCULAR:
|
| 704 |
+
*
|
| 705 |
+
* a helper flag for the search of circular references.
|
| 706 |
+
*/
|
| 707 |
+
#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
|
| 708 |
+
/**
|
| 709 |
+
* XML_SCHEMAS_ELEM_BLOCK_ABSENT:
|
| 710 |
+
*
|
| 711 |
+
* the "block" attribute is absent
|
| 712 |
+
*/
|
| 713 |
+
#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
|
| 714 |
+
/**
|
| 715 |
+
* XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
|
| 716 |
+
*
|
| 717 |
+
* disallowed substitutions are absent
|
| 718 |
+
*/
|
| 719 |
+
#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
|
| 720 |
+
/**
|
| 721 |
+
* XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
|
| 722 |
+
*
|
| 723 |
+
* disallowed substitutions: "restriction"
|
| 724 |
+
*/
|
| 725 |
+
#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
|
| 726 |
+
/**
|
| 727 |
+
* XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
|
| 728 |
+
*
|
| 729 |
+
* disallowed substitutions: "substitution"
|
| 730 |
+
*/
|
| 731 |
+
#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
|
| 732 |
+
/**
|
| 733 |
+
* XML_SCHEMAS_ELEM_FINAL_ABSENT:
|
| 734 |
+
*
|
| 735 |
+
* substitution group exclusions are absent
|
| 736 |
+
*/
|
| 737 |
+
#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
|
| 738 |
+
/**
|
| 739 |
+
* XML_SCHEMAS_ELEM_FINAL_EXTENSION:
|
| 740 |
+
*
|
| 741 |
+
* substitution group exclusions: "extension"
|
| 742 |
+
*/
|
| 743 |
+
#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
|
| 744 |
+
/**
|
| 745 |
+
* XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
|
| 746 |
+
*
|
| 747 |
+
* substitution group exclusions: "restriction"
|
| 748 |
+
*/
|
| 749 |
+
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
|
| 750 |
+
/**
|
| 751 |
+
* XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
|
| 752 |
+
*
|
| 753 |
+
* the declaration is a substitution group head
|
| 754 |
+
*/
|
| 755 |
+
#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
|
| 756 |
+
/**
|
| 757 |
+
* XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
|
| 758 |
+
*
|
| 759 |
+
* this is set when the elem decl has been checked against
|
| 760 |
+
* all constraints
|
| 761 |
+
*/
|
| 762 |
+
#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
|
| 763 |
+
|
| 764 |
+
typedef struct _xmlSchemaElement xmlSchemaElement;
|
| 765 |
+
typedef xmlSchemaElement *xmlSchemaElementPtr;
|
| 766 |
+
struct _xmlSchemaElement {
|
| 767 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 768 |
+
struct _xmlSchemaType *next; /* Not used? */
|
| 769 |
+
const xmlChar *name;
|
| 770 |
+
const xmlChar *id; /* Deprecated; not used */
|
| 771 |
+
const xmlChar *ref; /* Deprecated; not used */
|
| 772 |
+
const xmlChar *refNs; /* Deprecated; not used */
|
| 773 |
+
xmlSchemaAnnotPtr annot;
|
| 774 |
+
xmlSchemaTypePtr subtypes; /* the type definition */
|
| 775 |
+
xmlSchemaAttributePtr attributes;
|
| 776 |
+
xmlNodePtr node;
|
| 777 |
+
int minOccurs; /* Deprecated; not used */
|
| 778 |
+
int maxOccurs; /* Deprecated; not used */
|
| 779 |
+
|
| 780 |
+
int flags;
|
| 781 |
+
const xmlChar *targetNamespace;
|
| 782 |
+
const xmlChar *namedType;
|
| 783 |
+
const xmlChar *namedTypeNs;
|
| 784 |
+
const xmlChar *substGroup;
|
| 785 |
+
const xmlChar *substGroupNs;
|
| 786 |
+
const xmlChar *scope;
|
| 787 |
+
const xmlChar *value; /* The original value of the value constraint. */
|
| 788 |
+
struct _xmlSchemaElement *refDecl; /* This will now be used for the
|
| 789 |
+
substitution group affiliation */
|
| 790 |
+
xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
|
| 791 |
+
xmlSchemaContentType contentType;
|
| 792 |
+
const xmlChar *refPrefix; /* Deprecated; not used */
|
| 793 |
+
xmlSchemaValPtr defVal; /* The compiled value constraint. */
|
| 794 |
+
void *idcs; /* The identity-constraint defs */
|
| 795 |
+
};
|
| 796 |
+
|
| 797 |
+
/*
|
| 798 |
+
* XML_SCHEMAS_FACET_UNKNOWN:
|
| 799 |
+
*
|
| 800 |
+
* unknown facet handling
|
| 801 |
+
*/
|
| 802 |
+
#define XML_SCHEMAS_FACET_UNKNOWN 0
|
| 803 |
+
/*
|
| 804 |
+
* XML_SCHEMAS_FACET_PRESERVE:
|
| 805 |
+
*
|
| 806 |
+
* preserve the type of the facet
|
| 807 |
+
*/
|
| 808 |
+
#define XML_SCHEMAS_FACET_PRESERVE 1
|
| 809 |
+
/*
|
| 810 |
+
* XML_SCHEMAS_FACET_REPLACE:
|
| 811 |
+
*
|
| 812 |
+
* replace the type of the facet
|
| 813 |
+
*/
|
| 814 |
+
#define XML_SCHEMAS_FACET_REPLACE 2
|
| 815 |
+
/*
|
| 816 |
+
* XML_SCHEMAS_FACET_COLLAPSE:
|
| 817 |
+
*
|
| 818 |
+
* collapse the types of the facet
|
| 819 |
+
*/
|
| 820 |
+
#define XML_SCHEMAS_FACET_COLLAPSE 3
|
| 821 |
+
/**
|
| 822 |
+
* A facet definition.
|
| 823 |
+
*/
|
| 824 |
+
struct _xmlSchemaFacet {
|
| 825 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 826 |
+
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
|
| 827 |
+
const xmlChar *value; /* The original value */
|
| 828 |
+
const xmlChar *id; /* Obsolete */
|
| 829 |
+
xmlSchemaAnnotPtr annot;
|
| 830 |
+
xmlNodePtr node;
|
| 831 |
+
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
|
| 832 |
+
int whitespace;
|
| 833 |
+
xmlSchemaValPtr val; /* The compiled value */
|
| 834 |
+
xmlRegexpPtr regexp; /* The regex for patterns */
|
| 835 |
+
};
|
| 836 |
+
|
| 837 |
+
/**
|
| 838 |
+
* A notation definition.
|
| 839 |
+
*/
|
| 840 |
+
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
| 841 |
+
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
|
| 842 |
+
struct _xmlSchemaNotation {
|
| 843 |
+
xmlSchemaTypeType type; /* The kind of type */
|
| 844 |
+
const xmlChar *name;
|
| 845 |
+
xmlSchemaAnnotPtr annot;
|
| 846 |
+
const xmlChar *identifier;
|
| 847 |
+
const xmlChar *targetNamespace;
|
| 848 |
+
};
|
| 849 |
+
|
| 850 |
+
/*
|
| 851 |
+
* TODO: Actually all those flags used for the schema should sit
|
| 852 |
+
* on the schema parser context, since they are used only
|
| 853 |
+
* during parsing an XML schema document, and not available
|
| 854 |
+
* on the component level as per spec.
|
| 855 |
+
*/
|
| 856 |
+
/**
|
| 857 |
+
* XML_SCHEMAS_QUALIF_ELEM:
|
| 858 |
+
*
|
| 859 |
+
* Reflects elementFormDefault == qualified in
|
| 860 |
+
* an XML schema document.
|
| 861 |
+
*/
|
| 862 |
+
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
|
| 863 |
+
/**
|
| 864 |
+
* XML_SCHEMAS_QUALIF_ATTR:
|
| 865 |
+
*
|
| 866 |
+
* Reflects attributeFormDefault == qualified in
|
| 867 |
+
* an XML schema document.
|
| 868 |
+
*/
|
| 869 |
+
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
|
| 870 |
+
/**
|
| 871 |
+
* XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
|
| 872 |
+
*
|
| 873 |
+
* the schema has "extension" in the set of finalDefault.
|
| 874 |
+
*/
|
| 875 |
+
#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
|
| 876 |
+
/**
|
| 877 |
+
* XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
|
| 878 |
+
*
|
| 879 |
+
* the schema has "restriction" in the set of finalDefault.
|
| 880 |
+
*/
|
| 881 |
+
#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
|
| 882 |
+
/**
|
| 883 |
+
* XML_SCHEMAS_FINAL_DEFAULT_LIST:
|
| 884 |
+
*
|
| 885 |
+
* the schema has "list" in the set of finalDefault.
|
| 886 |
+
*/
|
| 887 |
+
#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
|
| 888 |
+
/**
|
| 889 |
+
* XML_SCHEMAS_FINAL_DEFAULT_UNION:
|
| 890 |
+
*
|
| 891 |
+
* the schema has "union" in the set of finalDefault.
|
| 892 |
+
*/
|
| 893 |
+
#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
|
| 894 |
+
/**
|
| 895 |
+
* XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
|
| 896 |
+
*
|
| 897 |
+
* the schema has "extension" in the set of blockDefault.
|
| 898 |
+
*/
|
| 899 |
+
#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
|
| 900 |
+
/**
|
| 901 |
+
* XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
|
| 902 |
+
*
|
| 903 |
+
* the schema has "restriction" in the set of blockDefault.
|
| 904 |
+
*/
|
| 905 |
+
#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
|
| 906 |
+
/**
|
| 907 |
+
* XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
|
| 908 |
+
*
|
| 909 |
+
* the schema has "substitution" in the set of blockDefault.
|
| 910 |
+
*/
|
| 911 |
+
#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
|
| 912 |
+
/**
|
| 913 |
+
* XML_SCHEMAS_INCLUDING_CONVERT_NS:
|
| 914 |
+
*
|
| 915 |
+
* the schema is currently including an other schema with
|
| 916 |
+
* no target namespace.
|
| 917 |
+
*/
|
| 918 |
+
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
|
| 919 |
+
/**
|
| 920 |
+
* _xmlSchema:
|
| 921 |
+
*
|
| 922 |
+
* A Schemas definition
|
| 923 |
+
*/
|
| 924 |
+
struct _xmlSchema {
|
| 925 |
+
const xmlChar *name; /* schema name */
|
| 926 |
+
const xmlChar *targetNamespace; /* the target namespace */
|
| 927 |
+
const xmlChar *version;
|
| 928 |
+
const xmlChar *id; /* Obsolete */
|
| 929 |
+
xmlDocPtr doc;
|
| 930 |
+
xmlSchemaAnnotPtr annot;
|
| 931 |
+
int flags;
|
| 932 |
+
|
| 933 |
+
xmlHashTablePtr typeDecl;
|
| 934 |
+
xmlHashTablePtr attrDecl;
|
| 935 |
+
xmlHashTablePtr attrgrpDecl;
|
| 936 |
+
xmlHashTablePtr elemDecl;
|
| 937 |
+
xmlHashTablePtr notaDecl;
|
| 938 |
+
|
| 939 |
+
xmlHashTablePtr schemasImports;
|
| 940 |
+
|
| 941 |
+
void *_private; /* unused by the library for users or bindings */
|
| 942 |
+
xmlHashTablePtr groupDecl;
|
| 943 |
+
xmlDictPtr dict;
|
| 944 |
+
void *includes; /* the includes, this is opaque for now */
|
| 945 |
+
int preserve; /* whether to free the document */
|
| 946 |
+
int counter; /* used to give anonymous components unique names */
|
| 947 |
+
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
|
| 948 |
+
void *volatiles; /* Obsolete */
|
| 949 |
+
};
|
| 950 |
+
|
| 951 |
+
XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
|
| 952 |
+
XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
|
| 953 |
+
|
| 954 |
+
#ifdef __cplusplus
|
| 955 |
+
}
|
| 956 |
+
#endif
|
| 957 |
+
|
| 958 |
+
#endif /* LIBXML_SCHEMAS_ENABLED */
|
| 959 |
+
#endif /* __XML_SCHEMA_INTERNALS_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schematron.h
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: XML Schematron implementation
|
| 3 |
+
* Description: interface to the XML Schematron validity checking.
|
| 4 |
+
*
|
| 5 |
+
* Copy: See Copyright for the status of this software.
|
| 6 |
+
*
|
| 7 |
+
* Author: Daniel Veillard
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_SCHEMATRON_H__
|
| 12 |
+
#define __XML_SCHEMATRON_H__
|
| 13 |
+
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
|
| 16 |
+
#ifdef LIBXML_SCHEMATRON_ENABLED
|
| 17 |
+
|
| 18 |
+
#include <libxml/xmlerror.h>
|
| 19 |
+
#include <libxml/tree.h>
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
typedef enum {
|
| 26 |
+
XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
|
| 27 |
+
XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
|
| 28 |
+
XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
|
| 29 |
+
XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
|
| 30 |
+
XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
|
| 31 |
+
XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
|
| 32 |
+
XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
|
| 33 |
+
} xmlSchematronValidOptions;
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* The schemas related types are kept internal
|
| 37 |
+
*/
|
| 38 |
+
typedef struct _xmlSchematron xmlSchematron;
|
| 39 |
+
typedef xmlSchematron *xmlSchematronPtr;
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* xmlSchematronValidityErrorFunc:
|
| 43 |
+
* @ctx: the validation context
|
| 44 |
+
* @msg: the message
|
| 45 |
+
* @...: extra arguments
|
| 46 |
+
*
|
| 47 |
+
* Signature of an error callback from a Schematron validation
|
| 48 |
+
*/
|
| 49 |
+
typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* xmlSchematronValidityWarningFunc:
|
| 53 |
+
* @ctx: the validation context
|
| 54 |
+
* @msg: the message
|
| 55 |
+
* @...: extra arguments
|
| 56 |
+
*
|
| 57 |
+
* Signature of a warning callback from a Schematron validation
|
| 58 |
+
*/
|
| 59 |
+
typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
|
| 60 |
+
|
| 61 |
+
/**
|
| 62 |
+
* A schemas validation context
|
| 63 |
+
*/
|
| 64 |
+
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
|
| 65 |
+
typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
|
| 66 |
+
|
| 67 |
+
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
|
| 68 |
+
typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
|
| 69 |
+
|
| 70 |
+
/*
|
| 71 |
+
* Interfaces for parsing.
|
| 72 |
+
*/
|
| 73 |
+
XMLPUBFUN xmlSchematronParserCtxtPtr
|
| 74 |
+
xmlSchematronNewParserCtxt (const char *URL);
|
| 75 |
+
XMLPUBFUN xmlSchematronParserCtxtPtr
|
| 76 |
+
xmlSchematronNewMemParserCtxt(const char *buffer,
|
| 77 |
+
int size);
|
| 78 |
+
XMLPUBFUN xmlSchematronParserCtxtPtr
|
| 79 |
+
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
|
| 80 |
+
XMLPUBFUN void
|
| 81 |
+
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
|
| 82 |
+
/*****
|
| 83 |
+
XMLPUBFUN void
|
| 84 |
+
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
| 85 |
+
xmlSchematronValidityErrorFunc err,
|
| 86 |
+
xmlSchematronValidityWarningFunc warn,
|
| 87 |
+
void *ctx);
|
| 88 |
+
XMLPUBFUN int
|
| 89 |
+
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
| 90 |
+
xmlSchematronValidityErrorFunc * err,
|
| 91 |
+
xmlSchematronValidityWarningFunc * warn,
|
| 92 |
+
void **ctx);
|
| 93 |
+
XMLPUBFUN int
|
| 94 |
+
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
|
| 95 |
+
*****/
|
| 96 |
+
XMLPUBFUN xmlSchematronPtr
|
| 97 |
+
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
|
| 98 |
+
XMLPUBFUN void
|
| 99 |
+
xmlSchematronFree (xmlSchematronPtr schema);
|
| 100 |
+
/*
|
| 101 |
+
* Interfaces for validating
|
| 102 |
+
*/
|
| 103 |
+
XMLPUBFUN void
|
| 104 |
+
xmlSchematronSetValidStructuredErrors(
|
| 105 |
+
xmlSchematronValidCtxtPtr ctxt,
|
| 106 |
+
xmlStructuredErrorFunc serror,
|
| 107 |
+
void *ctx);
|
| 108 |
+
/******
|
| 109 |
+
XMLPUBFUN void
|
| 110 |
+
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
| 111 |
+
xmlSchematronValidityErrorFunc err,
|
| 112 |
+
xmlSchematronValidityWarningFunc warn,
|
| 113 |
+
void *ctx);
|
| 114 |
+
XMLPUBFUN int
|
| 115 |
+
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
| 116 |
+
xmlSchematronValidityErrorFunc *err,
|
| 117 |
+
xmlSchematronValidityWarningFunc *warn,
|
| 118 |
+
void **ctx);
|
| 119 |
+
XMLPUBFUN int
|
| 120 |
+
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
|
| 121 |
+
int options);
|
| 122 |
+
XMLPUBFUN int
|
| 123 |
+
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
|
| 124 |
+
XMLPUBFUN int
|
| 125 |
+
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
|
| 126 |
+
xmlNodePtr elem);
|
| 127 |
+
*******/
|
| 128 |
+
|
| 129 |
+
XMLPUBFUN xmlSchematronValidCtxtPtr
|
| 130 |
+
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
|
| 131 |
+
int options);
|
| 132 |
+
XMLPUBFUN void
|
| 133 |
+
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
|
| 134 |
+
XMLPUBFUN int
|
| 135 |
+
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
|
| 136 |
+
xmlDocPtr instance);
|
| 137 |
+
|
| 138 |
+
#ifdef __cplusplus
|
| 139 |
+
}
|
| 140 |
+
#endif
|
| 141 |
+
|
| 142 |
+
#endif /* LIBXML_SCHEMATRON_ENABLED */
|
| 143 |
+
#endif /* __XML_SCHEMATRON_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/threads.h
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Summary: interfaces for thread handling
|
| 3 |
+
* Description: set of generic threading related routines
|
| 4 |
+
* should work with pthreads, Windows native or TLS threads
|
| 5 |
+
*
|
| 6 |
+
* Copy: See Copyright for the status of this software.
|
| 7 |
+
*
|
| 8 |
+
* Author: Daniel Veillard
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef __XML_THREADS_H__
|
| 12 |
+
#define __XML_THREADS_H__
|
| 13 |
+
|
| 14 |
+
#include <libxml/xmlversion.h>
|
| 15 |
+
|
| 16 |
+
#ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
/*
|
| 21 |
+
* xmlMutex are a simple mutual exception locks.
|
| 22 |
+
*/
|
| 23 |
+
typedef struct _xmlMutex xmlMutex;
|
| 24 |
+
typedef xmlMutex *xmlMutexPtr;
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* xmlRMutex are reentrant mutual exception locks.
|
| 28 |
+
*/
|
| 29 |
+
typedef struct _xmlRMutex xmlRMutex;
|
| 30 |
+
typedef xmlRMutex *xmlRMutexPtr;
|
| 31 |
+
|
| 32 |
+
XMLPUBFUN int
|
| 33 |
+
xmlCheckThreadLocalStorage(void);
|
| 34 |
+
|
| 35 |
+
XMLPUBFUN xmlMutexPtr
|
| 36 |
+
xmlNewMutex (void);
|
| 37 |
+
XMLPUBFUN void
|
| 38 |
+
xmlMutexLock (xmlMutexPtr tok);
|
| 39 |
+
XMLPUBFUN void
|
| 40 |
+
xmlMutexUnlock (xmlMutexPtr tok);
|
| 41 |
+
XMLPUBFUN void
|
| 42 |
+
xmlFreeMutex (xmlMutexPtr tok);
|
| 43 |
+
|
| 44 |
+
XMLPUBFUN xmlRMutexPtr
|
| 45 |
+
xmlNewRMutex (void);
|
| 46 |
+
XMLPUBFUN void
|
| 47 |
+
xmlRMutexLock (xmlRMutexPtr tok);
|
| 48 |
+
XMLPUBFUN void
|
| 49 |
+
xmlRMutexUnlock (xmlRMutexPtr tok);
|
| 50 |
+
XMLPUBFUN void
|
| 51 |
+
xmlFreeRMutex (xmlRMutexPtr tok);
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* Library wide APIs.
|
| 55 |
+
*/
|
| 56 |
+
XML_DEPRECATED
|
| 57 |
+
XMLPUBFUN void
|
| 58 |
+
xmlInitThreads (void);
|
| 59 |
+
XMLPUBFUN void
|
| 60 |
+
xmlLockLibrary (void);
|
| 61 |
+
XMLPUBFUN void
|
| 62 |
+
xmlUnlockLibrary(void);
|
| 63 |
+
XML_DEPRECATED
|
| 64 |
+
XMLPUBFUN void
|
| 65 |
+
xmlCleanupThreads(void);
|
| 66 |
+
|
| 67 |
+
/** DOC_DISABLE */
|
| 68 |
+
#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
|
| 69 |
+
defined(LIBXML_STATIC_FOR_DLL)
|
| 70 |
+
int
|
| 71 |
+
xmlDllMain(void *hinstDLL, unsigned long fdwReason,
|
| 72 |
+
void *lpvReserved);
|
| 73 |
+
#endif
|
| 74 |
+
/** DOC_ENABLE */
|
| 75 |
+
|
| 76 |
+
#ifdef __cplusplus
|
| 77 |
+
}
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
#endif /* __XML_THREADS_H__ */
|
platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/tree.h
ADDED
|
@@ -0,0 +1,1326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Summary: interfaces for tree manipulation
|
| 3 |
+
* Description: this module describes the structures found in an tree resulting
|
| 4 |
+
* from an XML or HTML parsing, as well as the API provided for
|
| 5 |
+
* various processing on that tree
|
| 6 |
+
*
|
| 7 |
+
* Copy: See Copyright for the status of this software.
|
| 8 |
+
*
|
| 9 |
+
* Author: Daniel Veillard
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef XML_TREE_INTERNALS
|
| 13 |
+
|
| 14 |
+
/*
|
| 15 |
+
* Emulate circular dependency for backward compatibility
|
| 16 |
+
*/
|
| 17 |
+
#include <libxml/parser.h>
|
| 18 |
+
|
| 19 |
+
#else /* XML_TREE_INTERNALS */
|
| 20 |
+
|
| 21 |
+
#ifndef __XML_TREE_H__
|
| 22 |
+
#define __XML_TREE_H__
|
| 23 |
+
|
| 24 |
+
#include <stdio.h>
|
| 25 |
+
#include <limits.h>
|
| 26 |
+
#include <libxml/xmlversion.h>
|
| 27 |
+
#include <libxml/xmlstring.h>
|
| 28 |
+
#include <libxml/xmlmemory.h>
|
| 29 |
+
#include <libxml/xmlregexp.h>
|
| 30 |
+
|
| 31 |
+
#ifdef __cplusplus
|
| 32 |
+
extern "C" {
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* Backward compatibility
|
| 37 |
+
*/
|
| 38 |
+
#define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT
|
| 39 |
+
#define xmlDefaultBufferSize 4096
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* Some of the basic types pointer to structures:
|
| 43 |
+
*/
|
| 44 |
+
/* xmlIO.h */
|
| 45 |
+
typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
|
| 46 |
+
typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
|
| 47 |
+
|
| 48 |
+
typedef struct _xmlOutputBuffer xmlOutputBuffer;
|
| 49 |
+
typedef xmlOutputBuffer *xmlOutputBufferPtr;
|
| 50 |
+
|
| 51 |
+
/* parser.h */
|
| 52 |
+
typedef struct _xmlParserInput xmlParserInput;
|
| 53 |
+
typedef xmlParserInput *xmlParserInputPtr;
|
| 54 |
+
|
| 55 |
+
typedef struct _xmlParserCtxt xmlParserCtxt;
|
| 56 |
+
typedef xmlParserCtxt *xmlParserCtxtPtr;
|
| 57 |
+
|
| 58 |
+
typedef struct _xmlSAXLocator xmlSAXLocator;
|
| 59 |
+
typedef xmlSAXLocator *xmlSAXLocatorPtr;
|
| 60 |
+
|
| 61 |
+
typedef struct _xmlSAXHandler xmlSAXHandler;
|
| 62 |
+
typedef xmlSAXHandler *xmlSAXHandlerPtr;
|
| 63 |
+
|
| 64 |
+
/* entities.h */
|
| 65 |
+
typedef struct _xmlEntity xmlEntity;
|
| 66 |
+
typedef xmlEntity *xmlEntityPtr;
|
| 67 |
+
|
| 68 |
+
/**
|
| 69 |
+
* LIBXML_NAMESPACE_DICT:
|
| 70 |
+
*
|
| 71 |
+
* Defines experimental behaviour:
|
| 72 |
+
* 1) xmlNs gets an additional field @context (a xmlDoc)
|
| 73 |
+
* 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
|
| 74 |
+
*/
|
| 75 |
+
/* #define LIBXML_NAMESPACE_DICT */
|
| 76 |
+
|
| 77 |
+
/**
|
| 78 |
+
* xmlBufferAllocationScheme:
|
| 79 |
+
*
|
| 80 |
+
* A buffer allocation scheme can be defined to either match exactly the
|
| 81 |
+
* need or double it's allocated size each time it is found too small.
|
| 82 |
+
*/
|
| 83 |
+
|
| 84 |
+
typedef enum {
|
| 85 |
+
XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
|
| 86 |
+
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
|
| 87 |
+
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
|
| 88 |
+
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
|
| 89 |
+
XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
|
| 90 |
+
XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
|
| 91 |
+
} xmlBufferAllocationScheme;
|
| 92 |
+
|
| 93 |
+
/**
|
| 94 |
+
* xmlBuffer:
|
| 95 |
+
*
|
| 96 |
+
* A buffer structure, this old construct is limited to 2GB and
|
| 97 |
+
* is being deprecated, use API with xmlBuf instead
|
| 98 |
+
*/
|
| 99 |
+
typedef struct _xmlBuffer xmlBuffer;
|
| 100 |
+
typedef xmlBuffer *xmlBufferPtr;
|
| 101 |
+
struct _xmlBuffer {
|
| 102 |
+
/* The buffer content UTF8 */
|
| 103 |
+
xmlChar *content XML_DEPRECATED_MEMBER;
|
| 104 |
+
/* The buffer size used */
|
| 105 |
+
unsigned int use XML_DEPRECATED_MEMBER;
|
| 106 |
+
/* The buffer size */
|
| 107 |
+
unsigned int size XML_DEPRECATED_MEMBER;
|
| 108 |
+
/* The realloc method */
|
| 109 |
+
xmlBufferAllocationScheme alloc XML_DEPRECATED_MEMBER;
|
| 110 |
+
/* in IO mode we may have a different base */
|
| 111 |
+
xmlChar *contentIO XML_DEPRECATED_MEMBER;
|
| 112 |
+
};
|
| 113 |
+
|
| 114 |
+
/**
|
| 115 |
+
* xmlBuf:
|
| 116 |
+
*
|
| 117 |
+
* A buffer structure, new one, the actual structure internals are not public
|
| 118 |
+
*/
|
| 119 |
+
|
| 120 |
+
typedef struct _xmlBuf xmlBuf;
|
| 121 |
+
|
| 122 |
+
/**
|
| 123 |
+
* xmlBufPtr:
|
| 124 |
+
*
|
| 125 |
+
* A pointer to a buffer structure, the actual structure internals are not
|
| 126 |
+
* public
|
| 127 |
+
*/
|
| 128 |
+
|
| 129 |
+
typedef xmlBuf *xmlBufPtr;
|
| 130 |
+
|
| 131 |
+
/*
|
| 132 |
+
* A few public routines for xmlBuf. As those are expected to be used
|
| 133 |
+
* mostly internally the bulk of the routines are internal in buf.h
|
| 134 |
+
*/
|
| 135 |
+
XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
|
| 136 |
+
XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
|
| 137 |
+
XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
|
| 138 |
+
XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
|
| 139 |
+
|
| 140 |
+
/*
|
| 141 |
+
* LIBXML2_NEW_BUFFER:
|
| 142 |
+
*
|
| 143 |
+
* Macro used to express that the API use the new buffers for
|
| 144 |
+
* xmlParserInputBuffer and xmlOutputBuffer. The change was
|
| 145 |
+
* introduced in 2.9.0.
|
| 146 |
+
*/
|
| 147 |
+
#define LIBXML2_NEW_BUFFER
|
| 148 |
+
|
| 149 |
+
/**
|
| 150 |
+
* XML_XML_NAMESPACE:
|
| 151 |
+
*
|
| 152 |
+
* This is the namespace for the special xml: prefix predefined in the
|
| 153 |
+
* XML Namespace specification.
|
| 154 |
+
*/
|
| 155 |
+
#define XML_XML_NAMESPACE \
|
| 156 |
+
(const xmlChar *) "http://www.w3.org/XML/1998/namespace"
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* XML_XML_ID:
|
| 160 |
+
*
|
| 161 |
+
* This is the name for the special xml:id attribute
|
| 162 |
+
*/
|
| 163 |
+
#define XML_XML_ID (const xmlChar *) "xml:id"
|
| 164 |
+
|
| 165 |
+
/*
|
| 166 |
+
* The different element types carried by an XML tree.
|
| 167 |
+
*
|
| 168 |
+
* NOTE: This is synchronized with DOM Level1 values
|
| 169 |
+
* See http://www.w3.org/TR/REC-DOM-Level-1/
|
| 170 |
+
*
|
| 171 |
+
* Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
|
| 172 |
+
* be deprecated to use an XML_DTD_NODE.
|
| 173 |
+
*/
|
| 174 |
+
typedef enum {
|
| 175 |
+
XML_ELEMENT_NODE= 1,
|
| 176 |
+
XML_ATTRIBUTE_NODE= 2,
|
| 177 |
+
XML_TEXT_NODE= 3,
|
| 178 |
+
XML_CDATA_SECTION_NODE= 4,
|
| 179 |
+
XML_ENTITY_REF_NODE= 5,
|
| 180 |
+
XML_ENTITY_NODE= 6, /* unused */
|
| 181 |
+
XML_PI_NODE= 7,
|
| 182 |
+
XML_COMMENT_NODE= 8,
|
| 183 |
+
XML_DOCUMENT_NODE= 9,
|
| 184 |
+
XML_DOCUMENT_TYPE_NODE= 10, /* unused */
|
| 185 |
+
XML_DOCUMENT_FRAG_NODE= 11,
|
| 186 |
+
XML_NOTATION_NODE= 12, /* unused */
|
| 187 |
+
XML_HTML_DOCUMENT_NODE= 13,
|
| 188 |
+
XML_DTD_NODE= 14,
|
| 189 |
+
XML_ELEMENT_DECL= 15,
|
| 190 |
+
XML_ATTRIBUTE_DECL= 16,
|
| 191 |
+
XML_ENTITY_DECL= 17,
|
| 192 |
+
XML_NAMESPACE_DECL= 18,
|
| 193 |
+
XML_XINCLUDE_START= 19,
|
| 194 |
+
XML_XINCLUDE_END= 20
|
| 195 |
+
/* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
|
| 196 |
+
} xmlElementType;
|
| 197 |
+
|
| 198 |
+
/** DOC_DISABLE */
|
| 199 |
+
/* For backward compatibility */
|
| 200 |
+
#define XML_DOCB_DOCUMENT_NODE 21
|
| 201 |
+
/** DOC_ENABLE */
|
| 202 |
+
|
| 203 |
+
/**
|
| 204 |
+
* xmlNotation:
|
| 205 |
+
*
|
| 206 |
+
* A DTD Notation definition.
|
| 207 |
+
*/
|
| 208 |
+
|
| 209 |
+
typedef struct _xmlNotation xmlNotation;
|
| 210 |
+
typedef xmlNotation *xmlNotationPtr;
|
| 211 |
+
struct _xmlNotation {
|
| 212 |
+
const xmlChar *name; /* Notation name */
|
| 213 |
+
const xmlChar *PublicID; /* Public identifier, if any */
|
| 214 |
+
const xmlChar *SystemID; /* System identifier, if any */
|
| 215 |
+
};
|
| 216 |
+
|
| 217 |
+
/**
|
| 218 |
+
* xmlAttributeType:
|
| 219 |
+
*
|
| 220 |
+
* A DTD Attribute type definition.
|
| 221 |
+
*/
|
| 222 |
+
|
| 223 |
+
typedef enum {
|
| 224 |
+
XML_ATTRIBUTE_CDATA = 1,
|
| 225 |
+
XML_ATTRIBUTE_ID,
|
| 226 |
+
XML_ATTRIBUTE_IDREF ,
|
| 227 |
+
XML_ATTRIBUTE_IDREFS,
|
| 228 |
+
XML_ATTRIBUTE_ENTITY,
|
| 229 |
+
XML_ATTRIBUTE_ENTITIES,
|
| 230 |
+
XML_ATTRIBUTE_NMTOKEN,
|
| 231 |
+
XML_ATTRIBUTE_NMTOKENS,
|
| 232 |
+
XML_ATTRIBUTE_ENUMERATION,
|
| 233 |
+
XML_ATTRIBUTE_NOTATION
|
| 234 |
+
} xmlAttributeType;
|
| 235 |
+
|
| 236 |
+
/**
|
| 237 |
+
* xmlAttributeDefault:
|
| 238 |
+
*
|
| 239 |
+
* A DTD Attribute default definition.
|
| 240 |
+
*/
|
| 241 |
+
|
| 242 |
+
typedef enum {
|
| 243 |
+
XML_ATTRIBUTE_NONE = 1,
|
| 244 |
+
XML_ATTRIBUTE_REQUIRED,
|
| 245 |
+
XML_ATTRIBUTE_IMPLIED,
|
| 246 |
+
XML_ATTRIBUTE_FIXED
|
| 247 |
+
} xmlAttributeDefault;
|
| 248 |
+
|
| 249 |
+
/**
|
| 250 |
+
* xmlEnumeration:
|
| 251 |
+
*
|
| 252 |
+
* List structure used when there is an enumeration in DTDs.
|
| 253 |
+
*/
|
| 254 |
+
|
| 255 |
+
typedef struct _xmlEnumeration xmlEnumeration;
|
| 256 |
+
typedef xmlEnumeration *xmlEnumerationPtr;
|
| 257 |
+
struct _xmlEnumeration {
|
| 258 |
+
struct _xmlEnumeration *next; /* next one */
|
| 259 |
+
const xmlChar *name; /* Enumeration name */
|
| 260 |
+
};
|
| 261 |
+
|
| 262 |
+
/**
|
| 263 |
+
* xmlAttribute:
|
| 264 |
+
*
|
| 265 |
+
* An Attribute declaration in a DTD.
|
| 266 |
+
*/
|
| 267 |
+
|
| 268 |
+
typedef struct _xmlAttribute xmlAttribute;
|
| 269 |
+
typedef xmlAttribute *xmlAttributePtr;
|
| 270 |
+
struct _xmlAttribute {
|
| 271 |
+
void *_private; /* application data */
|
| 272 |
+
xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
|
| 273 |
+
const xmlChar *name; /* Attribute name */
|
| 274 |
+
struct _xmlNode *children; /* NULL */
|
| 275 |
+
struct _xmlNode *last; /* NULL */
|
| 276 |
+
struct _xmlDtd *parent; /* -> DTD */
|
| 277 |
+
struct _xmlNode *next; /* next sibling link */
|
| 278 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 279 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 280 |
+
|
| 281 |
+
struct _xmlAttribute *nexth; /* next in hash table */
|
| 282 |
+
xmlAttributeType atype; /* The attribute type */
|
| 283 |
+
xmlAttributeDefault def; /* the default */
|
| 284 |
+
const xmlChar *defaultValue; /* or the default value */
|
| 285 |
+
xmlEnumerationPtr tree; /* or the enumeration tree if any */
|
| 286 |
+
const xmlChar *prefix; /* the namespace prefix if any */
|
| 287 |
+
const xmlChar *elem; /* Element holding the attribute */
|
| 288 |
+
};
|
| 289 |
+
|
| 290 |
+
/**
|
| 291 |
+
* xmlElementContentType:
|
| 292 |
+
*
|
| 293 |
+
* Possible definitions of element content types.
|
| 294 |
+
*/
|
| 295 |
+
typedef enum {
|
| 296 |
+
XML_ELEMENT_CONTENT_PCDATA = 1,
|
| 297 |
+
XML_ELEMENT_CONTENT_ELEMENT,
|
| 298 |
+
XML_ELEMENT_CONTENT_SEQ,
|
| 299 |
+
XML_ELEMENT_CONTENT_OR
|
| 300 |
+
} xmlElementContentType;
|
| 301 |
+
|
| 302 |
+
/**
|
| 303 |
+
* xmlElementContentOccur:
|
| 304 |
+
*
|
| 305 |
+
* Possible definitions of element content occurrences.
|
| 306 |
+
*/
|
| 307 |
+
typedef enum {
|
| 308 |
+
XML_ELEMENT_CONTENT_ONCE = 1,
|
| 309 |
+
XML_ELEMENT_CONTENT_OPT,
|
| 310 |
+
XML_ELEMENT_CONTENT_MULT,
|
| 311 |
+
XML_ELEMENT_CONTENT_PLUS
|
| 312 |
+
} xmlElementContentOccur;
|
| 313 |
+
|
| 314 |
+
/**
|
| 315 |
+
* xmlElementContent:
|
| 316 |
+
*
|
| 317 |
+
* An XML Element content as stored after parsing an element definition
|
| 318 |
+
* in a DTD.
|
| 319 |
+
*/
|
| 320 |
+
|
| 321 |
+
typedef struct _xmlElementContent xmlElementContent;
|
| 322 |
+
typedef xmlElementContent *xmlElementContentPtr;
|
| 323 |
+
struct _xmlElementContent {
|
| 324 |
+
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
|
| 325 |
+
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
|
| 326 |
+
const xmlChar *name; /* Element name */
|
| 327 |
+
struct _xmlElementContent *c1; /* first child */
|
| 328 |
+
struct _xmlElementContent *c2; /* second child */
|
| 329 |
+
struct _xmlElementContent *parent; /* parent */
|
| 330 |
+
const xmlChar *prefix; /* Namespace prefix */
|
| 331 |
+
};
|
| 332 |
+
|
| 333 |
+
/**
|
| 334 |
+
* xmlElementTypeVal:
|
| 335 |
+
*
|
| 336 |
+
* The different possibilities for an element content type.
|
| 337 |
+
*/
|
| 338 |
+
|
| 339 |
+
typedef enum {
|
| 340 |
+
XML_ELEMENT_TYPE_UNDEFINED = 0,
|
| 341 |
+
XML_ELEMENT_TYPE_EMPTY = 1,
|
| 342 |
+
XML_ELEMENT_TYPE_ANY,
|
| 343 |
+
XML_ELEMENT_TYPE_MIXED,
|
| 344 |
+
XML_ELEMENT_TYPE_ELEMENT
|
| 345 |
+
} xmlElementTypeVal;
|
| 346 |
+
|
| 347 |
+
/**
|
| 348 |
+
* xmlElement:
|
| 349 |
+
*
|
| 350 |
+
* An XML Element declaration from a DTD.
|
| 351 |
+
*/
|
| 352 |
+
|
| 353 |
+
typedef struct _xmlElement xmlElement;
|
| 354 |
+
typedef xmlElement *xmlElementPtr;
|
| 355 |
+
struct _xmlElement {
|
| 356 |
+
void *_private; /* application data */
|
| 357 |
+
xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
|
| 358 |
+
const xmlChar *name; /* Element name */
|
| 359 |
+
struct _xmlNode *children; /* NULL */
|
| 360 |
+
struct _xmlNode *last; /* NULL */
|
| 361 |
+
struct _xmlDtd *parent; /* -> DTD */
|
| 362 |
+
struct _xmlNode *next; /* next sibling link */
|
| 363 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 364 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 365 |
+
|
| 366 |
+
xmlElementTypeVal etype; /* The type */
|
| 367 |
+
xmlElementContentPtr content; /* the allowed element content */
|
| 368 |
+
xmlAttributePtr attributes; /* List of the declared attributes */
|
| 369 |
+
const xmlChar *prefix; /* the namespace prefix if any */
|
| 370 |
+
#ifdef LIBXML_REGEXP_ENABLED
|
| 371 |
+
xmlRegexpPtr contModel; /* the validating regexp */
|
| 372 |
+
#else
|
| 373 |
+
void *contModel;
|
| 374 |
+
#endif
|
| 375 |
+
};
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
/**
|
| 379 |
+
* XML_LOCAL_NAMESPACE:
|
| 380 |
+
*
|
| 381 |
+
* A namespace declaration node.
|
| 382 |
+
*/
|
| 383 |
+
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
|
| 384 |
+
typedef xmlElementType xmlNsType;
|
| 385 |
+
|
| 386 |
+
/**
|
| 387 |
+
* xmlNs:
|
| 388 |
+
*
|
| 389 |
+
* An XML namespace.
|
| 390 |
+
* Note that prefix == NULL is valid, it defines the default namespace
|
| 391 |
+
* within the subtree (until overridden).
|
| 392 |
+
*
|
| 393 |
+
* xmlNsType is unified with xmlElementType.
|
| 394 |
+
*/
|
| 395 |
+
|
| 396 |
+
typedef struct _xmlNs xmlNs;
|
| 397 |
+
typedef xmlNs *xmlNsPtr;
|
| 398 |
+
struct _xmlNs {
|
| 399 |
+
struct _xmlNs *next; /* next Ns link for this node */
|
| 400 |
+
xmlNsType type; /* global or local */
|
| 401 |
+
const xmlChar *href; /* URL for the namespace */
|
| 402 |
+
const xmlChar *prefix; /* prefix for the namespace */
|
| 403 |
+
void *_private; /* application data */
|
| 404 |
+
struct _xmlDoc *context; /* normally an xmlDoc */
|
| 405 |
+
};
|
| 406 |
+
|
| 407 |
+
/**
|
| 408 |
+
* xmlDtd:
|
| 409 |
+
*
|
| 410 |
+
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for
|
| 411 |
+
* the internal subset and for the external subset.
|
| 412 |
+
*/
|
| 413 |
+
typedef struct _xmlDtd xmlDtd;
|
| 414 |
+
typedef xmlDtd *xmlDtdPtr;
|
| 415 |
+
struct _xmlDtd {
|
| 416 |
+
void *_private; /* application data */
|
| 417 |
+
xmlElementType type; /* XML_DTD_NODE, must be second ! */
|
| 418 |
+
const xmlChar *name; /* Name of the DTD */
|
| 419 |
+
struct _xmlNode *children; /* the value of the property link */
|
| 420 |
+
struct _xmlNode *last; /* last child link */
|
| 421 |
+
struct _xmlDoc *parent; /* child->parent link */
|
| 422 |
+
struct _xmlNode *next; /* next sibling link */
|
| 423 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 424 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 425 |
+
|
| 426 |
+
/* End of common part */
|
| 427 |
+
void *notations; /* Hash table for notations if any */
|
| 428 |
+
void *elements; /* Hash table for elements if any */
|
| 429 |
+
void *attributes; /* Hash table for attributes if any */
|
| 430 |
+
void *entities; /* Hash table for entities if any */
|
| 431 |
+
const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
|
| 432 |
+
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
|
| 433 |
+
void *pentities; /* Hash table for param entities if any */
|
| 434 |
+
};
|
| 435 |
+
|
| 436 |
+
/**
|
| 437 |
+
* xmlAttr:
|
| 438 |
+
*
|
| 439 |
+
* An attribute on an XML node.
|
| 440 |
+
*/
|
| 441 |
+
typedef struct _xmlAttr xmlAttr;
|
| 442 |
+
typedef xmlAttr *xmlAttrPtr;
|
| 443 |
+
struct _xmlAttr {
|
| 444 |
+
void *_private; /* application data */
|
| 445 |
+
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
|
| 446 |
+
const xmlChar *name; /* the name of the property */
|
| 447 |
+
struct _xmlNode *children; /* the value of the property */
|
| 448 |
+
struct _xmlNode *last; /* NULL */
|
| 449 |
+
struct _xmlNode *parent; /* child->parent link */
|
| 450 |
+
struct _xmlAttr *next; /* next sibling link */
|
| 451 |
+
struct _xmlAttr *prev; /* previous sibling link */
|
| 452 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 453 |
+
xmlNs *ns; /* pointer to the associated namespace */
|
| 454 |
+
xmlAttributeType atype; /* the attribute type if validating */
|
| 455 |
+
void *psvi; /* for type/PSVI information */
|
| 456 |
+
struct _xmlID *id; /* the ID struct */
|
| 457 |
+
};
|
| 458 |
+
|
| 459 |
+
/**
|
| 460 |
+
* xmlID:
|
| 461 |
+
*
|
| 462 |
+
* An XML ID instance.
|
| 463 |
+
*/
|
| 464 |
+
|
| 465 |
+
typedef struct _xmlID xmlID;
|
| 466 |
+
typedef xmlID *xmlIDPtr;
|
| 467 |
+
struct _xmlID {
|
| 468 |
+
struct _xmlID *next; /* next ID */
|
| 469 |
+
const xmlChar *value; /* The ID name */
|
| 470 |
+
xmlAttrPtr attr; /* The attribute holding it */
|
| 471 |
+
const xmlChar *name; /* The attribute if attr is not available */
|
| 472 |
+
int lineno; /* The line number if attr is not available */
|
| 473 |
+
struct _xmlDoc *doc; /* The document holding the ID */
|
| 474 |
+
};
|
| 475 |
+
|
| 476 |
+
/**
|
| 477 |
+
* xmlRef:
|
| 478 |
+
*
|
| 479 |
+
* An XML IDREF instance.
|
| 480 |
+
*/
|
| 481 |
+
|
| 482 |
+
typedef struct _xmlRef xmlRef;
|
| 483 |
+
typedef xmlRef *xmlRefPtr;
|
| 484 |
+
struct _xmlRef {
|
| 485 |
+
struct _xmlRef *next; /* next Ref */
|
| 486 |
+
const xmlChar *value; /* The Ref name */
|
| 487 |
+
xmlAttrPtr attr; /* The attribute holding it */
|
| 488 |
+
const xmlChar *name; /* The attribute if attr is not available */
|
| 489 |
+
int lineno; /* The line number if attr is not available */
|
| 490 |
+
};
|
| 491 |
+
|
| 492 |
+
/**
|
| 493 |
+
* xmlNode:
|
| 494 |
+
*
|
| 495 |
+
* A node in an XML tree.
|
| 496 |
+
*/
|
| 497 |
+
typedef struct _xmlNode xmlNode;
|
| 498 |
+
typedef xmlNode *xmlNodePtr;
|
| 499 |
+
struct _xmlNode {
|
| 500 |
+
void *_private; /* application data */
|
| 501 |
+
xmlElementType type; /* type number, must be second ! */
|
| 502 |
+
const xmlChar *name; /* the name of the node, or the entity */
|
| 503 |
+
struct _xmlNode *children; /* parent->childs link */
|
| 504 |
+
struct _xmlNode *last; /* last child link */
|
| 505 |
+
struct _xmlNode *parent; /* child->parent link */
|
| 506 |
+
struct _xmlNode *next; /* next sibling link */
|
| 507 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 508 |
+
struct _xmlDoc *doc; /* the containing document */
|
| 509 |
+
|
| 510 |
+
/* End of common part */
|
| 511 |
+
xmlNs *ns; /* pointer to the associated namespace */
|
| 512 |
+
xmlChar *content; /* the content */
|
| 513 |
+
struct _xmlAttr *properties;/* properties list */
|
| 514 |
+
xmlNs *nsDef; /* namespace definitions on this node */
|
| 515 |
+
void *psvi; /* for type/PSVI information */
|
| 516 |
+
unsigned short line; /* line number */
|
| 517 |
+
unsigned short extra; /* extra data for XPath/XSLT */
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
/**
|
| 521 |
+
* XML_GET_CONTENT:
|
| 522 |
+
*
|
| 523 |
+
* Macro to extract the content pointer of a node.
|
| 524 |
+
*/
|
| 525 |
+
#define XML_GET_CONTENT(n) \
|
| 526 |
+
((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
|
| 527 |
+
|
| 528 |
+
/**
|
| 529 |
+
* XML_GET_LINE:
|
| 530 |
+
*
|
| 531 |
+
* Macro to extract the line number of an element node.
|
| 532 |
+
*/
|
| 533 |
+
#define XML_GET_LINE(n) \
|
| 534 |
+
(xmlGetLineNo(n))
|
| 535 |
+
|
| 536 |
+
/**
|
| 537 |
+
* xmlDocProperty
|
| 538 |
+
*
|
| 539 |
+
* Set of properties of the document as found by the parser
|
| 540 |
+
* Some of them are linked to similarly named xmlParserOption
|
| 541 |
+
*/
|
| 542 |
+
typedef enum {
|
| 543 |
+
XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
|
| 544 |
+
XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
|
| 545 |
+
XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
|
| 546 |
+
XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
|
| 547 |
+
XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
|
| 548 |
+
XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
|
| 549 |
+
and not by parsing an instance */
|
| 550 |
+
XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
|
| 551 |
+
XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
|
| 552 |
+
} xmlDocProperties;
|
| 553 |
+
|
| 554 |
+
/**
|
| 555 |
+
* xmlDoc:
|
| 556 |
+
*
|
| 557 |
+
* An XML document.
|
| 558 |
+
*/
|
| 559 |
+
typedef struct _xmlDoc xmlDoc;
|
| 560 |
+
typedef xmlDoc *xmlDocPtr;
|
| 561 |
+
struct _xmlDoc {
|
| 562 |
+
void *_private; /* application data */
|
| 563 |
+
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
|
| 564 |
+
char *name; /* name/filename/URI of the document */
|
| 565 |
+
struct _xmlNode *children; /* the document tree */
|
| 566 |
+
struct _xmlNode *last; /* last child link */
|
| 567 |
+
struct _xmlNode *parent; /* child->parent link */
|
| 568 |
+
struct _xmlNode *next; /* next sibling link */
|
| 569 |
+
struct _xmlNode *prev; /* previous sibling link */
|
| 570 |
+
struct _xmlDoc *doc; /* autoreference to itself */
|
| 571 |
+
|
| 572 |
+
/* End of common part */
|
| 573 |
+
int compression;/* level of zlib compression */
|
| 574 |
+
int standalone; /* standalone document (no external refs)
|
| 575 |
+
1 if standalone="yes"
|
| 576 |
+
0 if standalone="no"
|
| 577 |
+
-1 if there is no XML declaration
|
| 578 |
+
-2 if there is an XML declaration, but no
|
| 579 |
+
standalone attribute was specified */
|
| 580 |
+
struct _xmlDtd *intSubset; /* the document internal subset */
|
| 581 |
+
struct _xmlDtd *extSubset; /* the document external subset */
|
| 582 |
+
struct _xmlNs *oldNs; /* Global namespace, the old way */
|
| 583 |
+
const xmlChar *version; /* the XML version string */
|
| 584 |
+
const xmlChar *encoding; /* actual encoding, if any */
|
| 585 |
+
void *ids; /* Hash table for ID attributes if any */
|
| 586 |
+
void *refs; /* Hash table for IDREFs attributes if any */
|
| 587 |
+
const xmlChar *URL; /* The URI for that document */
|
| 588 |
+
int charset; /* unused */
|
| 589 |
+
struct _xmlDict *dict; /* dict used to allocate names or NULL */
|
| 590 |
+
void *psvi; /* for type/PSVI information */
|
| 591 |
+
int parseFlags; /* set of xmlParserOption used to parse the
|
| 592 |
+
document */
|
| 593 |
+
int properties; /* set of xmlDocProperties for this document
|
| 594 |
+
set at the end of parsing */
|
| 595 |
+
};
|
| 596 |
+
|
| 597 |
+
|
| 598 |
+
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
|
| 599 |
+
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
|
| 600 |
+
|
| 601 |
+
/**
|
| 602 |
+
* xmlDOMWrapAcquireNsFunction:
|
| 603 |
+
* @ctxt: a DOM wrapper context
|
| 604 |
+
* @node: the context node (element or attribute)
|
| 605 |
+
* @nsName: the requested namespace name
|
| 606 |
+
* @nsPrefix: the requested namespace prefix
|
| 607 |
+
*
|
| 608 |
+
* A function called to acquire namespaces (xmlNs) from the wrapper.
|
| 609 |
+
*
|
| 610 |
+
* Returns an xmlNsPtr or NULL in case of an error.
|
| 611 |
+
*/
|
| 612 |
+
typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
|
| 613 |
+
xmlNodePtr node,
|
| 614 |
+
const xmlChar *nsName,
|
| 615 |
+
const xmlChar *nsPrefix);
|
| 616 |
+
|
| 617 |
+
/**
|
| 618 |
+
* xmlDOMWrapCtxt:
|
| 619 |
+
*
|
| 620 |
+
* Context for DOM wrapper-operations.
|
| 621 |
+
*/
|
| 622 |
+
struct _xmlDOMWrapCtxt {
|
| 623 |
+
void * _private;
|
| 624 |
+
/*
|
| 625 |
+
* The type of this context, just in case we need specialized
|
| 626 |
+
* contexts in the future.
|
| 627 |
+
*/
|
| 628 |
+
int type;
|
| 629 |
+
/*
|
| 630 |
+
* Internal namespace map used for various operations.
|
| 631 |
+
*/
|
| 632 |
+
void * namespaceMap;
|
| 633 |
+
/*
|
| 634 |
+
* Use this one to acquire an xmlNsPtr intended for node->ns.
|
| 635 |
+
* (Note that this is not intended for elem->nsDef).
|
| 636 |
+
*/
|
| 637 |
+
xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
|
| 638 |
+
};
|
| 639 |
+
|
| 640 |
+
/**
|
| 641 |
+
* xmlRegisterNodeFunc:
|
| 642 |
+
* @node: the current node
|
| 643 |
+
*
|
| 644 |
+
* Signature for the registration callback of a created node
|
| 645 |
+
*/
|
| 646 |
+
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
|
| 647 |
+
|
| 648 |
+
/**
|
| 649 |
+
* xmlDeregisterNodeFunc:
|
| 650 |
+
* @node: the current node
|
| 651 |
+
*
|
| 652 |
+
* Signature for the deregistration callback of a discarded node
|
| 653 |
+
*/
|
| 654 |
+
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
| 655 |
+
|
| 656 |
+
/**
|
| 657 |
+
* xmlChildrenNode:
|
| 658 |
+
*
|
| 659 |
+
* Macro for compatibility naming layer with libxml1. Maps
|
| 660 |
+
* to "children."
|
| 661 |
+
*/
|
| 662 |
+
#ifndef xmlChildrenNode
|
| 663 |
+
#define xmlChildrenNode children
|
| 664 |
+
#endif
|
| 665 |
+
|
| 666 |
+
/**
|
| 667 |
+
* xmlRootNode:
|
| 668 |
+
*
|
| 669 |
+
* Macro for compatibility naming layer with libxml1. Maps
|
| 670 |
+
* to "children".
|
| 671 |
+
*/
|
| 672 |
+
#ifndef xmlRootNode
|
| 673 |
+
#define xmlRootNode children
|
| 674 |
+
#endif
|
| 675 |
+
|
| 676 |
+
/*
|
| 677 |
+
* Variables.
|
| 678 |
+
*/
|
| 679 |
+
|
| 680 |
+
/** DOC_DISABLE */
|
| 681 |
+
XML_DEPRECATED
|
| 682 |
+
XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
|
| 683 |
+
XML_DEPRECATED
|
| 684 |
+
XMLPUBFUN xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
|
| 685 |
+
|
| 686 |
+
#ifndef XML_GLOBALS_NO_REDEFINITION
|
| 687 |
+
#define xmlRegisterNodeDefaultValue \
|
| 688 |
+
(*__xmlRegisterNodeDefaultValue())
|
| 689 |
+
#define xmlDeregisterNodeDefaultValue \
|
| 690 |
+
(*__xmlDeregisterNodeDefaultValue())
|
| 691 |
+
#endif
|
| 692 |
+
/** DOC_ENABLE */
|
| 693 |
+
|
| 694 |
+
/*
|
| 695 |
+
* Some helper functions
|
| 696 |
+
*/
|
| 697 |
+
XMLPUBFUN int
|
| 698 |
+
xmlValidateNCName (const xmlChar *value,
|
| 699 |
+
int space);
|
| 700 |
+
|
| 701 |
+
XMLPUBFUN int
|
| 702 |
+
xmlValidateQName (const xmlChar *value,
|
| 703 |
+
int space);
|
| 704 |
+
XMLPUBFUN int
|
| 705 |
+
xmlValidateName (const xmlChar *value,
|
| 706 |
+
int space);
|
| 707 |
+
XMLPUBFUN int
|
| 708 |
+
xmlValidateNMToken (const xmlChar *value,
|
| 709 |
+
int space);
|
| 710 |
+
|
| 711 |
+
XMLPUBFUN xmlChar *
|
| 712 |
+
xmlBuildQName (const xmlChar *ncname,
|
| 713 |
+
const xmlChar *prefix,
|
| 714 |
+
xmlChar *memory,
|
| 715 |
+
int len);
|
| 716 |
+
XMLPUBFUN xmlChar *
|
| 717 |
+
xmlSplitQName2 (const xmlChar *name,
|
| 718 |
+
xmlChar **prefix);
|
| 719 |
+
XMLPUBFUN const xmlChar *
|
| 720 |
+
xmlSplitQName3 (const xmlChar *name,
|
| 721 |
+
int *len);
|
| 722 |
+
|
| 723 |
+
/*
|
| 724 |
+
* Handling Buffers, the old ones see @xmlBuf for the new ones.
|
| 725 |
+
*/
|
| 726 |
+
|
| 727 |
+
XML_DEPRECATED
|
| 728 |
+
XMLPUBFUN void
|
| 729 |
+
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
|
| 730 |
+
XML_DEPRECATED
|
| 731 |
+
XMLPUBFUN xmlBufferAllocationScheme
|
| 732 |
+
xmlGetBufferAllocationScheme(void);
|
| 733 |
+
|
| 734 |
+
XMLPUBFUN xmlBufferPtr
|
| 735 |
+
xmlBufferCreate (void);
|
| 736 |
+
XMLPUBFUN xmlBufferPtr
|
| 737 |
+
xmlBufferCreateSize (size_t size);
|
| 738 |
+
XMLPUBFUN xmlBufferPtr
|
| 739 |
+
xmlBufferCreateStatic (void *mem,
|
| 740 |
+
size_t size);
|
| 741 |
+
XML_DEPRECATED
|
| 742 |
+
XMLPUBFUN int
|
| 743 |
+
xmlBufferResize (xmlBufferPtr buf,
|
| 744 |
+
unsigned int size);
|
| 745 |
+
XMLPUBFUN void
|
| 746 |
+
xmlBufferFree (xmlBufferPtr buf);
|
| 747 |
+
XMLPUBFUN int
|
| 748 |
+
xmlBufferDump (FILE *file,
|
| 749 |
+
xmlBufferPtr buf);
|
| 750 |
+
XMLPUBFUN int
|
| 751 |
+
xmlBufferAdd (xmlBufferPtr buf,
|
| 752 |
+
const xmlChar *str,
|
| 753 |
+
int len);
|
| 754 |
+
XMLPUBFUN int
|
| 755 |
+
xmlBufferAddHead (xmlBufferPtr buf,
|
| 756 |
+
const xmlChar *str,
|
| 757 |
+
int len);
|
| 758 |
+
XMLPUBFUN int
|
| 759 |
+
xmlBufferCat (xmlBufferPtr buf,
|
| 760 |
+
const xmlChar *str);
|
| 761 |
+
XMLPUBFUN int
|
| 762 |
+
xmlBufferCCat (xmlBufferPtr buf,
|
| 763 |
+
const char *str);
|
| 764 |
+
XML_DEPRECATED
|
| 765 |
+
XMLPUBFUN int
|
| 766 |
+
xmlBufferShrink (xmlBufferPtr buf,
|
| 767 |
+
unsigned int len);
|
| 768 |
+
XML_DEPRECATED
|
| 769 |
+
XMLPUBFUN int
|
| 770 |
+
xmlBufferGrow (xmlBufferPtr buf,
|
| 771 |
+
unsigned int len);
|
| 772 |
+
XMLPUBFUN void
|
| 773 |
+
xmlBufferEmpty (xmlBufferPtr buf);
|
| 774 |
+
XMLPUBFUN const xmlChar*
|
| 775 |
+
xmlBufferContent (const xmlBuffer *buf);
|
| 776 |
+
XMLPUBFUN xmlChar*
|
| 777 |
+
xmlBufferDetach (xmlBufferPtr buf);
|
| 778 |
+
XMLPUBFUN void
|
| 779 |
+
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
|
| 780 |
+
xmlBufferAllocationScheme scheme);
|
| 781 |
+
XMLPUBFUN int
|
| 782 |
+
xmlBufferLength (const xmlBuffer *buf);
|
| 783 |
+
|
| 784 |
+
/*
|
| 785 |
+
* Creating/freeing new structures.
|
| 786 |
+
*/
|
| 787 |
+
XMLPUBFUN xmlDtdPtr
|
| 788 |
+
xmlCreateIntSubset (xmlDocPtr doc,
|
| 789 |
+
const xmlChar *name,
|
| 790 |
+
const xmlChar *ExternalID,
|
| 791 |
+
const xmlChar *SystemID);
|
| 792 |
+
XMLPUBFUN xmlDtdPtr
|
| 793 |
+
xmlNewDtd (xmlDocPtr doc,
|
| 794 |
+
const xmlChar *name,
|
| 795 |
+
const xmlChar *ExternalID,
|
| 796 |
+
const xmlChar *SystemID);
|
| 797 |
+
XMLPUBFUN xmlDtdPtr
|
| 798 |
+
xmlGetIntSubset (const xmlDoc *doc);
|
| 799 |
+
XMLPUBFUN void
|
| 800 |
+
xmlFreeDtd (xmlDtdPtr cur);
|
| 801 |
+
XMLPUBFUN xmlNsPtr
|
| 802 |
+
xmlNewNs (xmlNodePtr node,
|
| 803 |
+
const xmlChar *href,
|
| 804 |
+
const xmlChar *prefix);
|
| 805 |
+
XMLPUBFUN void
|
| 806 |
+
xmlFreeNs (xmlNsPtr cur);
|
| 807 |
+
XMLPUBFUN void
|
| 808 |
+
xmlFreeNsList (xmlNsPtr cur);
|
| 809 |
+
XMLPUBFUN xmlDocPtr
|
| 810 |
+
xmlNewDoc (const xmlChar *version);
|
| 811 |
+
XMLPUBFUN void
|
| 812 |
+
xmlFreeDoc (xmlDocPtr cur);
|
| 813 |
+
XMLPUBFUN xmlAttrPtr
|
| 814 |
+
xmlNewDocProp (xmlDocPtr doc,
|
| 815 |
+
const xmlChar *name,
|
| 816 |
+
const xmlChar *value);
|
| 817 |
+
XMLPUBFUN xmlAttrPtr
|
| 818 |
+
xmlNewProp (xmlNodePtr node,
|
| 819 |
+
const xmlChar *name,
|
| 820 |
+
const xmlChar *value);
|
| 821 |
+
XMLPUBFUN xmlAttrPtr
|
| 822 |
+
xmlNewNsProp (xmlNodePtr node,
|
| 823 |
+
xmlNsPtr ns,
|
| 824 |
+
const xmlChar *name,
|
| 825 |
+
const xmlChar *value);
|
| 826 |
+
XMLPUBFUN xmlAttrPtr
|
| 827 |
+
xmlNewNsPropEatName (xmlNodePtr node,
|
| 828 |
+
xmlNsPtr ns,
|
| 829 |
+
xmlChar *name,
|
| 830 |
+
const xmlChar *value);
|
| 831 |
+
XMLPUBFUN void
|
| 832 |
+
xmlFreePropList (xmlAttrPtr cur);
|
| 833 |
+
XMLPUBFUN void
|
| 834 |
+
xmlFreeProp (xmlAttrPtr cur);
|
| 835 |
+
XMLPUBFUN xmlAttrPtr
|
| 836 |
+
xmlCopyProp (xmlNodePtr target,
|
| 837 |
+
xmlAttrPtr cur);
|
| 838 |
+
XMLPUBFUN xmlAttrPtr
|
| 839 |
+
xmlCopyPropList (xmlNodePtr target,
|
| 840 |
+
xmlAttrPtr cur);
|
| 841 |
+
XMLPUBFUN xmlDtdPtr
|
| 842 |
+
xmlCopyDtd (xmlDtdPtr dtd);
|
| 843 |
+
XMLPUBFUN xmlDocPtr
|
| 844 |
+
xmlCopyDoc (xmlDocPtr doc,
|
| 845 |
+
int recursive);
|
| 846 |
+
/*
|
| 847 |
+
* Creating new nodes.
|
| 848 |
+
*/
|
| 849 |
+
XMLPUBFUN xmlNodePtr
|
| 850 |
+
xmlNewDocNode (xmlDocPtr doc,
|
| 851 |
+
xmlNsPtr ns,
|
| 852 |
+
const xmlChar *name,
|
| 853 |
+
const xmlChar *content);
|
| 854 |
+
XMLPUBFUN xmlNodePtr
|
| 855 |
+
xmlNewDocNodeEatName (xmlDocPtr doc,
|
| 856 |
+
xmlNsPtr ns,
|
| 857 |
+
xmlChar *name,
|
| 858 |
+
const xmlChar *content);
|
| 859 |
+
XMLPUBFUN xmlNodePtr
|
| 860 |
+
xmlNewNode (xmlNsPtr ns,
|
| 861 |
+
const xmlChar *name);
|
| 862 |
+
XMLPUBFUN xmlNodePtr
|
| 863 |
+
xmlNewNodeEatName (xmlNsPtr ns,
|
| 864 |
+
xmlChar *name);
|
| 865 |
+
XMLPUBFUN xmlNodePtr
|
| 866 |
+
xmlNewChild (xmlNodePtr parent,
|
| 867 |
+
xmlNsPtr ns,
|
| 868 |
+
const xmlChar *name,
|
| 869 |
+
const xmlChar *content);
|
| 870 |
+
XMLPUBFUN xmlNodePtr
|
| 871 |
+
xmlNewDocText (const xmlDoc *doc,
|
| 872 |
+
const xmlChar *content);
|
| 873 |
+
XMLPUBFUN xmlNodePtr
|
| 874 |
+
xmlNewText (const xmlChar *content);
|
| 875 |
+
XMLPUBFUN xmlNodePtr
|
| 876 |
+
xmlNewDocPI (xmlDocPtr doc,
|
| 877 |
+
const xmlChar *name,
|
| 878 |
+
const xmlChar *content);
|
| 879 |
+
XMLPUBFUN xmlNodePtr
|
| 880 |
+
xmlNewPI (const xmlChar *name,
|
| 881 |
+
const xmlChar *content);
|
| 882 |
+
XMLPUBFUN xmlNodePtr
|
| 883 |
+
xmlNewDocTextLen (xmlDocPtr doc,
|
| 884 |
+
const xmlChar *content,
|
| 885 |
+
int len);
|
| 886 |
+
XMLPUBFUN xmlNodePtr
|
| 887 |
+
xmlNewTextLen (const xmlChar *content,
|
| 888 |
+
int len);
|
| 889 |
+
XMLPUBFUN xmlNodePtr
|
| 890 |
+
xmlNewDocComment (xmlDocPtr doc,
|
| 891 |
+
const xmlChar *content);
|
| 892 |
+
XMLPUBFUN xmlNodePtr
|
| 893 |
+
xmlNewComment (const xmlChar *content);
|
| 894 |
+
XMLPUBFUN xmlNodePtr
|
| 895 |
+
xmlNewCDataBlock (xmlDocPtr doc,
|
| 896 |
+
const xmlChar *content,
|
| 897 |
+
int len);
|
| 898 |
+
XMLPUBFUN xmlNodePtr
|
| 899 |
+
xmlNewCharRef (xmlDocPtr doc,
|
| 900 |
+
const xmlChar *name);
|
| 901 |
+
XMLPUBFUN xmlNodePtr
|
| 902 |
+
xmlNewReference (const xmlDoc *doc,
|
| 903 |
+
const xmlChar *name);
|
| 904 |
+
XMLPUBFUN xmlNodePtr
|
| 905 |
+
xmlCopyNode (xmlNodePtr node,
|
| 906 |
+
int recursive);
|
| 907 |
+
XMLPUBFUN xmlNodePtr
|
| 908 |
+
xmlDocCopyNode (xmlNodePtr node,
|
| 909 |
+
xmlDocPtr doc,
|
| 910 |
+
int recursive);
|
| 911 |
+
XMLPUBFUN xmlNodePtr
|
| 912 |
+
xmlDocCopyNodeList (xmlDocPtr doc,
|
| 913 |
+
xmlNodePtr node);
|
| 914 |
+
XMLPUBFUN xmlNodePtr
|
| 915 |
+
xmlCopyNodeList (xmlNodePtr node);
|
| 916 |
+
XMLPUBFUN xmlNodePtr
|
| 917 |
+
xmlNewTextChild (xmlNodePtr parent,
|
| 918 |
+
xmlNsPtr ns,
|
| 919 |
+
const xmlChar *name,
|
| 920 |
+
const xmlChar *content);
|
| 921 |
+
XMLPUBFUN xmlNodePtr
|
| 922 |
+
xmlNewDocRawNode (xmlDocPtr doc,
|
| 923 |
+
xmlNsPtr ns,
|
| 924 |
+
const xmlChar *name,
|
| 925 |
+
const xmlChar *content);
|
| 926 |
+
XMLPUBFUN xmlNodePtr
|
| 927 |
+
xmlNewDocFragment (xmlDocPtr doc);
|
| 928 |
+
|
| 929 |
+
/*
|
| 930 |
+
* Navigating.
|
| 931 |
+
*/
|
| 932 |
+
XMLPUBFUN long
|
| 933 |
+
xmlGetLineNo (const xmlNode *node);
|
| 934 |
+
XMLPUBFUN xmlChar *
|
| 935 |
+
xmlGetNodePath (const xmlNode *node);
|
| 936 |
+
XMLPUBFUN xmlNodePtr
|
| 937 |
+
xmlDocGetRootElement (const xmlDoc *doc);
|
| 938 |
+
XMLPUBFUN xmlNodePtr
|
| 939 |
+
xmlGetLastChild (const xmlNode *parent);
|
| 940 |
+
XMLPUBFUN int
|
| 941 |
+
xmlNodeIsText (const xmlNode *node);
|
| 942 |
+
XMLPUBFUN int
|
| 943 |
+
xmlIsBlankNode (const xmlNode *node);
|
| 944 |
+
|
| 945 |
+
/*
|
| 946 |
+
* Changing the structure.
|
| 947 |
+
*/
|
| 948 |
+
XMLPUBFUN xmlNodePtr
|
| 949 |
+
xmlDocSetRootElement (xmlDocPtr doc,
|
| 950 |
+
xmlNodePtr root);
|
| 951 |
+
XMLPUBFUN void
|
| 952 |
+
xmlNodeSetName (xmlNodePtr cur,
|
| 953 |
+
const xmlChar *name);
|
| 954 |
+
XMLPUBFUN xmlNodePtr
|
| 955 |
+
xmlAddChild (xmlNodePtr parent,
|
| 956 |
+
xmlNodePtr cur);
|
| 957 |
+
XMLPUBFUN xmlNodePtr
|
| 958 |
+
xmlAddChildList (xmlNodePtr parent,
|
| 959 |
+
xmlNodePtr cur);
|
| 960 |
+
XMLPUBFUN xmlNodePtr
|
| 961 |
+
xmlReplaceNode (xmlNodePtr old,
|
| 962 |
+
xmlNodePtr cur);
|
| 963 |
+
XMLPUBFUN xmlNodePtr
|
| 964 |
+
xmlAddPrevSibling (xmlNodePtr cur,
|
| 965 |
+
xmlNodePtr elem);
|
| 966 |
+
XMLPUBFUN xmlNodePtr
|
| 967 |
+
xmlAddSibling (xmlNodePtr cur,
|
| 968 |
+
xmlNodePtr elem);
|
| 969 |
+
XMLPUBFUN xmlNodePtr
|
| 970 |
+
xmlAddNextSibling (xmlNodePtr cur,
|
| 971 |
+
xmlNodePtr elem);
|
| 972 |
+
XMLPUBFUN void
|
| 973 |
+
xmlUnlinkNode (xmlNodePtr cur);
|
| 974 |
+
XMLPUBFUN xmlNodePtr
|
| 975 |
+
xmlTextMerge (xmlNodePtr first,
|
| 976 |
+
xmlNodePtr second);
|
| 977 |
+
XMLPUBFUN int
|
| 978 |
+
xmlTextConcat (xmlNodePtr node,
|
| 979 |
+
const xmlChar *content,
|
| 980 |
+
int len);
|
| 981 |
+
XMLPUBFUN void
|
| 982 |
+
xmlFreeNodeList (xmlNodePtr cur);
|
| 983 |
+
XMLPUBFUN void
|
| 984 |
+
xmlFreeNode (xmlNodePtr cur);
|
| 985 |
+
XMLPUBFUN int
|
| 986 |
+
xmlSetTreeDoc (xmlNodePtr tree,
|
| 987 |
+
xmlDocPtr doc);
|
| 988 |
+
XMLPUBFUN int
|
| 989 |
+
xmlSetListDoc (xmlNodePtr list,
|
| 990 |
+
xmlDocPtr doc);
|
| 991 |
+
/*
|
| 992 |
+
* Namespaces.
|
| 993 |
+
*/
|
| 994 |
+
XMLPUBFUN xmlNsPtr
|
| 995 |
+
xmlSearchNs (xmlDocPtr doc,
|
| 996 |
+
xmlNodePtr node,
|
| 997 |
+
const xmlChar *nameSpace);
|
| 998 |
+
XMLPUBFUN xmlNsPtr
|
| 999 |
+
xmlSearchNsByHref (xmlDocPtr doc,
|
| 1000 |
+
xmlNodePtr node,
|
| 1001 |
+
const xmlChar *href);
|
| 1002 |
+
XMLPUBFUN int
|
| 1003 |
+
xmlGetNsListSafe (const xmlDoc *doc,
|
| 1004 |
+
const xmlNode *node,
|
| 1005 |
+
xmlNsPtr **out);
|
| 1006 |
+
XMLPUBFUN xmlNsPtr *
|
| 1007 |
+
xmlGetNsList (const xmlDoc *doc,
|
| 1008 |
+
const xmlNode *node);
|
| 1009 |
+
|
| 1010 |
+
XMLPUBFUN void
|
| 1011 |
+
xmlSetNs (xmlNodePtr node,
|
| 1012 |
+
xmlNsPtr ns);
|
| 1013 |
+
XMLPUBFUN xmlNsPtr
|
| 1014 |
+
xmlCopyNamespace (xmlNsPtr cur);
|
| 1015 |
+
XMLPUBFUN xmlNsPtr
|
| 1016 |
+
xmlCopyNamespaceList (xmlNsPtr cur);
|
| 1017 |
+
|
| 1018 |
+
/*
|
| 1019 |
+
* Changing the content.
|
| 1020 |
+
*/
|
| 1021 |
+
XMLPUBFUN xmlAttrPtr
|
| 1022 |
+
xmlSetProp (xmlNodePtr node,
|
| 1023 |
+
const xmlChar *name,
|
| 1024 |
+
const xmlChar *value);
|
| 1025 |
+
XMLPUBFUN xmlAttrPtr
|
| 1026 |
+
xmlSetNsProp (xmlNodePtr node,
|
| 1027 |
+
xmlNsPtr ns,
|
| 1028 |
+
const xmlChar *name,
|
| 1029 |
+
const xmlChar *value);
|
| 1030 |
+
XMLPUBFUN int
|
| 1031 |
+
xmlNodeGetAttrValue (const xmlNode *node,
|
| 1032 |
+
const xmlChar *name,
|
| 1033 |
+
const xmlChar *nsUri,
|
| 1034 |
+
xmlChar **out);
|
| 1035 |
+
XMLPUBFUN xmlChar *
|
| 1036 |
+
xmlGetNoNsProp (const xmlNode *node,
|
| 1037 |
+
const xmlChar *name);
|
| 1038 |
+
XMLPUBFUN xmlChar *
|
| 1039 |
+
xmlGetProp (const xmlNode *node,
|
| 1040 |
+
const xmlChar *name);
|
| 1041 |
+
XMLPUBFUN xmlAttrPtr
|
| 1042 |
+
xmlHasProp (const xmlNode *node,
|
| 1043 |
+
const xmlChar *name);
|
| 1044 |
+
XMLPUBFUN xmlAttrPtr
|
| 1045 |
+
xmlHasNsProp (const xmlNode *node,
|
| 1046 |
+
const xmlChar *name,
|
| 1047 |
+
const xmlChar *nameSpace);
|
| 1048 |
+
XMLPUBFUN xmlChar *
|
| 1049 |
+
xmlGetNsProp (const xmlNode *node,
|
| 1050 |
+
const xmlChar *name,
|
| 1051 |
+
const xmlChar *nameSpace);
|
| 1052 |
+
XMLPUBFUN xmlNodePtr
|
| 1053 |
+
xmlStringGetNodeList (const xmlDoc *doc,
|
| 1054 |
+
const xmlChar *value);
|
| 1055 |
+
XMLPUBFUN xmlNodePtr
|
| 1056 |
+
xmlStringLenGetNodeList (const xmlDoc *doc,
|
| 1057 |
+
const xmlChar *value,
|
| 1058 |
+
int len);
|
| 1059 |
+
XMLPUBFUN xmlChar *
|
| 1060 |
+
xmlNodeListGetString (xmlDocPtr doc,
|
| 1061 |
+
const xmlNode *list,
|
| 1062 |
+
int inLine);
|
| 1063 |
+
XMLPUBFUN xmlChar *
|
| 1064 |
+
xmlNodeListGetRawString (const xmlDoc *doc,
|
| 1065 |
+
const xmlNode *list,
|
| 1066 |
+
int inLine);
|
| 1067 |
+
XMLPUBFUN int
|
| 1068 |
+
xmlNodeSetContent (xmlNodePtr cur,
|
| 1069 |
+
const xmlChar *content);
|
| 1070 |
+
XMLPUBFUN int
|
| 1071 |
+
xmlNodeSetContentLen (xmlNodePtr cur,
|
| 1072 |
+
const xmlChar *content,
|
| 1073 |
+
int len);
|
| 1074 |
+
XMLPUBFUN int
|
| 1075 |
+
xmlNodeAddContent (xmlNodePtr cur,
|
| 1076 |
+
const xmlChar *content);
|
| 1077 |
+
XMLPUBFUN int
|
| 1078 |
+
xmlNodeAddContentLen (xmlNodePtr cur,
|
| 1079 |
+
const xmlChar *content,
|
| 1080 |
+
int len);
|
| 1081 |
+
XMLPUBFUN xmlChar *
|
| 1082 |
+
xmlNodeGetContent (const xmlNode *cur);
|
| 1083 |
+
|
| 1084 |
+
XMLPUBFUN int
|
| 1085 |
+
xmlNodeBufGetContent (xmlBufferPtr buffer,
|
| 1086 |
+
const xmlNode *cur);
|
| 1087 |
+
XMLPUBFUN int
|
| 1088 |
+
xmlBufGetNodeContent (xmlBufPtr buf,
|
| 1089 |
+
const xmlNode *cur);
|
| 1090 |
+
|
| 1091 |
+
XMLPUBFUN xmlChar *
|
| 1092 |
+
xmlNodeGetLang (const xmlNode *cur);
|
| 1093 |
+
XMLPUBFUN int
|
| 1094 |
+
xmlNodeGetSpacePreserve (const xmlNode *cur);
|
| 1095 |
+
XMLPUBFUN int
|
| 1096 |
+
xmlNodeSetLang (xmlNodePtr cur,
|
| 1097 |
+
const xmlChar *lang);
|
| 1098 |
+
XMLPUBFUN int
|
| 1099 |
+
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
| 1100 |
+
int val);
|
| 1101 |
+
XMLPUBFUN int
|
| 1102 |
+
xmlNodeGetBaseSafe (const xmlDoc *doc,
|
| 1103 |
+
const xmlNode *cur,
|
| 1104 |
+
xmlChar **baseOut);
|
| 1105 |
+
XMLPUBFUN xmlChar *
|
| 1106 |
+
xmlNodeGetBase (const xmlDoc *doc,
|
| 1107 |
+
const xmlNode *cur);
|
| 1108 |
+
XMLPUBFUN int
|
| 1109 |
+
xmlNodeSetBase (xmlNodePtr cur,
|
| 1110 |
+
const xmlChar *uri);
|
| 1111 |
+
|
| 1112 |
+
/*
|
| 1113 |
+
* Removing content.
|
| 1114 |
+
*/
|
| 1115 |
+
XMLPUBFUN int
|
| 1116 |
+
xmlRemoveProp (xmlAttrPtr cur);
|
| 1117 |
+
XMLPUBFUN int
|
| 1118 |
+
xmlUnsetNsProp (xmlNodePtr node,
|
| 1119 |
+
xmlNsPtr ns,
|
| 1120 |
+
const xmlChar *name);
|
| 1121 |
+
XMLPUBFUN int
|
| 1122 |
+
xmlUnsetProp (xmlNodePtr node,
|
| 1123 |
+
const xmlChar *name);
|
| 1124 |
+
|
| 1125 |
+
/*
|
| 1126 |
+
* Internal, don't use.
|
| 1127 |
+
*/
|
| 1128 |
+
XMLPUBFUN void
|
| 1129 |
+
xmlBufferWriteCHAR (xmlBufferPtr buf,
|
| 1130 |
+
const xmlChar *string);
|
| 1131 |
+
XMLPUBFUN void
|
| 1132 |
+
xmlBufferWriteChar (xmlBufferPtr buf,
|
| 1133 |
+
const char *string);
|
| 1134 |
+
XMLPUBFUN void
|
| 1135 |
+
xmlBufferWriteQuotedString(xmlBufferPtr buf,
|
| 1136 |
+
const xmlChar *string);
|
| 1137 |
+
|
| 1138 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 1139 |
+
XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
|
| 1140 |
+
xmlDocPtr doc,
|
| 1141 |
+
xmlAttrPtr attr,
|
| 1142 |
+
const xmlChar *string);
|
| 1143 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 1144 |
+
|
| 1145 |
+
/*
|
| 1146 |
+
* Namespace handling.
|
| 1147 |
+
*/
|
| 1148 |
+
XMLPUBFUN int
|
| 1149 |
+
xmlReconciliateNs (xmlDocPtr doc,
|
| 1150 |
+
xmlNodePtr tree);
|
| 1151 |
+
|
| 1152 |
+
#ifdef LIBXML_OUTPUT_ENABLED
|
| 1153 |
+
/*
|
| 1154 |
+
* Saving.
|
| 1155 |
+
*/
|
| 1156 |
+
XMLPUBFUN void
|
| 1157 |
+
xmlDocDumpFormatMemory (xmlDocPtr cur,
|
| 1158 |
+
xmlChar **mem,
|
| 1159 |
+
int *size,
|
| 1160 |
+
int format);
|
| 1161 |
+
XMLPUBFUN void
|
| 1162 |
+
xmlDocDumpMemory (xmlDocPtr cur,
|
| 1163 |
+
xmlChar **mem,
|
| 1164 |
+
int *size);
|
| 1165 |
+
XMLPUBFUN void
|
| 1166 |
+
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
|
| 1167 |
+
xmlChar **doc_txt_ptr,
|
| 1168 |
+
int * doc_txt_len,
|
| 1169 |
+
const char *txt_encoding);
|
| 1170 |
+
XMLPUBFUN void
|
| 1171 |
+
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
|
| 1172 |
+
xmlChar **doc_txt_ptr,
|
| 1173 |
+
int * doc_txt_len,
|
| 1174 |
+
const char *txt_encoding,
|
| 1175 |
+
int format);
|
| 1176 |
+
XMLPUBFUN int
|
| 1177 |
+
xmlDocFormatDump (FILE *f,
|
| 1178 |
+
xmlDocPtr cur,
|
| 1179 |
+
int format);
|
| 1180 |
+
XMLPUBFUN int
|
| 1181 |
+
xmlDocDump (FILE *f,
|
| 1182 |
+
xmlDocPtr cur);
|
| 1183 |
+
XMLPUBFUN void
|
| 1184 |
+
xmlElemDump (FILE *f,
|
| 1185 |
+
xmlDocPtr doc,
|
| 1186 |
+
xmlNodePtr cur);
|
| 1187 |
+
XMLPUBFUN int
|
| 1188 |
+
xmlSaveFile (const char *filename,
|
| 1189 |
+
xmlDocPtr cur);
|
| 1190 |
+
XMLPUBFUN int
|
| 1191 |
+
xmlSaveFormatFile (const char *filename,
|
| 1192 |
+
xmlDocPtr cur,
|
| 1193 |
+
int format);
|
| 1194 |
+
XMLPUBFUN size_t
|
| 1195 |
+
xmlBufNodeDump (xmlBufPtr buf,
|
| 1196 |
+
xmlDocPtr doc,
|
| 1197 |
+
xmlNodePtr cur,
|
| 1198 |
+
int level,
|
| 1199 |
+
int format);
|
| 1200 |
+
XMLPUBFUN int
|
| 1201 |
+
xmlNodeDump (xmlBufferPtr buf,
|
| 1202 |
+
xmlDocPtr doc,
|
| 1203 |
+
xmlNodePtr cur,
|
| 1204 |
+
int level,
|
| 1205 |
+
int format);
|
| 1206 |
+
|
| 1207 |
+
XMLPUBFUN int
|
| 1208 |
+
xmlSaveFileTo (xmlOutputBufferPtr buf,
|
| 1209 |
+
xmlDocPtr cur,
|
| 1210 |
+
const char *encoding);
|
| 1211 |
+
XMLPUBFUN int
|
| 1212 |
+
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
|
| 1213 |
+
xmlDocPtr cur,
|
| 1214 |
+
const char *encoding,
|
| 1215 |
+
int format);
|
| 1216 |
+
XMLPUBFUN void
|
| 1217 |
+
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
| 1218 |
+
xmlDocPtr doc,
|
| 1219 |
+
xmlNodePtr cur,
|
| 1220 |
+
int level,
|
| 1221 |
+
int format,
|
| 1222 |
+
const char *encoding);
|
| 1223 |
+
|
| 1224 |
+
XMLPUBFUN int
|
| 1225 |
+
xmlSaveFormatFileEnc (const char *filename,
|
| 1226 |
+
xmlDocPtr cur,
|
| 1227 |
+
const char *encoding,
|
| 1228 |
+
int format);
|
| 1229 |
+
|
| 1230 |
+
XMLPUBFUN int
|
| 1231 |
+
xmlSaveFileEnc (const char *filename,
|
| 1232 |
+
xmlDocPtr cur,
|
| 1233 |
+
const char *encoding);
|
| 1234 |
+
|
| 1235 |
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
| 1236 |
+
/*
|
| 1237 |
+
* XHTML
|
| 1238 |
+
*/
|
| 1239 |
+
XMLPUBFUN int
|
| 1240 |
+
xmlIsXHTML (const xmlChar *systemID,
|
| 1241 |
+
const xmlChar *publicID);
|
| 1242 |
+
|
| 1243 |
+
/*
|
| 1244 |
+
* Compression.
|
| 1245 |
+
*/
|
| 1246 |
+
XMLPUBFUN int
|
| 1247 |
+
xmlGetDocCompressMode (const xmlDoc *doc);
|
| 1248 |
+
XMLPUBFUN void
|
| 1249 |
+
xmlSetDocCompressMode (xmlDocPtr doc,
|
| 1250 |
+
int mode);
|
| 1251 |
+
XML_DEPRECATED
|
| 1252 |
+
XMLPUBFUN int
|
| 1253 |
+
xmlGetCompressMode (void);
|
| 1254 |
+
XML_DEPRECATED
|
| 1255 |
+
XMLPUBFUN void
|
| 1256 |
+
xmlSetCompressMode (int mode);
|
| 1257 |
+
|
| 1258 |
+
/*
|
| 1259 |
+
* DOM-wrapper helper functions.
|
| 1260 |
+
*/
|
| 1261 |
+
XMLPUBFUN xmlDOMWrapCtxtPtr
|
| 1262 |
+
xmlDOMWrapNewCtxt (void);
|
| 1263 |
+
XMLPUBFUN void
|
| 1264 |
+
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
|
| 1265 |
+
XMLPUBFUN int
|
| 1266 |
+
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
|
| 1267 |
+
xmlNodePtr elem,
|
| 1268 |
+
int options);
|
| 1269 |
+
XMLPUBFUN int
|
| 1270 |
+
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
|
| 1271 |
+
xmlDocPtr sourceDoc,
|
| 1272 |
+
xmlNodePtr node,
|
| 1273 |
+
xmlDocPtr destDoc,
|
| 1274 |
+
xmlNodePtr destParent,
|
| 1275 |
+
int options);
|
| 1276 |
+
XMLPUBFUN int
|
| 1277 |
+
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
|
| 1278 |
+
xmlDocPtr doc,
|
| 1279 |
+
xmlNodePtr node,
|
| 1280 |
+
int options);
|
| 1281 |
+
XMLPUBFUN int
|
| 1282 |
+
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
|
| 1283 |
+
xmlDocPtr sourceDoc,
|
| 1284 |
+
xmlNodePtr node,
|
| 1285 |
+
xmlNodePtr *clonedNode,
|
| 1286 |
+
xmlDocPtr destDoc,
|
| 1287 |
+
xmlNodePtr destParent,
|
| 1288 |
+
int deep,
|
| 1289 |
+
int options);
|
| 1290 |
+
|
| 1291 |
+
/*
|
| 1292 |
+
* 5 interfaces from DOM ElementTraversal, but different in entities
|
| 1293 |
+
* traversal.
|
| 1294 |
+
*/
|
| 1295 |
+
XMLPUBFUN unsigned long
|
| 1296 |
+
xmlChildElementCount (xmlNodePtr parent);
|
| 1297 |
+
XMLPUBFUN xmlNodePtr
|
| 1298 |
+
xmlNextElementSibling (xmlNodePtr node);
|
| 1299 |
+
XMLPUBFUN xmlNodePtr
|
| 1300 |
+
xmlFirstElementChild (xmlNodePtr parent);
|
| 1301 |
+
XMLPUBFUN xmlNodePtr
|
| 1302 |
+
xmlLastElementChild (xmlNodePtr parent);
|
| 1303 |
+
XMLPUBFUN xmlNodePtr
|
| 1304 |
+
xmlPreviousElementSibling (xmlNodePtr node);
|
| 1305 |
+
|
| 1306 |
+
XML_DEPRECATED
|
| 1307 |
+
XMLPUBFUN xmlRegisterNodeFunc
|
| 1308 |
+
xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
|
| 1309 |
+
XML_DEPRECATED
|
| 1310 |
+
XMLPUBFUN xmlDeregisterNodeFunc
|
| 1311 |
+
xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
|
| 1312 |
+
XML_DEPRECATED
|
| 1313 |
+
XMLPUBFUN xmlRegisterNodeFunc
|
| 1314 |
+
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
| 1315 |
+
XML_DEPRECATED
|
| 1316 |
+
XMLPUBFUN xmlDeregisterNodeFunc
|
| 1317 |
+
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
| 1318 |
+
|
| 1319 |
+
#ifdef __cplusplus
|
| 1320 |
+
}
|
| 1321 |
+
#endif
|
| 1322 |
+
|
| 1323 |
+
#endif /* __XML_TREE_H__ */
|
| 1324 |
+
|
| 1325 |
+
#endif /* XML_TREE_INTERNALS */
|
| 1326 |
+
|