ZTWHHH commited on
Commit
129e7d1
·
verified ·
1 Parent(s): 10e7f12

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +4 -0
  2. omnilmm/lib/python3.10/site-packages/lxml/includes/__pycache__/__init__.cpython-310.pyc +0 -0
  3. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/__init__.py +0 -0
  4. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/__pycache__/__init__.cpython-310.pyc +0 -0
  5. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/libcharset.h +45 -0
  6. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/localcharset.h +137 -0
  7. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/zconf.h +543 -0
  8. omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/zlib.h +1938 -0
  9. omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/__init__.py +0 -0
  10. omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/__pycache__/__init__.cpython-310.pyc +0 -0
  11. omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/exslt.h +108 -0
  12. omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/exsltconfig.h +70 -0
  13. omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/exsltexports.h +63 -0
  14. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/HTMLparser.h +343 -0
  15. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/HTMLtree.h +147 -0
  16. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/SAX.h +202 -0
  17. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/__init__.py +0 -0
  18. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/__pycache__/__init__.cpython-310.pyc +0 -0
  19. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/c14n.h +126 -0
  20. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/catalog.h +182 -0
  21. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/chvalid.h +230 -0
  22. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/debugXML.h +217 -0
  23. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/dict.h +82 -0
  24. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/encoding.h +235 -0
  25. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/globals.h +41 -0
  26. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/hash.h +232 -0
  27. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/list.h +137 -0
  28. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/nanoftp.h +186 -0
  29. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/nanohttp.h +81 -0
  30. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/parser.h +1384 -0
  31. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/relaxng.h +219 -0
  32. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/schematron.h +143 -0
  33. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/threads.h +87 -0
  34. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/tree.h +1362 -0
  35. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/uri.h +95 -0
  36. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/valid.h +450 -0
  37. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xinclude.h +129 -0
  38. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlIO.h +421 -0
  39. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlautomata.h +146 -0
  40. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlerror.h +948 -0
  41. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlexports.h +50 -0
  42. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlmemory.h +225 -0
  43. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlmodule.h +57 -0
  44. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlreader.h +434 -0
  45. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlregexp.h +215 -0
  46. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlsave.h +97 -0
  47. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlschemas.h +249 -0
  48. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlschemastypes.h +152 -0
  49. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlstring.h +140 -0
  50. omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlunicode.h +202 -0
.gitattributes CHANGED
@@ -1019,3 +1019,7 @@ omnilmm/lib/python3.10/site-packages/lxml/objectify.cpython-310-x86_64-linux-gnu
1019
  omnilmm/lib/python3.10/site-packages/lxml/sax.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1020
  omnilmm/lib/python3.10/site-packages/lxml/builder.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1021
  omnilmm/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
1019
  omnilmm/lib/python3.10/site-packages/lxml/sax.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1020
  omnilmm/lib/python3.10/site-packages/lxml/builder.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1021
  omnilmm/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1022
+ omnilmm/lib/python3.10/site-packages/matplotlib/__pycache__/backend_bases.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
1023
+ omnilmm/lib/python3.10/site-packages/matplotlib/__pycache__/patches.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
1024
+ omnilmm/lib/python3.10/site-packages/matplotlib/__pycache__/widgets.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
1025
+ omnilmm/lib/python3.10/site-packages/matplotlib/__pycache__/figure.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
omnilmm/lib/python3.10/site-packages/lxml/includes/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (166 Bytes). View file
 
omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/__init__.py ADDED
File without changes
omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (174 Bytes). View file
 
omnilmm/lib/python3.10/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 */
omnilmm/lib/python3.10/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 */
omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/zconf.h ADDED
@@ -0,0 +1,543 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 */
omnilmm/lib/python3.10/site-packages/lxml/includes/extlibs/zlib.h ADDED
@@ -0,0 +1,1938 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 */
omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/__init__.py ADDED
File without changes
omnilmm/lib/python3.10/site-packages/lxml/includes/libexslt/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (175 Bytes). View file
 
omnilmm/lib/python3.10/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
+
omnilmm/lib/python3.10/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.23"
22
+
23
+ /**
24
+ * LIBEXSLT_VERSION:
25
+ *
26
+ * the version number: 1.2.3 value is 10203
27
+ */
28
+ #define LIBEXSLT_VERSION 823
29
+
30
+ /**
31
+ * LIBEXSLT_VERSION_STRING:
32
+ *
33
+ * the version number string, 1.2.3 value is "10203"
34
+ */
35
+ #define LIBEXSLT_VERSION_STRING "823"
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__ */
omnilmm/lib/python3.10/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
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/HTMLparser.h ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Most of the back-end structures from XML and HTML are shared.
26
+ */
27
+ typedef xmlParserCtxt htmlParserCtxt;
28
+ typedef xmlParserCtxtPtr htmlParserCtxtPtr;
29
+ typedef xmlParserNodeInfo htmlParserNodeInfo;
30
+ typedef xmlSAXHandler htmlSAXHandler;
31
+ typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
32
+ typedef xmlParserInput htmlParserInput;
33
+ typedef xmlParserInputPtr htmlParserInputPtr;
34
+ typedef xmlDocPtr htmlDocPtr;
35
+ typedef xmlNodePtr htmlNodePtr;
36
+
37
+ /*
38
+ * Internal description of an HTML element, representing HTML 4.01
39
+ * and XHTML 1.0 (which share the same structure).
40
+ */
41
+ typedef struct _htmlElemDesc htmlElemDesc;
42
+ typedef htmlElemDesc *htmlElemDescPtr;
43
+ struct _htmlElemDesc {
44
+ const char *name; /* The tag name */
45
+ char startTag; /* Whether the start tag can be implied */
46
+ char endTag; /* Whether the end tag can be implied */
47
+ char saveEndTag; /* Whether the end tag should be saved */
48
+ char empty; /* Is this an empty element ? */
49
+ char depr; /* Is this a deprecated element ? */
50
+ char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
51
+ char isinline; /* is this a block 0 or inline 1 element */
52
+ const char *desc; /* the description */
53
+
54
+ /* NRK Jan.2003
55
+ * New fields encapsulating HTML structure
56
+ *
57
+ * Bugs:
58
+ * This is a very limited representation. It fails to tell us when
59
+ * an element *requires* subelements (we only have whether they're
60
+ * allowed or not), and it doesn't tell us where CDATA and PCDATA
61
+ * are allowed. Some element relationships are not fully represented:
62
+ * these are flagged with the word MODIFIER
63
+ */
64
+ const char** subelts; /* allowed sub-elements of this element */
65
+ const char* defaultsubelt; /* subelement for suggested auto-repair
66
+ if necessary or NULL */
67
+ const char** attrs_opt; /* Optional Attributes */
68
+ const char** attrs_depr; /* Additional deprecated attributes */
69
+ const char** attrs_req; /* Required attributes */
70
+ };
71
+
72
+ /*
73
+ * Internal description of an HTML entity.
74
+ */
75
+ typedef struct _htmlEntityDesc htmlEntityDesc;
76
+ typedef htmlEntityDesc *htmlEntityDescPtr;
77
+ struct _htmlEntityDesc {
78
+ unsigned int value; /* the UNICODE value for the character */
79
+ const char *name; /* The entity name */
80
+ const char *desc; /* the description */
81
+ };
82
+
83
+ /** DOC_DISABLE */
84
+ #ifdef LIBXML_SAX1_ENABLED
85
+ #define XML_GLOBALS_HTML \
86
+ XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
87
+ #else
88
+ #define XML_GLOBALS_HTML
89
+ #endif
90
+
91
+ #define XML_OP XML_DECLARE_GLOBAL
92
+ XML_GLOBALS_HTML
93
+ #undef XML_OP
94
+
95
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
96
+ #define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
97
+ #endif
98
+ /** DOC_ENABLE */
99
+
100
+ /*
101
+ * There is only few public functions.
102
+ */
103
+ XML_DEPRECATED
104
+ XMLPUBFUN void
105
+ htmlInitAutoClose (void);
106
+ XMLPUBFUN const htmlElemDesc *
107
+ htmlTagLookup (const xmlChar *tag);
108
+ XMLPUBFUN const htmlEntityDesc *
109
+ htmlEntityLookup(const xmlChar *name);
110
+ XMLPUBFUN const htmlEntityDesc *
111
+ htmlEntityValueLookup(unsigned int value);
112
+
113
+ XMLPUBFUN int
114
+ htmlIsAutoClosed(htmlDocPtr doc,
115
+ htmlNodePtr elem);
116
+ XMLPUBFUN int
117
+ htmlAutoCloseTag(htmlDocPtr doc,
118
+ const xmlChar *name,
119
+ htmlNodePtr elem);
120
+ XML_DEPRECATED
121
+ XMLPUBFUN const htmlEntityDesc *
122
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
123
+ const xmlChar **str);
124
+ XML_DEPRECATED
125
+ XMLPUBFUN int
126
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
127
+ XML_DEPRECATED
128
+ XMLPUBFUN void
129
+ htmlParseElement(htmlParserCtxtPtr ctxt);
130
+
131
+ XMLPUBFUN htmlParserCtxtPtr
132
+ htmlNewParserCtxt(void);
133
+ XMLPUBFUN htmlParserCtxtPtr
134
+ htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
135
+ void *userData);
136
+
137
+ XMLPUBFUN htmlParserCtxtPtr
138
+ htmlCreateMemoryParserCtxt(const char *buffer,
139
+ int size);
140
+
141
+ XMLPUBFUN int
142
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
143
+ XML_DEPRECATED
144
+ XMLPUBFUN htmlDocPtr
145
+ htmlSAXParseDoc (const xmlChar *cur,
146
+ const char *encoding,
147
+ htmlSAXHandlerPtr sax,
148
+ void *userData);
149
+ XMLPUBFUN htmlDocPtr
150
+ htmlParseDoc (const xmlChar *cur,
151
+ const char *encoding);
152
+ XMLPUBFUN htmlParserCtxtPtr
153
+ htmlCreateFileParserCtxt(const char *filename,
154
+ const char *encoding);
155
+ XML_DEPRECATED
156
+ XMLPUBFUN htmlDocPtr
157
+ htmlSAXParseFile(const char *filename,
158
+ const char *encoding,
159
+ htmlSAXHandlerPtr sax,
160
+ void *userData);
161
+ XMLPUBFUN htmlDocPtr
162
+ htmlParseFile (const char *filename,
163
+ const char *encoding);
164
+ XMLPUBFUN int
165
+ UTF8ToHtml (unsigned char *out,
166
+ int *outlen,
167
+ const unsigned char *in,
168
+ int *inlen);
169
+ XMLPUBFUN int
170
+ htmlEncodeEntities(unsigned char *out,
171
+ int *outlen,
172
+ const unsigned char *in,
173
+ int *inlen, int quoteChar);
174
+ XMLPUBFUN int
175
+ htmlIsScriptAttribute(const xmlChar *name);
176
+ XMLPUBFUN int
177
+ htmlHandleOmittedElem(int val);
178
+
179
+ #ifdef LIBXML_PUSH_ENABLED
180
+ /**
181
+ * Interfaces for the Push mode.
182
+ */
183
+ XMLPUBFUN htmlParserCtxtPtr
184
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
185
+ void *user_data,
186
+ const char *chunk,
187
+ int size,
188
+ const char *filename,
189
+ xmlCharEncoding enc);
190
+ XMLPUBFUN int
191
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
192
+ const char *chunk,
193
+ int size,
194
+ int terminate);
195
+ #endif /* LIBXML_PUSH_ENABLED */
196
+
197
+ XMLPUBFUN void
198
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
199
+
200
+ /*
201
+ * New set of simpler/more flexible APIs
202
+ */
203
+ /**
204
+ * xmlParserOption:
205
+ *
206
+ * This is the set of XML parser options that can be passed down
207
+ * to the xmlReadDoc() and similar calls.
208
+ */
209
+ typedef enum {
210
+ HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
211
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
212
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
213
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
214
+ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
215
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
216
+ HTML_PARSE_NONET = 1<<11,/* Forbid network access */
217
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
218
+ HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
219
+ HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
220
+ } htmlParserOption;
221
+
222
+ XMLPUBFUN void
223
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
224
+ XMLPUBFUN int
225
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
226
+ int options);
227
+ XMLPUBFUN htmlDocPtr
228
+ htmlReadDoc (const xmlChar *cur,
229
+ const char *URL,
230
+ const char *encoding,
231
+ int options);
232
+ XMLPUBFUN htmlDocPtr
233
+ htmlReadFile (const char *URL,
234
+ const char *encoding,
235
+ int options);
236
+ XMLPUBFUN htmlDocPtr
237
+ htmlReadMemory (const char *buffer,
238
+ int size,
239
+ const char *URL,
240
+ const char *encoding,
241
+ int options);
242
+ XMLPUBFUN htmlDocPtr
243
+ htmlReadFd (int fd,
244
+ const char *URL,
245
+ const char *encoding,
246
+ int options);
247
+ XMLPUBFUN htmlDocPtr
248
+ htmlReadIO (xmlInputReadCallback ioread,
249
+ xmlInputCloseCallback ioclose,
250
+ void *ioctx,
251
+ const char *URL,
252
+ const char *encoding,
253
+ int options);
254
+ XMLPUBFUN htmlDocPtr
255
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
256
+ const xmlChar *cur,
257
+ const char *URL,
258
+ const char *encoding,
259
+ int options);
260
+ XMLPUBFUN htmlDocPtr
261
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
262
+ const char *filename,
263
+ const char *encoding,
264
+ int options);
265
+ XMLPUBFUN htmlDocPtr
266
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
267
+ const char *buffer,
268
+ int size,
269
+ const char *URL,
270
+ const char *encoding,
271
+ int options);
272
+ XMLPUBFUN htmlDocPtr
273
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
274
+ int fd,
275
+ const char *URL,
276
+ const char *encoding,
277
+ int options);
278
+ XMLPUBFUN htmlDocPtr
279
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
280
+ xmlInputReadCallback ioread,
281
+ xmlInputCloseCallback ioclose,
282
+ void *ioctx,
283
+ const char *URL,
284
+ const char *encoding,
285
+ int options);
286
+
287
+ /* NRK/Jan2003: further knowledge of HTML structure
288
+ */
289
+ typedef enum {
290
+ HTML_NA = 0 , /* something we don't check at all */
291
+ HTML_INVALID = 0x1 ,
292
+ HTML_DEPRECATED = 0x2 ,
293
+ HTML_VALID = 0x4 ,
294
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
295
+ } htmlStatus ;
296
+
297
+ /* Using htmlElemDesc rather than name here, to emphasise the fact
298
+ that otherwise there's a lookup overhead
299
+ */
300
+ XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
301
+ XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
302
+ XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
303
+ XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
304
+ /**
305
+ * htmlDefaultSubelement:
306
+ * @elt: HTML element
307
+ *
308
+ * Returns the default subelement for this element
309
+ */
310
+ #define htmlDefaultSubelement(elt) elt->defaultsubelt
311
+ /**
312
+ * htmlElementAllowedHereDesc:
313
+ * @parent: HTML parent element
314
+ * @elt: HTML element
315
+ *
316
+ * Checks whether an HTML element description may be a
317
+ * direct child of the specified element.
318
+ *
319
+ * Returns 1 if allowed; 0 otherwise.
320
+ */
321
+ #define htmlElementAllowedHereDesc(parent,elt) \
322
+ htmlElementAllowedHere((parent), (elt)->name)
323
+ /**
324
+ * htmlRequiredAttrs:
325
+ * @elt: HTML element
326
+ *
327
+ * Returns the attributes required for the specified element.
328
+ */
329
+ #define htmlRequiredAttrs(elt) (elt)->attrs_req
330
+
331
+
332
+ #ifdef __cplusplus
333
+ }
334
+ #endif
335
+
336
+ #else /* LIBXML_HTML_ENABLED */
337
+
338
+ /** DOC_DISABLE */
339
+ #define XML_GLOBALS_HTML
340
+ /** DOC_ENABLE */
341
+
342
+ #endif /* LIBXML_HTML_ENABLED */
343
+ #endif /* __HTML_PARSER_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/HTMLtree.h ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ XMLPUBFUN int
137
+ htmlIsBooleanAttr (const xmlChar *name);
138
+
139
+
140
+ #ifdef __cplusplus
141
+ }
142
+ #endif
143
+
144
+ #endif /* LIBXML_HTML_ENABLED */
145
+
146
+ #endif /* __HTML_TREE_H__ */
147
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/SAX.h ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
12
+ #ifndef __XML_SAX_H__
13
+ #define __XML_SAX_H__
14
+
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/parser.h>
17
+
18
+ #ifdef LIBXML_LEGACY_ENABLED
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+ XML_DEPRECATED
24
+ XMLPUBFUN const xmlChar *
25
+ getPublicId (void *ctx);
26
+ XML_DEPRECATED
27
+ XMLPUBFUN const xmlChar *
28
+ getSystemId (void *ctx);
29
+ XML_DEPRECATED
30
+ XMLPUBFUN void
31
+ setDocumentLocator (void *ctx,
32
+ xmlSAXLocatorPtr loc);
33
+
34
+ XML_DEPRECATED
35
+ XMLPUBFUN int
36
+ getLineNumber (void *ctx);
37
+ XML_DEPRECATED
38
+ XMLPUBFUN int
39
+ getColumnNumber (void *ctx);
40
+
41
+ XML_DEPRECATED
42
+ XMLPUBFUN int
43
+ isStandalone (void *ctx);
44
+ XML_DEPRECATED
45
+ XMLPUBFUN int
46
+ hasInternalSubset (void *ctx);
47
+ XML_DEPRECATED
48
+ XMLPUBFUN int
49
+ hasExternalSubset (void *ctx);
50
+
51
+ XML_DEPRECATED
52
+ XMLPUBFUN void
53
+ internalSubset (void *ctx,
54
+ const xmlChar *name,
55
+ const xmlChar *ExternalID,
56
+ const xmlChar *SystemID);
57
+ XML_DEPRECATED
58
+ XMLPUBFUN void
59
+ externalSubset (void *ctx,
60
+ const xmlChar *name,
61
+ const xmlChar *ExternalID,
62
+ const xmlChar *SystemID);
63
+ XML_DEPRECATED
64
+ XMLPUBFUN xmlEntityPtr
65
+ getEntity (void *ctx,
66
+ const xmlChar *name);
67
+ XML_DEPRECATED
68
+ XMLPUBFUN xmlEntityPtr
69
+ getParameterEntity (void *ctx,
70
+ const xmlChar *name);
71
+ XML_DEPRECATED
72
+ XMLPUBFUN xmlParserInputPtr
73
+ resolveEntity (void *ctx,
74
+ const xmlChar *publicId,
75
+ const xmlChar *systemId);
76
+
77
+ XML_DEPRECATED
78
+ XMLPUBFUN void
79
+ entityDecl (void *ctx,
80
+ const xmlChar *name,
81
+ int type,
82
+ const xmlChar *publicId,
83
+ const xmlChar *systemId,
84
+ xmlChar *content);
85
+ XML_DEPRECATED
86
+ XMLPUBFUN void
87
+ attributeDecl (void *ctx,
88
+ const xmlChar *elem,
89
+ const xmlChar *fullname,
90
+ int type,
91
+ int def,
92
+ const xmlChar *defaultValue,
93
+ xmlEnumerationPtr tree);
94
+ XML_DEPRECATED
95
+ XMLPUBFUN void
96
+ elementDecl (void *ctx,
97
+ const xmlChar *name,
98
+ int type,
99
+ xmlElementContentPtr content);
100
+ XML_DEPRECATED
101
+ XMLPUBFUN void
102
+ notationDecl (void *ctx,
103
+ const xmlChar *name,
104
+ const xmlChar *publicId,
105
+ const xmlChar *systemId);
106
+ XML_DEPRECATED
107
+ XMLPUBFUN void
108
+ unparsedEntityDecl (void *ctx,
109
+ const xmlChar *name,
110
+ const xmlChar *publicId,
111
+ const xmlChar *systemId,
112
+ const xmlChar *notationName);
113
+
114
+ XML_DEPRECATED
115
+ XMLPUBFUN void
116
+ startDocument (void *ctx);
117
+ XML_DEPRECATED
118
+ XMLPUBFUN void
119
+ endDocument (void *ctx);
120
+ XML_DEPRECATED
121
+ XMLPUBFUN void
122
+ attribute (void *ctx,
123
+ const xmlChar *fullname,
124
+ const xmlChar *value);
125
+ XML_DEPRECATED
126
+ XMLPUBFUN void
127
+ startElement (void *ctx,
128
+ const xmlChar *fullname,
129
+ const xmlChar **atts);
130
+ XML_DEPRECATED
131
+ XMLPUBFUN void
132
+ endElement (void *ctx,
133
+ const xmlChar *name);
134
+ XML_DEPRECATED
135
+ XMLPUBFUN void
136
+ reference (void *ctx,
137
+ const xmlChar *name);
138
+ XML_DEPRECATED
139
+ XMLPUBFUN void
140
+ characters (void *ctx,
141
+ const xmlChar *ch,
142
+ int len);
143
+ XML_DEPRECATED
144
+ XMLPUBFUN void
145
+ ignorableWhitespace (void *ctx,
146
+ const xmlChar *ch,
147
+ int len);
148
+ XML_DEPRECATED
149
+ XMLPUBFUN void
150
+ processingInstruction (void *ctx,
151
+ const xmlChar *target,
152
+ const xmlChar *data);
153
+ XML_DEPRECATED
154
+ XMLPUBFUN void
155
+ globalNamespace (void *ctx,
156
+ const xmlChar *href,
157
+ const xmlChar *prefix);
158
+ XML_DEPRECATED
159
+ XMLPUBFUN void
160
+ setNamespace (void *ctx,
161
+ const xmlChar *name);
162
+ XML_DEPRECATED
163
+ XMLPUBFUN xmlNsPtr
164
+ getNamespace (void *ctx);
165
+ XML_DEPRECATED
166
+ XMLPUBFUN int
167
+ checkNamespace (void *ctx,
168
+ xmlChar *nameSpace);
169
+ XML_DEPRECATED
170
+ XMLPUBFUN void
171
+ namespaceDecl (void *ctx,
172
+ const xmlChar *href,
173
+ const xmlChar *prefix);
174
+ XML_DEPRECATED
175
+ XMLPUBFUN void
176
+ comment (void *ctx,
177
+ const xmlChar *value);
178
+ XML_DEPRECATED
179
+ XMLPUBFUN void
180
+ cdataBlock (void *ctx,
181
+ const xmlChar *value,
182
+ int len);
183
+
184
+ #ifdef LIBXML_SAX1_ENABLED
185
+ XML_DEPRECATED
186
+ XMLPUBFUN void
187
+ initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
188
+ int warning);
189
+ #ifdef LIBXML_HTML_ENABLED
190
+ XML_DEPRECATED
191
+ XMLPUBFUN void
192
+ inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
193
+ #endif
194
+ #endif /* LIBXML_SAX1_ENABLED */
195
+
196
+ #ifdef __cplusplus
197
+ }
198
+ #endif
199
+
200
+ #endif /* LIBXML_LEGACY_ENABLED */
201
+
202
+ #endif /* __XML_SAX_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/__init__.py ADDED
File without changes
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (173 Bytes). View file
 
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/c14n.h ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 global settings:
43
+ *
44
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
45
+ * xmlSubstituteEntitiesDefault(1);
46
+ *
47
+ * or corresponding parser context setting:
48
+ * xmlParserCtxtPtr ctxt;
49
+ *
50
+ * ...
51
+ * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
52
+ * ctxt->replaceEntities = 1;
53
+ * ...
54
+ */
55
+
56
+ /*
57
+ * xmlC14NMode:
58
+ *
59
+ * Predefined values for C14N modes
60
+ *
61
+ */
62
+ typedef enum {
63
+ XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
64
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
65
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
66
+ } xmlC14NMode;
67
+
68
+ XMLPUBFUN int
69
+ xmlC14NDocSaveTo (xmlDocPtr doc,
70
+ xmlNodeSetPtr nodes,
71
+ int mode, /* a xmlC14NMode */
72
+ xmlChar **inclusive_ns_prefixes,
73
+ int with_comments,
74
+ xmlOutputBufferPtr buf);
75
+
76
+ XMLPUBFUN int
77
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
78
+ xmlNodeSetPtr nodes,
79
+ int mode, /* a xmlC14NMode */
80
+ xmlChar **inclusive_ns_prefixes,
81
+ int with_comments,
82
+ xmlChar **doc_txt_ptr);
83
+
84
+ XMLPUBFUN int
85
+ xmlC14NDocSave (xmlDocPtr doc,
86
+ xmlNodeSetPtr nodes,
87
+ int mode, /* a xmlC14NMode */
88
+ xmlChar **inclusive_ns_prefixes,
89
+ int with_comments,
90
+ const char* filename,
91
+ int compression);
92
+
93
+
94
+ /**
95
+ * This is the core C14N function
96
+ */
97
+ /**
98
+ * xmlC14NIsVisibleCallback:
99
+ * @user_data: user data
100
+ * @node: the current node
101
+ * @parent: the parent node
102
+ *
103
+ * Signature for a C14N callback on visible nodes
104
+ *
105
+ * Returns 1 if the node should be included
106
+ */
107
+ typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
108
+ xmlNodePtr node,
109
+ xmlNodePtr parent);
110
+
111
+ XMLPUBFUN int
112
+ xmlC14NExecute (xmlDocPtr doc,
113
+ xmlC14NIsVisibleCallback is_visible_callback,
114
+ void* user_data,
115
+ int mode, /* a xmlC14NMode */
116
+ xmlChar **inclusive_ns_prefixes,
117
+ int with_comments,
118
+ xmlOutputBufferPtr buf);
119
+
120
+ #ifdef __cplusplus
121
+ }
122
+ #endif /* __cplusplus */
123
+
124
+ #endif /* LIBXML_C14N_ENABLED */
125
+ #endif /* __XML_C14N_H__ */
126
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/catalog.h ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ XMLPUBFUN xmlCatalogPrefer
165
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
166
+ XMLPUBFUN void
167
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
168
+ XMLPUBFUN xmlCatalogAllow
169
+ xmlCatalogGetDefaults (void);
170
+
171
+
172
+ /* DEPRECATED interfaces */
173
+ XMLPUBFUN const xmlChar *
174
+ xmlCatalogGetSystem (const xmlChar *sysID);
175
+ XMLPUBFUN const xmlChar *
176
+ xmlCatalogGetPublic (const xmlChar *pubID);
177
+
178
+ #ifdef __cplusplus
179
+ }
180
+ #endif
181
+ #endif /* LIBXML_CATALOG_ENABLED */
182
+ #endif /* __XML_CATALOG_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/chvalid.h ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/debugXML.h ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /****************************************************************
75
+ * *
76
+ * XML shell helpers *
77
+ * *
78
+ ****************************************************************/
79
+
80
+ XMLPUBFUN void
81
+ xmlLsOneNode (FILE *output, xmlNodePtr node);
82
+ XMLPUBFUN int
83
+ xmlLsCountNode (xmlNodePtr node);
84
+
85
+ XMLPUBFUN const char *
86
+ xmlBoolToText (int boolval);
87
+
88
+ /****************************************************************
89
+ * *
90
+ * The XML shell related structures and functions *
91
+ * *
92
+ ****************************************************************/
93
+
94
+ #ifdef LIBXML_XPATH_ENABLED
95
+ /**
96
+ * xmlShellReadlineFunc:
97
+ * @prompt: a string prompt
98
+ *
99
+ * This is a generic signature for the XML shell input function.
100
+ *
101
+ * Returns a string which will be freed by the Shell.
102
+ */
103
+ typedef char * (* xmlShellReadlineFunc)(char *prompt);
104
+
105
+ /**
106
+ * xmlShellCtxt:
107
+ *
108
+ * A debugging shell context.
109
+ * TODO: add the defined function tables.
110
+ */
111
+ typedef struct _xmlShellCtxt xmlShellCtxt;
112
+ typedef xmlShellCtxt *xmlShellCtxtPtr;
113
+ struct _xmlShellCtxt {
114
+ char *filename;
115
+ xmlDocPtr doc;
116
+ xmlNodePtr node;
117
+ xmlXPathContextPtr pctxt;
118
+ int loaded;
119
+ FILE *output;
120
+ xmlShellReadlineFunc input;
121
+ };
122
+
123
+ /**
124
+ * xmlShellCmd:
125
+ * @ctxt: a shell context
126
+ * @arg: a string argument
127
+ * @node: a first node
128
+ * @node2: a second node
129
+ *
130
+ * This is a generic signature for the XML shell functions.
131
+ *
132
+ * Returns an int, negative returns indicating errors.
133
+ */
134
+ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
135
+ char *arg,
136
+ xmlNodePtr node,
137
+ xmlNodePtr node2);
138
+
139
+ XMLPUBFUN void
140
+ xmlShellPrintXPathError (int errorType,
141
+ const char *arg);
142
+ XMLPUBFUN void
143
+ xmlShellPrintXPathResult(xmlXPathObjectPtr list);
144
+ XMLPUBFUN int
145
+ xmlShellList (xmlShellCtxtPtr ctxt,
146
+ char *arg,
147
+ xmlNodePtr node,
148
+ xmlNodePtr node2);
149
+ XMLPUBFUN int
150
+ xmlShellBase (xmlShellCtxtPtr ctxt,
151
+ char *arg,
152
+ xmlNodePtr node,
153
+ xmlNodePtr node2);
154
+ XMLPUBFUN int
155
+ xmlShellDir (xmlShellCtxtPtr ctxt,
156
+ char *arg,
157
+ xmlNodePtr node,
158
+ xmlNodePtr node2);
159
+ XMLPUBFUN int
160
+ xmlShellLoad (xmlShellCtxtPtr ctxt,
161
+ char *filename,
162
+ xmlNodePtr node,
163
+ xmlNodePtr node2);
164
+ #ifdef LIBXML_OUTPUT_ENABLED
165
+ XMLPUBFUN void
166
+ xmlShellPrintNode (xmlNodePtr node);
167
+ XMLPUBFUN int
168
+ xmlShellCat (xmlShellCtxtPtr ctxt,
169
+ char *arg,
170
+ xmlNodePtr node,
171
+ xmlNodePtr node2);
172
+ XMLPUBFUN int
173
+ xmlShellWrite (xmlShellCtxtPtr ctxt,
174
+ char *filename,
175
+ xmlNodePtr node,
176
+ xmlNodePtr node2);
177
+ XMLPUBFUN int
178
+ xmlShellSave (xmlShellCtxtPtr ctxt,
179
+ char *filename,
180
+ xmlNodePtr node,
181
+ xmlNodePtr node2);
182
+ #endif /* LIBXML_OUTPUT_ENABLED */
183
+ #ifdef LIBXML_VALID_ENABLED
184
+ XMLPUBFUN int
185
+ xmlShellValidate (xmlShellCtxtPtr ctxt,
186
+ char *dtd,
187
+ xmlNodePtr node,
188
+ xmlNodePtr node2);
189
+ #endif /* LIBXML_VALID_ENABLED */
190
+ XMLPUBFUN int
191
+ xmlShellDu (xmlShellCtxtPtr ctxt,
192
+ char *arg,
193
+ xmlNodePtr tree,
194
+ xmlNodePtr node2);
195
+ XMLPUBFUN int
196
+ xmlShellPwd (xmlShellCtxtPtr ctxt,
197
+ char *buffer,
198
+ xmlNodePtr node,
199
+ xmlNodePtr node2);
200
+
201
+ /*
202
+ * The Shell interface.
203
+ */
204
+ XMLPUBFUN void
205
+ xmlShell (xmlDocPtr doc,
206
+ char *filename,
207
+ xmlShellReadlineFunc input,
208
+ FILE *output);
209
+
210
+ #endif /* LIBXML_XPATH_ENABLED */
211
+
212
+ #ifdef __cplusplus
213
+ }
214
+ #endif
215
+
216
+ #endif /* LIBXML_DEBUG_ENABLED */
217
+ #endif /* __DEBUG_XML__ */
omnilmm/lib/python3.10/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__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/encoding.h ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
27
+ #ifdef LIBXML_ICONV_ENABLED
28
+ #include <iconv.h>
29
+ #endif
30
+
31
+ #ifdef __cplusplus
32
+ extern "C" {
33
+ #endif
34
+
35
+ typedef enum {
36
+ XML_ENC_ERR_SUCCESS = 0,
37
+ XML_ENC_ERR_SPACE = -1,
38
+ XML_ENC_ERR_INPUT = -2,
39
+ XML_ENC_ERR_PARTIAL = -3,
40
+ XML_ENC_ERR_INTERNAL = -4,
41
+ XML_ENC_ERR_MEMORY = -5
42
+ } xmlCharEncError;
43
+
44
+ /*
45
+ * xmlCharEncoding:
46
+ *
47
+ * Predefined values for some standard encodings.
48
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
49
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
50
+ *
51
+ * Anything else would have to be translated to UTF8 before being
52
+ * given to the parser itself. The BOM for UTF16 and the encoding
53
+ * declaration are looked at and a converter is looked for at that
54
+ * point. If not found the parser stops here as asked by the XML REC. A
55
+ * converter can be registered by the user using xmlRegisterCharEncodingHandler
56
+ * but the current form doesn't allow stateful transcoding (a serious
57
+ * problem agreed !). If iconv has been found it will be used
58
+ * automatically and allow stateful transcoding, the simplest is then
59
+ * to be sure to enable iconv and to provide iconv libs for the encoding
60
+ * support needed.
61
+ *
62
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
63
+ * the specific UTF-16LE and UTF-16BE are present.
64
+ */
65
+ typedef enum {
66
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
67
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
68
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
69
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
70
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
71
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
72
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
73
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
74
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
75
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
76
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
77
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
78
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
79
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
80
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
81
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
82
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
83
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
84
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
85
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
86
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
87
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
88
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
89
+ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
90
+ } xmlCharEncoding;
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
+ * Take a block of chars in the original encoding and try to convert
100
+ * it to an UTF-8 block of chars out.
101
+ *
102
+ * Returns the number of bytes written, -1 if lack of space, or -2
103
+ * if the transcoding failed.
104
+ * The value of @inlen after return is the number of octets consumed
105
+ * if the return value is positive, else unpredictiable.
106
+ * The value of @outlen after return is the number of octets consumed.
107
+ */
108
+ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
109
+ const unsigned char *in, int *inlen);
110
+
111
+
112
+ /**
113
+ * xmlCharEncodingOutputFunc:
114
+ * @out: a pointer to an array of bytes to store the result
115
+ * @outlen: the length of @out
116
+ * @in: a pointer to an array of UTF-8 chars
117
+ * @inlen: the length of @in
118
+ *
119
+ * Take a block of UTF-8 chars in and try to convert it to another
120
+ * encoding.
121
+ * Note: a first call designed to produce heading info is called with
122
+ * in = NULL. If stateful this should also initialize the encoder state.
123
+ *
124
+ * Returns the number of bytes written, -1 if lack of space, or -2
125
+ * if the transcoding failed.
126
+ * The value of @inlen after return is the number of octets consumed
127
+ * if the return value is positive, else unpredictiable.
128
+ * The value of @outlen after return is the number of octets produced.
129
+ */
130
+ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
131
+ const unsigned char *in, int *inlen);
132
+
133
+
134
+ /*
135
+ * Block defining the handlers for non UTF-8 encodings.
136
+ * If iconv is supported, there are two extra fields.
137
+ */
138
+ typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
139
+ typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
140
+ struct _xmlCharEncodingHandler {
141
+ char *name;
142
+ xmlCharEncodingInputFunc input;
143
+ xmlCharEncodingOutputFunc output;
144
+ #ifdef LIBXML_ICONV_ENABLED
145
+ iconv_t iconv_in;
146
+ iconv_t iconv_out;
147
+ #endif /* LIBXML_ICONV_ENABLED */
148
+ #ifdef LIBXML_ICU_ENABLED
149
+ struct _uconv_t *uconv_in;
150
+ struct _uconv_t *uconv_out;
151
+ #endif /* LIBXML_ICU_ENABLED */
152
+ };
153
+
154
+ /*
155
+ * Interfaces for encoding handlers.
156
+ */
157
+ XML_DEPRECATED
158
+ XMLPUBFUN void
159
+ xmlInitCharEncodingHandlers (void);
160
+ XML_DEPRECATED
161
+ XMLPUBFUN void
162
+ xmlCleanupCharEncodingHandlers (void);
163
+ XMLPUBFUN void
164
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
165
+ XMLPUBFUN xmlCharEncodingHandlerPtr
166
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
167
+ XMLPUBFUN xmlCharEncodingHandlerPtr
168
+ xmlFindCharEncodingHandler (const char *name);
169
+ XMLPUBFUN xmlCharEncodingHandlerPtr
170
+ xmlNewCharEncodingHandler (const char *name,
171
+ xmlCharEncodingInputFunc input,
172
+ xmlCharEncodingOutputFunc output);
173
+
174
+ /*
175
+ * Interfaces for encoding names and aliases.
176
+ */
177
+ XMLPUBFUN int
178
+ xmlAddEncodingAlias (const char *name,
179
+ const char *alias);
180
+ XMLPUBFUN int
181
+ xmlDelEncodingAlias (const char *alias);
182
+ XMLPUBFUN const char *
183
+ xmlGetEncodingAlias (const char *alias);
184
+ XMLPUBFUN void
185
+ xmlCleanupEncodingAliases (void);
186
+ XMLPUBFUN xmlCharEncoding
187
+ xmlParseCharEncoding (const char *name);
188
+ XMLPUBFUN const char *
189
+ xmlGetCharEncodingName (xmlCharEncoding enc);
190
+
191
+ /*
192
+ * Interfaces directly used by the parsers.
193
+ */
194
+ XMLPUBFUN xmlCharEncoding
195
+ xmlDetectCharEncoding (const unsigned char *in,
196
+ int len);
197
+
198
+ struct _xmlBuffer;
199
+ XMLPUBFUN int
200
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
201
+ struct _xmlBuffer *out,
202
+ struct _xmlBuffer *in);
203
+
204
+ XMLPUBFUN int
205
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
206
+ struct _xmlBuffer *out,
207
+ struct _xmlBuffer *in);
208
+ XML_DEPRECATED
209
+ XMLPUBFUN int
210
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
211
+ struct _xmlBuffer *out,
212
+ struct _xmlBuffer *in);
213
+ XMLPUBFUN int
214
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
215
+
216
+ /*
217
+ * Export a few useful functions
218
+ */
219
+ #ifdef LIBXML_OUTPUT_ENABLED
220
+ XMLPUBFUN int
221
+ UTF8Toisolat1 (unsigned char *out,
222
+ int *outlen,
223
+ const unsigned char *in,
224
+ int *inlen);
225
+ #endif /* LIBXML_OUTPUT_ENABLED */
226
+ XMLPUBFUN int
227
+ isolat1ToUTF8 (unsigned char *out,
228
+ int *outlen,
229
+ const unsigned char *in,
230
+ int *inlen);
231
+ #ifdef __cplusplus
232
+ }
233
+ #endif
234
+
235
+ #endif /* __XML_CHAR_ENCODING_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/globals.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ #ifdef __cplusplus
26
+ extern "C" {
27
+ #endif
28
+
29
+ typedef struct _xmlGlobalState xmlGlobalState;
30
+ typedef xmlGlobalState *xmlGlobalStatePtr;
31
+
32
+ XML_DEPRECATED XMLPUBFUN void
33
+ xmlInitializeGlobalState(xmlGlobalStatePtr gs);
34
+ XML_DEPRECATED XMLPUBFUN
35
+ xmlGlobalStatePtr xmlGetGlobalState(void);
36
+
37
+ #ifdef __cplusplus
38
+ }
39
+ #endif
40
+
41
+ #endif /* __XML_GLOBALS_H */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/hash.h ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ xmlHashAddEntry (xmlHashTablePtr hash,
114
+ const xmlChar *name,
115
+ void *userdata);
116
+ XMLPUBFUN int
117
+ xmlHashUpdateEntry (xmlHashTablePtr hash,
118
+ const xmlChar *name,
119
+ void *userdata,
120
+ xmlHashDeallocator dealloc);
121
+ XMLPUBFUN int
122
+ xmlHashAddEntry2 (xmlHashTablePtr hash,
123
+ const xmlChar *name,
124
+ const xmlChar *name2,
125
+ void *userdata);
126
+ XMLPUBFUN int
127
+ xmlHashUpdateEntry2 (xmlHashTablePtr hash,
128
+ const xmlChar *name,
129
+ const xmlChar *name2,
130
+ void *userdata,
131
+ xmlHashDeallocator dealloc);
132
+ XMLPUBFUN int
133
+ xmlHashAddEntry3 (xmlHashTablePtr hash,
134
+ const xmlChar *name,
135
+ const xmlChar *name2,
136
+ const xmlChar *name3,
137
+ void *userdata);
138
+ XMLPUBFUN int
139
+ xmlHashUpdateEntry3 (xmlHashTablePtr hash,
140
+ const xmlChar *name,
141
+ const xmlChar *name2,
142
+ const xmlChar *name3,
143
+ void *userdata,
144
+ xmlHashDeallocator dealloc);
145
+
146
+ /*
147
+ * Remove an entry from the hash table.
148
+ */
149
+ XMLPUBFUN int
150
+ xmlHashRemoveEntry (xmlHashTablePtr hash,
151
+ const xmlChar *name,
152
+ xmlHashDeallocator dealloc);
153
+ XMLPUBFUN int
154
+ xmlHashRemoveEntry2 (xmlHashTablePtr hash,
155
+ const xmlChar *name,
156
+ const xmlChar *name2,
157
+ xmlHashDeallocator dealloc);
158
+ XMLPUBFUN int
159
+ xmlHashRemoveEntry3 (xmlHashTablePtr hash,
160
+ const xmlChar *name,
161
+ const xmlChar *name2,
162
+ const xmlChar *name3,
163
+ xmlHashDeallocator dealloc);
164
+
165
+ /*
166
+ * Retrieve the payload.
167
+ */
168
+ XMLPUBFUN void *
169
+ xmlHashLookup (xmlHashTablePtr hash,
170
+ const xmlChar *name);
171
+ XMLPUBFUN void *
172
+ xmlHashLookup2 (xmlHashTablePtr hash,
173
+ const xmlChar *name,
174
+ const xmlChar *name2);
175
+ XMLPUBFUN void *
176
+ xmlHashLookup3 (xmlHashTablePtr hash,
177
+ const xmlChar *name,
178
+ const xmlChar *name2,
179
+ const xmlChar *name3);
180
+ XMLPUBFUN void *
181
+ xmlHashQLookup (xmlHashTablePtr hash,
182
+ const xmlChar *prefix,
183
+ const xmlChar *name);
184
+ XMLPUBFUN void *
185
+ xmlHashQLookup2 (xmlHashTablePtr hash,
186
+ const xmlChar *prefix,
187
+ const xmlChar *name,
188
+ const xmlChar *prefix2,
189
+ const xmlChar *name2);
190
+ XMLPUBFUN void *
191
+ xmlHashQLookup3 (xmlHashTablePtr hash,
192
+ const xmlChar *prefix,
193
+ const xmlChar *name,
194
+ const xmlChar *prefix2,
195
+ const xmlChar *name2,
196
+ const xmlChar *prefix3,
197
+ const xmlChar *name3);
198
+
199
+ /*
200
+ * Helpers.
201
+ */
202
+ XMLPUBFUN xmlHashTablePtr
203
+ xmlHashCopy (xmlHashTablePtr hash,
204
+ xmlHashCopier copy);
205
+ XMLPUBFUN int
206
+ xmlHashSize (xmlHashTablePtr hash);
207
+ XMLPUBFUN void
208
+ xmlHashScan (xmlHashTablePtr hash,
209
+ xmlHashScanner scan,
210
+ void *data);
211
+ XMLPUBFUN void
212
+ xmlHashScan3 (xmlHashTablePtr hash,
213
+ const xmlChar *name,
214
+ const xmlChar *name2,
215
+ const xmlChar *name3,
216
+ xmlHashScanner scan,
217
+ void *data);
218
+ XMLPUBFUN void
219
+ xmlHashScanFull (xmlHashTablePtr hash,
220
+ xmlHashScannerFull scan,
221
+ void *data);
222
+ XMLPUBFUN void
223
+ xmlHashScanFull3 (xmlHashTablePtr hash,
224
+ const xmlChar *name,
225
+ const xmlChar *name2,
226
+ const xmlChar *name3,
227
+ xmlHashScannerFull scan,
228
+ void *data);
229
+ #ifdef __cplusplus
230
+ }
231
+ #endif
232
+ #endif /* ! __XML_HASH_H__ */
omnilmm/lib/python3.10/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 (const xmlListPtr old);
123
+ XMLPUBFUN int
124
+ xmlListCopy (xmlListPtr cur,
125
+ const 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__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/nanoftp.h ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: minimal FTP implementation
3
+ * Description: minimal FTP implementation allowing to fetch resources
4
+ * like external subset. This module is DEPRECATED, do not
5
+ * use any of its functions.
6
+ *
7
+ * Copy: See Copyright for the status of this software.
8
+ *
9
+ * Author: Daniel Veillard
10
+ */
11
+
12
+ #ifndef __NANO_FTP_H__
13
+ #define __NANO_FTP_H__
14
+
15
+ #include <libxml/xmlversion.h>
16
+
17
+ #if defined(LIBXML_FTP_ENABLED)
18
+
19
+ /* Needed for portability to Windows 64 bits */
20
+ #if defined(_WIN32)
21
+ #include <winsock2.h>
22
+ #else
23
+ /**
24
+ * SOCKET:
25
+ *
26
+ * macro used to provide portability of code to windows sockets
27
+ */
28
+ #define SOCKET int
29
+ /**
30
+ * INVALID_SOCKET:
31
+ *
32
+ * macro used to provide portability of code to windows sockets
33
+ * the value to be used when the socket is not valid
34
+ */
35
+ #undef INVALID_SOCKET
36
+ #define INVALID_SOCKET (-1)
37
+ #endif
38
+
39
+ #ifdef __cplusplus
40
+ extern "C" {
41
+ #endif
42
+
43
+ /**
44
+ * ftpListCallback:
45
+ * @userData: user provided data for the callback
46
+ * @filename: the file name (including "->" when links are shown)
47
+ * @attrib: the attribute string
48
+ * @owner: the owner string
49
+ * @group: the group string
50
+ * @size: the file size
51
+ * @links: the link count
52
+ * @year: the year
53
+ * @month: the month
54
+ * @day: the day
55
+ * @hour: the hour
56
+ * @minute: the minute
57
+ *
58
+ * A callback for the xmlNanoFTPList command.
59
+ * Note that only one of year and day:minute are specified.
60
+ */
61
+ typedef void (*ftpListCallback) (void *userData,
62
+ const char *filename, const char *attrib,
63
+ const char *owner, const char *group,
64
+ unsigned long size, int links, int year,
65
+ const char *month, int day, int hour,
66
+ int minute);
67
+ /**
68
+ * ftpDataCallback:
69
+ * @userData: the user provided context
70
+ * @data: the data received
71
+ * @len: its size in bytes
72
+ *
73
+ * A callback for the xmlNanoFTPGet command.
74
+ */
75
+ typedef void (*ftpDataCallback) (void *userData,
76
+ const char *data,
77
+ int len);
78
+
79
+ /*
80
+ * Init
81
+ */
82
+ XML_DEPRECATED
83
+ XMLPUBFUN void
84
+ xmlNanoFTPInit (void);
85
+ XML_DEPRECATED
86
+ XMLPUBFUN void
87
+ xmlNanoFTPCleanup (void);
88
+
89
+ /*
90
+ * Creating/freeing contexts.
91
+ */
92
+ XML_DEPRECATED
93
+ XMLPUBFUN void *
94
+ xmlNanoFTPNewCtxt (const char *URL);
95
+ XML_DEPRECATED
96
+ XMLPUBFUN void
97
+ xmlNanoFTPFreeCtxt (void * ctx);
98
+ XML_DEPRECATED
99
+ XMLPUBFUN void *
100
+ xmlNanoFTPConnectTo (const char *server,
101
+ int port);
102
+ /*
103
+ * Opening/closing session connections.
104
+ */
105
+ XML_DEPRECATED
106
+ XMLPUBFUN void *
107
+ xmlNanoFTPOpen (const char *URL);
108
+ XML_DEPRECATED
109
+ XMLPUBFUN int
110
+ xmlNanoFTPConnect (void *ctx);
111
+ XML_DEPRECATED
112
+ XMLPUBFUN int
113
+ xmlNanoFTPClose (void *ctx);
114
+ XML_DEPRECATED
115
+ XMLPUBFUN int
116
+ xmlNanoFTPQuit (void *ctx);
117
+ XML_DEPRECATED
118
+ XMLPUBFUN void
119
+ xmlNanoFTPScanProxy (const char *URL);
120
+ XML_DEPRECATED
121
+ XMLPUBFUN void
122
+ xmlNanoFTPProxy (const char *host,
123
+ int port,
124
+ const char *user,
125
+ const char *passwd,
126
+ int type);
127
+ XML_DEPRECATED
128
+ XMLPUBFUN int
129
+ xmlNanoFTPUpdateURL (void *ctx,
130
+ const char *URL);
131
+
132
+ /*
133
+ * Rather internal commands.
134
+ */
135
+ XML_DEPRECATED
136
+ XMLPUBFUN int
137
+ xmlNanoFTPGetResponse (void *ctx);
138
+ XML_DEPRECATED
139
+ XMLPUBFUN int
140
+ xmlNanoFTPCheckResponse (void *ctx);
141
+
142
+ /*
143
+ * CD/DIR/GET handlers.
144
+ */
145
+ XML_DEPRECATED
146
+ XMLPUBFUN int
147
+ xmlNanoFTPCwd (void *ctx,
148
+ const char *directory);
149
+ XML_DEPRECATED
150
+ XMLPUBFUN int
151
+ xmlNanoFTPDele (void *ctx,
152
+ const char *file);
153
+
154
+ XML_DEPRECATED
155
+ XMLPUBFUN SOCKET
156
+ xmlNanoFTPGetConnection (void *ctx);
157
+ XML_DEPRECATED
158
+ XMLPUBFUN int
159
+ xmlNanoFTPCloseConnection(void *ctx);
160
+ XML_DEPRECATED
161
+ XMLPUBFUN int
162
+ xmlNanoFTPList (void *ctx,
163
+ ftpListCallback callback,
164
+ void *userData,
165
+ const char *filename);
166
+ XML_DEPRECATED
167
+ XMLPUBFUN SOCKET
168
+ xmlNanoFTPGetSocket (void *ctx,
169
+ const char *filename);
170
+ XML_DEPRECATED
171
+ XMLPUBFUN int
172
+ xmlNanoFTPGet (void *ctx,
173
+ ftpDataCallback callback,
174
+ void *userData,
175
+ const char *filename);
176
+ XML_DEPRECATED
177
+ XMLPUBFUN int
178
+ xmlNanoFTPRead (void *ctx,
179
+ void *dest,
180
+ int len);
181
+
182
+ #ifdef __cplusplus
183
+ }
184
+ #endif
185
+ #endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
186
+ #endif /* __NANO_FTP_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/nanohttp.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ XMLPUBFUN void
22
+ xmlNanoHTTPInit (void);
23
+ XMLPUBFUN void
24
+ xmlNanoHTTPCleanup (void);
25
+ XMLPUBFUN void
26
+ xmlNanoHTTPScanProxy (const char *URL);
27
+ XMLPUBFUN int
28
+ xmlNanoHTTPFetch (const char *URL,
29
+ const char *filename,
30
+ char **contentType);
31
+ XMLPUBFUN void *
32
+ xmlNanoHTTPMethod (const char *URL,
33
+ const char *method,
34
+ const char *input,
35
+ char **contentType,
36
+ const char *headers,
37
+ int ilen);
38
+ XMLPUBFUN void *
39
+ xmlNanoHTTPMethodRedir (const char *URL,
40
+ const char *method,
41
+ const char *input,
42
+ char **contentType,
43
+ char **redir,
44
+ const char *headers,
45
+ int ilen);
46
+ XMLPUBFUN void *
47
+ xmlNanoHTTPOpen (const char *URL,
48
+ char **contentType);
49
+ XMLPUBFUN void *
50
+ xmlNanoHTTPOpenRedir (const char *URL,
51
+ char **contentType,
52
+ char **redir);
53
+ XMLPUBFUN int
54
+ xmlNanoHTTPReturnCode (void *ctx);
55
+ XMLPUBFUN const char *
56
+ xmlNanoHTTPAuthHeader (void *ctx);
57
+ XMLPUBFUN const char *
58
+ xmlNanoHTTPRedir (void *ctx);
59
+ XMLPUBFUN int
60
+ xmlNanoHTTPContentLength( void * ctx );
61
+ XMLPUBFUN const char *
62
+ xmlNanoHTTPEncoding (void *ctx);
63
+ XMLPUBFUN const char *
64
+ xmlNanoHTTPMimeType (void *ctx);
65
+ XMLPUBFUN int
66
+ xmlNanoHTTPRead (void *ctx,
67
+ void *dest,
68
+ int len);
69
+ #ifdef LIBXML_OUTPUT_ENABLED
70
+ XMLPUBFUN int
71
+ xmlNanoHTTPSave (void *ctxt,
72
+ const char *filename);
73
+ #endif /* LIBXML_OUTPUT_ENABLED */
74
+ XMLPUBFUN void
75
+ xmlNanoHTTPClose (void *ctx);
76
+ #ifdef __cplusplus
77
+ }
78
+ #endif
79
+
80
+ #endif /* LIBXML_HTTP_ENABLED */
81
+ #endif /* __NANO_HTTP_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/parser.h ADDED
@@ -0,0 +1,1384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ #include <libxml/xmlversion.h>
14
+ #define XML_TREE_INTERNALS
15
+ #include <libxml/tree.h>
16
+ #undef XML_TREE_INTERNALS
17
+ #include <libxml/dict.h>
18
+ #include <libxml/hash.h>
19
+ #include <libxml/valid.h>
20
+ #include <libxml/entities.h>
21
+ #include <libxml/xmlerror.h>
22
+ #include <libxml/xmlstring.h>
23
+ #include <libxml/xmlmemory.h>
24
+ #include <libxml/encoding.h>
25
+ #include <libxml/xmlIO.h>
26
+ /* for compatibility */
27
+ #include <libxml/SAX2.h>
28
+ #include <libxml/threads.h>
29
+
30
+ #ifdef __cplusplus
31
+ extern "C" {
32
+ #endif
33
+
34
+ /**
35
+ * XML_DEFAULT_VERSION:
36
+ *
37
+ * The default version of XML used: 1.0
38
+ */
39
+ #define XML_DEFAULT_VERSION "1.0"
40
+
41
+ /**
42
+ * xmlParserInput:
43
+ *
44
+ * An xmlParserInput is an input flow for the XML processor.
45
+ * Each entity parsed is associated an xmlParserInput (except the
46
+ * few predefined ones). This is the case both for internal entities
47
+ * - in which case the flow is already completely in memory - or
48
+ * external entities - in which case we use the buf structure for
49
+ * progressive reading and I18N conversions to the internal UTF-8 format.
50
+ */
51
+
52
+ /**
53
+ * xmlParserInputDeallocate:
54
+ * @str: the string to deallocate
55
+ *
56
+ * Callback for freeing some parser input allocations.
57
+ */
58
+ typedef void (* xmlParserInputDeallocate)(xmlChar *str);
59
+
60
+ struct _xmlParserInput {
61
+ /* Input buffer */
62
+ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
63
+
64
+ const char *filename; /* The file analyzed, if any */
65
+ const char *directory; /* the directory/base of the file */
66
+ const xmlChar *base; /* Base of the array to parse */
67
+ const xmlChar *cur; /* Current char being parsed */
68
+ const xmlChar *end; /* end of the array to parse */
69
+ int length; /* length if known */
70
+ int line; /* Current line */
71
+ int col; /* Current column */
72
+ unsigned long consumed; /* How many xmlChars already consumed */
73
+ xmlParserInputDeallocate free; /* function to deallocate the base */
74
+ const xmlChar *encoding; /* unused */
75
+ const xmlChar *version; /* the version string for entity */
76
+ int flags; /* Flags */
77
+ int id; /* an unique identifier for the entity */
78
+ unsigned long parentConsumed; /* consumed bytes from parents */
79
+ xmlEntityPtr entity; /* entity, if any */
80
+ };
81
+
82
+ /**
83
+ * xmlParserNodeInfo:
84
+ *
85
+ * The parser can be asked to collect Node information, i.e. at what
86
+ * place in the file they were detected.
87
+ * NOTE: This is off by default and not very well tested.
88
+ */
89
+ typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
90
+ typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
91
+
92
+ struct _xmlParserNodeInfo {
93
+ const struct _xmlNode* node;
94
+ /* Position & line # that text that created the node begins & ends on */
95
+ unsigned long begin_pos;
96
+ unsigned long begin_line;
97
+ unsigned long end_pos;
98
+ unsigned long end_line;
99
+ };
100
+
101
+ typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
102
+ typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
103
+ struct _xmlParserNodeInfoSeq {
104
+ unsigned long maximum;
105
+ unsigned long length;
106
+ xmlParserNodeInfo* buffer;
107
+ };
108
+
109
+ /**
110
+ * xmlParserInputState:
111
+ *
112
+ * The parser is now working also as a state based parser.
113
+ * The recursive one use the state info for entities processing.
114
+ */
115
+ typedef enum {
116
+ XML_PARSER_EOF = -1, /* nothing is to be parsed */
117
+ XML_PARSER_START = 0, /* nothing has been parsed */
118
+ XML_PARSER_MISC, /* Misc* before int subset */
119
+ XML_PARSER_PI, /* Within a processing instruction */
120
+ XML_PARSER_DTD, /* within some DTD content */
121
+ XML_PARSER_PROLOG, /* Misc* after internal subset */
122
+ XML_PARSER_COMMENT, /* within a comment */
123
+ XML_PARSER_START_TAG, /* within a start tag */
124
+ XML_PARSER_CONTENT, /* within the content */
125
+ XML_PARSER_CDATA_SECTION, /* within a CDATA section */
126
+ XML_PARSER_END_TAG, /* within a closing tag */
127
+ XML_PARSER_ENTITY_DECL, /* within an entity declaration */
128
+ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
129
+ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
130
+ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
131
+ XML_PARSER_EPILOG, /* the Misc* after the last end tag */
132
+ XML_PARSER_IGNORE, /* within an IGNORED section */
133
+ XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */
134
+ XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
135
+ } xmlParserInputState;
136
+
137
+ /**
138
+ * XML_DETECT_IDS:
139
+ *
140
+ * Bit in the loadsubset context field to tell to do ID/REFs lookups.
141
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
142
+ */
143
+ #define XML_DETECT_IDS 2
144
+
145
+ /**
146
+ * XML_COMPLETE_ATTRS:
147
+ *
148
+ * Bit in the loadsubset context field to tell to do complete the
149
+ * elements attributes lists with the ones defaulted from the DTDs.
150
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
151
+ */
152
+ #define XML_COMPLETE_ATTRS 4
153
+
154
+ /**
155
+ * XML_SKIP_IDS:
156
+ *
157
+ * Bit in the loadsubset context field to tell to not do ID/REFs registration.
158
+ * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
159
+ */
160
+ #define XML_SKIP_IDS 8
161
+
162
+ /**
163
+ * xmlParserMode:
164
+ *
165
+ * A parser can operate in various modes
166
+ */
167
+ typedef enum {
168
+ XML_PARSE_UNKNOWN = 0,
169
+ XML_PARSE_DOM = 1,
170
+ XML_PARSE_SAX = 2,
171
+ XML_PARSE_PUSH_DOM = 3,
172
+ XML_PARSE_PUSH_SAX = 4,
173
+ XML_PARSE_READER = 5
174
+ } xmlParserMode;
175
+
176
+ typedef struct _xmlStartTag xmlStartTag;
177
+ typedef struct _xmlParserNsData xmlParserNsData;
178
+ typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
179
+
180
+ /**
181
+ * xmlParserCtxt:
182
+ *
183
+ * The parser context.
184
+ * NOTE This doesn't completely define the parser state, the (current ?)
185
+ * design of the parser uses recursive function calls since this allow
186
+ * and easy mapping from the production rules of the specification
187
+ * to the actual code. The drawback is that the actual function call
188
+ * also reflect the parser state. However most of the parsing routines
189
+ * takes as the only argument the parser context pointer, so migrating
190
+ * to a state based parser for progressive parsing shouldn't be too hard.
191
+ */
192
+ struct _xmlParserCtxt {
193
+ struct _xmlSAXHandler *sax; /* The SAX handler */
194
+ void *userData; /* For SAX interface only, used by DOM build */
195
+ xmlDocPtr myDoc; /* the document being built */
196
+ int wellFormed; /* is the document well formed */
197
+ int replaceEntities; /* shall we replace entities ? */
198
+ const xmlChar *version; /* the XML version string */
199
+ const xmlChar *encoding; /* the declared encoding, if any */
200
+ int standalone; /* standalone document */
201
+ int html; /* an HTML(1) document
202
+ * 3 is HTML after <head>
203
+ * 10 is HTML after <body>
204
+ */
205
+
206
+ /* Input stream stack */
207
+ xmlParserInputPtr input; /* Current input stream */
208
+ int inputNr; /* Number of current input streams */
209
+ int inputMax; /* Max number of input streams */
210
+ xmlParserInputPtr *inputTab; /* stack of inputs */
211
+
212
+ /* Node analysis stack only used for DOM building */
213
+ xmlNodePtr node; /* Current parsed Node */
214
+ int nodeNr; /* Depth of the parsing stack */
215
+ int nodeMax; /* Max depth of the parsing stack */
216
+ xmlNodePtr *nodeTab; /* array of nodes */
217
+
218
+ int record_info; /* Whether node info should be kept */
219
+ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
220
+
221
+ int errNo; /* error code */
222
+
223
+ int hasExternalSubset; /* reference and external subset */
224
+ int hasPErefs; /* the internal subset has PE refs */
225
+ int external; /* are we parsing an external entity */
226
+
227
+ int valid; /* is the document valid */
228
+ int validate; /* shall we try to validate ? */
229
+ xmlValidCtxt vctxt; /* The validity context */
230
+
231
+ xmlParserInputState instate; /* current type of input */
232
+ int token; /* next char look-ahead */
233
+
234
+ char *directory; /* the data directory */
235
+
236
+ /* Node name stack */
237
+ const xmlChar *name; /* Current parsed Node */
238
+ int nameNr; /* Depth of the parsing stack */
239
+ int nameMax; /* Max depth of the parsing stack */
240
+ const xmlChar * *nameTab; /* array of nodes */
241
+
242
+ long nbChars; /* unused */
243
+ long checkIndex; /* used by progressive parsing lookup */
244
+ int keepBlanks; /* ugly but ... */
245
+ int disableSAX; /* SAX callbacks are disabled */
246
+ int inSubset; /* Parsing is in int 1/ext 2 subset */
247
+ const xmlChar * intSubName; /* name of subset */
248
+ xmlChar * extSubURI; /* URI of external subset */
249
+ xmlChar * extSubSystem; /* SYSTEM ID of external subset */
250
+
251
+ /* xml:space values */
252
+ int * space; /* Should the parser preserve spaces */
253
+ int spaceNr; /* Depth of the parsing stack */
254
+ int spaceMax; /* Max depth of the parsing stack */
255
+ int * spaceTab; /* array of space infos */
256
+
257
+ int depth; /* to prevent entity substitution loops */
258
+ xmlParserInputPtr entity; /* used to check entities boundaries */
259
+ int charset; /* unused */
260
+ int nodelen; /* Those two fields are there to */
261
+ int nodemem; /* Speed up large node parsing */
262
+ int pedantic; /* signal pedantic warnings */
263
+ void *_private; /* For user data, libxml won't touch it */
264
+
265
+ int loadsubset; /* should the external subset be loaded */
266
+ int linenumbers; /* set line number in element content */
267
+ void *catalogs; /* document's own catalog */
268
+ int recovery; /* run in recovery mode */
269
+ int progressive; /* is this a progressive parsing */
270
+ xmlDictPtr dict; /* dictionary for the parser */
271
+ const xmlChar * *atts; /* array for the attributes callbacks */
272
+ int maxatts; /* the size of the array */
273
+ int docdict; /* use strings from dict to build tree */
274
+
275
+ /*
276
+ * pre-interned strings
277
+ */
278
+ const xmlChar *str_xml;
279
+ const xmlChar *str_xmlns;
280
+ const xmlChar *str_xml_ns;
281
+
282
+ /*
283
+ * Everything below is used only by the new SAX mode
284
+ */
285
+ int sax2; /* operating in the new SAX mode */
286
+ int nsNr; /* the number of inherited namespaces */
287
+ int nsMax; /* the size of the arrays */
288
+ const xmlChar * *nsTab; /* the array of prefix/namespace name */
289
+ unsigned *attallocs; /* which attribute were allocated */
290
+ xmlStartTag *pushTab; /* array of data for push */
291
+ xmlHashTablePtr attsDefault; /* defaulted attributes if any */
292
+ xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
293
+ int nsWellFormed; /* is the document XML Namespace okay */
294
+ int options; /* Extra options */
295
+
296
+ /*
297
+ * Those fields are needed only for streaming parsing so far
298
+ */
299
+ int dictNames; /* Use dictionary names for the tree */
300
+ int freeElemsNr; /* number of freed element nodes */
301
+ xmlNodePtr freeElems; /* List of freed element nodes */
302
+ int freeAttrsNr; /* number of freed attributes nodes */
303
+ xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
304
+
305
+ /*
306
+ * the complete error information for the last error.
307
+ */
308
+ xmlError lastError;
309
+ xmlParserMode parseMode; /* the parser mode */
310
+ unsigned long nbentities; /* unused */
311
+ unsigned long sizeentities; /* size of parsed entities */
312
+
313
+ /* for use by HTML non-recursive parser */
314
+ xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
315
+ int nodeInfoNr; /* Depth of the parsing stack */
316
+ int nodeInfoMax; /* Max depth of the parsing stack */
317
+ xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
318
+
319
+ int input_id; /* we need to label inputs */
320
+ unsigned long sizeentcopy; /* volume of entity copy */
321
+
322
+ int endCheckState; /* quote state for push parser */
323
+ unsigned short nbErrors; /* number of errors */
324
+ unsigned short nbWarnings; /* number of warnings */
325
+ unsigned maxAmpl; /* maximum amplification factor */
326
+
327
+ xmlParserNsData *nsdb; /* namespace database */
328
+ unsigned attrHashMax; /* allocated size */
329
+ xmlAttrHashBucket *attrHash; /* atttribute hash table */
330
+ };
331
+
332
+ /**
333
+ * xmlSAXLocator:
334
+ *
335
+ * A SAX Locator.
336
+ */
337
+ struct _xmlSAXLocator {
338
+ const xmlChar *(*getPublicId)(void *ctx);
339
+ const xmlChar *(*getSystemId)(void *ctx);
340
+ int (*getLineNumber)(void *ctx);
341
+ int (*getColumnNumber)(void *ctx);
342
+ };
343
+
344
+ /**
345
+ * xmlSAXHandler:
346
+ *
347
+ * A SAX handler is bunch of callbacks called by the parser when processing
348
+ * of the input generate data or structure information.
349
+ */
350
+
351
+ /**
352
+ * resolveEntitySAXFunc:
353
+ * @ctx: the user data (XML parser context)
354
+ * @publicId: The public ID of the entity
355
+ * @systemId: The system ID of the entity
356
+ *
357
+ * Callback:
358
+ * The entity loader, to control the loading of external entities,
359
+ * the application can either:
360
+ * - override this resolveEntity() callback in the SAX block
361
+ * - or better use the xmlSetExternalEntityLoader() function to
362
+ * set up it's own entity resolution routine
363
+ *
364
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
365
+ */
366
+ typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
367
+ const xmlChar *publicId,
368
+ const xmlChar *systemId);
369
+ /**
370
+ * internalSubsetSAXFunc:
371
+ * @ctx: the user data (XML parser context)
372
+ * @name: the root element name
373
+ * @ExternalID: the external ID
374
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
375
+ *
376
+ * Callback on internal subset declaration.
377
+ */
378
+ typedef void (*internalSubsetSAXFunc) (void *ctx,
379
+ const xmlChar *name,
380
+ const xmlChar *ExternalID,
381
+ const xmlChar *SystemID);
382
+ /**
383
+ * externalSubsetSAXFunc:
384
+ * @ctx: the user data (XML parser context)
385
+ * @name: the root element name
386
+ * @ExternalID: the external ID
387
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
388
+ *
389
+ * Callback on external subset declaration.
390
+ */
391
+ typedef void (*externalSubsetSAXFunc) (void *ctx,
392
+ const xmlChar *name,
393
+ const xmlChar *ExternalID,
394
+ const xmlChar *SystemID);
395
+ /**
396
+ * getEntitySAXFunc:
397
+ * @ctx: the user data (XML parser context)
398
+ * @name: The entity name
399
+ *
400
+ * Get an entity by name.
401
+ *
402
+ * Returns the xmlEntityPtr if found.
403
+ */
404
+ typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
405
+ const xmlChar *name);
406
+ /**
407
+ * getParameterEntitySAXFunc:
408
+ * @ctx: the user data (XML parser context)
409
+ * @name: The entity name
410
+ *
411
+ * Get a parameter entity by name.
412
+ *
413
+ * Returns the xmlEntityPtr if found.
414
+ */
415
+ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
416
+ const xmlChar *name);
417
+ /**
418
+ * entityDeclSAXFunc:
419
+ * @ctx: the user data (XML parser context)
420
+ * @name: the entity name
421
+ * @type: the entity type
422
+ * @publicId: The public ID of the entity
423
+ * @systemId: The system ID of the entity
424
+ * @content: the entity value (without processing).
425
+ *
426
+ * An entity definition has been parsed.
427
+ */
428
+ typedef void (*entityDeclSAXFunc) (void *ctx,
429
+ const xmlChar *name,
430
+ int type,
431
+ const xmlChar *publicId,
432
+ const xmlChar *systemId,
433
+ xmlChar *content);
434
+ /**
435
+ * notationDeclSAXFunc:
436
+ * @ctx: the user data (XML parser context)
437
+ * @name: The name of the notation
438
+ * @publicId: The public ID of the entity
439
+ * @systemId: The system ID of the entity
440
+ *
441
+ * What to do when a notation declaration has been parsed.
442
+ */
443
+ typedef void (*notationDeclSAXFunc)(void *ctx,
444
+ const xmlChar *name,
445
+ const xmlChar *publicId,
446
+ const xmlChar *systemId);
447
+ /**
448
+ * attributeDeclSAXFunc:
449
+ * @ctx: the user data (XML parser context)
450
+ * @elem: the name of the element
451
+ * @fullname: the attribute name
452
+ * @type: the attribute type
453
+ * @def: the type of default value
454
+ * @defaultValue: the attribute default value
455
+ * @tree: the tree of enumerated value set
456
+ *
457
+ * An attribute definition has been parsed.
458
+ */
459
+ typedef void (*attributeDeclSAXFunc)(void *ctx,
460
+ const xmlChar *elem,
461
+ const xmlChar *fullname,
462
+ int type,
463
+ int def,
464
+ const xmlChar *defaultValue,
465
+ xmlEnumerationPtr tree);
466
+ /**
467
+ * elementDeclSAXFunc:
468
+ * @ctx: the user data (XML parser context)
469
+ * @name: the element name
470
+ * @type: the element type
471
+ * @content: the element value tree
472
+ *
473
+ * An element definition has been parsed.
474
+ */
475
+ typedef void (*elementDeclSAXFunc)(void *ctx,
476
+ const xmlChar *name,
477
+ int type,
478
+ xmlElementContentPtr content);
479
+ /**
480
+ * unparsedEntityDeclSAXFunc:
481
+ * @ctx: the user data (XML parser context)
482
+ * @name: The name of the entity
483
+ * @publicId: The public ID of the entity
484
+ * @systemId: The system ID of the entity
485
+ * @notationName: the name of the notation
486
+ *
487
+ * What to do when an unparsed entity declaration is parsed.
488
+ */
489
+ typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
490
+ const xmlChar *name,
491
+ const xmlChar *publicId,
492
+ const xmlChar *systemId,
493
+ const xmlChar *notationName);
494
+ /**
495
+ * setDocumentLocatorSAXFunc:
496
+ * @ctx: the user data (XML parser context)
497
+ * @loc: A SAX Locator
498
+ *
499
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
500
+ * Everything is available on the context, so this is useless in our case.
501
+ */
502
+ typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
503
+ xmlSAXLocatorPtr loc);
504
+ /**
505
+ * startDocumentSAXFunc:
506
+ * @ctx: the user data (XML parser context)
507
+ *
508
+ * Called when the document start being processed.
509
+ */
510
+ typedef void (*startDocumentSAXFunc) (void *ctx);
511
+ /**
512
+ * endDocumentSAXFunc:
513
+ * @ctx: the user data (XML parser context)
514
+ *
515
+ * Called when the document end has been detected.
516
+ */
517
+ typedef void (*endDocumentSAXFunc) (void *ctx);
518
+ /**
519
+ * startElementSAXFunc:
520
+ * @ctx: the user data (XML parser context)
521
+ * @name: The element name, including namespace prefix
522
+ * @atts: An array of name/value attributes pairs, NULL terminated
523
+ *
524
+ * Called when an opening tag has been processed.
525
+ */
526
+ typedef void (*startElementSAXFunc) (void *ctx,
527
+ const xmlChar *name,
528
+ const xmlChar **atts);
529
+ /**
530
+ * endElementSAXFunc:
531
+ * @ctx: the user data (XML parser context)
532
+ * @name: The element name
533
+ *
534
+ * Called when the end of an element has been detected.
535
+ */
536
+ typedef void (*endElementSAXFunc) (void *ctx,
537
+ const xmlChar *name);
538
+ /**
539
+ * attributeSAXFunc:
540
+ * @ctx: the user data (XML parser context)
541
+ * @name: The attribute name, including namespace prefix
542
+ * @value: The attribute value
543
+ *
544
+ * Handle an attribute that has been read by the parser.
545
+ * The default handling is to convert the attribute into an
546
+ * DOM subtree and past it in a new xmlAttr element added to
547
+ * the element.
548
+ */
549
+ typedef void (*attributeSAXFunc) (void *ctx,
550
+ const xmlChar *name,
551
+ const xmlChar *value);
552
+ /**
553
+ * referenceSAXFunc:
554
+ * @ctx: the user data (XML parser context)
555
+ * @name: The entity name
556
+ *
557
+ * Called when an entity reference is detected.
558
+ */
559
+ typedef void (*referenceSAXFunc) (void *ctx,
560
+ const xmlChar *name);
561
+ /**
562
+ * charactersSAXFunc:
563
+ * @ctx: the user data (XML parser context)
564
+ * @ch: a xmlChar string
565
+ * @len: the number of xmlChar
566
+ *
567
+ * Receiving some chars from the parser.
568
+ */
569
+ typedef void (*charactersSAXFunc) (void *ctx,
570
+ const xmlChar *ch,
571
+ int len);
572
+ /**
573
+ * ignorableWhitespaceSAXFunc:
574
+ * @ctx: the user data (XML parser context)
575
+ * @ch: a xmlChar string
576
+ * @len: the number of xmlChar
577
+ *
578
+ * Receiving some ignorable whitespaces from the parser.
579
+ * UNUSED: by default the DOM building will use characters.
580
+ */
581
+ typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
582
+ const xmlChar *ch,
583
+ int len);
584
+ /**
585
+ * processingInstructionSAXFunc:
586
+ * @ctx: the user data (XML parser context)
587
+ * @target: the target name
588
+ * @data: the PI data's
589
+ *
590
+ * A processing instruction has been parsed.
591
+ */
592
+ typedef void (*processingInstructionSAXFunc) (void *ctx,
593
+ const xmlChar *target,
594
+ const xmlChar *data);
595
+ /**
596
+ * commentSAXFunc:
597
+ * @ctx: the user data (XML parser context)
598
+ * @value: the comment content
599
+ *
600
+ * A comment has been parsed.
601
+ */
602
+ typedef void (*commentSAXFunc) (void *ctx,
603
+ const xmlChar *value);
604
+ /**
605
+ * cdataBlockSAXFunc:
606
+ * @ctx: the user data (XML parser context)
607
+ * @value: The pcdata content
608
+ * @len: the block length
609
+ *
610
+ * Called when a pcdata block has been parsed.
611
+ */
612
+ typedef void (*cdataBlockSAXFunc) (
613
+ void *ctx,
614
+ const xmlChar *value,
615
+ int len);
616
+ /**
617
+ * warningSAXFunc:
618
+ * @ctx: an XML parser context
619
+ * @msg: the message to display/transmit
620
+ * @...: extra parameters for the message display
621
+ *
622
+ * Display and format a warning messages, callback.
623
+ */
624
+ typedef void (*warningSAXFunc) (void *ctx,
625
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
626
+ /**
627
+ * errorSAXFunc:
628
+ * @ctx: an XML parser context
629
+ * @msg: the message to display/transmit
630
+ * @...: extra parameters for the message display
631
+ *
632
+ * Display and format an error messages, callback.
633
+ */
634
+ typedef void (*errorSAXFunc) (void *ctx,
635
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
636
+ /**
637
+ * fatalErrorSAXFunc:
638
+ * @ctx: an XML parser context
639
+ * @msg: the message to display/transmit
640
+ * @...: extra parameters for the message display
641
+ *
642
+ * Display and format fatal error messages, callback.
643
+ * Note: so far fatalError() SAX callbacks are not used, error()
644
+ * get all the callbacks for errors.
645
+ */
646
+ typedef void (*fatalErrorSAXFunc) (void *ctx,
647
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
648
+ /**
649
+ * isStandaloneSAXFunc:
650
+ * @ctx: the user data (XML parser context)
651
+ *
652
+ * Is this document tagged standalone?
653
+ *
654
+ * Returns 1 if true
655
+ */
656
+ typedef int (*isStandaloneSAXFunc) (void *ctx);
657
+ /**
658
+ * hasInternalSubsetSAXFunc:
659
+ * @ctx: the user data (XML parser context)
660
+ *
661
+ * Does this document has an internal subset.
662
+ *
663
+ * Returns 1 if true
664
+ */
665
+ typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
666
+
667
+ /**
668
+ * hasExternalSubsetSAXFunc:
669
+ * @ctx: the user data (XML parser context)
670
+ *
671
+ * Does this document has an external subset?
672
+ *
673
+ * Returns 1 if true
674
+ */
675
+ typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
676
+
677
+ /************************************************************************
678
+ * *
679
+ * The SAX version 2 API extensions *
680
+ * *
681
+ ************************************************************************/
682
+ /**
683
+ * XML_SAX2_MAGIC:
684
+ *
685
+ * Special constant found in SAX2 blocks initialized fields
686
+ */
687
+ #define XML_SAX2_MAGIC 0xDEEDBEAF
688
+
689
+ /**
690
+ * startElementNsSAX2Func:
691
+ * @ctx: the user data (XML parser context)
692
+ * @localname: the local name of the element
693
+ * @prefix: the element namespace prefix if available
694
+ * @URI: the element namespace name if available
695
+ * @nb_namespaces: number of namespace definitions on that node
696
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
697
+ * @nb_attributes: the number of attributes on that node
698
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
699
+ * ones are at the end of the array
700
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
701
+ * attribute values.
702
+ *
703
+ * SAX2 callback when an element start has been detected by the parser.
704
+ * It provides the namespace information for the element, as well as
705
+ * the new namespace declarations on the element.
706
+ */
707
+
708
+ typedef void (*startElementNsSAX2Func) (void *ctx,
709
+ const xmlChar *localname,
710
+ const xmlChar *prefix,
711
+ const xmlChar *URI,
712
+ int nb_namespaces,
713
+ const xmlChar **namespaces,
714
+ int nb_attributes,
715
+ int nb_defaulted,
716
+ const xmlChar **attributes);
717
+
718
+ /**
719
+ * endElementNsSAX2Func:
720
+ * @ctx: the user data (XML parser context)
721
+ * @localname: the local name of the element
722
+ * @prefix: the element namespace prefix if available
723
+ * @URI: the element namespace name if available
724
+ *
725
+ * SAX2 callback when an element end has been detected by the parser.
726
+ * It provides the namespace information for the element.
727
+ */
728
+
729
+ typedef void (*endElementNsSAX2Func) (void *ctx,
730
+ const xmlChar *localname,
731
+ const xmlChar *prefix,
732
+ const xmlChar *URI);
733
+
734
+
735
+ struct _xmlSAXHandler {
736
+ internalSubsetSAXFunc internalSubset;
737
+ isStandaloneSAXFunc isStandalone;
738
+ hasInternalSubsetSAXFunc hasInternalSubset;
739
+ hasExternalSubsetSAXFunc hasExternalSubset;
740
+ resolveEntitySAXFunc resolveEntity;
741
+ getEntitySAXFunc getEntity;
742
+ entityDeclSAXFunc entityDecl;
743
+ notationDeclSAXFunc notationDecl;
744
+ attributeDeclSAXFunc attributeDecl;
745
+ elementDeclSAXFunc elementDecl;
746
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
747
+ setDocumentLocatorSAXFunc setDocumentLocator;
748
+ startDocumentSAXFunc startDocument;
749
+ endDocumentSAXFunc endDocument;
750
+ /*
751
+ * `startElement` and `endElement` are only used by the legacy SAX1
752
+ * interface and should not be used in new software. If you really
753
+ * have to enable SAX1, the preferred way is set the `initialized`
754
+ * member to 1 instead of XML_SAX2_MAGIC.
755
+ *
756
+ * For backward compatibility, it's also possible to set the
757
+ * `startElementNs` and `endElementNs` handlers to NULL.
758
+ *
759
+ * You can also set the XML_PARSE_SAX1 parser option, but versions
760
+ * older than 2.12.0 will probably crash if this option is provided
761
+ * together with custom SAX callbacks.
762
+ */
763
+ startElementSAXFunc startElement;
764
+ endElementSAXFunc endElement;
765
+ referenceSAXFunc reference;
766
+ charactersSAXFunc characters;
767
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
768
+ processingInstructionSAXFunc processingInstruction;
769
+ commentSAXFunc comment;
770
+ warningSAXFunc warning;
771
+ errorSAXFunc error;
772
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
773
+ getParameterEntitySAXFunc getParameterEntity;
774
+ cdataBlockSAXFunc cdataBlock;
775
+ externalSubsetSAXFunc externalSubset;
776
+ /*
777
+ * `initialized` should always be set to XML_SAX2_MAGIC to enable the
778
+ * modern SAX2 interface.
779
+ */
780
+ unsigned int initialized;
781
+ /*
782
+ * The following members are only used by the SAX2 interface.
783
+ */
784
+ void *_private;
785
+ startElementNsSAX2Func startElementNs;
786
+ endElementNsSAX2Func endElementNs;
787
+ xmlStructuredErrorFunc serror;
788
+ };
789
+
790
+ /*
791
+ * SAX Version 1
792
+ */
793
+ typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
794
+ typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
795
+ struct _xmlSAXHandlerV1 {
796
+ internalSubsetSAXFunc internalSubset;
797
+ isStandaloneSAXFunc isStandalone;
798
+ hasInternalSubsetSAXFunc hasInternalSubset;
799
+ hasExternalSubsetSAXFunc hasExternalSubset;
800
+ resolveEntitySAXFunc resolveEntity;
801
+ getEntitySAXFunc getEntity;
802
+ entityDeclSAXFunc entityDecl;
803
+ notationDeclSAXFunc notationDecl;
804
+ attributeDeclSAXFunc attributeDecl;
805
+ elementDeclSAXFunc elementDecl;
806
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
807
+ setDocumentLocatorSAXFunc setDocumentLocator;
808
+ startDocumentSAXFunc startDocument;
809
+ endDocumentSAXFunc endDocument;
810
+ startElementSAXFunc startElement;
811
+ endElementSAXFunc endElement;
812
+ referenceSAXFunc reference;
813
+ charactersSAXFunc characters;
814
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
815
+ processingInstructionSAXFunc processingInstruction;
816
+ commentSAXFunc comment;
817
+ warningSAXFunc warning;
818
+ errorSAXFunc error;
819
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
820
+ getParameterEntitySAXFunc getParameterEntity;
821
+ cdataBlockSAXFunc cdataBlock;
822
+ externalSubsetSAXFunc externalSubset;
823
+ unsigned int initialized;
824
+ };
825
+
826
+
827
+ /**
828
+ * xmlExternalEntityLoader:
829
+ * @URL: The System ID of the resource requested
830
+ * @ID: The Public ID of the resource requested
831
+ * @context: the XML parser context
832
+ *
833
+ * External entity loaders types.
834
+ *
835
+ * Returns the entity input parser.
836
+ */
837
+ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
838
+ const char *ID,
839
+ xmlParserCtxtPtr context);
840
+
841
+ /*
842
+ * Variables
843
+ */
844
+
845
+ XMLPUBVAR const char *const xmlParserVersion;
846
+ #ifdef LIBXML_THREAD_ENABLED
847
+ /* backward compatibility */
848
+ XMLPUBFUN const char *const *__xmlParserVersion(void);
849
+ #endif
850
+
851
+ /** DOC_DISABLE */
852
+ #define XML_GLOBALS_PARSER_CORE \
853
+ XML_OP(oldXMLWDcompatibility, int, XML_DEPRECATED) \
854
+ XML_OP(xmlDefaultSAXLocator, xmlSAXLocator, XML_DEPRECATED) \
855
+ XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
856
+ XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
857
+ XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
858
+ XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
859
+ XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
860
+ XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \
861
+ XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
862
+ XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
863
+
864
+ #ifdef LIBXML_OUTPUT_ENABLED
865
+ #define XML_GLOBALS_PARSER_OUTPUT \
866
+ XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \
867
+ XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \
868
+ XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR)
869
+ #else
870
+ #define XML_GLOBALS_PARSER_OUTPUT
871
+ #endif
872
+
873
+ #ifdef LIBXML_SAX1_ENABLED
874
+ #define XML_GLOBALS_PARSER_SAX1 \
875
+ XML_OP(xmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
876
+ #else
877
+ #define XML_GLOBALS_PARSER_SAX1
878
+ #endif
879
+
880
+ #define XML_GLOBALS_PARSER \
881
+ XML_GLOBALS_PARSER_CORE \
882
+ XML_GLOBALS_PARSER_OUTPUT \
883
+ XML_GLOBALS_PARSER_SAX1
884
+
885
+ #define XML_OP XML_DECLARE_GLOBAL
886
+ XML_GLOBALS_PARSER
887
+ #undef XML_OP
888
+
889
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
890
+ #define oldXMLWDcompatibility XML_GLOBAL_MACRO(oldXMLWDcompatibility)
891
+ #define xmlDefaultSAXHandler XML_GLOBAL_MACRO(xmlDefaultSAXHandler)
892
+ #define xmlDefaultSAXLocator XML_GLOBAL_MACRO(xmlDefaultSAXLocator)
893
+ #define xmlDoValidityCheckingDefaultValue \
894
+ XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue)
895
+ #define xmlGetWarningsDefaultValue \
896
+ XML_GLOBAL_MACRO(xmlGetWarningsDefaultValue)
897
+ #define xmlKeepBlanksDefaultValue XML_GLOBAL_MACRO(xmlKeepBlanksDefaultValue)
898
+ #define xmlLineNumbersDefaultValue \
899
+ XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
900
+ #define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
901
+ #define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
902
+ #define xmlPedanticParserDefaultValue \
903
+ XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
904
+ #define xmlSubstituteEntitiesDefaultValue \
905
+ XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue)
906
+ #ifdef LIBXML_OUTPUT_ENABLED
907
+ #define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput)
908
+ #define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString)
909
+ #define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags)
910
+ #endif
911
+ #endif
912
+ /** DOC_ENABLE */
913
+
914
+ /*
915
+ * Init/Cleanup
916
+ */
917
+ XMLPUBFUN void
918
+ xmlInitParser (void);
919
+ XMLPUBFUN void
920
+ xmlCleanupParser (void);
921
+ XML_DEPRECATED
922
+ XMLPUBFUN void
923
+ xmlInitGlobals (void);
924
+ XML_DEPRECATED
925
+ XMLPUBFUN void
926
+ xmlCleanupGlobals (void);
927
+
928
+ /*
929
+ * Input functions
930
+ */
931
+ XML_DEPRECATED
932
+ XMLPUBFUN int
933
+ xmlParserInputRead (xmlParserInputPtr in,
934
+ int len);
935
+ XML_DEPRECATED
936
+ XMLPUBFUN int
937
+ xmlParserInputGrow (xmlParserInputPtr in,
938
+ int len);
939
+
940
+ /*
941
+ * Basic parsing Interfaces
942
+ */
943
+ #ifdef LIBXML_SAX1_ENABLED
944
+ XMLPUBFUN xmlDocPtr
945
+ xmlParseDoc (const xmlChar *cur);
946
+ XMLPUBFUN xmlDocPtr
947
+ xmlParseFile (const char *filename);
948
+ XMLPUBFUN xmlDocPtr
949
+ xmlParseMemory (const char *buffer,
950
+ int size);
951
+ #endif /* LIBXML_SAX1_ENABLED */
952
+ XML_DEPRECATED XMLPUBFUN int
953
+ xmlSubstituteEntitiesDefault(int val);
954
+ XML_DEPRECATED XMLPUBFUN int
955
+ xmlThrDefSubstituteEntitiesDefaultValue(int v);
956
+ XMLPUBFUN int
957
+ xmlKeepBlanksDefault (int val);
958
+ XML_DEPRECATED XMLPUBFUN int
959
+ xmlThrDefKeepBlanksDefaultValue(int v);
960
+ XMLPUBFUN void
961
+ xmlStopParser (xmlParserCtxtPtr ctxt);
962
+ XML_DEPRECATED XMLPUBFUN int
963
+ xmlPedanticParserDefault(int val);
964
+ XML_DEPRECATED XMLPUBFUN int
965
+ xmlThrDefPedanticParserDefaultValue(int v);
966
+ XML_DEPRECATED XMLPUBFUN int
967
+ xmlLineNumbersDefault (int val);
968
+ XML_DEPRECATED XMLPUBFUN int
969
+ xmlThrDefLineNumbersDefaultValue(int v);
970
+ XML_DEPRECATED XMLPUBFUN int
971
+ xmlThrDefDoValidityCheckingDefaultValue(int v);
972
+ XML_DEPRECATED XMLPUBFUN int
973
+ xmlThrDefGetWarningsDefaultValue(int v);
974
+ XML_DEPRECATED XMLPUBFUN int
975
+ xmlThrDefLoadExtDtdDefaultValue(int v);
976
+ XML_DEPRECATED XMLPUBFUN int
977
+ xmlThrDefParserDebugEntities(int v);
978
+
979
+ #ifdef LIBXML_SAX1_ENABLED
980
+ /*
981
+ * Recovery mode
982
+ */
983
+ XML_DEPRECATED
984
+ XMLPUBFUN xmlDocPtr
985
+ xmlRecoverDoc (const xmlChar *cur);
986
+ XML_DEPRECATED
987
+ XMLPUBFUN xmlDocPtr
988
+ xmlRecoverMemory (const char *buffer,
989
+ int size);
990
+ XML_DEPRECATED
991
+ XMLPUBFUN xmlDocPtr
992
+ xmlRecoverFile (const char *filename);
993
+ #endif /* LIBXML_SAX1_ENABLED */
994
+
995
+ /*
996
+ * Less common routines and SAX interfaces
997
+ */
998
+ XMLPUBFUN int
999
+ xmlParseDocument (xmlParserCtxtPtr ctxt);
1000
+ XMLPUBFUN int
1001
+ xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
1002
+ #ifdef LIBXML_SAX1_ENABLED
1003
+ XML_DEPRECATED
1004
+ XMLPUBFUN int
1005
+ xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
1006
+ void *user_data,
1007
+ const char *filename);
1008
+ XML_DEPRECATED
1009
+ XMLPUBFUN int
1010
+ xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
1011
+ void *user_data,
1012
+ const char *buffer,
1013
+ int size);
1014
+ XML_DEPRECATED
1015
+ XMLPUBFUN xmlDocPtr
1016
+ xmlSAXParseDoc (xmlSAXHandlerPtr sax,
1017
+ const xmlChar *cur,
1018
+ int recovery);
1019
+ XML_DEPRECATED
1020
+ XMLPUBFUN xmlDocPtr
1021
+ xmlSAXParseMemory (xmlSAXHandlerPtr sax,
1022
+ const char *buffer,
1023
+ int size,
1024
+ int recovery);
1025
+ XML_DEPRECATED
1026
+ XMLPUBFUN xmlDocPtr
1027
+ xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
1028
+ const char *buffer,
1029
+ int size,
1030
+ int recovery,
1031
+ void *data);
1032
+ XML_DEPRECATED
1033
+ XMLPUBFUN xmlDocPtr
1034
+ xmlSAXParseFile (xmlSAXHandlerPtr sax,
1035
+ const char *filename,
1036
+ int recovery);
1037
+ XML_DEPRECATED
1038
+ XMLPUBFUN xmlDocPtr
1039
+ xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
1040
+ const char *filename,
1041
+ int recovery,
1042
+ void *data);
1043
+ XML_DEPRECATED
1044
+ XMLPUBFUN xmlDocPtr
1045
+ xmlSAXParseEntity (xmlSAXHandlerPtr sax,
1046
+ const char *filename);
1047
+ XML_DEPRECATED
1048
+ XMLPUBFUN xmlDocPtr
1049
+ xmlParseEntity (const char *filename);
1050
+ #endif /* LIBXML_SAX1_ENABLED */
1051
+
1052
+ #ifdef LIBXML_VALID_ENABLED
1053
+ XML_DEPRECATED
1054
+ XMLPUBFUN xmlDtdPtr
1055
+ xmlSAXParseDTD (xmlSAXHandlerPtr sax,
1056
+ const xmlChar *ExternalID,
1057
+ const xmlChar *SystemID);
1058
+ XMLPUBFUN xmlDtdPtr
1059
+ xmlParseDTD (const xmlChar *ExternalID,
1060
+ const xmlChar *SystemID);
1061
+ XMLPUBFUN xmlDtdPtr
1062
+ xmlIOParseDTD (xmlSAXHandlerPtr sax,
1063
+ xmlParserInputBufferPtr input,
1064
+ xmlCharEncoding enc);
1065
+ #endif /* LIBXML_VALID_ENABLE */
1066
+ #ifdef LIBXML_SAX1_ENABLED
1067
+ XMLPUBFUN int
1068
+ xmlParseBalancedChunkMemory(xmlDocPtr doc,
1069
+ xmlSAXHandlerPtr sax,
1070
+ void *user_data,
1071
+ int depth,
1072
+ const xmlChar *string,
1073
+ xmlNodePtr *lst);
1074
+ #endif /* LIBXML_SAX1_ENABLED */
1075
+ XMLPUBFUN xmlParserErrors
1076
+ xmlParseInNodeContext (xmlNodePtr node,
1077
+ const char *data,
1078
+ int datalen,
1079
+ int options,
1080
+ xmlNodePtr *lst);
1081
+ #ifdef LIBXML_SAX1_ENABLED
1082
+ XMLPUBFUN int
1083
+ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
1084
+ xmlSAXHandlerPtr sax,
1085
+ void *user_data,
1086
+ int depth,
1087
+ const xmlChar *string,
1088
+ xmlNodePtr *lst,
1089
+ int recover);
1090
+ XML_DEPRECATED
1091
+ XMLPUBFUN int
1092
+ xmlParseExternalEntity (xmlDocPtr doc,
1093
+ xmlSAXHandlerPtr sax,
1094
+ void *user_data,
1095
+ int depth,
1096
+ const xmlChar *URL,
1097
+ const xmlChar *ID,
1098
+ xmlNodePtr *lst);
1099
+ #endif /* LIBXML_SAX1_ENABLED */
1100
+ XMLPUBFUN int
1101
+ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
1102
+ const xmlChar *URL,
1103
+ const xmlChar *ID,
1104
+ xmlNodePtr *lst);
1105
+
1106
+ /*
1107
+ * Parser contexts handling.
1108
+ */
1109
+ XMLPUBFUN xmlParserCtxtPtr
1110
+ xmlNewParserCtxt (void);
1111
+ XMLPUBFUN xmlParserCtxtPtr
1112
+ xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
1113
+ void *userData);
1114
+ XMLPUBFUN int
1115
+ xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
1116
+ XMLPUBFUN void
1117
+ xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
1118
+ XMLPUBFUN void
1119
+ xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
1120
+ #ifdef LIBXML_SAX1_ENABLED
1121
+ XML_DEPRECATED
1122
+ XMLPUBFUN void
1123
+ xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
1124
+ const xmlChar* buffer,
1125
+ const char *filename);
1126
+ #endif /* LIBXML_SAX1_ENABLED */
1127
+ XMLPUBFUN xmlParserCtxtPtr
1128
+ xmlCreateDocParserCtxt (const xmlChar *cur);
1129
+
1130
+ #ifdef LIBXML_LEGACY_ENABLED
1131
+ /*
1132
+ * Reading/setting optional parsing features.
1133
+ */
1134
+ XML_DEPRECATED
1135
+ XMLPUBFUN int
1136
+ xmlGetFeaturesList (int *len,
1137
+ const char **result);
1138
+ XML_DEPRECATED
1139
+ XMLPUBFUN int
1140
+ xmlGetFeature (xmlParserCtxtPtr ctxt,
1141
+ const char *name,
1142
+ void *result);
1143
+ XML_DEPRECATED
1144
+ XMLPUBFUN int
1145
+ xmlSetFeature (xmlParserCtxtPtr ctxt,
1146
+ const char *name,
1147
+ void *value);
1148
+ #endif /* LIBXML_LEGACY_ENABLED */
1149
+
1150
+ #ifdef LIBXML_PUSH_ENABLED
1151
+ /*
1152
+ * Interfaces for the Push mode.
1153
+ */
1154
+ XMLPUBFUN xmlParserCtxtPtr
1155
+ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
1156
+ void *user_data,
1157
+ const char *chunk,
1158
+ int size,
1159
+ const char *filename);
1160
+ XMLPUBFUN int
1161
+ xmlParseChunk (xmlParserCtxtPtr ctxt,
1162
+ const char *chunk,
1163
+ int size,
1164
+ int terminate);
1165
+ #endif /* LIBXML_PUSH_ENABLED */
1166
+
1167
+ /*
1168
+ * Special I/O mode.
1169
+ */
1170
+
1171
+ XMLPUBFUN xmlParserCtxtPtr
1172
+ xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
1173
+ void *user_data,
1174
+ xmlInputReadCallback ioread,
1175
+ xmlInputCloseCallback ioclose,
1176
+ void *ioctx,
1177
+ xmlCharEncoding enc);
1178
+
1179
+ XMLPUBFUN xmlParserInputPtr
1180
+ xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
1181
+ xmlParserInputBufferPtr input,
1182
+ xmlCharEncoding enc);
1183
+
1184
+ /*
1185
+ * Node infos.
1186
+ */
1187
+ XMLPUBFUN const xmlParserNodeInfo*
1188
+ xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
1189
+ const xmlNodePtr node);
1190
+ XMLPUBFUN void
1191
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
1192
+ XMLPUBFUN void
1193
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
1194
+ XMLPUBFUN unsigned long
1195
+ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
1196
+ const xmlNodePtr node);
1197
+ XMLPUBFUN void
1198
+ xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
1199
+ const xmlParserNodeInfoPtr info);
1200
+
1201
+ /*
1202
+ * External entities handling actually implemented in xmlIO.
1203
+ */
1204
+
1205
+ XMLPUBFUN void
1206
+ xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
1207
+ XMLPUBFUN xmlExternalEntityLoader
1208
+ xmlGetExternalEntityLoader(void);
1209
+ XMLPUBFUN xmlParserInputPtr
1210
+ xmlLoadExternalEntity (const char *URL,
1211
+ const char *ID,
1212
+ xmlParserCtxtPtr ctxt);
1213
+
1214
+ /*
1215
+ * Index lookup, actually implemented in the encoding module
1216
+ */
1217
+ XMLPUBFUN long
1218
+ xmlByteConsumed (xmlParserCtxtPtr ctxt);
1219
+
1220
+ /*
1221
+ * New set of simpler/more flexible APIs
1222
+ */
1223
+ /**
1224
+ * xmlParserOption:
1225
+ *
1226
+ * This is the set of XML parser options that can be passed down
1227
+ * to the xmlReadDoc() and similar calls.
1228
+ */
1229
+ typedef enum {
1230
+ XML_PARSE_RECOVER = 1<<0, /* recover on errors */
1231
+ XML_PARSE_NOENT = 1<<1, /* substitute entities */
1232
+ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
1233
+ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
1234
+ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
1235
+ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
1236
+ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
1237
+ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
1238
+ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
1239
+ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
1240
+ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
1241
+ XML_PARSE_NONET = 1<<11,/* Forbid network access */
1242
+ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
1243
+ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
1244
+ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
1245
+ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
1246
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
1247
+ the tree allowed afterwards (will possibly
1248
+ crash if you try to modify the tree) */
1249
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
1250
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
1251
+ XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
1252
+ XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
1253
+ XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
1254
+ XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
1255
+ } xmlParserOption;
1256
+
1257
+ XMLPUBFUN void
1258
+ xmlCtxtReset (xmlParserCtxtPtr ctxt);
1259
+ XMLPUBFUN int
1260
+ xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
1261
+ const char *chunk,
1262
+ int size,
1263
+ const char *filename,
1264
+ const char *encoding);
1265
+ XMLPUBFUN int
1266
+ xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
1267
+ int options);
1268
+ XMLPUBFUN void
1269
+ xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
1270
+ unsigned maxAmpl);
1271
+ XMLPUBFUN xmlDocPtr
1272
+ xmlReadDoc (const xmlChar *cur,
1273
+ const char *URL,
1274
+ const char *encoding,
1275
+ int options);
1276
+ XMLPUBFUN xmlDocPtr
1277
+ xmlReadFile (const char *URL,
1278
+ const char *encoding,
1279
+ int options);
1280
+ XMLPUBFUN xmlDocPtr
1281
+ xmlReadMemory (const char *buffer,
1282
+ int size,
1283
+ const char *URL,
1284
+ const char *encoding,
1285
+ int options);
1286
+ XMLPUBFUN xmlDocPtr
1287
+ xmlReadFd (int fd,
1288
+ const char *URL,
1289
+ const char *encoding,
1290
+ int options);
1291
+ XMLPUBFUN xmlDocPtr
1292
+ xmlReadIO (xmlInputReadCallback ioread,
1293
+ xmlInputCloseCallback ioclose,
1294
+ void *ioctx,
1295
+ const char *URL,
1296
+ const char *encoding,
1297
+ int options);
1298
+ XMLPUBFUN xmlDocPtr
1299
+ xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
1300
+ const xmlChar *cur,
1301
+ const char *URL,
1302
+ const char *encoding,
1303
+ int options);
1304
+ XMLPUBFUN xmlDocPtr
1305
+ xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
1306
+ const char *filename,
1307
+ const char *encoding,
1308
+ int options);
1309
+ XMLPUBFUN xmlDocPtr
1310
+ xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
1311
+ const char *buffer,
1312
+ int size,
1313
+ const char *URL,
1314
+ const char *encoding,
1315
+ int options);
1316
+ XMLPUBFUN xmlDocPtr
1317
+ xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
1318
+ int fd,
1319
+ const char *URL,
1320
+ const char *encoding,
1321
+ int options);
1322
+ XMLPUBFUN xmlDocPtr
1323
+ xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
1324
+ xmlInputReadCallback ioread,
1325
+ xmlInputCloseCallback ioclose,
1326
+ void *ioctx,
1327
+ const char *URL,
1328
+ const char *encoding,
1329
+ int options);
1330
+
1331
+ /*
1332
+ * Library wide options
1333
+ */
1334
+ /**
1335
+ * xmlFeature:
1336
+ *
1337
+ * Used to examine the existence of features that can be enabled
1338
+ * or disabled at compile-time.
1339
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
1340
+ */
1341
+ typedef enum {
1342
+ XML_WITH_THREAD = 1,
1343
+ XML_WITH_TREE = 2,
1344
+ XML_WITH_OUTPUT = 3,
1345
+ XML_WITH_PUSH = 4,
1346
+ XML_WITH_READER = 5,
1347
+ XML_WITH_PATTERN = 6,
1348
+ XML_WITH_WRITER = 7,
1349
+ XML_WITH_SAX1 = 8,
1350
+ XML_WITH_FTP = 9,
1351
+ XML_WITH_HTTP = 10,
1352
+ XML_WITH_VALID = 11,
1353
+ XML_WITH_HTML = 12,
1354
+ XML_WITH_LEGACY = 13,
1355
+ XML_WITH_C14N = 14,
1356
+ XML_WITH_CATALOG = 15,
1357
+ XML_WITH_XPATH = 16,
1358
+ XML_WITH_XPTR = 17,
1359
+ XML_WITH_XINCLUDE = 18,
1360
+ XML_WITH_ICONV = 19,
1361
+ XML_WITH_ISO8859X = 20,
1362
+ XML_WITH_UNICODE = 21,
1363
+ XML_WITH_REGEXP = 22,
1364
+ XML_WITH_AUTOMATA = 23,
1365
+ XML_WITH_EXPR = 24,
1366
+ XML_WITH_SCHEMAS = 25,
1367
+ XML_WITH_SCHEMATRON = 26,
1368
+ XML_WITH_MODULES = 27,
1369
+ XML_WITH_DEBUG = 28,
1370
+ XML_WITH_DEBUG_MEM = 29,
1371
+ XML_WITH_DEBUG_RUN = 30,
1372
+ XML_WITH_ZLIB = 31,
1373
+ XML_WITH_ICU = 32,
1374
+ XML_WITH_LZMA = 33,
1375
+ XML_WITH_NONE = 99999 /* just to be sure of allocation size */
1376
+ } xmlFeature;
1377
+
1378
+ XMLPUBFUN int
1379
+ xmlHasFeature (xmlFeature feature);
1380
+
1381
+ #ifdef __cplusplus
1382
+ }
1383
+ #endif
1384
+ #endif /* __XML_PARSER_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/relaxng.h ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
18
+ #ifdef LIBXML_SCHEMAS_ENABLED
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ typedef struct _xmlRelaxNG xmlRelaxNG;
25
+ typedef xmlRelaxNG *xmlRelaxNGPtr;
26
+
27
+
28
+ /**
29
+ * xmlRelaxNGValidityErrorFunc:
30
+ * @ctx: the validation context
31
+ * @msg: the message
32
+ * @...: extra arguments
33
+ *
34
+ * Signature of an error callback from a Relax-NG validation
35
+ */
36
+ typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
37
+ const char *msg,
38
+ ...) LIBXML_ATTR_FORMAT(2,3);
39
+
40
+ /**
41
+ * xmlRelaxNGValidityWarningFunc:
42
+ * @ctx: the validation context
43
+ * @msg: the message
44
+ * @...: extra arguments
45
+ *
46
+ * Signature of a warning callback from a Relax-NG validation
47
+ */
48
+ typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
49
+ const char *msg,
50
+ ...) LIBXML_ATTR_FORMAT(2,3);
51
+
52
+ /**
53
+ * A schemas validation context
54
+ */
55
+ typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
56
+ typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
57
+
58
+ typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
59
+ typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
60
+
61
+ /*
62
+ * xmlRelaxNGValidErr:
63
+ *
64
+ * List of possible Relax NG validation errors
65
+ */
66
+ typedef enum {
67
+ XML_RELAXNG_OK = 0,
68
+ XML_RELAXNG_ERR_MEMORY,
69
+ XML_RELAXNG_ERR_TYPE,
70
+ XML_RELAXNG_ERR_TYPEVAL,
71
+ XML_RELAXNG_ERR_DUPID,
72
+ XML_RELAXNG_ERR_TYPECMP,
73
+ XML_RELAXNG_ERR_NOSTATE,
74
+ XML_RELAXNG_ERR_NODEFINE,
75
+ XML_RELAXNG_ERR_LISTEXTRA,
76
+ XML_RELAXNG_ERR_LISTEMPTY,
77
+ XML_RELAXNG_ERR_INTERNODATA,
78
+ XML_RELAXNG_ERR_INTERSEQ,
79
+ XML_RELAXNG_ERR_INTEREXTRA,
80
+ XML_RELAXNG_ERR_ELEMNAME,
81
+ XML_RELAXNG_ERR_ATTRNAME,
82
+ XML_RELAXNG_ERR_ELEMNONS,
83
+ XML_RELAXNG_ERR_ATTRNONS,
84
+ XML_RELAXNG_ERR_ELEMWRONGNS,
85
+ XML_RELAXNG_ERR_ATTRWRONGNS,
86
+ XML_RELAXNG_ERR_ELEMEXTRANS,
87
+ XML_RELAXNG_ERR_ATTREXTRANS,
88
+ XML_RELAXNG_ERR_ELEMNOTEMPTY,
89
+ XML_RELAXNG_ERR_NOELEM,
90
+ XML_RELAXNG_ERR_NOTELEM,
91
+ XML_RELAXNG_ERR_ATTRVALID,
92
+ XML_RELAXNG_ERR_CONTENTVALID,
93
+ XML_RELAXNG_ERR_EXTRACONTENT,
94
+ XML_RELAXNG_ERR_INVALIDATTR,
95
+ XML_RELAXNG_ERR_DATAELEM,
96
+ XML_RELAXNG_ERR_VALELEM,
97
+ XML_RELAXNG_ERR_LISTELEM,
98
+ XML_RELAXNG_ERR_DATATYPE,
99
+ XML_RELAXNG_ERR_VALUE,
100
+ XML_RELAXNG_ERR_LIST,
101
+ XML_RELAXNG_ERR_NOGRAMMAR,
102
+ XML_RELAXNG_ERR_EXTRADATA,
103
+ XML_RELAXNG_ERR_LACKDATA,
104
+ XML_RELAXNG_ERR_INTERNAL,
105
+ XML_RELAXNG_ERR_ELEMWRONG,
106
+ XML_RELAXNG_ERR_TEXTWRONG
107
+ } xmlRelaxNGValidErr;
108
+
109
+ /*
110
+ * xmlRelaxNGParserFlags:
111
+ *
112
+ * List of possible Relax NG Parser flags
113
+ */
114
+ typedef enum {
115
+ XML_RELAXNGP_NONE = 0,
116
+ XML_RELAXNGP_FREE_DOC = 1,
117
+ XML_RELAXNGP_CRNG = 2
118
+ } xmlRelaxNGParserFlag;
119
+
120
+ XMLPUBFUN int
121
+ xmlRelaxNGInitTypes (void);
122
+ XML_DEPRECATED
123
+ XMLPUBFUN void
124
+ xmlRelaxNGCleanupTypes (void);
125
+
126
+ /*
127
+ * Interfaces for parsing.
128
+ */
129
+ XMLPUBFUN xmlRelaxNGParserCtxtPtr
130
+ xmlRelaxNGNewParserCtxt (const char *URL);
131
+ XMLPUBFUN xmlRelaxNGParserCtxtPtr
132
+ xmlRelaxNGNewMemParserCtxt (const char *buffer,
133
+ int size);
134
+ XMLPUBFUN xmlRelaxNGParserCtxtPtr
135
+ xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
136
+
137
+ XMLPUBFUN int
138
+ xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
139
+ int flag);
140
+
141
+ XMLPUBFUN void
142
+ xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
143
+ XMLPUBFUN void
144
+ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
145
+ xmlRelaxNGValidityErrorFunc err,
146
+ xmlRelaxNGValidityWarningFunc warn,
147
+ void *ctx);
148
+ XMLPUBFUN int
149
+ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
150
+ xmlRelaxNGValidityErrorFunc *err,
151
+ xmlRelaxNGValidityWarningFunc *warn,
152
+ void **ctx);
153
+ XMLPUBFUN void
154
+ xmlRelaxNGSetParserStructuredErrors(
155
+ xmlRelaxNGParserCtxtPtr ctxt,
156
+ xmlStructuredErrorFunc serror,
157
+ void *ctx);
158
+ XMLPUBFUN xmlRelaxNGPtr
159
+ xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
160
+ XMLPUBFUN void
161
+ xmlRelaxNGFree (xmlRelaxNGPtr schema);
162
+ #ifdef LIBXML_OUTPUT_ENABLED
163
+ XMLPUBFUN void
164
+ xmlRelaxNGDump (FILE *output,
165
+ xmlRelaxNGPtr schema);
166
+ XMLPUBFUN void
167
+ xmlRelaxNGDumpTree (FILE * output,
168
+ xmlRelaxNGPtr schema);
169
+ #endif /* LIBXML_OUTPUT_ENABLED */
170
+ /*
171
+ * Interfaces for validating
172
+ */
173
+ XMLPUBFUN void
174
+ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
175
+ xmlRelaxNGValidityErrorFunc err,
176
+ xmlRelaxNGValidityWarningFunc warn,
177
+ void *ctx);
178
+ XMLPUBFUN int
179
+ xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
180
+ xmlRelaxNGValidityErrorFunc *err,
181
+ xmlRelaxNGValidityWarningFunc *warn,
182
+ void **ctx);
183
+ XMLPUBFUN void
184
+ xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
185
+ xmlStructuredErrorFunc serror, void *ctx);
186
+ XMLPUBFUN xmlRelaxNGValidCtxtPtr
187
+ xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
188
+ XMLPUBFUN void
189
+ xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
190
+ XMLPUBFUN int
191
+ xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
192
+ xmlDocPtr doc);
193
+ /*
194
+ * Interfaces for progressive validation when possible
195
+ */
196
+ XMLPUBFUN int
197
+ xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
198
+ xmlDocPtr doc,
199
+ xmlNodePtr elem);
200
+ XMLPUBFUN int
201
+ xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
202
+ const xmlChar *data,
203
+ int len);
204
+ XMLPUBFUN int
205
+ xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
206
+ xmlDocPtr doc,
207
+ xmlNodePtr elem);
208
+ XMLPUBFUN int
209
+ xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
210
+ xmlDocPtr doc,
211
+ xmlNodePtr elem);
212
+
213
+ #ifdef __cplusplus
214
+ }
215
+ #endif
216
+
217
+ #endif /* LIBXML_SCHEMAS_ENABLED */
218
+
219
+ #endif /* __XML_RELAX_NG__ */
omnilmm/lib/python3.10/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__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/threads.h ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 int
65
+ xmlGetThreadId (void);
66
+ XML_DEPRECATED
67
+ XMLPUBFUN int
68
+ xmlIsMainThread (void);
69
+ XML_DEPRECATED
70
+ XMLPUBFUN void
71
+ xmlCleanupThreads(void);
72
+
73
+ /** DOC_DISABLE */
74
+ #if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
75
+ defined(LIBXML_STATIC_FOR_DLL)
76
+ int
77
+ xmlDllMain(void *hinstDLL, unsigned long fdwReason,
78
+ void *lpvReserved);
79
+ #endif
80
+ /** DOC_ENABLE */
81
+
82
+ #ifdef __cplusplus
83
+ }
84
+ #endif
85
+
86
+
87
+ #endif /* __XML_THREADS_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/tree.h ADDED
@@ -0,0 +1,1362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Some of the basic types pointer to structures:
37
+ */
38
+ /* xmlIO.h */
39
+ typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
40
+ typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
41
+
42
+ typedef struct _xmlOutputBuffer xmlOutputBuffer;
43
+ typedef xmlOutputBuffer *xmlOutputBufferPtr;
44
+
45
+ /* parser.h */
46
+ typedef struct _xmlParserInput xmlParserInput;
47
+ typedef xmlParserInput *xmlParserInputPtr;
48
+
49
+ typedef struct _xmlParserCtxt xmlParserCtxt;
50
+ typedef xmlParserCtxt *xmlParserCtxtPtr;
51
+
52
+ typedef struct _xmlSAXLocator xmlSAXLocator;
53
+ typedef xmlSAXLocator *xmlSAXLocatorPtr;
54
+
55
+ typedef struct _xmlSAXHandler xmlSAXHandler;
56
+ typedef xmlSAXHandler *xmlSAXHandlerPtr;
57
+
58
+ /* entities.h */
59
+ typedef struct _xmlEntity xmlEntity;
60
+ typedef xmlEntity *xmlEntityPtr;
61
+
62
+ /**
63
+ * BASE_BUFFER_SIZE:
64
+ *
65
+ * default buffer size 4000.
66
+ */
67
+ #define BASE_BUFFER_SIZE 4096
68
+
69
+ /**
70
+ * LIBXML_NAMESPACE_DICT:
71
+ *
72
+ * Defines experimental behaviour:
73
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
74
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
75
+ */
76
+ /* #define LIBXML_NAMESPACE_DICT */
77
+
78
+ /**
79
+ * xmlBufferAllocationScheme:
80
+ *
81
+ * A buffer allocation scheme can be defined to either match exactly the
82
+ * need or double it's allocated size each time it is found too small.
83
+ */
84
+
85
+ typedef enum {
86
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
87
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
88
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
89
+ XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
90
+ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
91
+ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
92
+ } xmlBufferAllocationScheme;
93
+
94
+ /**
95
+ * xmlBuffer:
96
+ *
97
+ * A buffer structure, this old construct is limited to 2GB and
98
+ * is being deprecated, use API with xmlBuf instead
99
+ */
100
+ typedef struct _xmlBuffer xmlBuffer;
101
+ typedef xmlBuffer *xmlBufferPtr;
102
+ struct _xmlBuffer {
103
+ xmlChar *content; /* The buffer content UTF8 */
104
+ unsigned int use; /* The buffer size used */
105
+ unsigned int size; /* The buffer size */
106
+ xmlBufferAllocationScheme alloc; /* The realloc method */
107
+ xmlChar *contentIO; /* in IO mode we may have a different base */
108
+ };
109
+
110
+ /**
111
+ * xmlBuf:
112
+ *
113
+ * A buffer structure, new one, the actual structure internals are not public
114
+ */
115
+
116
+ typedef struct _xmlBuf xmlBuf;
117
+
118
+ /**
119
+ * xmlBufPtr:
120
+ *
121
+ * A pointer to a buffer structure, the actual structure internals are not
122
+ * public
123
+ */
124
+
125
+ typedef xmlBuf *xmlBufPtr;
126
+
127
+ /*
128
+ * A few public routines for xmlBuf. As those are expected to be used
129
+ * mostly internally the bulk of the routines are internal in buf.h
130
+ */
131
+ XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
132
+ XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
133
+ XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
134
+ XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
135
+
136
+ /*
137
+ * LIBXML2_NEW_BUFFER:
138
+ *
139
+ * Macro used to express that the API use the new buffers for
140
+ * xmlParserInputBuffer and xmlOutputBuffer. The change was
141
+ * introduced in 2.9.0.
142
+ */
143
+ #define LIBXML2_NEW_BUFFER
144
+
145
+ /**
146
+ * XML_XML_NAMESPACE:
147
+ *
148
+ * This is the namespace for the special xml: prefix predefined in the
149
+ * XML Namespace specification.
150
+ */
151
+ #define XML_XML_NAMESPACE \
152
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
153
+
154
+ /**
155
+ * XML_XML_ID:
156
+ *
157
+ * This is the name for the special xml:id attribute
158
+ */
159
+ #define XML_XML_ID (const xmlChar *) "xml:id"
160
+
161
+ /*
162
+ * The different element types carried by an XML tree.
163
+ *
164
+ * NOTE: This is synchronized with DOM Level1 values
165
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
166
+ *
167
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
168
+ * be deprecated to use an XML_DTD_NODE.
169
+ */
170
+ typedef enum {
171
+ XML_ELEMENT_NODE= 1,
172
+ XML_ATTRIBUTE_NODE= 2,
173
+ XML_TEXT_NODE= 3,
174
+ XML_CDATA_SECTION_NODE= 4,
175
+ XML_ENTITY_REF_NODE= 5,
176
+ XML_ENTITY_NODE= 6,
177
+ XML_PI_NODE= 7,
178
+ XML_COMMENT_NODE= 8,
179
+ XML_DOCUMENT_NODE= 9,
180
+ XML_DOCUMENT_TYPE_NODE= 10,
181
+ XML_DOCUMENT_FRAG_NODE= 11,
182
+ XML_NOTATION_NODE= 12,
183
+ XML_HTML_DOCUMENT_NODE= 13,
184
+ XML_DTD_NODE= 14,
185
+ XML_ELEMENT_DECL= 15,
186
+ XML_ATTRIBUTE_DECL= 16,
187
+ XML_ENTITY_DECL= 17,
188
+ XML_NAMESPACE_DECL= 18,
189
+ XML_XINCLUDE_START= 19,
190
+ XML_XINCLUDE_END= 20
191
+ /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
192
+ } xmlElementType;
193
+
194
+ /** DOC_DISABLE */
195
+ /* For backward compatibility */
196
+ #define XML_DOCB_DOCUMENT_NODE 21
197
+ /** DOC_ENABLE */
198
+
199
+ /**
200
+ * xmlNotation:
201
+ *
202
+ * A DTD Notation definition.
203
+ */
204
+
205
+ typedef struct _xmlNotation xmlNotation;
206
+ typedef xmlNotation *xmlNotationPtr;
207
+ struct _xmlNotation {
208
+ const xmlChar *name; /* Notation name */
209
+ const xmlChar *PublicID; /* Public identifier, if any */
210
+ const xmlChar *SystemID; /* System identifier, if any */
211
+ };
212
+
213
+ /**
214
+ * xmlAttributeType:
215
+ *
216
+ * A DTD Attribute type definition.
217
+ */
218
+
219
+ typedef enum {
220
+ XML_ATTRIBUTE_CDATA = 1,
221
+ XML_ATTRIBUTE_ID,
222
+ XML_ATTRIBUTE_IDREF ,
223
+ XML_ATTRIBUTE_IDREFS,
224
+ XML_ATTRIBUTE_ENTITY,
225
+ XML_ATTRIBUTE_ENTITIES,
226
+ XML_ATTRIBUTE_NMTOKEN,
227
+ XML_ATTRIBUTE_NMTOKENS,
228
+ XML_ATTRIBUTE_ENUMERATION,
229
+ XML_ATTRIBUTE_NOTATION
230
+ } xmlAttributeType;
231
+
232
+ /**
233
+ * xmlAttributeDefault:
234
+ *
235
+ * A DTD Attribute default definition.
236
+ */
237
+
238
+ typedef enum {
239
+ XML_ATTRIBUTE_NONE = 1,
240
+ XML_ATTRIBUTE_REQUIRED,
241
+ XML_ATTRIBUTE_IMPLIED,
242
+ XML_ATTRIBUTE_FIXED
243
+ } xmlAttributeDefault;
244
+
245
+ /**
246
+ * xmlEnumeration:
247
+ *
248
+ * List structure used when there is an enumeration in DTDs.
249
+ */
250
+
251
+ typedef struct _xmlEnumeration xmlEnumeration;
252
+ typedef xmlEnumeration *xmlEnumerationPtr;
253
+ struct _xmlEnumeration {
254
+ struct _xmlEnumeration *next; /* next one */
255
+ const xmlChar *name; /* Enumeration name */
256
+ };
257
+
258
+ /**
259
+ * xmlAttribute:
260
+ *
261
+ * An Attribute declaration in a DTD.
262
+ */
263
+
264
+ typedef struct _xmlAttribute xmlAttribute;
265
+ typedef xmlAttribute *xmlAttributePtr;
266
+ struct _xmlAttribute {
267
+ void *_private; /* application data */
268
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
269
+ const xmlChar *name; /* Attribute name */
270
+ struct _xmlNode *children; /* NULL */
271
+ struct _xmlNode *last; /* NULL */
272
+ struct _xmlDtd *parent; /* -> DTD */
273
+ struct _xmlNode *next; /* next sibling link */
274
+ struct _xmlNode *prev; /* previous sibling link */
275
+ struct _xmlDoc *doc; /* the containing document */
276
+
277
+ struct _xmlAttribute *nexth; /* next in hash table */
278
+ xmlAttributeType atype; /* The attribute type */
279
+ xmlAttributeDefault def; /* the default */
280
+ const xmlChar *defaultValue; /* or the default value */
281
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
282
+ const xmlChar *prefix; /* the namespace prefix if any */
283
+ const xmlChar *elem; /* Element holding the attribute */
284
+ };
285
+
286
+ /**
287
+ * xmlElementContentType:
288
+ *
289
+ * Possible definitions of element content types.
290
+ */
291
+ typedef enum {
292
+ XML_ELEMENT_CONTENT_PCDATA = 1,
293
+ XML_ELEMENT_CONTENT_ELEMENT,
294
+ XML_ELEMENT_CONTENT_SEQ,
295
+ XML_ELEMENT_CONTENT_OR
296
+ } xmlElementContentType;
297
+
298
+ /**
299
+ * xmlElementContentOccur:
300
+ *
301
+ * Possible definitions of element content occurrences.
302
+ */
303
+ typedef enum {
304
+ XML_ELEMENT_CONTENT_ONCE = 1,
305
+ XML_ELEMENT_CONTENT_OPT,
306
+ XML_ELEMENT_CONTENT_MULT,
307
+ XML_ELEMENT_CONTENT_PLUS
308
+ } xmlElementContentOccur;
309
+
310
+ /**
311
+ * xmlElementContent:
312
+ *
313
+ * An XML Element content as stored after parsing an element definition
314
+ * in a DTD.
315
+ */
316
+
317
+ typedef struct _xmlElementContent xmlElementContent;
318
+ typedef xmlElementContent *xmlElementContentPtr;
319
+ struct _xmlElementContent {
320
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
321
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
322
+ const xmlChar *name; /* Element name */
323
+ struct _xmlElementContent *c1; /* first child */
324
+ struct _xmlElementContent *c2; /* second child */
325
+ struct _xmlElementContent *parent; /* parent */
326
+ const xmlChar *prefix; /* Namespace prefix */
327
+ };
328
+
329
+ /**
330
+ * xmlElementTypeVal:
331
+ *
332
+ * The different possibilities for an element content type.
333
+ */
334
+
335
+ typedef enum {
336
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
337
+ XML_ELEMENT_TYPE_EMPTY = 1,
338
+ XML_ELEMENT_TYPE_ANY,
339
+ XML_ELEMENT_TYPE_MIXED,
340
+ XML_ELEMENT_TYPE_ELEMENT
341
+ } xmlElementTypeVal;
342
+
343
+ /**
344
+ * xmlElement:
345
+ *
346
+ * An XML Element declaration from a DTD.
347
+ */
348
+
349
+ typedef struct _xmlElement xmlElement;
350
+ typedef xmlElement *xmlElementPtr;
351
+ struct _xmlElement {
352
+ void *_private; /* application data */
353
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
354
+ const xmlChar *name; /* Element name */
355
+ struct _xmlNode *children; /* NULL */
356
+ struct _xmlNode *last; /* NULL */
357
+ struct _xmlDtd *parent; /* -> DTD */
358
+ struct _xmlNode *next; /* next sibling link */
359
+ struct _xmlNode *prev; /* previous sibling link */
360
+ struct _xmlDoc *doc; /* the containing document */
361
+
362
+ xmlElementTypeVal etype; /* The type */
363
+ xmlElementContentPtr content; /* the allowed element content */
364
+ xmlAttributePtr attributes; /* List of the declared attributes */
365
+ const xmlChar *prefix; /* the namespace prefix if any */
366
+ #ifdef LIBXML_REGEXP_ENABLED
367
+ xmlRegexpPtr contModel; /* the validating regexp */
368
+ #else
369
+ void *contModel;
370
+ #endif
371
+ };
372
+
373
+
374
+ /**
375
+ * XML_LOCAL_NAMESPACE:
376
+ *
377
+ * A namespace declaration node.
378
+ */
379
+ #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
380
+ typedef xmlElementType xmlNsType;
381
+
382
+ /**
383
+ * xmlNs:
384
+ *
385
+ * An XML namespace.
386
+ * Note that prefix == NULL is valid, it defines the default namespace
387
+ * within the subtree (until overridden).
388
+ *
389
+ * xmlNsType is unified with xmlElementType.
390
+ */
391
+
392
+ typedef struct _xmlNs xmlNs;
393
+ typedef xmlNs *xmlNsPtr;
394
+ struct _xmlNs {
395
+ struct _xmlNs *next; /* next Ns link for this node */
396
+ xmlNsType type; /* global or local */
397
+ const xmlChar *href; /* URL for the namespace */
398
+ const xmlChar *prefix; /* prefix for the namespace */
399
+ void *_private; /* application data */
400
+ struct _xmlDoc *context; /* normally an xmlDoc */
401
+ };
402
+
403
+ /**
404
+ * xmlDtd:
405
+ *
406
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
407
+ * the internal subset and for the external subset.
408
+ */
409
+ typedef struct _xmlDtd xmlDtd;
410
+ typedef xmlDtd *xmlDtdPtr;
411
+ struct _xmlDtd {
412
+ void *_private; /* application data */
413
+ xmlElementType type; /* XML_DTD_NODE, must be second ! */
414
+ const xmlChar *name; /* Name of the DTD */
415
+ struct _xmlNode *children; /* the value of the property link */
416
+ struct _xmlNode *last; /* last child link */
417
+ struct _xmlDoc *parent; /* child->parent link */
418
+ struct _xmlNode *next; /* next sibling link */
419
+ struct _xmlNode *prev; /* previous sibling link */
420
+ struct _xmlDoc *doc; /* the containing document */
421
+
422
+ /* End of common part */
423
+ void *notations; /* Hash table for notations if any */
424
+ void *elements; /* Hash table for elements if any */
425
+ void *attributes; /* Hash table for attributes if any */
426
+ void *entities; /* Hash table for entities if any */
427
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
428
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
429
+ void *pentities; /* Hash table for param entities if any */
430
+ };
431
+
432
+ /**
433
+ * xmlAttr:
434
+ *
435
+ * An attribute on an XML node.
436
+ */
437
+ typedef struct _xmlAttr xmlAttr;
438
+ typedef xmlAttr *xmlAttrPtr;
439
+ struct _xmlAttr {
440
+ void *_private; /* application data */
441
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
442
+ const xmlChar *name; /* the name of the property */
443
+ struct _xmlNode *children; /* the value of the property */
444
+ struct _xmlNode *last; /* NULL */
445
+ struct _xmlNode *parent; /* child->parent link */
446
+ struct _xmlAttr *next; /* next sibling link */
447
+ struct _xmlAttr *prev; /* previous sibling link */
448
+ struct _xmlDoc *doc; /* the containing document */
449
+ xmlNs *ns; /* pointer to the associated namespace */
450
+ xmlAttributeType atype; /* the attribute type if validating */
451
+ void *psvi; /* for type/PSVI information */
452
+ };
453
+
454
+ /**
455
+ * xmlID:
456
+ *
457
+ * An XML ID instance.
458
+ */
459
+
460
+ typedef struct _xmlID xmlID;
461
+ typedef xmlID *xmlIDPtr;
462
+ struct _xmlID {
463
+ struct _xmlID *next; /* next ID */
464
+ const xmlChar *value; /* The ID name */
465
+ xmlAttrPtr attr; /* The attribute holding it */
466
+ const xmlChar *name; /* The attribute if attr is not available */
467
+ int lineno; /* The line number if attr is not available */
468
+ struct _xmlDoc *doc; /* The document holding the ID */
469
+ };
470
+
471
+ /**
472
+ * xmlRef:
473
+ *
474
+ * An XML IDREF instance.
475
+ */
476
+
477
+ typedef struct _xmlRef xmlRef;
478
+ typedef xmlRef *xmlRefPtr;
479
+ struct _xmlRef {
480
+ struct _xmlRef *next; /* next Ref */
481
+ const xmlChar *value; /* The Ref name */
482
+ xmlAttrPtr attr; /* The attribute holding it */
483
+ const xmlChar *name; /* The attribute if attr is not available */
484
+ int lineno; /* The line number if attr is not available */
485
+ };
486
+
487
+ /**
488
+ * xmlNode:
489
+ *
490
+ * A node in an XML tree.
491
+ */
492
+ typedef struct _xmlNode xmlNode;
493
+ typedef xmlNode *xmlNodePtr;
494
+ struct _xmlNode {
495
+ void *_private; /* application data */
496
+ xmlElementType type; /* type number, must be second ! */
497
+ const xmlChar *name; /* the name of the node, or the entity */
498
+ struct _xmlNode *children; /* parent->childs link */
499
+ struct _xmlNode *last; /* last child link */
500
+ struct _xmlNode *parent; /* child->parent link */
501
+ struct _xmlNode *next; /* next sibling link */
502
+ struct _xmlNode *prev; /* previous sibling link */
503
+ struct _xmlDoc *doc; /* the containing document */
504
+
505
+ /* End of common part */
506
+ xmlNs *ns; /* pointer to the associated namespace */
507
+ xmlChar *content; /* the content */
508
+ struct _xmlAttr *properties;/* properties list */
509
+ xmlNs *nsDef; /* namespace definitions on this node */
510
+ void *psvi; /* for type/PSVI information */
511
+ unsigned short line; /* line number */
512
+ unsigned short extra; /* extra data for XPath/XSLT */
513
+ };
514
+
515
+ /**
516
+ * XML_GET_CONTENT:
517
+ *
518
+ * Macro to extract the content pointer of a node.
519
+ */
520
+ #define XML_GET_CONTENT(n) \
521
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
522
+
523
+ /**
524
+ * XML_GET_LINE:
525
+ *
526
+ * Macro to extract the line number of an element node.
527
+ */
528
+ #define XML_GET_LINE(n) \
529
+ (xmlGetLineNo(n))
530
+
531
+ /**
532
+ * xmlDocProperty
533
+ *
534
+ * Set of properties of the document as found by the parser
535
+ * Some of them are linked to similarly named xmlParserOption
536
+ */
537
+ typedef enum {
538
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
539
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
540
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
541
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
542
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
543
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
544
+ and not by parsing an instance */
545
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
546
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
547
+ } xmlDocProperties;
548
+
549
+ /**
550
+ * xmlDoc:
551
+ *
552
+ * An XML document.
553
+ */
554
+ typedef struct _xmlDoc xmlDoc;
555
+ typedef xmlDoc *xmlDocPtr;
556
+ struct _xmlDoc {
557
+ void *_private; /* application data */
558
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
559
+ char *name; /* name/filename/URI of the document */
560
+ struct _xmlNode *children; /* the document tree */
561
+ struct _xmlNode *last; /* last child link */
562
+ struct _xmlNode *parent; /* child->parent link */
563
+ struct _xmlNode *next; /* next sibling link */
564
+ struct _xmlNode *prev; /* previous sibling link */
565
+ struct _xmlDoc *doc; /* autoreference to itself */
566
+
567
+ /* End of common part */
568
+ int compression;/* level of zlib compression */
569
+ int standalone; /* standalone document (no external refs)
570
+ 1 if standalone="yes"
571
+ 0 if standalone="no"
572
+ -1 if there is no XML declaration
573
+ -2 if there is an XML declaration, but no
574
+ standalone attribute was specified */
575
+ struct _xmlDtd *intSubset; /* the document internal subset */
576
+ struct _xmlDtd *extSubset; /* the document external subset */
577
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
578
+ const xmlChar *version; /* the XML version string */
579
+ const xmlChar *encoding; /* actual encoding, if any */
580
+ void *ids; /* Hash table for ID attributes if any */
581
+ void *refs; /* Hash table for IDREFs attributes if any */
582
+ const xmlChar *URL; /* The URI for that document */
583
+ int charset; /* unused */
584
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
585
+ void *psvi; /* for type/PSVI information */
586
+ int parseFlags; /* set of xmlParserOption used to parse the
587
+ document */
588
+ int properties; /* set of xmlDocProperties for this document
589
+ set at the end of parsing */
590
+ };
591
+
592
+
593
+ typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
594
+ typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
595
+
596
+ /**
597
+ * xmlDOMWrapAcquireNsFunction:
598
+ * @ctxt: a DOM wrapper context
599
+ * @node: the context node (element or attribute)
600
+ * @nsName: the requested namespace name
601
+ * @nsPrefix: the requested namespace prefix
602
+ *
603
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
604
+ *
605
+ * Returns an xmlNsPtr or NULL in case of an error.
606
+ */
607
+ typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
608
+ xmlNodePtr node,
609
+ const xmlChar *nsName,
610
+ const xmlChar *nsPrefix);
611
+
612
+ /**
613
+ * xmlDOMWrapCtxt:
614
+ *
615
+ * Context for DOM wrapper-operations.
616
+ */
617
+ struct _xmlDOMWrapCtxt {
618
+ void * _private;
619
+ /*
620
+ * The type of this context, just in case we need specialized
621
+ * contexts in the future.
622
+ */
623
+ int type;
624
+ /*
625
+ * Internal namespace map used for various operations.
626
+ */
627
+ void * namespaceMap;
628
+ /*
629
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
630
+ * (Note that this is not intended for elem->nsDef).
631
+ */
632
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
633
+ };
634
+
635
+ /**
636
+ * xmlRegisterNodeFunc:
637
+ * @node: the current node
638
+ *
639
+ * Signature for the registration callback of a created node
640
+ */
641
+ typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
642
+
643
+ /**
644
+ * xmlDeregisterNodeFunc:
645
+ * @node: the current node
646
+ *
647
+ * Signature for the deregistration callback of a discarded node
648
+ */
649
+ typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
650
+
651
+ /**
652
+ * xmlChildrenNode:
653
+ *
654
+ * Macro for compatibility naming layer with libxml1. Maps
655
+ * to "children."
656
+ */
657
+ #ifndef xmlChildrenNode
658
+ #define xmlChildrenNode children
659
+ #endif
660
+
661
+ /**
662
+ * xmlRootNode:
663
+ *
664
+ * Macro for compatibility naming layer with libxml1. Maps
665
+ * to "children".
666
+ */
667
+ #ifndef xmlRootNode
668
+ #define xmlRootNode children
669
+ #endif
670
+
671
+ /*
672
+ * Variables.
673
+ */
674
+
675
+ /** DOC_DISABLE */
676
+ #define XML_GLOBALS_TREE \
677
+ XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
678
+ XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
679
+ XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
680
+ XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
681
+ XML_DEPRECATED)
682
+
683
+ #define XML_OP XML_DECLARE_GLOBAL
684
+ XML_GLOBALS_TREE
685
+ #undef XML_OP
686
+
687
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
688
+ #define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
689
+ #define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
690
+ #define xmlRegisterNodeDefaultValue \
691
+ XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
692
+ #define xmlDeregisterNodeDefaultValue \
693
+ XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
694
+ #endif
695
+ /** DOC_ENABLE */
696
+
697
+ /*
698
+ * Some helper functions
699
+ */
700
+ XMLPUBFUN int
701
+ xmlValidateNCName (const xmlChar *value,
702
+ int space);
703
+
704
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
705
+ XMLPUBFUN int
706
+ xmlValidateQName (const xmlChar *value,
707
+ int space);
708
+ XMLPUBFUN int
709
+ xmlValidateName (const xmlChar *value,
710
+ int space);
711
+ XMLPUBFUN int
712
+ xmlValidateNMToken (const xmlChar *value,
713
+ int space);
714
+ #endif
715
+
716
+ XMLPUBFUN xmlChar *
717
+ xmlBuildQName (const xmlChar *ncname,
718
+ const xmlChar *prefix,
719
+ xmlChar *memory,
720
+ int len);
721
+ XMLPUBFUN xmlChar *
722
+ xmlSplitQName2 (const xmlChar *name,
723
+ xmlChar **prefix);
724
+ XMLPUBFUN const xmlChar *
725
+ xmlSplitQName3 (const xmlChar *name,
726
+ int *len);
727
+
728
+ /*
729
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
730
+ */
731
+
732
+ XMLPUBFUN void
733
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
734
+ XMLPUBFUN xmlBufferAllocationScheme
735
+ xmlGetBufferAllocationScheme(void);
736
+
737
+ XMLPUBFUN xmlBufferPtr
738
+ xmlBufferCreate (void);
739
+ XMLPUBFUN xmlBufferPtr
740
+ xmlBufferCreateSize (size_t size);
741
+ XMLPUBFUN xmlBufferPtr
742
+ xmlBufferCreateStatic (void *mem,
743
+ size_t size);
744
+ XMLPUBFUN int
745
+ xmlBufferResize (xmlBufferPtr buf,
746
+ unsigned int size);
747
+ XMLPUBFUN void
748
+ xmlBufferFree (xmlBufferPtr buf);
749
+ XMLPUBFUN int
750
+ xmlBufferDump (FILE *file,
751
+ xmlBufferPtr buf);
752
+ XMLPUBFUN int
753
+ xmlBufferAdd (xmlBufferPtr buf,
754
+ const xmlChar *str,
755
+ int len);
756
+ XMLPUBFUN int
757
+ xmlBufferAddHead (xmlBufferPtr buf,
758
+ const xmlChar *str,
759
+ int len);
760
+ XMLPUBFUN int
761
+ xmlBufferCat (xmlBufferPtr buf,
762
+ const xmlChar *str);
763
+ XMLPUBFUN int
764
+ xmlBufferCCat (xmlBufferPtr buf,
765
+ const char *str);
766
+ XMLPUBFUN int
767
+ xmlBufferShrink (xmlBufferPtr buf,
768
+ unsigned int len);
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
+ #ifdef LIBXML_LEGACY_ENABLED
802
+ XML_DEPRECATED
803
+ XMLPUBFUN xmlNsPtr
804
+ xmlNewGlobalNs (xmlDocPtr doc,
805
+ const xmlChar *href,
806
+ const xmlChar *prefix);
807
+ #endif /* LIBXML_LEGACY_ENABLED */
808
+ XMLPUBFUN xmlNsPtr
809
+ xmlNewNs (xmlNodePtr node,
810
+ const xmlChar *href,
811
+ const xmlChar *prefix);
812
+ XMLPUBFUN void
813
+ xmlFreeNs (xmlNsPtr cur);
814
+ XMLPUBFUN void
815
+ xmlFreeNsList (xmlNsPtr cur);
816
+ XMLPUBFUN xmlDocPtr
817
+ xmlNewDoc (const xmlChar *version);
818
+ XMLPUBFUN void
819
+ xmlFreeDoc (xmlDocPtr cur);
820
+ XMLPUBFUN xmlAttrPtr
821
+ xmlNewDocProp (xmlDocPtr doc,
822
+ const xmlChar *name,
823
+ const xmlChar *value);
824
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
825
+ defined(LIBXML_SCHEMAS_ENABLED)
826
+ XMLPUBFUN xmlAttrPtr
827
+ xmlNewProp (xmlNodePtr node,
828
+ const xmlChar *name,
829
+ const xmlChar *value);
830
+ #endif
831
+ XMLPUBFUN xmlAttrPtr
832
+ xmlNewNsProp (xmlNodePtr node,
833
+ xmlNsPtr ns,
834
+ const xmlChar *name,
835
+ const xmlChar *value);
836
+ XMLPUBFUN xmlAttrPtr
837
+ xmlNewNsPropEatName (xmlNodePtr node,
838
+ xmlNsPtr ns,
839
+ xmlChar *name,
840
+ const xmlChar *value);
841
+ XMLPUBFUN void
842
+ xmlFreePropList (xmlAttrPtr cur);
843
+ XMLPUBFUN void
844
+ xmlFreeProp (xmlAttrPtr cur);
845
+ XMLPUBFUN xmlAttrPtr
846
+ xmlCopyProp (xmlNodePtr target,
847
+ xmlAttrPtr cur);
848
+ XMLPUBFUN xmlAttrPtr
849
+ xmlCopyPropList (xmlNodePtr target,
850
+ xmlAttrPtr cur);
851
+ #ifdef LIBXML_TREE_ENABLED
852
+ XMLPUBFUN xmlDtdPtr
853
+ xmlCopyDtd (xmlDtdPtr dtd);
854
+ #endif /* LIBXML_TREE_ENABLED */
855
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
856
+ XMLPUBFUN xmlDocPtr
857
+ xmlCopyDoc (xmlDocPtr doc,
858
+ int recursive);
859
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
860
+ /*
861
+ * Creating new nodes.
862
+ */
863
+ XMLPUBFUN xmlNodePtr
864
+ xmlNewDocNode (xmlDocPtr doc,
865
+ xmlNsPtr ns,
866
+ const xmlChar *name,
867
+ const xmlChar *content);
868
+ XMLPUBFUN xmlNodePtr
869
+ xmlNewDocNodeEatName (xmlDocPtr doc,
870
+ xmlNsPtr ns,
871
+ xmlChar *name,
872
+ const xmlChar *content);
873
+ XMLPUBFUN xmlNodePtr
874
+ xmlNewNode (xmlNsPtr ns,
875
+ const xmlChar *name);
876
+ XMLPUBFUN xmlNodePtr
877
+ xmlNewNodeEatName (xmlNsPtr ns,
878
+ xmlChar *name);
879
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
880
+ XMLPUBFUN xmlNodePtr
881
+ xmlNewChild (xmlNodePtr parent,
882
+ xmlNsPtr ns,
883
+ const xmlChar *name,
884
+ const xmlChar *content);
885
+ #endif
886
+ XMLPUBFUN xmlNodePtr
887
+ xmlNewDocText (const xmlDoc *doc,
888
+ const xmlChar *content);
889
+ XMLPUBFUN xmlNodePtr
890
+ xmlNewText (const xmlChar *content);
891
+ XMLPUBFUN xmlNodePtr
892
+ xmlNewDocPI (xmlDocPtr doc,
893
+ const xmlChar *name,
894
+ const xmlChar *content);
895
+ XMLPUBFUN xmlNodePtr
896
+ xmlNewPI (const xmlChar *name,
897
+ const xmlChar *content);
898
+ XMLPUBFUN xmlNodePtr
899
+ xmlNewDocTextLen (xmlDocPtr doc,
900
+ const xmlChar *content,
901
+ int len);
902
+ XMLPUBFUN xmlNodePtr
903
+ xmlNewTextLen (const xmlChar *content,
904
+ int len);
905
+ XMLPUBFUN xmlNodePtr
906
+ xmlNewDocComment (xmlDocPtr doc,
907
+ const xmlChar *content);
908
+ XMLPUBFUN xmlNodePtr
909
+ xmlNewComment (const xmlChar *content);
910
+ XMLPUBFUN xmlNodePtr
911
+ xmlNewCDataBlock (xmlDocPtr doc,
912
+ const xmlChar *content,
913
+ int len);
914
+ XMLPUBFUN xmlNodePtr
915
+ xmlNewCharRef (xmlDocPtr doc,
916
+ const xmlChar *name);
917
+ XMLPUBFUN xmlNodePtr
918
+ xmlNewReference (const xmlDoc *doc,
919
+ const xmlChar *name);
920
+ XMLPUBFUN xmlNodePtr
921
+ xmlCopyNode (xmlNodePtr node,
922
+ int recursive);
923
+ XMLPUBFUN xmlNodePtr
924
+ xmlDocCopyNode (xmlNodePtr node,
925
+ xmlDocPtr doc,
926
+ int recursive);
927
+ XMLPUBFUN xmlNodePtr
928
+ xmlDocCopyNodeList (xmlDocPtr doc,
929
+ xmlNodePtr node);
930
+ XMLPUBFUN xmlNodePtr
931
+ xmlCopyNodeList (xmlNodePtr node);
932
+ #ifdef LIBXML_TREE_ENABLED
933
+ XMLPUBFUN xmlNodePtr
934
+ xmlNewTextChild (xmlNodePtr parent,
935
+ xmlNsPtr ns,
936
+ const xmlChar *name,
937
+ const xmlChar *content);
938
+ XMLPUBFUN xmlNodePtr
939
+ xmlNewDocRawNode (xmlDocPtr doc,
940
+ xmlNsPtr ns,
941
+ const xmlChar *name,
942
+ const xmlChar *content);
943
+ XMLPUBFUN xmlNodePtr
944
+ xmlNewDocFragment (xmlDocPtr doc);
945
+ #endif /* LIBXML_TREE_ENABLED */
946
+
947
+ /*
948
+ * Navigating.
949
+ */
950
+ XMLPUBFUN long
951
+ xmlGetLineNo (const xmlNode *node);
952
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
953
+ XMLPUBFUN xmlChar *
954
+ xmlGetNodePath (const xmlNode *node);
955
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
956
+ XMLPUBFUN xmlNodePtr
957
+ xmlDocGetRootElement (const xmlDoc *doc);
958
+ XMLPUBFUN xmlNodePtr
959
+ xmlGetLastChild (const xmlNode *parent);
960
+ XMLPUBFUN int
961
+ xmlNodeIsText (const xmlNode *node);
962
+ XMLPUBFUN int
963
+ xmlIsBlankNode (const xmlNode *node);
964
+
965
+ /*
966
+ * Changing the structure.
967
+ */
968
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
969
+ XMLPUBFUN xmlNodePtr
970
+ xmlDocSetRootElement (xmlDocPtr doc,
971
+ xmlNodePtr root);
972
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
973
+ #ifdef LIBXML_TREE_ENABLED
974
+ XMLPUBFUN void
975
+ xmlNodeSetName (xmlNodePtr cur,
976
+ const xmlChar *name);
977
+ #endif /* LIBXML_TREE_ENABLED */
978
+ XMLPUBFUN xmlNodePtr
979
+ xmlAddChild (xmlNodePtr parent,
980
+ xmlNodePtr cur);
981
+ XMLPUBFUN xmlNodePtr
982
+ xmlAddChildList (xmlNodePtr parent,
983
+ xmlNodePtr cur);
984
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
985
+ XMLPUBFUN xmlNodePtr
986
+ xmlReplaceNode (xmlNodePtr old,
987
+ xmlNodePtr cur);
988
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
989
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
990
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
991
+ XMLPUBFUN xmlNodePtr
992
+ xmlAddPrevSibling (xmlNodePtr cur,
993
+ xmlNodePtr elem);
994
+ #endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
995
+ XMLPUBFUN xmlNodePtr
996
+ xmlAddSibling (xmlNodePtr cur,
997
+ xmlNodePtr elem);
998
+ XMLPUBFUN xmlNodePtr
999
+ xmlAddNextSibling (xmlNodePtr cur,
1000
+ xmlNodePtr elem);
1001
+ XMLPUBFUN void
1002
+ xmlUnlinkNode (xmlNodePtr cur);
1003
+ XMLPUBFUN xmlNodePtr
1004
+ xmlTextMerge (xmlNodePtr first,
1005
+ xmlNodePtr second);
1006
+ XMLPUBFUN int
1007
+ xmlTextConcat (xmlNodePtr node,
1008
+ const xmlChar *content,
1009
+ int len);
1010
+ XMLPUBFUN void
1011
+ xmlFreeNodeList (xmlNodePtr cur);
1012
+ XMLPUBFUN void
1013
+ xmlFreeNode (xmlNodePtr cur);
1014
+ XMLPUBFUN void
1015
+ xmlSetTreeDoc (xmlNodePtr tree,
1016
+ xmlDocPtr doc);
1017
+ XMLPUBFUN void
1018
+ xmlSetListDoc (xmlNodePtr list,
1019
+ xmlDocPtr doc);
1020
+ /*
1021
+ * Namespaces.
1022
+ */
1023
+ XMLPUBFUN xmlNsPtr
1024
+ xmlSearchNs (xmlDocPtr doc,
1025
+ xmlNodePtr node,
1026
+ const xmlChar *nameSpace);
1027
+ XMLPUBFUN xmlNsPtr
1028
+ xmlSearchNsByHref (xmlDocPtr doc,
1029
+ xmlNodePtr node,
1030
+ const xmlChar *href);
1031
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
1032
+ defined(LIBXML_SCHEMAS_ENABLED)
1033
+ XMLPUBFUN xmlNsPtr *
1034
+ xmlGetNsList (const xmlDoc *doc,
1035
+ const xmlNode *node);
1036
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
1037
+
1038
+ XMLPUBFUN void
1039
+ xmlSetNs (xmlNodePtr node,
1040
+ xmlNsPtr ns);
1041
+ XMLPUBFUN xmlNsPtr
1042
+ xmlCopyNamespace (xmlNsPtr cur);
1043
+ XMLPUBFUN xmlNsPtr
1044
+ xmlCopyNamespaceList (xmlNsPtr cur);
1045
+
1046
+ /*
1047
+ * Changing the content.
1048
+ */
1049
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
1050
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
1051
+ XMLPUBFUN xmlAttrPtr
1052
+ xmlSetProp (xmlNodePtr node,
1053
+ const xmlChar *name,
1054
+ const xmlChar *value);
1055
+ XMLPUBFUN xmlAttrPtr
1056
+ xmlSetNsProp (xmlNodePtr node,
1057
+ xmlNsPtr ns,
1058
+ const xmlChar *name,
1059
+ const xmlChar *value);
1060
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
1061
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
1062
+ XMLPUBFUN xmlChar *
1063
+ xmlGetNoNsProp (const xmlNode *node,
1064
+ const xmlChar *name);
1065
+ XMLPUBFUN xmlChar *
1066
+ xmlGetProp (const xmlNode *node,
1067
+ const xmlChar *name);
1068
+ XMLPUBFUN xmlAttrPtr
1069
+ xmlHasProp (const xmlNode *node,
1070
+ const xmlChar *name);
1071
+ XMLPUBFUN xmlAttrPtr
1072
+ xmlHasNsProp (const xmlNode *node,
1073
+ const xmlChar *name,
1074
+ const xmlChar *nameSpace);
1075
+ XMLPUBFUN xmlChar *
1076
+ xmlGetNsProp (const xmlNode *node,
1077
+ const xmlChar *name,
1078
+ const xmlChar *nameSpace);
1079
+ XMLPUBFUN xmlNodePtr
1080
+ xmlStringGetNodeList (const xmlDoc *doc,
1081
+ const xmlChar *value);
1082
+ XMLPUBFUN xmlNodePtr
1083
+ xmlStringLenGetNodeList (const xmlDoc *doc,
1084
+ const xmlChar *value,
1085
+ int len);
1086
+ XMLPUBFUN xmlChar *
1087
+ xmlNodeListGetString (xmlDocPtr doc,
1088
+ const xmlNode *list,
1089
+ int inLine);
1090
+ #ifdef LIBXML_TREE_ENABLED
1091
+ XMLPUBFUN xmlChar *
1092
+ xmlNodeListGetRawString (const xmlDoc *doc,
1093
+ const xmlNode *list,
1094
+ int inLine);
1095
+ #endif /* LIBXML_TREE_ENABLED */
1096
+ XMLPUBFUN void
1097
+ xmlNodeSetContent (xmlNodePtr cur,
1098
+ const xmlChar *content);
1099
+ #ifdef LIBXML_TREE_ENABLED
1100
+ XMLPUBFUN void
1101
+ xmlNodeSetContentLen (xmlNodePtr cur,
1102
+ const xmlChar *content,
1103
+ int len);
1104
+ #endif /* LIBXML_TREE_ENABLED */
1105
+ XMLPUBFUN void
1106
+ xmlNodeAddContent (xmlNodePtr cur,
1107
+ const xmlChar *content);
1108
+ XMLPUBFUN void
1109
+ xmlNodeAddContentLen (xmlNodePtr cur,
1110
+ const xmlChar *content,
1111
+ int len);
1112
+ XMLPUBFUN xmlChar *
1113
+ xmlNodeGetContent (const xmlNode *cur);
1114
+
1115
+ XMLPUBFUN int
1116
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
1117
+ const xmlNode *cur);
1118
+ XMLPUBFUN int
1119
+ xmlBufGetNodeContent (xmlBufPtr buf,
1120
+ const xmlNode *cur);
1121
+
1122
+ XMLPUBFUN xmlChar *
1123
+ xmlNodeGetLang (const xmlNode *cur);
1124
+ XMLPUBFUN int
1125
+ xmlNodeGetSpacePreserve (const xmlNode *cur);
1126
+ #ifdef LIBXML_TREE_ENABLED
1127
+ XMLPUBFUN void
1128
+ xmlNodeSetLang (xmlNodePtr cur,
1129
+ const xmlChar *lang);
1130
+ XMLPUBFUN void
1131
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
1132
+ int val);
1133
+ #endif /* LIBXML_TREE_ENABLED */
1134
+ XMLPUBFUN xmlChar *
1135
+ xmlNodeGetBase (const xmlDoc *doc,
1136
+ const xmlNode *cur);
1137
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
1138
+ XMLPUBFUN void
1139
+ xmlNodeSetBase (xmlNodePtr cur,
1140
+ const xmlChar *uri);
1141
+ #endif
1142
+
1143
+ /*
1144
+ * Removing content.
1145
+ */
1146
+ XMLPUBFUN int
1147
+ xmlRemoveProp (xmlAttrPtr cur);
1148
+ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
1149
+ XMLPUBFUN int
1150
+ xmlUnsetNsProp (xmlNodePtr node,
1151
+ xmlNsPtr ns,
1152
+ const xmlChar *name);
1153
+ XMLPUBFUN int
1154
+ xmlUnsetProp (xmlNodePtr node,
1155
+ const xmlChar *name);
1156
+ #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
1157
+
1158
+ /*
1159
+ * Internal, don't use.
1160
+ */
1161
+ XMLPUBFUN void
1162
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
1163
+ const xmlChar *string);
1164
+ XMLPUBFUN void
1165
+ xmlBufferWriteChar (xmlBufferPtr buf,
1166
+ const char *string);
1167
+ XMLPUBFUN void
1168
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
1169
+ const xmlChar *string);
1170
+
1171
+ #ifdef LIBXML_OUTPUT_ENABLED
1172
+ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
1173
+ xmlDocPtr doc,
1174
+ xmlAttrPtr attr,
1175
+ const xmlChar *string);
1176
+ #endif /* LIBXML_OUTPUT_ENABLED */
1177
+
1178
+ #ifdef LIBXML_TREE_ENABLED
1179
+ /*
1180
+ * Namespace handling.
1181
+ */
1182
+ XMLPUBFUN int
1183
+ xmlReconciliateNs (xmlDocPtr doc,
1184
+ xmlNodePtr tree);
1185
+ #endif
1186
+
1187
+ #ifdef LIBXML_OUTPUT_ENABLED
1188
+ /*
1189
+ * Saving.
1190
+ */
1191
+ XMLPUBFUN void
1192
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
1193
+ xmlChar **mem,
1194
+ int *size,
1195
+ int format);
1196
+ XMLPUBFUN void
1197
+ xmlDocDumpMemory (xmlDocPtr cur,
1198
+ xmlChar **mem,
1199
+ int *size);
1200
+ XMLPUBFUN void
1201
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
1202
+ xmlChar **doc_txt_ptr,
1203
+ int * doc_txt_len,
1204
+ const char *txt_encoding);
1205
+ XMLPUBFUN void
1206
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
1207
+ xmlChar **doc_txt_ptr,
1208
+ int * doc_txt_len,
1209
+ const char *txt_encoding,
1210
+ int format);
1211
+ XMLPUBFUN int
1212
+ xmlDocFormatDump (FILE *f,
1213
+ xmlDocPtr cur,
1214
+ int format);
1215
+ XMLPUBFUN int
1216
+ xmlDocDump (FILE *f,
1217
+ xmlDocPtr cur);
1218
+ XMLPUBFUN void
1219
+ xmlElemDump (FILE *f,
1220
+ xmlDocPtr doc,
1221
+ xmlNodePtr cur);
1222
+ XMLPUBFUN int
1223
+ xmlSaveFile (const char *filename,
1224
+ xmlDocPtr cur);
1225
+ XMLPUBFUN int
1226
+ xmlSaveFormatFile (const char *filename,
1227
+ xmlDocPtr cur,
1228
+ int format);
1229
+ XMLPUBFUN size_t
1230
+ xmlBufNodeDump (xmlBufPtr buf,
1231
+ xmlDocPtr doc,
1232
+ xmlNodePtr cur,
1233
+ int level,
1234
+ int format);
1235
+ XMLPUBFUN int
1236
+ xmlNodeDump (xmlBufferPtr buf,
1237
+ xmlDocPtr doc,
1238
+ xmlNodePtr cur,
1239
+ int level,
1240
+ int format);
1241
+
1242
+ XMLPUBFUN int
1243
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
1244
+ xmlDocPtr cur,
1245
+ const char *encoding);
1246
+ XMLPUBFUN int
1247
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
1248
+ xmlDocPtr cur,
1249
+ const char *encoding,
1250
+ int format);
1251
+ XMLPUBFUN void
1252
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
1253
+ xmlDocPtr doc,
1254
+ xmlNodePtr cur,
1255
+ int level,
1256
+ int format,
1257
+ const char *encoding);
1258
+
1259
+ XMLPUBFUN int
1260
+ xmlSaveFormatFileEnc (const char *filename,
1261
+ xmlDocPtr cur,
1262
+ const char *encoding,
1263
+ int format);
1264
+
1265
+ XMLPUBFUN int
1266
+ xmlSaveFileEnc (const char *filename,
1267
+ xmlDocPtr cur,
1268
+ const char *encoding);
1269
+
1270
+ #endif /* LIBXML_OUTPUT_ENABLED */
1271
+ /*
1272
+ * XHTML
1273
+ */
1274
+ XMLPUBFUN int
1275
+ xmlIsXHTML (const xmlChar *systemID,
1276
+ const xmlChar *publicID);
1277
+
1278
+ /*
1279
+ * Compression.
1280
+ */
1281
+ XMLPUBFUN int
1282
+ xmlGetDocCompressMode (const xmlDoc *doc);
1283
+ XMLPUBFUN void
1284
+ xmlSetDocCompressMode (xmlDocPtr doc,
1285
+ int mode);
1286
+ XMLPUBFUN int
1287
+ xmlGetCompressMode (void);
1288
+ XMLPUBFUN void
1289
+ xmlSetCompressMode (int mode);
1290
+
1291
+ /*
1292
+ * DOM-wrapper helper functions.
1293
+ */
1294
+ XMLPUBFUN xmlDOMWrapCtxtPtr
1295
+ xmlDOMWrapNewCtxt (void);
1296
+ XMLPUBFUN void
1297
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
1298
+ XMLPUBFUN int
1299
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
1300
+ xmlNodePtr elem,
1301
+ int options);
1302
+ XMLPUBFUN int
1303
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
1304
+ xmlDocPtr sourceDoc,
1305
+ xmlNodePtr node,
1306
+ xmlDocPtr destDoc,
1307
+ xmlNodePtr destParent,
1308
+ int options);
1309
+ XMLPUBFUN int
1310
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
1311
+ xmlDocPtr doc,
1312
+ xmlNodePtr node,
1313
+ int options);
1314
+ XMLPUBFUN int
1315
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
1316
+ xmlDocPtr sourceDoc,
1317
+ xmlNodePtr node,
1318
+ xmlNodePtr *clonedNode,
1319
+ xmlDocPtr destDoc,
1320
+ xmlNodePtr destParent,
1321
+ int deep,
1322
+ int options);
1323
+
1324
+ #ifdef LIBXML_TREE_ENABLED
1325
+ /*
1326
+ * 5 interfaces from DOM ElementTraversal, but different in entities
1327
+ * traversal.
1328
+ */
1329
+ XMLPUBFUN unsigned long
1330
+ xmlChildElementCount (xmlNodePtr parent);
1331
+ XMLPUBFUN xmlNodePtr
1332
+ xmlNextElementSibling (xmlNodePtr node);
1333
+ XMLPUBFUN xmlNodePtr
1334
+ xmlFirstElementChild (xmlNodePtr parent);
1335
+ XMLPUBFUN xmlNodePtr
1336
+ xmlLastElementChild (xmlNodePtr parent);
1337
+ XMLPUBFUN xmlNodePtr
1338
+ xmlPreviousElementSibling (xmlNodePtr node);
1339
+ #endif
1340
+
1341
+ XMLPUBFUN xmlRegisterNodeFunc
1342
+ xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
1343
+ XMLPUBFUN xmlDeregisterNodeFunc
1344
+ xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
1345
+ XMLPUBFUN xmlRegisterNodeFunc
1346
+ xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
1347
+ XMLPUBFUN xmlDeregisterNodeFunc
1348
+ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
1349
+
1350
+ XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
1351
+ xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
1352
+ XML_DEPRECATED XMLPUBFUN int
1353
+ xmlThrDefDefaultBufferSize (int v);
1354
+
1355
+ #ifdef __cplusplus
1356
+ }
1357
+ #endif
1358
+
1359
+ #endif /* __XML_TREE_H__ */
1360
+
1361
+ #endif /* XML_TREE_INTERNALS */
1362
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/uri.h ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Summary: library of generic URI related routines
3
+ * Description: library of generic URI related routines
4
+ * Implements RFC 2396
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_URI_H__
12
+ #define __XML_URI_H__
13
+
14
+ #include <stdio.h>
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlstring.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /**
23
+ * xmlURI:
24
+ *
25
+ * A parsed URI reference. This is a struct containing the various fields
26
+ * as described in RFC 2396 but separated for further processing.
27
+ *
28
+ * Note: query is a deprecated field which is incorrectly unescaped.
29
+ * query_raw takes precedence over query if the former is set.
30
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
31
+ */
32
+ typedef struct _xmlURI xmlURI;
33
+ typedef xmlURI *xmlURIPtr;
34
+ struct _xmlURI {
35
+ char *scheme; /* the URI scheme */
36
+ char *opaque; /* opaque part */
37
+ char *authority; /* the authority part */
38
+ char *server; /* the server part */
39
+ char *user; /* the user part */
40
+ int port; /* the port number */
41
+ char *path; /* the path string */
42
+ char *query; /* the query string (deprecated - use with caution) */
43
+ char *fragment; /* the fragment identifier */
44
+ int cleanup; /* parsing potentially unclean URI */
45
+ char *query_raw; /* the query string (as it appears in the URI) */
46
+ };
47
+
48
+ /*
49
+ * This function is in tree.h:
50
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
51
+ * xmlNodePtr cur);
52
+ */
53
+ XMLPUBFUN xmlURIPtr
54
+ xmlCreateURI (void);
55
+ XMLPUBFUN xmlChar *
56
+ xmlBuildURI (const xmlChar *URI,
57
+ const xmlChar *base);
58
+ XMLPUBFUN xmlChar *
59
+ xmlBuildRelativeURI (const xmlChar *URI,
60
+ const xmlChar *base);
61
+ XMLPUBFUN xmlURIPtr
62
+ xmlParseURI (const char *str);
63
+ XMLPUBFUN xmlURIPtr
64
+ xmlParseURIRaw (const char *str,
65
+ int raw);
66
+ XMLPUBFUN int
67
+ xmlParseURIReference (xmlURIPtr uri,
68
+ const char *str);
69
+ XMLPUBFUN xmlChar *
70
+ xmlSaveUri (xmlURIPtr uri);
71
+ XMLPUBFUN void
72
+ xmlPrintURI (FILE *stream,
73
+ xmlURIPtr uri);
74
+ XMLPUBFUN xmlChar *
75
+ xmlURIEscapeStr (const xmlChar *str,
76
+ const xmlChar *list);
77
+ XMLPUBFUN char *
78
+ xmlURIUnescapeString (const char *str,
79
+ int len,
80
+ char *target);
81
+ XMLPUBFUN int
82
+ xmlNormalizeURIPath (char *path);
83
+ XMLPUBFUN xmlChar *
84
+ xmlURIEscape (const xmlChar *str);
85
+ XMLPUBFUN void
86
+ xmlFreeURI (xmlURIPtr uri);
87
+ XMLPUBFUN xmlChar*
88
+ xmlCanonicPath (const xmlChar *path);
89
+ XMLPUBFUN xmlChar*
90
+ xmlPathToURI (const xmlChar *path);
91
+
92
+ #ifdef __cplusplus
93
+ }
94
+ #endif
95
+ #endif /* __XML_URI_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/valid.h ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: The DTD validation
3
+ * Description: API for the DTD handling and the validity checking
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+
11
+ #ifndef __XML_VALID_H__
12
+ #define __XML_VALID_H__
13
+
14
+ #include <libxml/xmlversion.h>
15
+ #include <libxml/xmlerror.h>
16
+ #define XML_TREE_INTERNALS
17
+ #include <libxml/tree.h>
18
+ #undef XML_TREE_INTERNALS
19
+ #include <libxml/list.h>
20
+ #include <libxml/xmlautomata.h>
21
+ #include <libxml/xmlregexp.h>
22
+
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+ /*
28
+ * Validation state added for non-determinist content model.
29
+ */
30
+ typedef struct _xmlValidState xmlValidState;
31
+ typedef xmlValidState *xmlValidStatePtr;
32
+
33
+ /**
34
+ * xmlValidityErrorFunc:
35
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
36
+ * but comes from ctxt->userData (which normally contains such
37
+ * a pointer); ctxt->userData can be changed by the user.
38
+ * @msg: the string to format *printf like vararg
39
+ * @...: remaining arguments to the format
40
+ *
41
+ * Callback called when a validity error is found. This is a message
42
+ * oriented function similar to an *printf function.
43
+ */
44
+ typedef void (*xmlValidityErrorFunc) (void *ctx,
45
+ const char *msg,
46
+ ...) LIBXML_ATTR_FORMAT(2,3);
47
+
48
+ /**
49
+ * xmlValidityWarningFunc:
50
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
51
+ * but comes from ctxt->userData (which normally contains such
52
+ * a pointer); ctxt->userData can be changed by the user.
53
+ * @msg: the string to format *printf like vararg
54
+ * @...: remaining arguments to the format
55
+ *
56
+ * Callback called when a validity warning is found. This is a message
57
+ * oriented function similar to an *printf function.
58
+ */
59
+ typedef void (*xmlValidityWarningFunc) (void *ctx,
60
+ const char *msg,
61
+ ...) LIBXML_ATTR_FORMAT(2,3);
62
+
63
+ /*
64
+ * xmlValidCtxt:
65
+ * An xmlValidCtxt is used for error reporting when validating.
66
+ */
67
+ typedef struct _xmlValidCtxt xmlValidCtxt;
68
+ typedef xmlValidCtxt *xmlValidCtxtPtr;
69
+ struct _xmlValidCtxt {
70
+ void *userData; /* user specific data block */
71
+ xmlValidityErrorFunc error; /* the callback in case of errors */
72
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
73
+
74
+ /* Node analysis stack used when validating within entities */
75
+ xmlNodePtr node; /* Current parsed Node */
76
+ int nodeNr; /* Depth of the parsing stack */
77
+ int nodeMax; /* Max depth of the parsing stack */
78
+ xmlNodePtr *nodeTab; /* array of nodes */
79
+
80
+ unsigned int flags; /* internal flags */
81
+ xmlDocPtr doc; /* the document */
82
+ int valid; /* temporary validity check result */
83
+
84
+ /* state state used for non-determinist content validation */
85
+ xmlValidState *vstate; /* current state */
86
+ int vstateNr; /* Depth of the validation stack */
87
+ int vstateMax; /* Max depth of the validation stack */
88
+ xmlValidState *vstateTab; /* array of validation states */
89
+
90
+ #ifdef LIBXML_REGEXP_ENABLED
91
+ xmlAutomataPtr am; /* the automata */
92
+ xmlAutomataStatePtr state; /* used to build the automata */
93
+ #else
94
+ void *am;
95
+ void *state;
96
+ #endif
97
+ };
98
+
99
+ /*
100
+ * ALL notation declarations are stored in a table.
101
+ * There is one table per DTD.
102
+ */
103
+
104
+ typedef struct _xmlHashTable xmlNotationTable;
105
+ typedef xmlNotationTable *xmlNotationTablePtr;
106
+
107
+ /*
108
+ * ALL element declarations are stored in a table.
109
+ * There is one table per DTD.
110
+ */
111
+
112
+ typedef struct _xmlHashTable xmlElementTable;
113
+ typedef xmlElementTable *xmlElementTablePtr;
114
+
115
+ /*
116
+ * ALL attribute declarations are stored in a table.
117
+ * There is one table per DTD.
118
+ */
119
+
120
+ typedef struct _xmlHashTable xmlAttributeTable;
121
+ typedef xmlAttributeTable *xmlAttributeTablePtr;
122
+
123
+ /*
124
+ * ALL IDs attributes are stored in a table.
125
+ * There is one table per document.
126
+ */
127
+
128
+ typedef struct _xmlHashTable xmlIDTable;
129
+ typedef xmlIDTable *xmlIDTablePtr;
130
+
131
+ /*
132
+ * ALL Refs attributes are stored in a table.
133
+ * There is one table per document.
134
+ */
135
+
136
+ typedef struct _xmlHashTable xmlRefTable;
137
+ typedef xmlRefTable *xmlRefTablePtr;
138
+
139
+ /* Notation */
140
+ XMLPUBFUN xmlNotationPtr
141
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
142
+ xmlDtdPtr dtd,
143
+ const xmlChar *name,
144
+ const xmlChar *PublicID,
145
+ const xmlChar *SystemID);
146
+ #ifdef LIBXML_TREE_ENABLED
147
+ XMLPUBFUN xmlNotationTablePtr
148
+ xmlCopyNotationTable (xmlNotationTablePtr table);
149
+ #endif /* LIBXML_TREE_ENABLED */
150
+ XMLPUBFUN void
151
+ xmlFreeNotationTable (xmlNotationTablePtr table);
152
+ #ifdef LIBXML_OUTPUT_ENABLED
153
+ XMLPUBFUN void
154
+ xmlDumpNotationDecl (xmlBufferPtr buf,
155
+ xmlNotationPtr nota);
156
+ XMLPUBFUN void
157
+ xmlDumpNotationTable (xmlBufferPtr buf,
158
+ xmlNotationTablePtr table);
159
+ #endif /* LIBXML_OUTPUT_ENABLED */
160
+
161
+ /* Element Content */
162
+ /* the non Doc version are being deprecated */
163
+ XMLPUBFUN xmlElementContentPtr
164
+ xmlNewElementContent (const xmlChar *name,
165
+ xmlElementContentType type);
166
+ XMLPUBFUN xmlElementContentPtr
167
+ xmlCopyElementContent (xmlElementContentPtr content);
168
+ XMLPUBFUN void
169
+ xmlFreeElementContent (xmlElementContentPtr cur);
170
+ /* the new versions with doc argument */
171
+ XMLPUBFUN xmlElementContentPtr
172
+ xmlNewDocElementContent (xmlDocPtr doc,
173
+ const xmlChar *name,
174
+ xmlElementContentType type);
175
+ XMLPUBFUN xmlElementContentPtr
176
+ xmlCopyDocElementContent(xmlDocPtr doc,
177
+ xmlElementContentPtr content);
178
+ XMLPUBFUN void
179
+ xmlFreeDocElementContent(xmlDocPtr doc,
180
+ xmlElementContentPtr cur);
181
+ XMLPUBFUN void
182
+ xmlSnprintfElementContent(char *buf,
183
+ int size,
184
+ xmlElementContentPtr content,
185
+ int englob);
186
+ #ifdef LIBXML_OUTPUT_ENABLED
187
+ /* DEPRECATED */
188
+ XMLPUBFUN void
189
+ xmlSprintfElementContent(char *buf,
190
+ xmlElementContentPtr content,
191
+ int englob);
192
+ #endif /* LIBXML_OUTPUT_ENABLED */
193
+ /* DEPRECATED */
194
+
195
+ /* Element */
196
+ XMLPUBFUN xmlElementPtr
197
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
198
+ xmlDtdPtr dtd,
199
+ const xmlChar *name,
200
+ xmlElementTypeVal type,
201
+ xmlElementContentPtr content);
202
+ #ifdef LIBXML_TREE_ENABLED
203
+ XMLPUBFUN xmlElementTablePtr
204
+ xmlCopyElementTable (xmlElementTablePtr table);
205
+ #endif /* LIBXML_TREE_ENABLED */
206
+ XMLPUBFUN void
207
+ xmlFreeElementTable (xmlElementTablePtr table);
208
+ #ifdef LIBXML_OUTPUT_ENABLED
209
+ XMLPUBFUN void
210
+ xmlDumpElementTable (xmlBufferPtr buf,
211
+ xmlElementTablePtr table);
212
+ XMLPUBFUN void
213
+ xmlDumpElementDecl (xmlBufferPtr buf,
214
+ xmlElementPtr elem);
215
+ #endif /* LIBXML_OUTPUT_ENABLED */
216
+
217
+ /* Enumeration */
218
+ XMLPUBFUN xmlEnumerationPtr
219
+ xmlCreateEnumeration (const xmlChar *name);
220
+ XMLPUBFUN void
221
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
222
+ #ifdef LIBXML_TREE_ENABLED
223
+ XMLPUBFUN xmlEnumerationPtr
224
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
225
+ #endif /* LIBXML_TREE_ENABLED */
226
+
227
+ /* Attribute */
228
+ XMLPUBFUN xmlAttributePtr
229
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
230
+ xmlDtdPtr dtd,
231
+ const xmlChar *elem,
232
+ const xmlChar *name,
233
+ const xmlChar *ns,
234
+ xmlAttributeType type,
235
+ xmlAttributeDefault def,
236
+ const xmlChar *defaultValue,
237
+ xmlEnumerationPtr tree);
238
+ #ifdef LIBXML_TREE_ENABLED
239
+ XMLPUBFUN xmlAttributeTablePtr
240
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
241
+ #endif /* LIBXML_TREE_ENABLED */
242
+ XMLPUBFUN void
243
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
244
+ #ifdef LIBXML_OUTPUT_ENABLED
245
+ XMLPUBFUN void
246
+ xmlDumpAttributeTable (xmlBufferPtr buf,
247
+ xmlAttributeTablePtr table);
248
+ XMLPUBFUN void
249
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
250
+ xmlAttributePtr attr);
251
+ #endif /* LIBXML_OUTPUT_ENABLED */
252
+
253
+ /* IDs */
254
+ XMLPUBFUN xmlIDPtr
255
+ xmlAddID (xmlValidCtxtPtr ctxt,
256
+ xmlDocPtr doc,
257
+ const xmlChar *value,
258
+ xmlAttrPtr attr);
259
+ XMLPUBFUN void
260
+ xmlFreeIDTable (xmlIDTablePtr table);
261
+ XMLPUBFUN xmlAttrPtr
262
+ xmlGetID (xmlDocPtr doc,
263
+ const xmlChar *ID);
264
+ XMLPUBFUN int
265
+ xmlIsID (xmlDocPtr doc,
266
+ xmlNodePtr elem,
267
+ xmlAttrPtr attr);
268
+ XMLPUBFUN int
269
+ xmlRemoveID (xmlDocPtr doc,
270
+ xmlAttrPtr attr);
271
+
272
+ /* IDREFs */
273
+ XML_DEPRECATED
274
+ XMLPUBFUN xmlRefPtr
275
+ xmlAddRef (xmlValidCtxtPtr ctxt,
276
+ xmlDocPtr doc,
277
+ const xmlChar *value,
278
+ xmlAttrPtr attr);
279
+ XML_DEPRECATED
280
+ XMLPUBFUN void
281
+ xmlFreeRefTable (xmlRefTablePtr table);
282
+ XML_DEPRECATED
283
+ XMLPUBFUN int
284
+ xmlIsRef (xmlDocPtr doc,
285
+ xmlNodePtr elem,
286
+ xmlAttrPtr attr);
287
+ XML_DEPRECATED
288
+ XMLPUBFUN int
289
+ xmlRemoveRef (xmlDocPtr doc,
290
+ xmlAttrPtr attr);
291
+ XML_DEPRECATED
292
+ XMLPUBFUN xmlListPtr
293
+ xmlGetRefs (xmlDocPtr doc,
294
+ const xmlChar *ID);
295
+
296
+ /**
297
+ * The public function calls related to validity checking.
298
+ */
299
+ #ifdef LIBXML_VALID_ENABLED
300
+ /* Allocate/Release Validation Contexts */
301
+ XMLPUBFUN xmlValidCtxtPtr
302
+ xmlNewValidCtxt(void);
303
+ XMLPUBFUN void
304
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
305
+
306
+ XMLPUBFUN int
307
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
308
+ xmlDocPtr doc);
309
+ XMLPUBFUN int
310
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
311
+ xmlDocPtr doc,
312
+ xmlElementPtr elem);
313
+ XMLPUBFUN xmlChar *
314
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
315
+ xmlNodePtr elem,
316
+ const xmlChar *name,
317
+ const xmlChar *value);
318
+ XMLPUBFUN xmlChar *
319
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
320
+ xmlDocPtr doc,
321
+ xmlNodePtr elem,
322
+ const xmlChar *name,
323
+ const xmlChar *value);
324
+ XMLPUBFUN int
325
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
326
+ xmlDocPtr doc,
327
+ xmlAttributePtr attr);
328
+ XMLPUBFUN int
329
+ xmlValidateAttributeValue(xmlAttributeType type,
330
+ const xmlChar *value);
331
+ XMLPUBFUN int
332
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
333
+ xmlDocPtr doc,
334
+ xmlNotationPtr nota);
335
+ XMLPUBFUN int
336
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
337
+ xmlDocPtr doc,
338
+ xmlDtdPtr dtd);
339
+ XMLPUBFUN int
340
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
341
+ xmlDocPtr doc);
342
+ XMLPUBFUN int
343
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
344
+ xmlDocPtr doc);
345
+ XMLPUBFUN int
346
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
347
+ xmlDocPtr doc,
348
+ xmlNodePtr elem);
349
+ XMLPUBFUN int
350
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
351
+ xmlDocPtr doc,
352
+ xmlNodePtr elem);
353
+ XMLPUBFUN int
354
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
355
+ xmlDocPtr doc,
356
+ xmlNodePtr elem,
357
+ xmlAttrPtr attr,
358
+ const xmlChar *value);
359
+ XMLPUBFUN int
360
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
361
+ xmlDocPtr doc,
362
+ xmlNodePtr elem,
363
+ const xmlChar *prefix,
364
+ xmlNsPtr ns,
365
+ const xmlChar *value);
366
+ XMLPUBFUN int
367
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
368
+ xmlDocPtr doc);
369
+ #endif /* LIBXML_VALID_ENABLED */
370
+
371
+ #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
372
+ XMLPUBFUN int
373
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
374
+ xmlDocPtr doc,
375
+ const xmlChar *notationName);
376
+ #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
377
+
378
+ XMLPUBFUN int
379
+ xmlIsMixedElement (xmlDocPtr doc,
380
+ const xmlChar *name);
381
+ XMLPUBFUN xmlAttributePtr
382
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
383
+ const xmlChar *elem,
384
+ const xmlChar *name);
385
+ XMLPUBFUN xmlAttributePtr
386
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
387
+ const xmlChar *elem,
388
+ const xmlChar *name,
389
+ const xmlChar *prefix);
390
+ XMLPUBFUN xmlNotationPtr
391
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
392
+ const xmlChar *name);
393
+ XMLPUBFUN xmlElementPtr
394
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
395
+ const xmlChar *name,
396
+ const xmlChar *prefix);
397
+ XMLPUBFUN xmlElementPtr
398
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
399
+ const xmlChar *name);
400
+
401
+ #ifdef LIBXML_VALID_ENABLED
402
+
403
+ XMLPUBFUN int
404
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
405
+ const xmlChar **names,
406
+ int *len,
407
+ int max);
408
+
409
+ XMLPUBFUN int
410
+ xmlValidGetValidElements(xmlNode *prev,
411
+ xmlNode *next,
412
+ const xmlChar **names,
413
+ int max);
414
+ XMLPUBFUN int
415
+ xmlValidateNameValue (const xmlChar *value);
416
+ XMLPUBFUN int
417
+ xmlValidateNamesValue (const xmlChar *value);
418
+ XMLPUBFUN int
419
+ xmlValidateNmtokenValue (const xmlChar *value);
420
+ XMLPUBFUN int
421
+ xmlValidateNmtokensValue(const xmlChar *value);
422
+
423
+ #ifdef LIBXML_REGEXP_ENABLED
424
+ /*
425
+ * Validation based on the regexp support
426
+ */
427
+ XMLPUBFUN int
428
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
429
+ xmlElementPtr elem);
430
+
431
+ XMLPUBFUN int
432
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
433
+ xmlDocPtr doc,
434
+ xmlNodePtr elem,
435
+ const xmlChar *qname);
436
+ XMLPUBFUN int
437
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
438
+ const xmlChar *data,
439
+ int len);
440
+ XMLPUBFUN int
441
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
442
+ xmlDocPtr doc,
443
+ xmlNodePtr elem,
444
+ const xmlChar *qname);
445
+ #endif /* LIBXML_REGEXP_ENABLED */
446
+ #endif /* LIBXML_VALID_ENABLED */
447
+ #ifdef __cplusplus
448
+ }
449
+ #endif
450
+ #endif /* __XML_VALID_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xinclude.h ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: implementation of XInclude
3
+ * Description: API to handle XInclude processing,
4
+ * implements the
5
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
6
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
7
+ *
8
+ * Copy: See Copyright for the status of this software.
9
+ *
10
+ * Author: Daniel Veillard
11
+ */
12
+
13
+ #ifndef __XML_XINCLUDE_H__
14
+ #define __XML_XINCLUDE_H__
15
+
16
+ #include <libxml/xmlversion.h>
17
+ #include <libxml/tree.h>
18
+
19
+ #ifdef LIBXML_XINCLUDE_ENABLED
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+ /**
26
+ * XINCLUDE_NS:
27
+ *
28
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
29
+ */
30
+ #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
31
+ /**
32
+ * XINCLUDE_OLD_NS:
33
+ *
34
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
35
+ */
36
+ #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
37
+ /**
38
+ * XINCLUDE_NODE:
39
+ *
40
+ * Macro defining "include"
41
+ */
42
+ #define XINCLUDE_NODE (const xmlChar *) "include"
43
+ /**
44
+ * XINCLUDE_FALLBACK:
45
+ *
46
+ * Macro defining "fallback"
47
+ */
48
+ #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
49
+ /**
50
+ * XINCLUDE_HREF:
51
+ *
52
+ * Macro defining "href"
53
+ */
54
+ #define XINCLUDE_HREF (const xmlChar *) "href"
55
+ /**
56
+ * XINCLUDE_PARSE:
57
+ *
58
+ * Macro defining "parse"
59
+ */
60
+ #define XINCLUDE_PARSE (const xmlChar *) "parse"
61
+ /**
62
+ * XINCLUDE_PARSE_XML:
63
+ *
64
+ * Macro defining "xml"
65
+ */
66
+ #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
67
+ /**
68
+ * XINCLUDE_PARSE_TEXT:
69
+ *
70
+ * Macro defining "text"
71
+ */
72
+ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
73
+ /**
74
+ * XINCLUDE_PARSE_ENCODING:
75
+ *
76
+ * Macro defining "encoding"
77
+ */
78
+ #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
79
+ /**
80
+ * XINCLUDE_PARSE_XPOINTER:
81
+ *
82
+ * Macro defining "xpointer"
83
+ */
84
+ #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
85
+
86
+ typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
87
+ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
88
+
89
+ /*
90
+ * standalone processing
91
+ */
92
+ XMLPUBFUN int
93
+ xmlXIncludeProcess (xmlDocPtr doc);
94
+ XMLPUBFUN int
95
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
96
+ int flags);
97
+ XMLPUBFUN int
98
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
99
+ int flags,
100
+ void *data);
101
+ XMLPUBFUN int
102
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
103
+ int flags,
104
+ void *data);
105
+ XMLPUBFUN int
106
+ xmlXIncludeProcessTree (xmlNodePtr tree);
107
+ XMLPUBFUN int
108
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
109
+ int flags);
110
+ /*
111
+ * contextual processing
112
+ */
113
+ XMLPUBFUN xmlXIncludeCtxtPtr
114
+ xmlXIncludeNewContext (xmlDocPtr doc);
115
+ XMLPUBFUN int
116
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
117
+ int flags);
118
+ XMLPUBFUN void
119
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
120
+ XMLPUBFUN int
121
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
122
+ xmlNodePtr tree);
123
+ #ifdef __cplusplus
124
+ }
125
+ #endif
126
+
127
+ #endif /* LIBXML_XINCLUDE_ENABLED */
128
+
129
+ #endif /* __XML_XINCLUDE_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlIO.h ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: interface for the I/O interfaces used by the parser
3
+ * Description: interface for the I/O interfaces used by the parser
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_IO_H__
11
+ #define __XML_IO_H__
12
+
13
+ #include <stdio.h>
14
+ #include <libxml/xmlversion.h>
15
+ #include <libxml/encoding.h>
16
+ #define XML_TREE_INTERNALS
17
+ #include <libxml/tree.h>
18
+ #undef XML_TREE_INTERNALS
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /*
25
+ * Those are the functions and datatypes for the parser input
26
+ * I/O structures.
27
+ */
28
+
29
+ /**
30
+ * xmlInputMatchCallback:
31
+ * @filename: the filename or URI
32
+ *
33
+ * Callback used in the I/O Input API to detect if the current handler
34
+ * can provide input functionality for this resource.
35
+ *
36
+ * Returns 1 if yes and 0 if another Input module should be used
37
+ */
38
+ typedef int (*xmlInputMatchCallback) (char const *filename);
39
+ /**
40
+ * xmlInputOpenCallback:
41
+ * @filename: the filename or URI
42
+ *
43
+ * Callback used in the I/O Input API to open the resource
44
+ *
45
+ * Returns an Input context or NULL in case or error
46
+ */
47
+ typedef void * (*xmlInputOpenCallback) (char const *filename);
48
+ /**
49
+ * xmlInputReadCallback:
50
+ * @context: an Input context
51
+ * @buffer: the buffer to store data read
52
+ * @len: the length of the buffer in bytes
53
+ *
54
+ * Callback used in the I/O Input API to read the resource
55
+ *
56
+ * Returns the number of bytes read or -1 in case of error
57
+ */
58
+ typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
59
+ /**
60
+ * xmlInputCloseCallback:
61
+ * @context: an Input context
62
+ *
63
+ * Callback used in the I/O Input API to close the resource
64
+ *
65
+ * Returns 0 or -1 in case of error
66
+ */
67
+ typedef int (*xmlInputCloseCallback) (void * context);
68
+
69
+ #ifdef LIBXML_OUTPUT_ENABLED
70
+ /*
71
+ * Those are the functions and datatypes for the library output
72
+ * I/O structures.
73
+ */
74
+
75
+ /**
76
+ * xmlOutputMatchCallback:
77
+ * @filename: the filename or URI
78
+ *
79
+ * Callback used in the I/O Output API to detect if the current handler
80
+ * can provide output functionality for this resource.
81
+ *
82
+ * Returns 1 if yes and 0 if another Output module should be used
83
+ */
84
+ typedef int (*xmlOutputMatchCallback) (char const *filename);
85
+ /**
86
+ * xmlOutputOpenCallback:
87
+ * @filename: the filename or URI
88
+ *
89
+ * Callback used in the I/O Output API to open the resource
90
+ *
91
+ * Returns an Output context or NULL in case or error
92
+ */
93
+ typedef void * (*xmlOutputOpenCallback) (char const *filename);
94
+ /**
95
+ * xmlOutputWriteCallback:
96
+ * @context: an Output context
97
+ * @buffer: the buffer of data to write
98
+ * @len: the length of the buffer in bytes
99
+ *
100
+ * Callback used in the I/O Output API to write to the resource
101
+ *
102
+ * Returns the number of bytes written or -1 in case of error
103
+ */
104
+ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
105
+ int len);
106
+ /**
107
+ * xmlOutputCloseCallback:
108
+ * @context: an Output context
109
+ *
110
+ * Callback used in the I/O Output API to close the resource
111
+ *
112
+ * Returns 0 or -1 in case of error
113
+ */
114
+ typedef int (*xmlOutputCloseCallback) (void * context);
115
+ #endif /* LIBXML_OUTPUT_ENABLED */
116
+
117
+ /**
118
+ * xmlParserInputBufferCreateFilenameFunc:
119
+ * @URI: the URI to read from
120
+ * @enc: the requested source encoding
121
+ *
122
+ * Signature for the function doing the lookup for a suitable input method
123
+ * corresponding to an URI.
124
+ *
125
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
126
+ * method was found.
127
+ */
128
+ typedef xmlParserInputBufferPtr
129
+ (*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc);
130
+
131
+ /**
132
+ * xmlOutputBufferCreateFilenameFunc:
133
+ * @URI: the URI to write to
134
+ * @enc: the requested target encoding
135
+ *
136
+ * Signature for the function doing the lookup for a suitable output method
137
+ * corresponding to an URI.
138
+ *
139
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
140
+ * method was found.
141
+ */
142
+ typedef xmlOutputBufferPtr
143
+ (*xmlOutputBufferCreateFilenameFunc)(const char *URI,
144
+ xmlCharEncodingHandlerPtr encoder, int compression);
145
+
146
+ struct _xmlParserInputBuffer {
147
+ void* context;
148
+ xmlInputReadCallback readcallback;
149
+ xmlInputCloseCallback closecallback;
150
+
151
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
152
+
153
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
154
+ xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
155
+ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
156
+ int error;
157
+ unsigned long rawconsumed;/* amount consumed from raw */
158
+ };
159
+
160
+
161
+ #ifdef LIBXML_OUTPUT_ENABLED
162
+ struct _xmlOutputBuffer {
163
+ void* context;
164
+ xmlOutputWriteCallback writecallback;
165
+ xmlOutputCloseCallback closecallback;
166
+
167
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
168
+
169
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
170
+ xmlBufPtr conv; /* if encoder != NULL buffer for output */
171
+ int written; /* total number of byte written */
172
+ int error;
173
+ };
174
+ #endif /* LIBXML_OUTPUT_ENABLED */
175
+
176
+ /** DOC_DISABLE */
177
+ #define XML_GLOBALS_IO \
178
+ XML_OP(xmlParserInputBufferCreateFilenameValue, \
179
+ xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \
180
+ XML_OP(xmlOutputBufferCreateFilenameValue, \
181
+ xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED)
182
+
183
+ #define XML_OP XML_DECLARE_GLOBAL
184
+ XML_GLOBALS_IO
185
+ #undef XML_OP
186
+
187
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
188
+ #define xmlParserInputBufferCreateFilenameValue \
189
+ XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue)
190
+ #define xmlOutputBufferCreateFilenameValue \
191
+ XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue)
192
+ #endif
193
+ /** DOC_ENABLE */
194
+
195
+ /*
196
+ * Interfaces for input
197
+ */
198
+ XMLPUBFUN void
199
+ xmlCleanupInputCallbacks (void);
200
+
201
+ XMLPUBFUN int
202
+ xmlPopInputCallbacks (void);
203
+
204
+ XMLPUBFUN void
205
+ xmlRegisterDefaultInputCallbacks (void);
206
+ XMLPUBFUN xmlParserInputBufferPtr
207
+ xmlAllocParserInputBuffer (xmlCharEncoding enc);
208
+
209
+ XMLPUBFUN xmlParserInputBufferPtr
210
+ xmlParserInputBufferCreateFilename (const char *URI,
211
+ xmlCharEncoding enc);
212
+ XMLPUBFUN xmlParserInputBufferPtr
213
+ xmlParserInputBufferCreateFile (FILE *file,
214
+ xmlCharEncoding enc);
215
+ XMLPUBFUN xmlParserInputBufferPtr
216
+ xmlParserInputBufferCreateFd (int fd,
217
+ xmlCharEncoding enc);
218
+ XMLPUBFUN xmlParserInputBufferPtr
219
+ xmlParserInputBufferCreateMem (const char *mem, int size,
220
+ xmlCharEncoding enc);
221
+ XMLPUBFUN xmlParserInputBufferPtr
222
+ xmlParserInputBufferCreateStatic (const char *mem, int size,
223
+ xmlCharEncoding enc);
224
+ XMLPUBFUN xmlParserInputBufferPtr
225
+ xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
226
+ xmlInputCloseCallback ioclose,
227
+ void *ioctx,
228
+ xmlCharEncoding enc);
229
+ XMLPUBFUN int
230
+ xmlParserInputBufferRead (xmlParserInputBufferPtr in,
231
+ int len);
232
+ XMLPUBFUN int
233
+ xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
234
+ int len);
235
+ XMLPUBFUN int
236
+ xmlParserInputBufferPush (xmlParserInputBufferPtr in,
237
+ int len,
238
+ const char *buf);
239
+ XMLPUBFUN void
240
+ xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
241
+ XMLPUBFUN char *
242
+ xmlParserGetDirectory (const char *filename);
243
+
244
+ XMLPUBFUN int
245
+ xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
246
+ xmlInputOpenCallback openFunc,
247
+ xmlInputReadCallback readFunc,
248
+ xmlInputCloseCallback closeFunc);
249
+
250
+ xmlParserInputBufferPtr
251
+ __xmlParserInputBufferCreateFilename(const char *URI,
252
+ xmlCharEncoding enc);
253
+
254
+ #ifdef LIBXML_OUTPUT_ENABLED
255
+ /*
256
+ * Interfaces for output
257
+ */
258
+ XMLPUBFUN void
259
+ xmlCleanupOutputCallbacks (void);
260
+ XMLPUBFUN int
261
+ xmlPopOutputCallbacks (void);
262
+ XMLPUBFUN void
263
+ xmlRegisterDefaultOutputCallbacks(void);
264
+ XMLPUBFUN xmlOutputBufferPtr
265
+ xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
266
+
267
+ XMLPUBFUN xmlOutputBufferPtr
268
+ xmlOutputBufferCreateFilename (const char *URI,
269
+ xmlCharEncodingHandlerPtr encoder,
270
+ int compression);
271
+
272
+ XMLPUBFUN xmlOutputBufferPtr
273
+ xmlOutputBufferCreateFile (FILE *file,
274
+ xmlCharEncodingHandlerPtr encoder);
275
+
276
+ XMLPUBFUN xmlOutputBufferPtr
277
+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
278
+ xmlCharEncodingHandlerPtr encoder);
279
+
280
+ XMLPUBFUN xmlOutputBufferPtr
281
+ xmlOutputBufferCreateFd (int fd,
282
+ xmlCharEncodingHandlerPtr encoder);
283
+
284
+ XMLPUBFUN xmlOutputBufferPtr
285
+ xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
286
+ xmlOutputCloseCallback ioclose,
287
+ void *ioctx,
288
+ xmlCharEncodingHandlerPtr encoder);
289
+
290
+ /* Couple of APIs to get the output without digging into the buffers */
291
+ XMLPUBFUN const xmlChar *
292
+ xmlOutputBufferGetContent (xmlOutputBufferPtr out);
293
+ XMLPUBFUN size_t
294
+ xmlOutputBufferGetSize (xmlOutputBufferPtr out);
295
+
296
+ XMLPUBFUN int
297
+ xmlOutputBufferWrite (xmlOutputBufferPtr out,
298
+ int len,
299
+ const char *buf);
300
+ XMLPUBFUN int
301
+ xmlOutputBufferWriteString (xmlOutputBufferPtr out,
302
+ const char *str);
303
+ XMLPUBFUN int
304
+ xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
305
+ const xmlChar *str,
306
+ xmlCharEncodingOutputFunc escaping);
307
+
308
+ XMLPUBFUN int
309
+ xmlOutputBufferFlush (xmlOutputBufferPtr out);
310
+ XMLPUBFUN int
311
+ xmlOutputBufferClose (xmlOutputBufferPtr out);
312
+
313
+ XMLPUBFUN int
314
+ xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
315
+ xmlOutputOpenCallback openFunc,
316
+ xmlOutputWriteCallback writeFunc,
317
+ xmlOutputCloseCallback closeFunc);
318
+
319
+ xmlOutputBufferPtr
320
+ __xmlOutputBufferCreateFilename(const char *URI,
321
+ xmlCharEncodingHandlerPtr encoder,
322
+ int compression);
323
+
324
+ #ifdef LIBXML_HTTP_ENABLED
325
+ /* This function only exists if HTTP support built into the library */
326
+ XMLPUBFUN void
327
+ xmlRegisterHTTPPostCallbacks (void );
328
+ #endif /* LIBXML_HTTP_ENABLED */
329
+
330
+ #endif /* LIBXML_OUTPUT_ENABLED */
331
+
332
+ XMLPUBFUN xmlParserInputPtr
333
+ xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
334
+ xmlParserInputPtr ret);
335
+
336
+ /*
337
+ * A predefined entity loader disabling network accesses
338
+ */
339
+ XMLPUBFUN xmlParserInputPtr
340
+ xmlNoNetExternalEntityLoader (const char *URL,
341
+ const char *ID,
342
+ xmlParserCtxtPtr ctxt);
343
+
344
+ /*
345
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
346
+ * Check xmlCanonicPath in uri.h for a better alternative.
347
+ */
348
+ XMLPUBFUN xmlChar *
349
+ xmlNormalizeWindowsPath (const xmlChar *path);
350
+
351
+ XMLPUBFUN int
352
+ xmlCheckFilename (const char *path);
353
+ /**
354
+ * Default 'file://' protocol callbacks
355
+ */
356
+ XMLPUBFUN int
357
+ xmlFileMatch (const char *filename);
358
+ XMLPUBFUN void *
359
+ xmlFileOpen (const char *filename);
360
+ XMLPUBFUN int
361
+ xmlFileRead (void * context,
362
+ char * buffer,
363
+ int len);
364
+ XMLPUBFUN int
365
+ xmlFileClose (void * context);
366
+
367
+ /**
368
+ * Default 'http://' protocol callbacks
369
+ */
370
+ #ifdef LIBXML_HTTP_ENABLED
371
+ XMLPUBFUN int
372
+ xmlIOHTTPMatch (const char *filename);
373
+ XMLPUBFUN void *
374
+ xmlIOHTTPOpen (const char *filename);
375
+ #ifdef LIBXML_OUTPUT_ENABLED
376
+ XMLPUBFUN void *
377
+ xmlIOHTTPOpenW (const char * post_uri,
378
+ int compression );
379
+ #endif /* LIBXML_OUTPUT_ENABLED */
380
+ XMLPUBFUN int
381
+ xmlIOHTTPRead (void * context,
382
+ char * buffer,
383
+ int len);
384
+ XMLPUBFUN int
385
+ xmlIOHTTPClose (void * context);
386
+ #endif /* LIBXML_HTTP_ENABLED */
387
+
388
+ /**
389
+ * Default 'ftp://' protocol callbacks
390
+ */
391
+ #if defined(LIBXML_FTP_ENABLED)
392
+ XMLPUBFUN int
393
+ xmlIOFTPMatch (const char *filename);
394
+ XMLPUBFUN void *
395
+ xmlIOFTPOpen (const char *filename);
396
+ XMLPUBFUN int
397
+ xmlIOFTPRead (void * context,
398
+ char * buffer,
399
+ int len);
400
+ XMLPUBFUN int
401
+ xmlIOFTPClose (void * context);
402
+ #endif /* defined(LIBXML_FTP_ENABLED) */
403
+
404
+ XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
405
+ xmlParserInputBufferCreateFilenameDefault(
406
+ xmlParserInputBufferCreateFilenameFunc func);
407
+ XMLPUBFUN xmlOutputBufferCreateFilenameFunc
408
+ xmlOutputBufferCreateFilenameDefault(
409
+ xmlOutputBufferCreateFilenameFunc func);
410
+ XMLPUBFUN xmlOutputBufferCreateFilenameFunc
411
+ xmlThrDefOutputBufferCreateFilenameDefault(
412
+ xmlOutputBufferCreateFilenameFunc func);
413
+ XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
414
+ xmlThrDefParserInputBufferCreateFilenameDefault(
415
+ xmlParserInputBufferCreateFilenameFunc func);
416
+
417
+ #ifdef __cplusplus
418
+ }
419
+ #endif
420
+
421
+ #endif /* __XML_IO_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlautomata.h ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: API to build regexp automata
3
+ * Description: the API to build regexp automata
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_AUTOMATA_H__
11
+ #define __XML_AUTOMATA_H__
12
+
13
+ #include <libxml/xmlversion.h>
14
+
15
+ #ifdef LIBXML_REGEXP_ENABLED
16
+ #ifdef LIBXML_AUTOMATA_ENABLED
17
+
18
+ #include <libxml/xmlstring.h>
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /**
25
+ * xmlAutomataPtr:
26
+ *
27
+ * A libxml automata description, It can be compiled into a regexp
28
+ */
29
+ typedef struct _xmlAutomata xmlAutomata;
30
+ typedef xmlAutomata *xmlAutomataPtr;
31
+
32
+ /**
33
+ * xmlAutomataStatePtr:
34
+ *
35
+ * A state int the automata description,
36
+ */
37
+ typedef struct _xmlAutomataState xmlAutomataState;
38
+ typedef xmlAutomataState *xmlAutomataStatePtr;
39
+
40
+ /*
41
+ * Building API
42
+ */
43
+ XMLPUBFUN xmlAutomataPtr
44
+ xmlNewAutomata (void);
45
+ XMLPUBFUN void
46
+ xmlFreeAutomata (xmlAutomataPtr am);
47
+
48
+ XMLPUBFUN xmlAutomataStatePtr
49
+ xmlAutomataGetInitState (xmlAutomataPtr am);
50
+ XMLPUBFUN int
51
+ xmlAutomataSetFinalState (xmlAutomataPtr am,
52
+ xmlAutomataStatePtr state);
53
+ XMLPUBFUN xmlAutomataStatePtr
54
+ xmlAutomataNewState (xmlAutomataPtr am);
55
+ XMLPUBFUN xmlAutomataStatePtr
56
+ xmlAutomataNewTransition (xmlAutomataPtr am,
57
+ xmlAutomataStatePtr from,
58
+ xmlAutomataStatePtr to,
59
+ const xmlChar *token,
60
+ void *data);
61
+ XMLPUBFUN xmlAutomataStatePtr
62
+ xmlAutomataNewTransition2 (xmlAutomataPtr am,
63
+ xmlAutomataStatePtr from,
64
+ xmlAutomataStatePtr to,
65
+ const xmlChar *token,
66
+ const xmlChar *token2,
67
+ void *data);
68
+ XMLPUBFUN xmlAutomataStatePtr
69
+ xmlAutomataNewNegTrans (xmlAutomataPtr am,
70
+ xmlAutomataStatePtr from,
71
+ xmlAutomataStatePtr to,
72
+ const xmlChar *token,
73
+ const xmlChar *token2,
74
+ void *data);
75
+
76
+ XMLPUBFUN xmlAutomataStatePtr
77
+ xmlAutomataNewCountTrans (xmlAutomataPtr am,
78
+ xmlAutomataStatePtr from,
79
+ xmlAutomataStatePtr to,
80
+ const xmlChar *token,
81
+ int min,
82
+ int max,
83
+ void *data);
84
+ XMLPUBFUN xmlAutomataStatePtr
85
+ xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
86
+ xmlAutomataStatePtr from,
87
+ xmlAutomataStatePtr to,
88
+ const xmlChar *token,
89
+ const xmlChar *token2,
90
+ int min,
91
+ int max,
92
+ void *data);
93
+ XMLPUBFUN xmlAutomataStatePtr
94
+ xmlAutomataNewOnceTrans (xmlAutomataPtr am,
95
+ xmlAutomataStatePtr from,
96
+ xmlAutomataStatePtr to,
97
+ const xmlChar *token,
98
+ int min,
99
+ int max,
100
+ void *data);
101
+ XMLPUBFUN xmlAutomataStatePtr
102
+ xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
103
+ xmlAutomataStatePtr from,
104
+ xmlAutomataStatePtr to,
105
+ const xmlChar *token,
106
+ const xmlChar *token2,
107
+ int min,
108
+ int max,
109
+ void *data);
110
+ XMLPUBFUN xmlAutomataStatePtr
111
+ xmlAutomataNewAllTrans (xmlAutomataPtr am,
112
+ xmlAutomataStatePtr from,
113
+ xmlAutomataStatePtr to,
114
+ int lax);
115
+ XMLPUBFUN xmlAutomataStatePtr
116
+ xmlAutomataNewEpsilon (xmlAutomataPtr am,
117
+ xmlAutomataStatePtr from,
118
+ xmlAutomataStatePtr to);
119
+ XMLPUBFUN xmlAutomataStatePtr
120
+ xmlAutomataNewCountedTrans (xmlAutomataPtr am,
121
+ xmlAutomataStatePtr from,
122
+ xmlAutomataStatePtr to,
123
+ int counter);
124
+ XMLPUBFUN xmlAutomataStatePtr
125
+ xmlAutomataNewCounterTrans (xmlAutomataPtr am,
126
+ xmlAutomataStatePtr from,
127
+ xmlAutomataStatePtr to,
128
+ int counter);
129
+ XMLPUBFUN int
130
+ xmlAutomataNewCounter (xmlAutomataPtr am,
131
+ int min,
132
+ int max);
133
+
134
+ XMLPUBFUN struct _xmlRegexp *
135
+ xmlAutomataCompile (xmlAutomataPtr am);
136
+ XMLPUBFUN int
137
+ xmlAutomataIsDeterminist (xmlAutomataPtr am);
138
+
139
+ #ifdef __cplusplus
140
+ }
141
+ #endif
142
+
143
+ #endif /* LIBXML_AUTOMATA_ENABLED */
144
+ #endif /* LIBXML_REGEXP_ENABLED */
145
+
146
+ #endif /* __XML_AUTOMATA_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlerror.h ADDED
@@ -0,0 +1,948 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: error handling
3
+ * Description: the API used to report errors
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_ERROR_H__
11
+ #define __XML_ERROR_H__
12
+
13
+ #include <libxml/xmlversion.h>
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif
18
+
19
+ /**
20
+ * xmlErrorLevel:
21
+ *
22
+ * Indicates the level of an error
23
+ */
24
+ typedef enum {
25
+ XML_ERR_NONE = 0,
26
+ XML_ERR_WARNING = 1, /* A simple warning */
27
+ XML_ERR_ERROR = 2, /* A recoverable error */
28
+ XML_ERR_FATAL = 3 /* A fatal error */
29
+ } xmlErrorLevel;
30
+
31
+ /**
32
+ * xmlErrorDomain:
33
+ *
34
+ * Indicates where an error may have come from
35
+ */
36
+ typedef enum {
37
+ XML_FROM_NONE = 0,
38
+ XML_FROM_PARSER, /* The XML parser */
39
+ XML_FROM_TREE, /* The tree module */
40
+ XML_FROM_NAMESPACE, /* The XML Namespace module */
41
+ XML_FROM_DTD, /* The XML DTD validation with parser context*/
42
+ XML_FROM_HTML, /* The HTML parser */
43
+ XML_FROM_MEMORY, /* The memory allocator */
44
+ XML_FROM_OUTPUT, /* The serialization code */
45
+ XML_FROM_IO, /* The Input/Output stack */
46
+ XML_FROM_FTP, /* The FTP module */
47
+ XML_FROM_HTTP, /* The HTTP module */
48
+ XML_FROM_XINCLUDE, /* The XInclude processing */
49
+ XML_FROM_XPATH, /* The XPath module */
50
+ XML_FROM_XPOINTER, /* The XPointer module */
51
+ XML_FROM_REGEXP, /* The regular expressions module */
52
+ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
53
+ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
54
+ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
55
+ XML_FROM_RELAXNGP, /* The Relax-NG parser module */
56
+ XML_FROM_RELAXNGV, /* The Relax-NG validator module */
57
+ XML_FROM_CATALOG, /* The Catalog module */
58
+ XML_FROM_C14N, /* The Canonicalization module */
59
+ XML_FROM_XSLT, /* The XSLT engine from libxslt */
60
+ XML_FROM_VALID, /* The XML DTD validation with valid context */
61
+ XML_FROM_CHECK, /* The error checking module */
62
+ XML_FROM_WRITER, /* The xmlwriter module */
63
+ XML_FROM_MODULE, /* The dynamically loaded module module*/
64
+ XML_FROM_I18N, /* The module handling character conversion */
65
+ XML_FROM_SCHEMATRONV,/* The Schematron validator module */
66
+ XML_FROM_BUFFER, /* The buffers module */
67
+ XML_FROM_URI /* The URI module */
68
+ } xmlErrorDomain;
69
+
70
+ /**
71
+ * xmlError:
72
+ *
73
+ * An XML Error instance.
74
+ */
75
+
76
+ typedef struct _xmlError xmlError;
77
+ typedef xmlError *xmlErrorPtr;
78
+ struct _xmlError {
79
+ int domain; /* What part of the library raised this error */
80
+ int code; /* The error code, e.g. an xmlParserError */
81
+ char *message;/* human-readable informative error message */
82
+ xmlErrorLevel level;/* how consequent is the error */
83
+ char *file; /* the filename */
84
+ int line; /* the line number if available */
85
+ char *str1; /* extra string information */
86
+ char *str2; /* extra string information */
87
+ char *str3; /* extra string information */
88
+ int int1; /* extra number information */
89
+ int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
90
+ void *ctxt; /* the parser context if available */
91
+ void *node; /* the node in the tree */
92
+ };
93
+
94
+ /**
95
+ * xmlParserError:
96
+ *
97
+ * This is an error that the XML (or HTML) parser can generate
98
+ */
99
+ typedef enum {
100
+ XML_ERR_OK = 0,
101
+ XML_ERR_INTERNAL_ERROR, /* 1 */
102
+ XML_ERR_NO_MEMORY, /* 2 */
103
+ XML_ERR_DOCUMENT_START, /* 3 */
104
+ XML_ERR_DOCUMENT_EMPTY, /* 4 */
105
+ XML_ERR_DOCUMENT_END, /* 5 */
106
+ XML_ERR_INVALID_HEX_CHARREF, /* 6 */
107
+ XML_ERR_INVALID_DEC_CHARREF, /* 7 */
108
+ XML_ERR_INVALID_CHARREF, /* 8 */
109
+ XML_ERR_INVALID_CHAR, /* 9 */
110
+ XML_ERR_CHARREF_AT_EOF, /* 10 */
111
+ XML_ERR_CHARREF_IN_PROLOG, /* 11 */
112
+ XML_ERR_CHARREF_IN_EPILOG, /* 12 */
113
+ XML_ERR_CHARREF_IN_DTD, /* 13 */
114
+ XML_ERR_ENTITYREF_AT_EOF, /* 14 */
115
+ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
116
+ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
117
+ XML_ERR_ENTITYREF_IN_DTD, /* 17 */
118
+ XML_ERR_PEREF_AT_EOF, /* 18 */
119
+ XML_ERR_PEREF_IN_PROLOG, /* 19 */
120
+ XML_ERR_PEREF_IN_EPILOG, /* 20 */
121
+ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
122
+ XML_ERR_ENTITYREF_NO_NAME, /* 22 */
123
+ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
124
+ XML_ERR_PEREF_NO_NAME, /* 24 */
125
+ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
126
+ XML_ERR_UNDECLARED_ENTITY, /* 26 */
127
+ XML_WAR_UNDECLARED_ENTITY, /* 27 */
128
+ XML_ERR_UNPARSED_ENTITY, /* 28 */
129
+ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
130
+ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
131
+ XML_ERR_UNKNOWN_ENCODING, /* 31 */
132
+ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
133
+ XML_ERR_STRING_NOT_STARTED, /* 33 */
134
+ XML_ERR_STRING_NOT_CLOSED, /* 34 */
135
+ XML_ERR_NS_DECL_ERROR, /* 35 */
136
+ XML_ERR_ENTITY_NOT_STARTED, /* 36 */
137
+ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
138
+ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
139
+ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
140
+ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
141
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
142
+ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
143
+ XML_ERR_LITERAL_NOT_STARTED, /* 43 */
144
+ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
145
+ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
146
+ XML_ERR_PI_NOT_STARTED, /* 46 */
147
+ XML_ERR_PI_NOT_FINISHED, /* 47 */
148
+ XML_ERR_NOTATION_NOT_STARTED, /* 48 */
149
+ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
150
+ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
151
+ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
152
+ XML_ERR_MIXED_NOT_STARTED, /* 52 */
153
+ XML_ERR_MIXED_NOT_FINISHED, /* 53 */
154
+ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
155
+ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
156
+ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
157
+ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
158
+ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
159
+ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
160
+ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
161
+ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
162
+ XML_ERR_MISPLACED_CDATA_END, /* 62 */
163
+ XML_ERR_CDATA_NOT_FINISHED, /* 63 */
164
+ XML_ERR_RESERVED_XML_NAME, /* 64 */
165
+ XML_ERR_SPACE_REQUIRED, /* 65 */
166
+ XML_ERR_SEPARATOR_REQUIRED, /* 66 */
167
+ XML_ERR_NMTOKEN_REQUIRED, /* 67 */
168
+ XML_ERR_NAME_REQUIRED, /* 68 */
169
+ XML_ERR_PCDATA_REQUIRED, /* 69 */
170
+ XML_ERR_URI_REQUIRED, /* 70 */
171
+ XML_ERR_PUBID_REQUIRED, /* 71 */
172
+ XML_ERR_LT_REQUIRED, /* 72 */
173
+ XML_ERR_GT_REQUIRED, /* 73 */
174
+ XML_ERR_LTSLASH_REQUIRED, /* 74 */
175
+ XML_ERR_EQUAL_REQUIRED, /* 75 */
176
+ XML_ERR_TAG_NAME_MISMATCH, /* 76 */
177
+ XML_ERR_TAG_NOT_FINISHED, /* 77 */
178
+ XML_ERR_STANDALONE_VALUE, /* 78 */
179
+ XML_ERR_ENCODING_NAME, /* 79 */
180
+ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
181
+ XML_ERR_INVALID_ENCODING, /* 81 */
182
+ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
183
+ XML_ERR_CONDSEC_INVALID, /* 83 */
184
+ XML_ERR_VALUE_REQUIRED, /* 84 */
185
+ XML_ERR_NOT_WELL_BALANCED, /* 85 */
186
+ XML_ERR_EXTRA_CONTENT, /* 86 */
187
+ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
188
+ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
189
+ XML_ERR_ENTITY_LOOP, /* 89 */
190
+ XML_ERR_ENTITY_BOUNDARY, /* 90 */
191
+ XML_ERR_INVALID_URI, /* 91 */
192
+ XML_ERR_URI_FRAGMENT, /* 92 */
193
+ XML_WAR_CATALOG_PI, /* 93 */
194
+ XML_ERR_NO_DTD, /* 94 */
195
+ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
196
+ XML_ERR_VERSION_MISSING, /* 96 */
197
+ XML_WAR_UNKNOWN_VERSION, /* 97 */
198
+ XML_WAR_LANG_VALUE, /* 98 */
199
+ XML_WAR_NS_URI, /* 99 */
200
+ XML_WAR_NS_URI_RELATIVE, /* 100 */
201
+ XML_ERR_MISSING_ENCODING, /* 101 */
202
+ XML_WAR_SPACE_VALUE, /* 102 */
203
+ XML_ERR_NOT_STANDALONE, /* 103 */
204
+ XML_ERR_ENTITY_PROCESSING, /* 104 */
205
+ XML_ERR_NOTATION_PROCESSING, /* 105 */
206
+ XML_WAR_NS_COLUMN, /* 106 */
207
+ XML_WAR_ENTITY_REDEFINED, /* 107 */
208
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
209
+ XML_ERR_VERSION_MISMATCH, /* 109 */
210
+ XML_ERR_NAME_TOO_LONG, /* 110 */
211
+ XML_ERR_USER_STOP, /* 111 */
212
+ XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
213
+ XML_WAR_ENCODING_MISMATCH, /* 113 */
214
+ XML_NS_ERR_XML_NAMESPACE = 200,
215
+ XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
216
+ XML_NS_ERR_QNAME, /* 202 */
217
+ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
218
+ XML_NS_ERR_EMPTY, /* 204 */
219
+ XML_NS_ERR_COLON, /* 205 */
220
+ XML_DTD_ATTRIBUTE_DEFAULT = 500,
221
+ XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
222
+ XML_DTD_ATTRIBUTE_VALUE, /* 502 */
223
+ XML_DTD_CONTENT_ERROR, /* 503 */
224
+ XML_DTD_CONTENT_MODEL, /* 504 */
225
+ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
226
+ XML_DTD_DIFFERENT_PREFIX, /* 506 */
227
+ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
228
+ XML_DTD_ELEM_NAMESPACE, /* 508 */
229
+ XML_DTD_ELEM_REDEFINED, /* 509 */
230
+ XML_DTD_EMPTY_NOTATION, /* 510 */
231
+ XML_DTD_ENTITY_TYPE, /* 511 */
232
+ XML_DTD_ID_FIXED, /* 512 */
233
+ XML_DTD_ID_REDEFINED, /* 513 */
234
+ XML_DTD_ID_SUBSET, /* 514 */
235
+ XML_DTD_INVALID_CHILD, /* 515 */
236
+ XML_DTD_INVALID_DEFAULT, /* 516 */
237
+ XML_DTD_LOAD_ERROR, /* 517 */
238
+ XML_DTD_MISSING_ATTRIBUTE, /* 518 */
239
+ XML_DTD_MIXED_CORRUPT, /* 519 */
240
+ XML_DTD_MULTIPLE_ID, /* 520 */
241
+ XML_DTD_NO_DOC, /* 521 */
242
+ XML_DTD_NO_DTD, /* 522 */
243
+ XML_DTD_NO_ELEM_NAME, /* 523 */
244
+ XML_DTD_NO_PREFIX, /* 524 */
245
+ XML_DTD_NO_ROOT, /* 525 */
246
+ XML_DTD_NOTATION_REDEFINED, /* 526 */
247
+ XML_DTD_NOTATION_VALUE, /* 527 */
248
+ XML_DTD_NOT_EMPTY, /* 528 */
249
+ XML_DTD_NOT_PCDATA, /* 529 */
250
+ XML_DTD_NOT_STANDALONE, /* 530 */
251
+ XML_DTD_ROOT_NAME, /* 531 */
252
+ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
253
+ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
254
+ XML_DTD_UNKNOWN_ELEM, /* 534 */
255
+ XML_DTD_UNKNOWN_ENTITY, /* 535 */
256
+ XML_DTD_UNKNOWN_ID, /* 536 */
257
+ XML_DTD_UNKNOWN_NOTATION, /* 537 */
258
+ XML_DTD_STANDALONE_DEFAULTED, /* 538 */
259
+ XML_DTD_XMLID_VALUE, /* 539 */
260
+ XML_DTD_XMLID_TYPE, /* 540 */
261
+ XML_DTD_DUP_TOKEN, /* 541 */
262
+ XML_HTML_STRUCURE_ERROR = 800,
263
+ XML_HTML_UNKNOWN_TAG, /* 801 */
264
+ XML_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */
265
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
266
+ XML_RNGP_ATTR_CONFLICT, /* 1001 */
267
+ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
268
+ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
269
+ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
270
+ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
271
+ XML_RNGP_CHOICE_CONTENT, /* 1006 */
272
+ XML_RNGP_CHOICE_EMPTY, /* 1007 */
273
+ XML_RNGP_CREATE_FAILURE, /* 1008 */
274
+ XML_RNGP_DATA_CONTENT, /* 1009 */
275
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
276
+ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
277
+ XML_RNGP_DEFINE_EMPTY, /* 1012 */
278
+ XML_RNGP_DEFINE_MISSING, /* 1013 */
279
+ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
280
+ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
281
+ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
282
+ XML_RNGP_ELEMENT_EMPTY, /* 1017 */
283
+ XML_RNGP_ELEMENT_CONTENT, /* 1018 */
284
+ XML_RNGP_ELEMENT_NAME, /* 1019 */
285
+ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
286
+ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
287
+ XML_RNGP_EMPTY, /* 1022 */
288
+ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
289
+ XML_RNGP_EMPTY_CONTENT, /* 1024 */
290
+ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
291
+ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
292
+ XML_RNGP_EXCEPT_EMPTY, /* 1027 */
293
+ XML_RNGP_EXCEPT_MISSING, /* 1028 */
294
+ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
295
+ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
296
+ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
297
+ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
298
+ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
299
+ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
300
+ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
301
+ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
302
+ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
303
+ XML_RNGP_GRAMMAR_MISSING, /* 1038 */
304
+ XML_RNGP_GRAMMAR_NO_START, /* 1039 */
305
+ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
306
+ XML_RNGP_HREF_ERROR, /* 1041 */
307
+ XML_RNGP_INCLUDE_EMPTY, /* 1042 */
308
+ XML_RNGP_INCLUDE_FAILURE, /* 1043 */
309
+ XML_RNGP_INCLUDE_RECURSE, /* 1044 */
310
+ XML_RNGP_INTERLEAVE_ADD, /* 1045 */
311
+ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
312
+ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
313
+ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
314
+ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
315
+ XML_RNGP_INVALID_URI, /* 1050 */
316
+ XML_RNGP_INVALID_VALUE, /* 1051 */
317
+ XML_RNGP_MISSING_HREF, /* 1052 */
318
+ XML_RNGP_NAME_MISSING, /* 1053 */
319
+ XML_RNGP_NEED_COMBINE, /* 1054 */
320
+ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
321
+ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
322
+ XML_RNGP_NSNAME_NO_NS, /* 1057 */
323
+ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
324
+ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
325
+ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
326
+ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
327
+ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
328
+ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
329
+ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
330
+ XML_RNGP_PARSE_ERROR, /* 1065 */
331
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
332
+ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
333
+ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
334
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
335
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
336
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
337
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
338
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
339
+ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
340
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
341
+ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
342
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
343
+ XML_RNGP_PAT_LIST_ATTR, /* 1078 */
344
+ XML_RNGP_PAT_LIST_ELEM, /* 1079 */
345
+ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
346
+ XML_RNGP_PAT_LIST_LIST, /* 1081 */
347
+ XML_RNGP_PAT_LIST_REF, /* 1082 */
348
+ XML_RNGP_PAT_LIST_TEXT, /* 1083 */
349
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
350
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
351
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
352
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
353
+ XML_RNGP_PAT_START_ATTR, /* 1088 */
354
+ XML_RNGP_PAT_START_DATA, /* 1089 */
355
+ XML_RNGP_PAT_START_EMPTY, /* 1090 */
356
+ XML_RNGP_PAT_START_GROUP, /* 1091 */
357
+ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
358
+ XML_RNGP_PAT_START_LIST, /* 1093 */
359
+ XML_RNGP_PAT_START_ONEMORE, /* 1094 */
360
+ XML_RNGP_PAT_START_TEXT, /* 1095 */
361
+ XML_RNGP_PAT_START_VALUE, /* 1096 */
362
+ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
363
+ XML_RNGP_REF_CREATE_FAILED, /* 1098 */
364
+ XML_RNGP_REF_CYCLE, /* 1099 */
365
+ XML_RNGP_REF_NAME_INVALID, /* 1100 */
366
+ XML_RNGP_REF_NO_DEF, /* 1101 */
367
+ XML_RNGP_REF_NO_NAME, /* 1102 */
368
+ XML_RNGP_REF_NOT_EMPTY, /* 1103 */
369
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
370
+ XML_RNGP_START_CONTENT, /* 1105 */
371
+ XML_RNGP_START_EMPTY, /* 1106 */
372
+ XML_RNGP_START_MISSING, /* 1107 */
373
+ XML_RNGP_TEXT_EXPECTED, /* 1108 */
374
+ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
375
+ XML_RNGP_TYPE_MISSING, /* 1110 */
376
+ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
377
+ XML_RNGP_TYPE_VALUE, /* 1112 */
378
+ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
379
+ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
380
+ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
381
+ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
382
+ XML_RNGP_URI_FRAGMENT, /* 1117 */
383
+ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
384
+ XML_RNGP_VALUE_EMPTY, /* 1119 */
385
+ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
386
+ XML_RNGP_XMLNS_NAME, /* 1121 */
387
+ XML_RNGP_XML_NS, /* 1122 */
388
+ XML_XPATH_EXPRESSION_OK = 1200,
389
+ XML_XPATH_NUMBER_ERROR, /* 1201 */
390
+ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
391
+ XML_XPATH_START_LITERAL_ERROR, /* 1203 */
392
+ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
393
+ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
394
+ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
395
+ XML_XPATH_EXPR_ERROR, /* 1207 */
396
+ XML_XPATH_UNCLOSED_ERROR, /* 1208 */
397
+ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
398
+ XML_XPATH_INVALID_OPERAND, /* 1210 */
399
+ XML_XPATH_INVALID_TYPE, /* 1211 */
400
+ XML_XPATH_INVALID_ARITY, /* 1212 */
401
+ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
402
+ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
403
+ XML_XPATH_MEMORY_ERROR, /* 1215 */
404
+ XML_XPTR_SYNTAX_ERROR, /* 1216 */
405
+ XML_XPTR_RESOURCE_ERROR, /* 1217 */
406
+ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
407
+ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
408
+ XML_XPATH_ENCODING_ERROR, /* 1220 */
409
+ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
410
+ XML_TREE_INVALID_HEX = 1300,
411
+ XML_TREE_INVALID_DEC, /* 1301 */
412
+ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
413
+ XML_TREE_NOT_UTF8, /* 1303 */
414
+ XML_SAVE_NOT_UTF8 = 1400,
415
+ XML_SAVE_CHAR_INVALID, /* 1401 */
416
+ XML_SAVE_NO_DOCTYPE, /* 1402 */
417
+ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
418
+ XML_REGEXP_COMPILE_ERROR = 1450,
419
+ XML_IO_UNKNOWN = 1500,
420
+ XML_IO_EACCES, /* 1501 */
421
+ XML_IO_EAGAIN, /* 1502 */
422
+ XML_IO_EBADF, /* 1503 */
423
+ XML_IO_EBADMSG, /* 1504 */
424
+ XML_IO_EBUSY, /* 1505 */
425
+ XML_IO_ECANCELED, /* 1506 */
426
+ XML_IO_ECHILD, /* 1507 */
427
+ XML_IO_EDEADLK, /* 1508 */
428
+ XML_IO_EDOM, /* 1509 */
429
+ XML_IO_EEXIST, /* 1510 */
430
+ XML_IO_EFAULT, /* 1511 */
431
+ XML_IO_EFBIG, /* 1512 */
432
+ XML_IO_EINPROGRESS, /* 1513 */
433
+ XML_IO_EINTR, /* 1514 */
434
+ XML_IO_EINVAL, /* 1515 */
435
+ XML_IO_EIO, /* 1516 */
436
+ XML_IO_EISDIR, /* 1517 */
437
+ XML_IO_EMFILE, /* 1518 */
438
+ XML_IO_EMLINK, /* 1519 */
439
+ XML_IO_EMSGSIZE, /* 1520 */
440
+ XML_IO_ENAMETOOLONG, /* 1521 */
441
+ XML_IO_ENFILE, /* 1522 */
442
+ XML_IO_ENODEV, /* 1523 */
443
+ XML_IO_ENOENT, /* 1524 */
444
+ XML_IO_ENOEXEC, /* 1525 */
445
+ XML_IO_ENOLCK, /* 1526 */
446
+ XML_IO_ENOMEM, /* 1527 */
447
+ XML_IO_ENOSPC, /* 1528 */
448
+ XML_IO_ENOSYS, /* 1529 */
449
+ XML_IO_ENOTDIR, /* 1530 */
450
+ XML_IO_ENOTEMPTY, /* 1531 */
451
+ XML_IO_ENOTSUP, /* 1532 */
452
+ XML_IO_ENOTTY, /* 1533 */
453
+ XML_IO_ENXIO, /* 1534 */
454
+ XML_IO_EPERM, /* 1535 */
455
+ XML_IO_EPIPE, /* 1536 */
456
+ XML_IO_ERANGE, /* 1537 */
457
+ XML_IO_EROFS, /* 1538 */
458
+ XML_IO_ESPIPE, /* 1539 */
459
+ XML_IO_ESRCH, /* 1540 */
460
+ XML_IO_ETIMEDOUT, /* 1541 */
461
+ XML_IO_EXDEV, /* 1542 */
462
+ XML_IO_NETWORK_ATTEMPT, /* 1543 */
463
+ XML_IO_ENCODER, /* 1544 */
464
+ XML_IO_FLUSH, /* 1545 */
465
+ XML_IO_WRITE, /* 1546 */
466
+ XML_IO_NO_INPUT, /* 1547 */
467
+ XML_IO_BUFFER_FULL, /* 1548 */
468
+ XML_IO_LOAD_ERROR, /* 1549 */
469
+ XML_IO_ENOTSOCK, /* 1550 */
470
+ XML_IO_EISCONN, /* 1551 */
471
+ XML_IO_ECONNREFUSED, /* 1552 */
472
+ XML_IO_ENETUNREACH, /* 1553 */
473
+ XML_IO_EADDRINUSE, /* 1554 */
474
+ XML_IO_EALREADY, /* 1555 */
475
+ XML_IO_EAFNOSUPPORT, /* 1556 */
476
+ XML_XINCLUDE_RECURSION=1600,
477
+ XML_XINCLUDE_PARSE_VALUE, /* 1601 */
478
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
479
+ XML_XINCLUDE_NO_HREF, /* 1603 */
480
+ XML_XINCLUDE_NO_FALLBACK, /* 1604 */
481
+ XML_XINCLUDE_HREF_URI, /* 1605 */
482
+ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
483
+ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
484
+ XML_XINCLUDE_INVALID_CHAR, /* 1608 */
485
+ XML_XINCLUDE_BUILD_FAILED, /* 1609 */
486
+ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
487
+ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
488
+ XML_XINCLUDE_XPTR_FAILED, /* 1612 */
489
+ XML_XINCLUDE_XPTR_RESULT, /* 1613 */
490
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
491
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
492
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
493
+ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
494
+ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
495
+ XML_CATALOG_MISSING_ATTR = 1650,
496
+ XML_CATALOG_ENTRY_BROKEN, /* 1651 */
497
+ XML_CATALOG_PREFER_VALUE, /* 1652 */
498
+ XML_CATALOG_NOT_CATALOG, /* 1653 */
499
+ XML_CATALOG_RECURSION, /* 1654 */
500
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
501
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
502
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
503
+ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
504
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
505
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
506
+ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
507
+ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
508
+ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
509
+ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
510
+ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
511
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
512
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
513
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
514
+ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
515
+ XML_SCHEMAP_INVALID_ENUM, /* 1715 */
516
+ XML_SCHEMAP_INVALID_FACET, /* 1716 */
517
+ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
518
+ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
519
+ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
520
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
521
+ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
522
+ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
523
+ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
524
+ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
525
+ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
526
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
527
+ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
528
+ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
529
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
530
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
531
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
532
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
533
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
534
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
535
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
536
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
537
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
538
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
539
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
540
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
541
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
542
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
543
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
544
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
545
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
546
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
547
+ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
548
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
549
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
550
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
551
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
552
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
553
+ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
554
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
555
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
556
+ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
557
+ XML_SCHEMAP_FAILED_LOAD, /* 1757 */
558
+ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
559
+ XML_SCHEMAP_NOROOT, /* 1759 */
560
+ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
561
+ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
562
+ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
563
+ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
564
+ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
565
+ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
566
+ XML_SCHEMAP_FAILED_PARSE, /* 1766 */
567
+ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
568
+ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
569
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
570
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
571
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
572
+ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
573
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
574
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
575
+ XML_SCHEMAP_RECURSIVE, /* 1775 */
576
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
577
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
578
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
579
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
580
+ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
581
+ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
582
+ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
583
+ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
584
+ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
585
+ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
586
+ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
587
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
588
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
589
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
590
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
591
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
592
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
593
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
594
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
595
+ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
596
+ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
597
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
598
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
599
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
600
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
601
+ XML_SCHEMAV_NOROOT = 1801,
602
+ XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
603
+ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
604
+ XML_SCHEMAV_MISSING, /* 1804 */
605
+ XML_SCHEMAV_WRONGELEM, /* 1805 */
606
+ XML_SCHEMAV_NOTYPE, /* 1806 */
607
+ XML_SCHEMAV_NOROLLBACK, /* 1807 */
608
+ XML_SCHEMAV_ISABSTRACT, /* 1808 */
609
+ XML_SCHEMAV_NOTEMPTY, /* 1809 */
610
+ XML_SCHEMAV_ELEMCONT, /* 1810 */
611
+ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
612
+ XML_SCHEMAV_NOTNILLABLE, /* 1812 */
613
+ XML_SCHEMAV_EXTRACONTENT, /* 1813 */
614
+ XML_SCHEMAV_INVALIDATTR, /* 1814 */
615
+ XML_SCHEMAV_INVALIDELEM, /* 1815 */
616
+ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
617
+ XML_SCHEMAV_CONSTRUCT, /* 1817 */
618
+ XML_SCHEMAV_INTERNAL, /* 1818 */
619
+ XML_SCHEMAV_NOTSIMPLE, /* 1819 */
620
+ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
621
+ XML_SCHEMAV_ATTRINVALID, /* 1821 */
622
+ XML_SCHEMAV_VALUE, /* 1822 */
623
+ XML_SCHEMAV_FACET, /* 1823 */
624
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
625
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
626
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
627
+ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
628
+ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
629
+ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
630
+ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
631
+ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
632
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
633
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
634
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
635
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
636
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
637
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
638
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
639
+ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
640
+ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
641
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
642
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
643
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
644
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
645
+ XML_SCHEMAV_CVC_ELT_1, /* 1845 */
646
+ XML_SCHEMAV_CVC_ELT_2, /* 1846 */
647
+ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
648
+ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
649
+ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
650
+ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
651
+ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
652
+ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
653
+ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
654
+ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
655
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
656
+ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
657
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
658
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
659
+ XML_SCHEMAV_CVC_ELT_6, /* 1859 */
660
+ XML_SCHEMAV_CVC_ELT_7, /* 1860 */
661
+ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
662
+ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
663
+ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
664
+ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
665
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
666
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
667
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
668
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
669
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
670
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
671
+ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
672
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
673
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
674
+ XML_SCHEMAV_CVC_AU, /* 1874 */
675
+ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
676
+ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
677
+ XML_SCHEMAV_CVC_IDC, /* 1877 */
678
+ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
679
+ XML_SCHEMAV_MISC, /* 1879 */
680
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
681
+ XML_XPTR_CHILDSEQ_START, /* 1901 */
682
+ XML_XPTR_EVAL_FAILED, /* 1902 */
683
+ XML_XPTR_EXTRA_OBJECTS, /* 1903 */
684
+ XML_C14N_CREATE_CTXT = 1950,
685
+ XML_C14N_REQUIRES_UTF8, /* 1951 */
686
+ XML_C14N_CREATE_STACK, /* 1952 */
687
+ XML_C14N_INVALID_NODE, /* 1953 */
688
+ XML_C14N_UNKNOW_NODE, /* 1954 */
689
+ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
690
+ XML_FTP_PASV_ANSWER = 2000,
691
+ XML_FTP_EPSV_ANSWER, /* 2001 */
692
+ XML_FTP_ACCNT, /* 2002 */
693
+ XML_FTP_URL_SYNTAX, /* 2003 */
694
+ XML_HTTP_URL_SYNTAX = 2020,
695
+ XML_HTTP_USE_IP, /* 2021 */
696
+ XML_HTTP_UNKNOWN_HOST, /* 2022 */
697
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
698
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
699
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
700
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
701
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
702
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
703
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
704
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
705
+ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
706
+ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
707
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
708
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
709
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
710
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
711
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
712
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
713
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
714
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
715
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
716
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
717
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
718
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
719
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
720
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
721
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
722
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
723
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
724
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
725
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
726
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
727
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
728
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
729
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
730
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
731
+ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
732
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
733
+ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
734
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
735
+ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
736
+ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
737
+ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
738
+ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
739
+ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
740
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
741
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
742
+ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
743
+ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
744
+ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
745
+ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
746
+ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
747
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
748
+ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
749
+ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
750
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
751
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
752
+ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
753
+ XML_SCHEMAP_NO_XMLNS, /* 3056 */
754
+ XML_SCHEMAP_NO_XSI, /* 3057 */
755
+ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
756
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
757
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
758
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
759
+ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
760
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
761
+ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
762
+ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
763
+ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
764
+ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
765
+ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
766
+ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
767
+ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
768
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
769
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
770
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
771
+ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
772
+ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
773
+ XML_SCHEMAP_SRC_CT_1, /* 3076 */
774
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
775
+ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
776
+ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
777
+ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
778
+ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
779
+ XML_SCHEMAP_SRC_IMPORT, /* 3082 */
780
+ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
781
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
782
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
783
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
784
+ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
785
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
786
+ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
787
+ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
788
+ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
789
+ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
790
+ XML_SCHEMATRONV_REPORT,
791
+ XML_MODULE_OPEN = 4900, /* 4900 */
792
+ XML_MODULE_CLOSE, /* 4901 */
793
+ XML_CHECK_FOUND_ELEMENT = 5000,
794
+ XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
795
+ XML_CHECK_FOUND_TEXT, /* 5002 */
796
+ XML_CHECK_FOUND_CDATA, /* 5003 */
797
+ XML_CHECK_FOUND_ENTITYREF, /* 5004 */
798
+ XML_CHECK_FOUND_ENTITY, /* 5005 */
799
+ XML_CHECK_FOUND_PI, /* 5006 */
800
+ XML_CHECK_FOUND_COMMENT, /* 5007 */
801
+ XML_CHECK_FOUND_DOCTYPE, /* 5008 */
802
+ XML_CHECK_FOUND_FRAGMENT, /* 5009 */
803
+ XML_CHECK_FOUND_NOTATION, /* 5010 */
804
+ XML_CHECK_UNKNOWN_NODE, /* 5011 */
805
+ XML_CHECK_ENTITY_TYPE, /* 5012 */
806
+ XML_CHECK_NO_PARENT, /* 5013 */
807
+ XML_CHECK_NO_DOC, /* 5014 */
808
+ XML_CHECK_NO_NAME, /* 5015 */
809
+ XML_CHECK_NO_ELEM, /* 5016 */
810
+ XML_CHECK_WRONG_DOC, /* 5017 */
811
+ XML_CHECK_NO_PREV, /* 5018 */
812
+ XML_CHECK_WRONG_PREV, /* 5019 */
813
+ XML_CHECK_NO_NEXT, /* 5020 */
814
+ XML_CHECK_WRONG_NEXT, /* 5021 */
815
+ XML_CHECK_NOT_DTD, /* 5022 */
816
+ XML_CHECK_NOT_ATTR, /* 5023 */
817
+ XML_CHECK_NOT_ATTR_DECL, /* 5024 */
818
+ XML_CHECK_NOT_ELEM_DECL, /* 5025 */
819
+ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
820
+ XML_CHECK_NOT_NS_DECL, /* 5027 */
821
+ XML_CHECK_NO_HREF, /* 5028 */
822
+ XML_CHECK_WRONG_PARENT,/* 5029 */
823
+ XML_CHECK_NS_SCOPE, /* 5030 */
824
+ XML_CHECK_NS_ANCESTOR, /* 5031 */
825
+ XML_CHECK_NOT_UTF8, /* 5032 */
826
+ XML_CHECK_NO_DICT, /* 5033 */
827
+ XML_CHECK_NOT_NCNAME, /* 5034 */
828
+ XML_CHECK_OUTSIDE_DICT, /* 5035 */
829
+ XML_CHECK_WRONG_NAME, /* 5036 */
830
+ XML_CHECK_NAME_NOT_NULL, /* 5037 */
831
+ XML_I18N_NO_NAME = 6000,
832
+ XML_I18N_NO_HANDLER, /* 6001 */
833
+ XML_I18N_EXCESS_HANDLER, /* 6002 */
834
+ XML_I18N_CONV_FAILED, /* 6003 */
835
+ XML_I18N_NO_OUTPUT, /* 6004 */
836
+ XML_BUF_OVERFLOW = 7000
837
+ } xmlParserErrors;
838
+
839
+ /**
840
+ * xmlGenericErrorFunc:
841
+ * @ctx: a parsing context
842
+ * @msg: the message
843
+ * @...: the extra arguments of the varargs to format the message
844
+ *
845
+ * Signature of the function to use when there is an error and
846
+ * no parsing or validity context available .
847
+ */
848
+ typedef void (*xmlGenericErrorFunc) (void *ctx,
849
+ const char *msg,
850
+ ...) LIBXML_ATTR_FORMAT(2,3);
851
+ /**
852
+ * xmlStructuredErrorFunc:
853
+ * @userData: user provided data for the error callback
854
+ * @error: the error being raised.
855
+ *
856
+ * Signature of the function to use when there is an error and
857
+ * the module handles the new error reporting mechanism.
858
+ */
859
+ typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
860
+
861
+ /** DOC_DISABLE */
862
+ #define XML_GLOBALS_ERROR \
863
+ XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
864
+ XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
865
+ XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
866
+ XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
867
+ XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
868
+
869
+ #define XML_OP XML_DECLARE_GLOBAL
870
+ XML_GLOBALS_ERROR
871
+ #undef XML_OP
872
+
873
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
874
+ #define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
875
+ #define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
876
+ #define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
877
+ #define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
878
+ #define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
879
+ #endif
880
+ /** DOC_ENABLE */
881
+
882
+ /*
883
+ * Use the following function to reset the two global variables
884
+ * xmlGenericError and xmlGenericErrorContext.
885
+ */
886
+ XMLPUBFUN void
887
+ xmlSetGenericErrorFunc (void *ctx,
888
+ xmlGenericErrorFunc handler);
889
+ XMLPUBFUN void
890
+ xmlThrDefSetGenericErrorFunc(void *ctx,
891
+ xmlGenericErrorFunc handler);
892
+ XML_DEPRECATED
893
+ XMLPUBFUN void
894
+ initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
895
+
896
+ XMLPUBFUN void
897
+ xmlSetStructuredErrorFunc (void *ctx,
898
+ xmlStructuredErrorFunc handler);
899
+ XMLPUBFUN void
900
+ xmlThrDefSetStructuredErrorFunc(void *ctx,
901
+ xmlStructuredErrorFunc handler);
902
+ /*
903
+ * Default message routines used by SAX and Valid context for error
904
+ * and warning reporting.
905
+ */
906
+ XMLPUBFUN void
907
+ xmlParserError (void *ctx,
908
+ const char *msg,
909
+ ...) LIBXML_ATTR_FORMAT(2,3);
910
+ XMLPUBFUN void
911
+ xmlParserWarning (void *ctx,
912
+ const char *msg,
913
+ ...) LIBXML_ATTR_FORMAT(2,3);
914
+ XMLPUBFUN void
915
+ xmlParserValidityError (void *ctx,
916
+ const char *msg,
917
+ ...) LIBXML_ATTR_FORMAT(2,3);
918
+ XMLPUBFUN void
919
+ xmlParserValidityWarning (void *ctx,
920
+ const char *msg,
921
+ ...) LIBXML_ATTR_FORMAT(2,3);
922
+ struct _xmlParserInput;
923
+ XMLPUBFUN void
924
+ xmlParserPrintFileInfo (struct _xmlParserInput *input);
925
+ XMLPUBFUN void
926
+ xmlParserPrintFileContext (struct _xmlParserInput *input);
927
+
928
+ /*
929
+ * Extended error information routines
930
+ */
931
+ XMLPUBFUN const xmlError *
932
+ xmlGetLastError (void);
933
+ XMLPUBFUN void
934
+ xmlResetLastError (void);
935
+ XMLPUBFUN const xmlError *
936
+ xmlCtxtGetLastError (void *ctx);
937
+ XMLPUBFUN void
938
+ xmlCtxtResetLastError (void *ctx);
939
+ XMLPUBFUN void
940
+ xmlResetError (xmlErrorPtr err);
941
+ XMLPUBFUN int
942
+ xmlCopyError (const xmlError *from,
943
+ xmlErrorPtr to);
944
+
945
+ #ifdef __cplusplus
946
+ }
947
+ #endif
948
+ #endif /* __XML_ERROR_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlexports.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: macros for marking symbols as exportable/importable.
3
+ * Description: macros for marking symbols as exportable/importable.
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ */
7
+
8
+ #ifndef __XML_EXPORTS_H__
9
+ #define __XML_EXPORTS_H__
10
+
11
+ /** DOC_DISABLE */
12
+ #if defined(_WIN32) || defined(__CYGWIN__)
13
+ #ifdef LIBXML_STATIC
14
+ #define XMLPUBLIC
15
+ #elif defined(IN_LIBXML)
16
+ #define XMLPUBLIC __declspec(dllexport)
17
+ #else
18
+ #define XMLPUBLIC __declspec(dllimport)
19
+ #endif
20
+ #else /* not Windows */
21
+ #define XMLPUBLIC
22
+ #endif /* platform switch */
23
+ /** DOC_ENABLE */
24
+
25
+ /*
26
+ * XMLPUBFUN:
27
+ *
28
+ * Macro which declares an exportable function
29
+ */
30
+ #define XMLPUBFUN XMLPUBLIC
31
+
32
+ /**
33
+ * XMLPUBVAR:
34
+ *
35
+ * Macro which declares an exportable variable
36
+ */
37
+ #define XMLPUBVAR XMLPUBLIC extern
38
+
39
+ /** DOC_DISABLE */
40
+ /* Compatibility */
41
+ #define XMLCALL
42
+ #define XMLCDECL
43
+ #if !defined(LIBXML_DLL_IMPORT)
44
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
45
+ #endif
46
+ /** DOC_ENABLE */
47
+
48
+ #endif /* __XML_EXPORTS_H__ */
49
+
50
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlmemory.h ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: interface for the memory allocator
3
+ * Description: provides interfaces for the memory allocator,
4
+ * including debugging capabilities.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+
12
+ #ifndef __DEBUG_MEMORY_ALLOC__
13
+ #define __DEBUG_MEMORY_ALLOC__
14
+
15
+ #include <stdio.h>
16
+ #include <libxml/xmlversion.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /*
23
+ * The XML memory wrapper support 4 basic overloadable functions.
24
+ */
25
+ /**
26
+ * xmlFreeFunc:
27
+ * @mem: an already allocated block of memory
28
+ *
29
+ * Signature for a free() implementation.
30
+ */
31
+ typedef void (*xmlFreeFunc)(void *mem);
32
+ /**
33
+ * xmlMallocFunc:
34
+ * @size: the size requested in bytes
35
+ *
36
+ * Signature for a malloc() implementation.
37
+ *
38
+ * Returns a pointer to the newly allocated block or NULL in case of error.
39
+ */
40
+ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
41
+
42
+ /**
43
+ * xmlReallocFunc:
44
+ * @mem: an already allocated block of memory
45
+ * @size: the new size requested in bytes
46
+ *
47
+ * Signature for a realloc() implementation.
48
+ *
49
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
50
+ */
51
+ typedef void *(*xmlReallocFunc)(void *mem, size_t size);
52
+
53
+ /**
54
+ * xmlStrdupFunc:
55
+ * @str: a zero terminated string
56
+ *
57
+ * Signature for an strdup() implementation.
58
+ *
59
+ * Returns the copy of the string or NULL in case of error.
60
+ */
61
+ typedef char *(*xmlStrdupFunc)(const char *str);
62
+
63
+ /*
64
+ * In general the memory allocation entry points are not kept
65
+ * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
66
+ * - xmlMalloc
67
+ * - xmlMallocAtomic
68
+ * - xmlRealloc
69
+ * - xmlMemStrdup
70
+ * - xmlFree
71
+ */
72
+ /** DOC_DISABLE */
73
+ #ifdef LIBXML_THREAD_ALLOC_ENABLED
74
+ #define XML_GLOBALS_ALLOC \
75
+ XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
76
+ XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
77
+ XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
78
+ XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
79
+ XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
80
+ #define XML_OP XML_DECLARE_GLOBAL
81
+ XML_GLOBALS_ALLOC
82
+ #undef XML_OP
83
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
84
+ #define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
85
+ #define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
86
+ #define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
87
+ #define xmlFree XML_GLOBAL_MACRO(xmlFree)
88
+ #define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
89
+ #endif
90
+ #else
91
+ #define XML_GLOBALS_ALLOC
92
+ /** DOC_ENABLE */
93
+ XMLPUBVAR xmlMallocFunc xmlMalloc;
94
+ XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
95
+ XMLPUBVAR xmlReallocFunc xmlRealloc;
96
+ XMLPUBVAR xmlFreeFunc xmlFree;
97
+ XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
98
+ #endif
99
+
100
+ /*
101
+ * The way to overload the existing functions.
102
+ * The xmlGc function have an extra entry for atomic block
103
+ * allocations useful for garbage collected memory allocators
104
+ */
105
+ XMLPUBFUN int
106
+ xmlMemSetup (xmlFreeFunc freeFunc,
107
+ xmlMallocFunc mallocFunc,
108
+ xmlReallocFunc reallocFunc,
109
+ xmlStrdupFunc strdupFunc);
110
+ XMLPUBFUN int
111
+ xmlMemGet (xmlFreeFunc *freeFunc,
112
+ xmlMallocFunc *mallocFunc,
113
+ xmlReallocFunc *reallocFunc,
114
+ xmlStrdupFunc *strdupFunc);
115
+ XMLPUBFUN int
116
+ xmlGcMemSetup (xmlFreeFunc freeFunc,
117
+ xmlMallocFunc mallocFunc,
118
+ xmlMallocFunc mallocAtomicFunc,
119
+ xmlReallocFunc reallocFunc,
120
+ xmlStrdupFunc strdupFunc);
121
+ XMLPUBFUN int
122
+ xmlGcMemGet (xmlFreeFunc *freeFunc,
123
+ xmlMallocFunc *mallocFunc,
124
+ xmlMallocFunc *mallocAtomicFunc,
125
+ xmlReallocFunc *reallocFunc,
126
+ xmlStrdupFunc *strdupFunc);
127
+
128
+ /*
129
+ * Initialization of the memory layer.
130
+ */
131
+ XML_DEPRECATED
132
+ XMLPUBFUN int
133
+ xmlInitMemory (void);
134
+
135
+ /*
136
+ * Cleanup of the memory layer.
137
+ */
138
+ XML_DEPRECATED
139
+ XMLPUBFUN void
140
+ xmlCleanupMemory (void);
141
+ /*
142
+ * These are specific to the XML debug memory wrapper.
143
+ */
144
+ XMLPUBFUN size_t
145
+ xmlMemSize (void *ptr);
146
+ XMLPUBFUN int
147
+ xmlMemUsed (void);
148
+ XMLPUBFUN int
149
+ xmlMemBlocks (void);
150
+ XMLPUBFUN void
151
+ xmlMemDisplay (FILE *fp);
152
+ XMLPUBFUN void
153
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
154
+ XMLPUBFUN void
155
+ xmlMemShow (FILE *fp, int nr);
156
+ XMLPUBFUN void
157
+ xmlMemoryDump (void);
158
+ XMLPUBFUN void *
159
+ xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
160
+ XMLPUBFUN void *
161
+ xmlMemRealloc (void *ptr,size_t size);
162
+ XMLPUBFUN void
163
+ xmlMemFree (void *ptr);
164
+ XMLPUBFUN char *
165
+ xmlMemoryStrdup (const char *str);
166
+ XMLPUBFUN void *
167
+ xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
168
+ XMLPUBFUN void *
169
+ xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
170
+ XMLPUBFUN void *
171
+ xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
172
+ XMLPUBFUN char *
173
+ xmlMemStrdupLoc (const char *str, const char *file, int line);
174
+
175
+
176
+ /** DOC_DISABLE */
177
+ #ifdef DEBUG_MEMORY_LOCATION
178
+ /**
179
+ * xmlMalloc:
180
+ * @size: number of bytes to allocate
181
+ *
182
+ * Wrapper for the malloc() function used in the XML library.
183
+ *
184
+ * Returns the pointer to the allocated area or NULL in case of error.
185
+ */
186
+ #define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
187
+ /**
188
+ * xmlMallocAtomic:
189
+ * @size: number of bytes to allocate
190
+ *
191
+ * Wrapper for the malloc() function used in the XML library for allocation
192
+ * of block not containing pointers to other areas.
193
+ *
194
+ * Returns the pointer to the allocated area or NULL in case of error.
195
+ */
196
+ #define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
197
+ /**
198
+ * xmlRealloc:
199
+ * @ptr: pointer to the existing allocated area
200
+ * @size: number of bytes to allocate
201
+ *
202
+ * Wrapper for the realloc() function used in the XML library.
203
+ *
204
+ * Returns the pointer to the allocated area or NULL in case of error.
205
+ */
206
+ #define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
207
+ /**
208
+ * xmlMemStrdup:
209
+ * @str: pointer to the existing string
210
+ *
211
+ * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
212
+ *
213
+ * Returns the pointer to the allocated area or NULL in case of error.
214
+ */
215
+ #define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
216
+
217
+ #endif /* DEBUG_MEMORY_LOCATION */
218
+ /** DOC_ENABLE */
219
+
220
+ #ifdef __cplusplus
221
+ }
222
+ #endif /* __cplusplus */
223
+
224
+ #endif /* __DEBUG_MEMORY_ALLOC__ */
225
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlmodule.h ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: dynamic module loading
3
+ * Description: basic API for dynamic module loading, used by
4
+ * libexslt added in 2.6.17
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Joel W. Reed
9
+ */
10
+
11
+ #ifndef __XML_MODULE_H__
12
+ #define __XML_MODULE_H__
13
+
14
+ #include <libxml/xmlversion.h>
15
+
16
+ #ifdef LIBXML_MODULES_ENABLED
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /**
23
+ * xmlModulePtr:
24
+ *
25
+ * A handle to a dynamically loaded module
26
+ */
27
+ typedef struct _xmlModule xmlModule;
28
+ typedef xmlModule *xmlModulePtr;
29
+
30
+ /**
31
+ * xmlModuleOption:
32
+ *
33
+ * enumeration of options that can be passed down to xmlModuleOpen()
34
+ */
35
+ typedef enum {
36
+ XML_MODULE_LAZY = 1, /* lazy binding */
37
+ XML_MODULE_LOCAL= 2 /* local binding */
38
+ } xmlModuleOption;
39
+
40
+ XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
41
+ int options);
42
+
43
+ XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
44
+ const char* name,
45
+ void **result);
46
+
47
+ XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
48
+
49
+ XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
50
+
51
+ #ifdef __cplusplus
52
+ }
53
+ #endif
54
+
55
+ #endif /* LIBXML_MODULES_ENABLED */
56
+
57
+ #endif /*__XML_MODULE_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlreader.h ADDED
@@ -0,0 +1,434 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: the XMLReader implementation
3
+ * Description: API of the XML streaming API based on C# interfaces.
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_XMLREADER_H__
11
+ #define __XML_XMLREADER_H__
12
+
13
+ #include <libxml/xmlversion.h>
14
+ #include <libxml/tree.h>
15
+ #include <libxml/xmlerror.h>
16
+ #include <libxml/xmlIO.h>
17
+ #ifdef LIBXML_SCHEMAS_ENABLED
18
+ #include <libxml/relaxng.h>
19
+ #include <libxml/xmlschemas.h>
20
+ #endif
21
+ /* for compatibility */
22
+ #include <libxml/parser.h>
23
+
24
+ #ifdef __cplusplus
25
+ extern "C" {
26
+ #endif
27
+
28
+ /**
29
+ * xmlParserSeverities:
30
+ *
31
+ * How severe an error callback is when the per-reader error callback API
32
+ * is used.
33
+ */
34
+ typedef enum {
35
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
36
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
37
+ XML_PARSER_SEVERITY_WARNING = 3,
38
+ XML_PARSER_SEVERITY_ERROR = 4
39
+ } xmlParserSeverities;
40
+
41
+ #ifdef LIBXML_READER_ENABLED
42
+
43
+ /**
44
+ * xmlTextReaderMode:
45
+ *
46
+ * Internal state values for the reader.
47
+ */
48
+ typedef enum {
49
+ XML_TEXTREADER_MODE_INITIAL = 0,
50
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
51
+ XML_TEXTREADER_MODE_ERROR = 2,
52
+ XML_TEXTREADER_MODE_EOF =3,
53
+ XML_TEXTREADER_MODE_CLOSED = 4,
54
+ XML_TEXTREADER_MODE_READING = 5
55
+ } xmlTextReaderMode;
56
+
57
+ /**
58
+ * xmlParserProperties:
59
+ *
60
+ * Some common options to use with xmlTextReaderSetParserProp, but it
61
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
62
+ * xmlReaderForxxx APIs now.
63
+ */
64
+ typedef enum {
65
+ XML_PARSER_LOADDTD = 1,
66
+ XML_PARSER_DEFAULTATTRS = 2,
67
+ XML_PARSER_VALIDATE = 3,
68
+ XML_PARSER_SUBST_ENTITIES = 4
69
+ } xmlParserProperties;
70
+
71
+ /**
72
+ * xmlReaderTypes:
73
+ *
74
+ * Predefined constants for the different types of nodes.
75
+ */
76
+ typedef enum {
77
+ XML_READER_TYPE_NONE = 0,
78
+ XML_READER_TYPE_ELEMENT = 1,
79
+ XML_READER_TYPE_ATTRIBUTE = 2,
80
+ XML_READER_TYPE_TEXT = 3,
81
+ XML_READER_TYPE_CDATA = 4,
82
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
83
+ XML_READER_TYPE_ENTITY = 6,
84
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
85
+ XML_READER_TYPE_COMMENT = 8,
86
+ XML_READER_TYPE_DOCUMENT = 9,
87
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
88
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
89
+ XML_READER_TYPE_NOTATION = 12,
90
+ XML_READER_TYPE_WHITESPACE = 13,
91
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
92
+ XML_READER_TYPE_END_ELEMENT = 15,
93
+ XML_READER_TYPE_END_ENTITY = 16,
94
+ XML_READER_TYPE_XML_DECLARATION = 17
95
+ } xmlReaderTypes;
96
+
97
+ /**
98
+ * xmlTextReader:
99
+ *
100
+ * Structure for an xmlReader context.
101
+ */
102
+ typedef struct _xmlTextReader xmlTextReader;
103
+
104
+ /**
105
+ * xmlTextReaderPtr:
106
+ *
107
+ * Pointer to an xmlReader context.
108
+ */
109
+ typedef xmlTextReader *xmlTextReaderPtr;
110
+
111
+ /*
112
+ * Constructors & Destructor
113
+ */
114
+ XMLPUBFUN xmlTextReaderPtr
115
+ xmlNewTextReader (xmlParserInputBufferPtr input,
116
+ const char *URI);
117
+ XMLPUBFUN xmlTextReaderPtr
118
+ xmlNewTextReaderFilename(const char *URI);
119
+
120
+ XMLPUBFUN void
121
+ xmlFreeTextReader (xmlTextReaderPtr reader);
122
+
123
+ XMLPUBFUN int
124
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
125
+ xmlParserInputBufferPtr input, const char *URL,
126
+ const char *encoding, int options);
127
+ XMLPUBFUN void
128
+ xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
129
+ unsigned maxAmpl);
130
+
131
+ /*
132
+ * Iterators
133
+ */
134
+ XMLPUBFUN int
135
+ xmlTextReaderRead (xmlTextReaderPtr reader);
136
+
137
+ #ifdef LIBXML_WRITER_ENABLED
138
+ XMLPUBFUN xmlChar *
139
+ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
140
+
141
+ XMLPUBFUN xmlChar *
142
+ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
143
+ #endif
144
+
145
+ XMLPUBFUN xmlChar *
146
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
147
+ XMLPUBFUN int
148
+ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
149
+
150
+ /*
151
+ * Attributes of the node
152
+ */
153
+ XMLPUBFUN int
154
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
155
+ XMLPUBFUN int
156
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
157
+ XMLPUBFUN int
158
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
159
+ XMLPUBFUN int
160
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
161
+ XMLPUBFUN int
162
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
163
+ XMLPUBFUN int
164
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
165
+ XMLPUBFUN int
166
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
167
+ XMLPUBFUN int
168
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
169
+ XMLPUBFUN int
170
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
171
+ XMLPUBFUN int
172
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
173
+
174
+ XMLPUBFUN const xmlChar *
175
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
176
+ XMLPUBFUN const xmlChar *
177
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
178
+ XMLPUBFUN const xmlChar *
179
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
180
+ XMLPUBFUN const xmlChar *
181
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
182
+ XMLPUBFUN const xmlChar *
183
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
184
+ XMLPUBFUN const xmlChar *
185
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
186
+ XMLPUBFUN const xmlChar *
187
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
188
+ const xmlChar *str);
189
+ XMLPUBFUN const xmlChar *
190
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
191
+
192
+ /*
193
+ * use the Const version of the routine for
194
+ * better performance and simpler code
195
+ */
196
+ XMLPUBFUN xmlChar *
197
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
198
+ XMLPUBFUN xmlChar *
199
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
200
+ XMLPUBFUN xmlChar *
201
+ xmlTextReaderName (xmlTextReaderPtr reader);
202
+ XMLPUBFUN xmlChar *
203
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
204
+ XMLPUBFUN xmlChar *
205
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
206
+ XMLPUBFUN xmlChar *
207
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
208
+ XMLPUBFUN xmlChar *
209
+ xmlTextReaderValue (xmlTextReaderPtr reader);
210
+
211
+ /*
212
+ * Methods of the XmlTextReader
213
+ */
214
+ XMLPUBFUN int
215
+ xmlTextReaderClose (xmlTextReaderPtr reader);
216
+ XMLPUBFUN xmlChar *
217
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
218
+ int no);
219
+ XMLPUBFUN xmlChar *
220
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
221
+ const xmlChar *name);
222
+ XMLPUBFUN xmlChar *
223
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
224
+ const xmlChar *localName,
225
+ const xmlChar *namespaceURI);
226
+ XMLPUBFUN xmlParserInputBufferPtr
227
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
228
+ XMLPUBFUN xmlChar *
229
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
230
+ const xmlChar *prefix);
231
+ XMLPUBFUN int
232
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
233
+ int no);
234
+ XMLPUBFUN int
235
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
236
+ const xmlChar *name);
237
+ XMLPUBFUN int
238
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
239
+ const xmlChar *localName,
240
+ const xmlChar *namespaceURI);
241
+ XMLPUBFUN int
242
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
243
+ XMLPUBFUN int
244
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
245
+ XMLPUBFUN int
246
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
247
+ XMLPUBFUN int
248
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
249
+ XMLPUBFUN const xmlChar *
250
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
251
+
252
+ /*
253
+ * Extensions
254
+ */
255
+ XMLPUBFUN int
256
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
257
+ int prop,
258
+ int value);
259
+ XMLPUBFUN int
260
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
261
+ int prop);
262
+ XMLPUBFUN xmlNodePtr
263
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
264
+
265
+ XMLPUBFUN int
266
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
267
+
268
+ XMLPUBFUN int
269
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
270
+
271
+ XMLPUBFUN xmlNodePtr
272
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
273
+ #ifdef LIBXML_PATTERN_ENABLED
274
+ XMLPUBFUN int
275
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
276
+ const xmlChar *pattern,
277
+ const xmlChar **namespaces);
278
+ #endif /* LIBXML_PATTERN_ENABLED */
279
+ XMLPUBFUN xmlDocPtr
280
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
281
+ XMLPUBFUN xmlNodePtr
282
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
283
+ XMLPUBFUN int
284
+ xmlTextReaderNext (xmlTextReaderPtr reader);
285
+ XMLPUBFUN int
286
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
287
+ XMLPUBFUN int
288
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
289
+ #ifdef LIBXML_SCHEMAS_ENABLED
290
+ XMLPUBFUN int
291
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
292
+ const char *rng);
293
+ XMLPUBFUN int
294
+ xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
295
+ xmlRelaxNGValidCtxtPtr ctxt,
296
+ int options);
297
+
298
+ XMLPUBFUN int
299
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
300
+ xmlRelaxNGPtr schema);
301
+ XMLPUBFUN int
302
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
303
+ const char *xsd);
304
+ XMLPUBFUN int
305
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
306
+ xmlSchemaValidCtxtPtr ctxt,
307
+ int options);
308
+ XMLPUBFUN int
309
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
310
+ xmlSchemaPtr schema);
311
+ #endif
312
+ XMLPUBFUN const xmlChar *
313
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
314
+ XMLPUBFUN int
315
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
316
+
317
+
318
+ /*
319
+ * Index lookup
320
+ */
321
+ XMLPUBFUN long
322
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
323
+
324
+ /*
325
+ * New more complete APIs for simpler creation and reuse of readers
326
+ */
327
+ XMLPUBFUN xmlTextReaderPtr
328
+ xmlReaderWalker (xmlDocPtr doc);
329
+ XMLPUBFUN xmlTextReaderPtr
330
+ xmlReaderForDoc (const xmlChar * cur,
331
+ const char *URL,
332
+ const char *encoding,
333
+ int options);
334
+ XMLPUBFUN xmlTextReaderPtr
335
+ xmlReaderForFile (const char *filename,
336
+ const char *encoding,
337
+ int options);
338
+ XMLPUBFUN xmlTextReaderPtr
339
+ xmlReaderForMemory (const char *buffer,
340
+ int size,
341
+ const char *URL,
342
+ const char *encoding,
343
+ int options);
344
+ XMLPUBFUN xmlTextReaderPtr
345
+ xmlReaderForFd (int fd,
346
+ const char *URL,
347
+ const char *encoding,
348
+ int options);
349
+ XMLPUBFUN xmlTextReaderPtr
350
+ xmlReaderForIO (xmlInputReadCallback ioread,
351
+ xmlInputCloseCallback ioclose,
352
+ void *ioctx,
353
+ const char *URL,
354
+ const char *encoding,
355
+ int options);
356
+
357
+ XMLPUBFUN int
358
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
359
+ xmlDocPtr doc);
360
+ XMLPUBFUN int
361
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
362
+ const xmlChar * cur,
363
+ const char *URL,
364
+ const char *encoding,
365
+ int options);
366
+ XMLPUBFUN int
367
+ xmlReaderNewFile (xmlTextReaderPtr reader,
368
+ const char *filename,
369
+ const char *encoding,
370
+ int options);
371
+ XMLPUBFUN int
372
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
373
+ const char *buffer,
374
+ int size,
375
+ const char *URL,
376
+ const char *encoding,
377
+ int options);
378
+ XMLPUBFUN int
379
+ xmlReaderNewFd (xmlTextReaderPtr reader,
380
+ int fd,
381
+ const char *URL,
382
+ const char *encoding,
383
+ int options);
384
+ XMLPUBFUN int
385
+ xmlReaderNewIO (xmlTextReaderPtr reader,
386
+ xmlInputReadCallback ioread,
387
+ xmlInputCloseCallback ioclose,
388
+ void *ioctx,
389
+ const char *URL,
390
+ const char *encoding,
391
+ int options);
392
+ /*
393
+ * Error handling extensions
394
+ */
395
+ typedef void * xmlTextReaderLocatorPtr;
396
+
397
+ /**
398
+ * xmlTextReaderErrorFunc:
399
+ * @arg: the user argument
400
+ * @msg: the message
401
+ * @severity: the severity of the error
402
+ * @locator: a locator indicating where the error occurred
403
+ *
404
+ * Signature of an error callback from a reader parser
405
+ */
406
+ typedef void (*xmlTextReaderErrorFunc)(void *arg,
407
+ const char *msg,
408
+ xmlParserSeverities severity,
409
+ xmlTextReaderLocatorPtr locator);
410
+ XMLPUBFUN int
411
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
412
+ XMLPUBFUN xmlChar *
413
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
414
+ XMLPUBFUN void
415
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
416
+ xmlTextReaderErrorFunc f,
417
+ void *arg);
418
+ XMLPUBFUN void
419
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
420
+ xmlStructuredErrorFunc f,
421
+ void *arg);
422
+ XMLPUBFUN void
423
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
424
+ xmlTextReaderErrorFunc *f,
425
+ void **arg);
426
+
427
+ #endif /* LIBXML_READER_ENABLED */
428
+
429
+ #ifdef __cplusplus
430
+ }
431
+ #endif
432
+
433
+ #endif /* __XML_XMLREADER_H__ */
434
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlregexp.h ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: regular expressions handling
3
+ * Description: basic API for libxml regular expressions handling used
4
+ * for XML Schemas and validation.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_REGEXP_H__
12
+ #define __XML_REGEXP_H__
13
+
14
+ #include <stdio.h>
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlstring.h>
17
+
18
+ #ifdef LIBXML_REGEXP_ENABLED
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /**
25
+ * xmlRegexpPtr:
26
+ *
27
+ * A libxml regular expression, they can actually be far more complex
28
+ * thank the POSIX regex expressions.
29
+ */
30
+ typedef struct _xmlRegexp xmlRegexp;
31
+ typedef xmlRegexp *xmlRegexpPtr;
32
+
33
+ /**
34
+ * xmlRegExecCtxtPtr:
35
+ *
36
+ * A libxml progressive regular expression evaluation context
37
+ */
38
+ typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
39
+ typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
40
+
41
+ /*
42
+ * The POSIX like API
43
+ */
44
+ XMLPUBFUN xmlRegexpPtr
45
+ xmlRegexpCompile (const xmlChar *regexp);
46
+ XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
47
+ XMLPUBFUN int
48
+ xmlRegexpExec (xmlRegexpPtr comp,
49
+ const xmlChar *value);
50
+ XMLPUBFUN void
51
+ xmlRegexpPrint (FILE *output,
52
+ xmlRegexpPtr regexp);
53
+ XMLPUBFUN int
54
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
55
+
56
+ /**
57
+ * xmlRegExecCallbacks:
58
+ * @exec: the regular expression context
59
+ * @token: the current token string
60
+ * @transdata: transition data
61
+ * @inputdata: input data
62
+ *
63
+ * Callback function when doing a transition in the automata
64
+ */
65
+ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
66
+ const xmlChar *token,
67
+ void *transdata,
68
+ void *inputdata);
69
+
70
+ /*
71
+ * The progressive API
72
+ */
73
+ XMLPUBFUN xmlRegExecCtxtPtr
74
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
75
+ xmlRegExecCallbacks callback,
76
+ void *data);
77
+ XMLPUBFUN void
78
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
79
+ XMLPUBFUN int
80
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
81
+ const xmlChar *value,
82
+ void *data);
83
+ XMLPUBFUN int
84
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
85
+ const xmlChar *value,
86
+ const xmlChar *value2,
87
+ void *data);
88
+
89
+ XMLPUBFUN int
90
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
91
+ int *nbval,
92
+ int *nbneg,
93
+ xmlChar **values,
94
+ int *terminal);
95
+ XMLPUBFUN int
96
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
97
+ const xmlChar **string,
98
+ int *nbval,
99
+ int *nbneg,
100
+ xmlChar **values,
101
+ int *terminal);
102
+ #ifdef LIBXML_EXPR_ENABLED
103
+ /*
104
+ * Formal regular expression handling
105
+ * Its goal is to do some formal work on content models
106
+ */
107
+
108
+ /* expressions are used within a context */
109
+ typedef struct _xmlExpCtxt xmlExpCtxt;
110
+ typedef xmlExpCtxt *xmlExpCtxtPtr;
111
+
112
+ XMLPUBFUN void
113
+ xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
114
+ XMLPUBFUN xmlExpCtxtPtr
115
+ xmlExpNewCtxt (int maxNodes,
116
+ xmlDictPtr dict);
117
+
118
+ XMLPUBFUN int
119
+ xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
120
+ XMLPUBFUN int
121
+ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
122
+
123
+ /* Expressions are trees but the tree is opaque */
124
+ typedef struct _xmlExpNode xmlExpNode;
125
+ typedef xmlExpNode *xmlExpNodePtr;
126
+
127
+ typedef enum {
128
+ XML_EXP_EMPTY = 0,
129
+ XML_EXP_FORBID = 1,
130
+ XML_EXP_ATOM = 2,
131
+ XML_EXP_SEQ = 3,
132
+ XML_EXP_OR = 4,
133
+ XML_EXP_COUNT = 5
134
+ } xmlExpNodeType;
135
+
136
+ /*
137
+ * 2 core expressions shared by all for the empty language set
138
+ * and for the set with just the empty token
139
+ */
140
+ XMLPUBVAR xmlExpNodePtr forbiddenExp;
141
+ XMLPUBVAR xmlExpNodePtr emptyExp;
142
+
143
+ /*
144
+ * Expressions are reference counted internally
145
+ */
146
+ XMLPUBFUN void
147
+ xmlExpFree (xmlExpCtxtPtr ctxt,
148
+ xmlExpNodePtr expr);
149
+ XMLPUBFUN void
150
+ xmlExpRef (xmlExpNodePtr expr);
151
+
152
+ /*
153
+ * constructors can be either manual or from a string
154
+ */
155
+ XMLPUBFUN xmlExpNodePtr
156
+ xmlExpParse (xmlExpCtxtPtr ctxt,
157
+ const char *expr);
158
+ XMLPUBFUN xmlExpNodePtr
159
+ xmlExpNewAtom (xmlExpCtxtPtr ctxt,
160
+ const xmlChar *name,
161
+ int len);
162
+ XMLPUBFUN xmlExpNodePtr
163
+ xmlExpNewOr (xmlExpCtxtPtr ctxt,
164
+ xmlExpNodePtr left,
165
+ xmlExpNodePtr right);
166
+ XMLPUBFUN xmlExpNodePtr
167
+ xmlExpNewSeq (xmlExpCtxtPtr ctxt,
168
+ xmlExpNodePtr left,
169
+ xmlExpNodePtr right);
170
+ XMLPUBFUN xmlExpNodePtr
171
+ xmlExpNewRange (xmlExpCtxtPtr ctxt,
172
+ xmlExpNodePtr subset,
173
+ int min,
174
+ int max);
175
+ /*
176
+ * The really interesting APIs
177
+ */
178
+ XMLPUBFUN int
179
+ xmlExpIsNillable(xmlExpNodePtr expr);
180
+ XMLPUBFUN int
181
+ xmlExpMaxToken (xmlExpNodePtr expr);
182
+ XMLPUBFUN int
183
+ xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
184
+ xmlExpNodePtr expr,
185
+ const xmlChar**langList,
186
+ int len);
187
+ XMLPUBFUN int
188
+ xmlExpGetStart (xmlExpCtxtPtr ctxt,
189
+ xmlExpNodePtr expr,
190
+ const xmlChar**tokList,
191
+ int len);
192
+ XMLPUBFUN xmlExpNodePtr
193
+ xmlExpStringDerive(xmlExpCtxtPtr ctxt,
194
+ xmlExpNodePtr expr,
195
+ const xmlChar *str,
196
+ int len);
197
+ XMLPUBFUN xmlExpNodePtr
198
+ xmlExpExpDerive (xmlExpCtxtPtr ctxt,
199
+ xmlExpNodePtr expr,
200
+ xmlExpNodePtr sub);
201
+ XMLPUBFUN int
202
+ xmlExpSubsume (xmlExpCtxtPtr ctxt,
203
+ xmlExpNodePtr expr,
204
+ xmlExpNodePtr sub);
205
+ XMLPUBFUN void
206
+ xmlExpDump (xmlBufferPtr buf,
207
+ xmlExpNodePtr expr);
208
+ #endif /* LIBXML_EXPR_ENABLED */
209
+ #ifdef __cplusplus
210
+ }
211
+ #endif
212
+
213
+ #endif /* LIBXML_REGEXP_ENABLED */
214
+
215
+ #endif /*__XML_REGEXP_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlsave.h ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: the XML document serializer
3
+ * Description: API to save document or subtree of document
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_XMLSAVE_H__
11
+ #define __XML_XMLSAVE_H__
12
+
13
+ #include <libxml/xmlversion.h>
14
+ #include <libxml/tree.h>
15
+ #include <libxml/encoding.h>
16
+ #include <libxml/xmlIO.h>
17
+
18
+ #ifdef LIBXML_OUTPUT_ENABLED
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+ /**
24
+ * xmlSaveOption:
25
+ *
26
+ * This is the set of XML save options that can be passed down
27
+ * to the xmlSaveToFd() and similar calls.
28
+ */
29
+ typedef enum {
30
+ XML_SAVE_FORMAT = 1<<0, /* format save output */
31
+ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
32
+ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
33
+ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
34
+ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
35
+ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
36
+ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
37
+ XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
38
+ } xmlSaveOption;
39
+
40
+
41
+ typedef struct _xmlSaveCtxt xmlSaveCtxt;
42
+ typedef xmlSaveCtxt *xmlSaveCtxtPtr;
43
+
44
+ XMLPUBFUN xmlSaveCtxtPtr
45
+ xmlSaveToFd (int fd,
46
+ const char *encoding,
47
+ int options);
48
+ XMLPUBFUN xmlSaveCtxtPtr
49
+ xmlSaveToFilename (const char *filename,
50
+ const char *encoding,
51
+ int options);
52
+
53
+ XMLPUBFUN xmlSaveCtxtPtr
54
+ xmlSaveToBuffer (xmlBufferPtr buffer,
55
+ const char *encoding,
56
+ int options);
57
+
58
+ XMLPUBFUN xmlSaveCtxtPtr
59
+ xmlSaveToIO (xmlOutputWriteCallback iowrite,
60
+ xmlOutputCloseCallback ioclose,
61
+ void *ioctx,
62
+ const char *encoding,
63
+ int options);
64
+
65
+ XMLPUBFUN long
66
+ xmlSaveDoc (xmlSaveCtxtPtr ctxt,
67
+ xmlDocPtr doc);
68
+ XMLPUBFUN long
69
+ xmlSaveTree (xmlSaveCtxtPtr ctxt,
70
+ xmlNodePtr node);
71
+
72
+ XMLPUBFUN int
73
+ xmlSaveFlush (xmlSaveCtxtPtr ctxt);
74
+ XMLPUBFUN int
75
+ xmlSaveClose (xmlSaveCtxtPtr ctxt);
76
+ XMLPUBFUN int
77
+ xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
78
+ xmlCharEncodingOutputFunc escape);
79
+ XMLPUBFUN int
80
+ xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
81
+ xmlCharEncodingOutputFunc escape);
82
+
83
+ XMLPUBFUN int
84
+ xmlThrDefIndentTreeOutput(int v);
85
+ XMLPUBFUN const char *
86
+ xmlThrDefTreeIndentString(const char * v);
87
+ XMLPUBFUN int
88
+ xmlThrDefSaveNoEmptyTags(int v);
89
+
90
+ #ifdef __cplusplus
91
+ }
92
+ #endif
93
+
94
+ #endif /* LIBXML_OUTPUT_ENABLED */
95
+ #endif /* __XML_XMLSAVE_H__ */
96
+
97
+
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlschemas.h ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: incomplete XML Schemas structure implementation
3
+ * Description: interface to the XML Schemas handling and schema validity
4
+ * checking, it is incomplete right now.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+
12
+ #ifndef __XML_SCHEMA_H__
13
+ #define __XML_SCHEMA_H__
14
+
15
+ #include <libxml/xmlversion.h>
16
+
17
+ #ifdef LIBXML_SCHEMAS_ENABLED
18
+
19
+ #include <stdio.h>
20
+ #include <libxml/encoding.h>
21
+ #include <libxml/tree.h>
22
+ #include <libxml/xmlerror.h>
23
+
24
+ #ifdef __cplusplus
25
+ extern "C" {
26
+ #endif
27
+
28
+ /**
29
+ * This error codes are obsolete; not used any more.
30
+ */
31
+ typedef enum {
32
+ XML_SCHEMAS_ERR_OK = 0,
33
+ XML_SCHEMAS_ERR_NOROOT = 1,
34
+ XML_SCHEMAS_ERR_UNDECLAREDELEM,
35
+ XML_SCHEMAS_ERR_NOTTOPLEVEL,
36
+ XML_SCHEMAS_ERR_MISSING,
37
+ XML_SCHEMAS_ERR_WRONGELEM,
38
+ XML_SCHEMAS_ERR_NOTYPE,
39
+ XML_SCHEMAS_ERR_NOROLLBACK,
40
+ XML_SCHEMAS_ERR_ISABSTRACT,
41
+ XML_SCHEMAS_ERR_NOTEMPTY,
42
+ XML_SCHEMAS_ERR_ELEMCONT,
43
+ XML_SCHEMAS_ERR_HAVEDEFAULT,
44
+ XML_SCHEMAS_ERR_NOTNILLABLE,
45
+ XML_SCHEMAS_ERR_EXTRACONTENT,
46
+ XML_SCHEMAS_ERR_INVALIDATTR,
47
+ XML_SCHEMAS_ERR_INVALIDELEM,
48
+ XML_SCHEMAS_ERR_NOTDETERMINIST,
49
+ XML_SCHEMAS_ERR_CONSTRUCT,
50
+ XML_SCHEMAS_ERR_INTERNAL,
51
+ XML_SCHEMAS_ERR_NOTSIMPLE,
52
+ XML_SCHEMAS_ERR_ATTRUNKNOWN,
53
+ XML_SCHEMAS_ERR_ATTRINVALID,
54
+ XML_SCHEMAS_ERR_VALUE,
55
+ XML_SCHEMAS_ERR_FACET,
56
+ XML_SCHEMAS_ERR_,
57
+ XML_SCHEMAS_ERR_XXX
58
+ } xmlSchemaValidError;
59
+
60
+ /*
61
+ * ATTENTION: Change xmlSchemaSetValidOptions's check
62
+ * for invalid values, if adding to the validation
63
+ * options below.
64
+ */
65
+ /**
66
+ * xmlSchemaValidOption:
67
+ *
68
+ * This is the set of XML Schema validation options.
69
+ */
70
+ typedef enum {
71
+ XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
72
+ /* Default/fixed: create an attribute node
73
+ * or an element's text node on the instance.
74
+ */
75
+ } xmlSchemaValidOption;
76
+
77
+ /*
78
+ XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
79
+ * assemble schemata using
80
+ * xsi:schemaLocation and
81
+ * xsi:noNamespaceSchemaLocation
82
+ */
83
+
84
+ /**
85
+ * The schemas related types are kept internal
86
+ */
87
+ typedef struct _xmlSchema xmlSchema;
88
+ typedef xmlSchema *xmlSchemaPtr;
89
+
90
+ /**
91
+ * xmlSchemaValidityErrorFunc:
92
+ * @ctx: the validation context
93
+ * @msg: the message
94
+ * @...: extra arguments
95
+ *
96
+ * Signature of an error callback from an XSD validation
97
+ */
98
+ typedef void (*xmlSchemaValidityErrorFunc)
99
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
100
+
101
+ /**
102
+ * xmlSchemaValidityWarningFunc:
103
+ * @ctx: the validation context
104
+ * @msg: the message
105
+ * @...: extra arguments
106
+ *
107
+ * Signature of a warning callback from an XSD validation
108
+ */
109
+ typedef void (*xmlSchemaValidityWarningFunc)
110
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
111
+
112
+ /**
113
+ * A schemas validation context
114
+ */
115
+ typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
116
+ typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
117
+
118
+ typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
119
+ typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
120
+
121
+ /**
122
+ * xmlSchemaValidityLocatorFunc:
123
+ * @ctx: user provided context
124
+ * @file: returned file information
125
+ * @line: returned line information
126
+ *
127
+ * A schemas validation locator, a callback called by the validator.
128
+ * This is used when file or node information are not available
129
+ * to find out what file and line number are affected
130
+ *
131
+ * Returns: 0 in case of success and -1 in case of error
132
+ */
133
+
134
+ typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
135
+ const char **file, unsigned long *line);
136
+
137
+ /*
138
+ * Interfaces for parsing.
139
+ */
140
+ XMLPUBFUN xmlSchemaParserCtxtPtr
141
+ xmlSchemaNewParserCtxt (const char *URL);
142
+ XMLPUBFUN xmlSchemaParserCtxtPtr
143
+ xmlSchemaNewMemParserCtxt (const char *buffer,
144
+ int size);
145
+ XMLPUBFUN xmlSchemaParserCtxtPtr
146
+ xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
147
+ XMLPUBFUN void
148
+ xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
149
+ XMLPUBFUN void
150
+ xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
151
+ xmlSchemaValidityErrorFunc err,
152
+ xmlSchemaValidityWarningFunc warn,
153
+ void *ctx);
154
+ XMLPUBFUN void
155
+ xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
156
+ xmlStructuredErrorFunc serror,
157
+ void *ctx);
158
+ XMLPUBFUN int
159
+ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
160
+ xmlSchemaValidityErrorFunc * err,
161
+ xmlSchemaValidityWarningFunc * warn,
162
+ void **ctx);
163
+ XMLPUBFUN int
164
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
165
+
166
+ XMLPUBFUN xmlSchemaPtr
167
+ xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
168
+ XMLPUBFUN void
169
+ xmlSchemaFree (xmlSchemaPtr schema);
170
+ #ifdef LIBXML_OUTPUT_ENABLED
171
+ XMLPUBFUN void
172
+ xmlSchemaDump (FILE *output,
173
+ xmlSchemaPtr schema);
174
+ #endif /* LIBXML_OUTPUT_ENABLED */
175
+ /*
176
+ * Interfaces for validating
177
+ */
178
+ XMLPUBFUN void
179
+ xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
180
+ xmlSchemaValidityErrorFunc err,
181
+ xmlSchemaValidityWarningFunc warn,
182
+ void *ctx);
183
+ XMLPUBFUN void
184
+ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
185
+ xmlStructuredErrorFunc serror,
186
+ void *ctx);
187
+ XMLPUBFUN int
188
+ xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
189
+ xmlSchemaValidityErrorFunc *err,
190
+ xmlSchemaValidityWarningFunc *warn,
191
+ void **ctx);
192
+ XMLPUBFUN int
193
+ xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
194
+ int options);
195
+ XMLPUBFUN void
196
+ xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
197
+ const char *filename);
198
+ XMLPUBFUN int
199
+ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
200
+
201
+ XMLPUBFUN xmlSchemaValidCtxtPtr
202
+ xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
203
+ XMLPUBFUN void
204
+ xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
205
+ XMLPUBFUN int
206
+ xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
207
+ xmlDocPtr instance);
208
+ XMLPUBFUN int
209
+ xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
210
+ xmlNodePtr elem);
211
+ XMLPUBFUN int
212
+ xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
213
+ xmlParserInputBufferPtr input,
214
+ xmlCharEncoding enc,
215
+ xmlSAXHandlerPtr sax,
216
+ void *user_data);
217
+ XMLPUBFUN int
218
+ xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
219
+ const char * filename,
220
+ int options);
221
+
222
+ XMLPUBFUN xmlParserCtxtPtr
223
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
224
+
225
+ /*
226
+ * Interface to insert Schemas SAX validation in a SAX stream
227
+ */
228
+ typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
229
+ typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
230
+
231
+ XMLPUBFUN xmlSchemaSAXPlugPtr
232
+ xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
233
+ xmlSAXHandlerPtr *sax,
234
+ void **user_data);
235
+ XMLPUBFUN int
236
+ xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
237
+
238
+
239
+ XMLPUBFUN void
240
+ xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
241
+ xmlSchemaValidityLocatorFunc f,
242
+ void *ctxt);
243
+
244
+ #ifdef __cplusplus
245
+ }
246
+ #endif
247
+
248
+ #endif /* LIBXML_SCHEMAS_ENABLED */
249
+ #endif /* __XML_SCHEMA_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlschemastypes.h ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: implementation of XML Schema Datatypes
3
+ * Description: module providing the XML Schema Datatypes implementation
4
+ * both definition and validity checking
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+
12
+ #ifndef __XML_SCHEMA_TYPES_H__
13
+ #define __XML_SCHEMA_TYPES_H__
14
+
15
+ #include <libxml/xmlversion.h>
16
+
17
+ #ifdef LIBXML_SCHEMAS_ENABLED
18
+
19
+ #include <libxml/schemasInternals.h>
20
+ #include <libxml/xmlschemas.h>
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ typedef enum {
27
+ XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
28
+ XML_SCHEMA_WHITESPACE_PRESERVE = 1,
29
+ XML_SCHEMA_WHITESPACE_REPLACE = 2,
30
+ XML_SCHEMA_WHITESPACE_COLLAPSE = 3
31
+ } xmlSchemaWhitespaceValueType;
32
+
33
+ XMLPUBFUN int
34
+ xmlSchemaInitTypes (void);
35
+ XML_DEPRECATED
36
+ XMLPUBFUN void
37
+ xmlSchemaCleanupTypes (void);
38
+ XMLPUBFUN xmlSchemaTypePtr
39
+ xmlSchemaGetPredefinedType (const xmlChar *name,
40
+ const xmlChar *ns);
41
+ XMLPUBFUN int
42
+ xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
43
+ const xmlChar *value,
44
+ xmlSchemaValPtr *val);
45
+ XMLPUBFUN int
46
+ xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
47
+ const xmlChar *value,
48
+ xmlSchemaValPtr *val,
49
+ xmlNodePtr node);
50
+ XMLPUBFUN int
51
+ xmlSchemaValidateFacet (xmlSchemaTypePtr base,
52
+ xmlSchemaFacetPtr facet,
53
+ const xmlChar *value,
54
+ xmlSchemaValPtr val);
55
+ XMLPUBFUN int
56
+ xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
57
+ xmlSchemaWhitespaceValueType fws,
58
+ xmlSchemaValType valType,
59
+ const xmlChar *value,
60
+ xmlSchemaValPtr val,
61
+ xmlSchemaWhitespaceValueType ws);
62
+ XMLPUBFUN void
63
+ xmlSchemaFreeValue (xmlSchemaValPtr val);
64
+ XMLPUBFUN xmlSchemaFacetPtr
65
+ xmlSchemaNewFacet (void);
66
+ XMLPUBFUN int
67
+ xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
68
+ xmlSchemaTypePtr typeDecl,
69
+ xmlSchemaParserCtxtPtr ctxt,
70
+ const xmlChar *name);
71
+ XMLPUBFUN void
72
+ xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
73
+ XMLPUBFUN int
74
+ xmlSchemaCompareValues (xmlSchemaValPtr x,
75
+ xmlSchemaValPtr y);
76
+ XMLPUBFUN xmlSchemaTypePtr
77
+ xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
78
+ XMLPUBFUN int
79
+ xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
80
+ const xmlChar *value,
81
+ unsigned long actualLen,
82
+ unsigned long *expectedLen);
83
+ XMLPUBFUN xmlSchemaTypePtr
84
+ xmlSchemaGetBuiltInType (xmlSchemaValType type);
85
+ XMLPUBFUN int
86
+ xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
87
+ int facetType);
88
+ XMLPUBFUN xmlChar *
89
+ xmlSchemaCollapseString (const xmlChar *value);
90
+ XMLPUBFUN xmlChar *
91
+ xmlSchemaWhiteSpaceReplace (const xmlChar *value);
92
+ XMLPUBFUN unsigned long
93
+ xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
94
+ XMLPUBFUN int
95
+ xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
96
+ xmlSchemaFacetPtr facet,
97
+ const xmlChar *value,
98
+ xmlSchemaValPtr val,
99
+ unsigned long *length);
100
+ XMLPUBFUN int
101
+ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
102
+ xmlSchemaValType valType,
103
+ const xmlChar *value,
104
+ xmlSchemaValPtr val,
105
+ unsigned long *length,
106
+ xmlSchemaWhitespaceValueType ws);
107
+ XMLPUBFUN int
108
+ xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
109
+ const xmlChar *value,
110
+ xmlSchemaValPtr *val,
111
+ xmlNodePtr node);
112
+ XMLPUBFUN int
113
+ xmlSchemaGetCanonValue (xmlSchemaValPtr val,
114
+ const xmlChar **retValue);
115
+ XMLPUBFUN int
116
+ xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
117
+ const xmlChar **retValue,
118
+ xmlSchemaWhitespaceValueType ws);
119
+ XMLPUBFUN int
120
+ xmlSchemaValueAppend (xmlSchemaValPtr prev,
121
+ xmlSchemaValPtr cur);
122
+ XMLPUBFUN xmlSchemaValPtr
123
+ xmlSchemaValueGetNext (xmlSchemaValPtr cur);
124
+ XMLPUBFUN const xmlChar *
125
+ xmlSchemaValueGetAsString (xmlSchemaValPtr val);
126
+ XMLPUBFUN int
127
+ xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
128
+ XMLPUBFUN xmlSchemaValPtr
129
+ xmlSchemaNewStringValue (xmlSchemaValType type,
130
+ const xmlChar *value);
131
+ XMLPUBFUN xmlSchemaValPtr
132
+ xmlSchemaNewNOTATIONValue (const xmlChar *name,
133
+ const xmlChar *ns);
134
+ XMLPUBFUN xmlSchemaValPtr
135
+ xmlSchemaNewQNameValue (const xmlChar *namespaceName,
136
+ const xmlChar *localName);
137
+ XMLPUBFUN int
138
+ xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
139
+ xmlSchemaWhitespaceValueType xws,
140
+ xmlSchemaValPtr y,
141
+ xmlSchemaWhitespaceValueType yws);
142
+ XMLPUBFUN xmlSchemaValPtr
143
+ xmlSchemaCopyValue (xmlSchemaValPtr val);
144
+ XMLPUBFUN xmlSchemaValType
145
+ xmlSchemaGetValType (xmlSchemaValPtr val);
146
+
147
+ #ifdef __cplusplus
148
+ }
149
+ #endif
150
+
151
+ #endif /* LIBXML_SCHEMAS_ENABLED */
152
+ #endif /* __XML_SCHEMA_TYPES_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlstring.h ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: set of routines to process strings
3
+ * Description: type and interfaces needed for the internal string handling
4
+ * of the library, especially UTF8 processing.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_STRING_H__
12
+ #define __XML_STRING_H__
13
+
14
+ #include <stdarg.h>
15
+ #include <libxml/xmlversion.h>
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ /**
22
+ * xmlChar:
23
+ *
24
+ * This is a basic byte in an UTF-8 encoded string.
25
+ * It's unsigned allowing to pinpoint case where char * are assigned
26
+ * to xmlChar * (possibly making serialization back impossible).
27
+ */
28
+ typedef unsigned char xmlChar;
29
+
30
+ /**
31
+ * BAD_CAST:
32
+ *
33
+ * Macro to cast a string to an xmlChar * when one know its safe.
34
+ */
35
+ #define BAD_CAST (xmlChar *)
36
+
37
+ /*
38
+ * xmlChar handling
39
+ */
40
+ XMLPUBFUN xmlChar *
41
+ xmlStrdup (const xmlChar *cur);
42
+ XMLPUBFUN xmlChar *
43
+ xmlStrndup (const xmlChar *cur,
44
+ int len);
45
+ XMLPUBFUN xmlChar *
46
+ xmlCharStrndup (const char *cur,
47
+ int len);
48
+ XMLPUBFUN xmlChar *
49
+ xmlCharStrdup (const char *cur);
50
+ XMLPUBFUN xmlChar *
51
+ xmlStrsub (const xmlChar *str,
52
+ int start,
53
+ int len);
54
+ XMLPUBFUN const xmlChar *
55
+ xmlStrchr (const xmlChar *str,
56
+ xmlChar val);
57
+ XMLPUBFUN const xmlChar *
58
+ xmlStrstr (const xmlChar *str,
59
+ const xmlChar *val);
60
+ XMLPUBFUN const xmlChar *
61
+ xmlStrcasestr (const xmlChar *str,
62
+ const xmlChar *val);
63
+ XMLPUBFUN int
64
+ xmlStrcmp (const xmlChar *str1,
65
+ const xmlChar *str2);
66
+ XMLPUBFUN int
67
+ xmlStrncmp (const xmlChar *str1,
68
+ const xmlChar *str2,
69
+ int len);
70
+ XMLPUBFUN int
71
+ xmlStrcasecmp (const xmlChar *str1,
72
+ const xmlChar *str2);
73
+ XMLPUBFUN int
74
+ xmlStrncasecmp (const xmlChar *str1,
75
+ const xmlChar *str2,
76
+ int len);
77
+ XMLPUBFUN int
78
+ xmlStrEqual (const xmlChar *str1,
79
+ const xmlChar *str2);
80
+ XMLPUBFUN int
81
+ xmlStrQEqual (const xmlChar *pref,
82
+ const xmlChar *name,
83
+ const xmlChar *str);
84
+ XMLPUBFUN int
85
+ xmlStrlen (const xmlChar *str);
86
+ XMLPUBFUN xmlChar *
87
+ xmlStrcat (xmlChar *cur,
88
+ const xmlChar *add);
89
+ XMLPUBFUN xmlChar *
90
+ xmlStrncat (xmlChar *cur,
91
+ const xmlChar *add,
92
+ int len);
93
+ XMLPUBFUN xmlChar *
94
+ xmlStrncatNew (const xmlChar *str1,
95
+ const xmlChar *str2,
96
+ int len);
97
+ XMLPUBFUN int
98
+ xmlStrPrintf (xmlChar *buf,
99
+ int len,
100
+ const char *msg,
101
+ ...) LIBXML_ATTR_FORMAT(3,4);
102
+ XMLPUBFUN int
103
+ xmlStrVPrintf (xmlChar *buf,
104
+ int len,
105
+ const char *msg,
106
+ va_list ap) LIBXML_ATTR_FORMAT(3,0);
107
+
108
+ XMLPUBFUN int
109
+ xmlGetUTF8Char (const unsigned char *utf,
110
+ int *len);
111
+ XMLPUBFUN int
112
+ xmlCheckUTF8 (const unsigned char *utf);
113
+ XMLPUBFUN int
114
+ xmlUTF8Strsize (const xmlChar *utf,
115
+ int len);
116
+ XMLPUBFUN xmlChar *
117
+ xmlUTF8Strndup (const xmlChar *utf,
118
+ int len);
119
+ XMLPUBFUN const xmlChar *
120
+ xmlUTF8Strpos (const xmlChar *utf,
121
+ int pos);
122
+ XMLPUBFUN int
123
+ xmlUTF8Strloc (const xmlChar *utf,
124
+ const xmlChar *utfchar);
125
+ XMLPUBFUN xmlChar *
126
+ xmlUTF8Strsub (const xmlChar *utf,
127
+ int start,
128
+ int len);
129
+ XMLPUBFUN int
130
+ xmlUTF8Strlen (const xmlChar *utf);
131
+ XMLPUBFUN int
132
+ xmlUTF8Size (const xmlChar *utf);
133
+ XMLPUBFUN int
134
+ xmlUTF8Charcmp (const xmlChar *utf1,
135
+ const xmlChar *utf2);
136
+
137
+ #ifdef __cplusplus
138
+ }
139
+ #endif
140
+ #endif /* __XML_STRING_H__ */
omnilmm/lib/python3.10/site-packages/lxml/includes/libxml/xmlunicode.h ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Summary: Unicode character APIs
3
+ * Description: API for the Unicode character APIs
4
+ *
5
+ * This file is automatically generated from the
6
+ * UCS description files of the Unicode Character Database
7
+ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
8
+ * using the genUnicode.py Python script.
9
+ *
10
+ * Generation date: Mon Mar 27 11:09:52 2006
11
+ * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
12
+ * Author: Daniel Veillard
13
+ */
14
+
15
+ #ifndef __XML_UNICODE_H__
16
+ #define __XML_UNICODE_H__
17
+
18
+ #include <libxml/xmlversion.h>
19
+
20
+ #ifdef LIBXML_UNICODE_ENABLED
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ XMLPUBFUN int xmlUCSIsAegeanNumbers (int code);
27
+ XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code);
28
+ XMLPUBFUN int xmlUCSIsArabic (int code);
29
+ XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code);
30
+ XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code);
31
+ XMLPUBFUN int xmlUCSIsArmenian (int code);
32
+ XMLPUBFUN int xmlUCSIsArrows (int code);
33
+ XMLPUBFUN int xmlUCSIsBasicLatin (int code);
34
+ XMLPUBFUN int xmlUCSIsBengali (int code);
35
+ XMLPUBFUN int xmlUCSIsBlockElements (int code);
36
+ XMLPUBFUN int xmlUCSIsBopomofo (int code);
37
+ XMLPUBFUN int xmlUCSIsBopomofoExtended (int code);
38
+ XMLPUBFUN int xmlUCSIsBoxDrawing (int code);
39
+ XMLPUBFUN int xmlUCSIsBraillePatterns (int code);
40
+ XMLPUBFUN int xmlUCSIsBuhid (int code);
41
+ XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code);
42
+ XMLPUBFUN int xmlUCSIsCJKCompatibility (int code);
43
+ XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code);
44
+ XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code);
45
+ XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
46
+ XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code);
47
+ XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code);
48
+ XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code);
49
+ XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
50
+ XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
51
+ XMLPUBFUN int xmlUCSIsCherokee (int code);
52
+ XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code);
53
+ XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
54
+ XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code);
55
+ XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code);
56
+ XMLPUBFUN int xmlUCSIsControlPictures (int code);
57
+ XMLPUBFUN int xmlUCSIsCurrencySymbols (int code);
58
+ XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code);
59
+ XMLPUBFUN int xmlUCSIsCyrillic (int code);
60
+ XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code);
61
+ XMLPUBFUN int xmlUCSIsDeseret (int code);
62
+ XMLPUBFUN int xmlUCSIsDevanagari (int code);
63
+ XMLPUBFUN int xmlUCSIsDingbats (int code);
64
+ XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code);
65
+ XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code);
66
+ XMLPUBFUN int xmlUCSIsEthiopic (int code);
67
+ XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code);
68
+ XMLPUBFUN int xmlUCSIsGeometricShapes (int code);
69
+ XMLPUBFUN int xmlUCSIsGeorgian (int code);
70
+ XMLPUBFUN int xmlUCSIsGothic (int code);
71
+ XMLPUBFUN int xmlUCSIsGreek (int code);
72
+ XMLPUBFUN int xmlUCSIsGreekExtended (int code);
73
+ XMLPUBFUN int xmlUCSIsGreekandCoptic (int code);
74
+ XMLPUBFUN int xmlUCSIsGujarati (int code);
75
+ XMLPUBFUN int xmlUCSIsGurmukhi (int code);
76
+ XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code);
77
+ XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code);
78
+ XMLPUBFUN int xmlUCSIsHangulJamo (int code);
79
+ XMLPUBFUN int xmlUCSIsHangulSyllables (int code);
80
+ XMLPUBFUN int xmlUCSIsHanunoo (int code);
81
+ XMLPUBFUN int xmlUCSIsHebrew (int code);
82
+ XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code);
83
+ XMLPUBFUN int xmlUCSIsHighSurrogates (int code);
84
+ XMLPUBFUN int xmlUCSIsHiragana (int code);
85
+ XMLPUBFUN int xmlUCSIsIPAExtensions (int code);
86
+ XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code);
87
+ XMLPUBFUN int xmlUCSIsKanbun (int code);
88
+ XMLPUBFUN int xmlUCSIsKangxiRadicals (int code);
89
+ XMLPUBFUN int xmlUCSIsKannada (int code);
90
+ XMLPUBFUN int xmlUCSIsKatakana (int code);
91
+ XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code);
92
+ XMLPUBFUN int xmlUCSIsKhmer (int code);
93
+ XMLPUBFUN int xmlUCSIsKhmerSymbols (int code);
94
+ XMLPUBFUN int xmlUCSIsLao (int code);
95
+ XMLPUBFUN int xmlUCSIsLatin1Supplement (int code);
96
+ XMLPUBFUN int xmlUCSIsLatinExtendedA (int code);
97
+ XMLPUBFUN int xmlUCSIsLatinExtendedB (int code);
98
+ XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code);
99
+ XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code);
100
+ XMLPUBFUN int xmlUCSIsLimbu (int code);
101
+ XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code);
102
+ XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code);
103
+ XMLPUBFUN int xmlUCSIsLowSurrogates (int code);
104
+ XMLPUBFUN int xmlUCSIsMalayalam (int code);
105
+ XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code);
106
+ XMLPUBFUN int xmlUCSIsMathematicalOperators (int code);
107
+ XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
108
+ XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
109
+ XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code);
110
+ XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code);
111
+ XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code);
112
+ XMLPUBFUN int xmlUCSIsMongolian (int code);
113
+ XMLPUBFUN int xmlUCSIsMusicalSymbols (int code);
114
+ XMLPUBFUN int xmlUCSIsMyanmar (int code);
115
+ XMLPUBFUN int xmlUCSIsNumberForms (int code);
116
+ XMLPUBFUN int xmlUCSIsOgham (int code);
117
+ XMLPUBFUN int xmlUCSIsOldItalic (int code);
118
+ XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code);
119
+ XMLPUBFUN int xmlUCSIsOriya (int code);
120
+ XMLPUBFUN int xmlUCSIsOsmanya (int code);
121
+ XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code);
122
+ XMLPUBFUN int xmlUCSIsPrivateUse (int code);
123
+ XMLPUBFUN int xmlUCSIsPrivateUseArea (int code);
124
+ XMLPUBFUN int xmlUCSIsRunic (int code);
125
+ XMLPUBFUN int xmlUCSIsShavian (int code);
126
+ XMLPUBFUN int xmlUCSIsSinhala (int code);
127
+ XMLPUBFUN int xmlUCSIsSmallFormVariants (int code);
128
+ XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code);
129
+ XMLPUBFUN int xmlUCSIsSpecials (int code);
130
+ XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code);
131
+ XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code);
132
+ XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code);
133
+ XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code);
134
+ XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code);
135
+ XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code);
136
+ XMLPUBFUN int xmlUCSIsSyriac (int code);
137
+ XMLPUBFUN int xmlUCSIsTagalog (int code);
138
+ XMLPUBFUN int xmlUCSIsTagbanwa (int code);
139
+ XMLPUBFUN int xmlUCSIsTags (int code);
140
+ XMLPUBFUN int xmlUCSIsTaiLe (int code);
141
+ XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code);
142
+ XMLPUBFUN int xmlUCSIsTamil (int code);
143
+ XMLPUBFUN int xmlUCSIsTelugu (int code);
144
+ XMLPUBFUN int xmlUCSIsThaana (int code);
145
+ XMLPUBFUN int xmlUCSIsThai (int code);
146
+ XMLPUBFUN int xmlUCSIsTibetan (int code);
147
+ XMLPUBFUN int xmlUCSIsUgaritic (int code);
148
+ XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
149
+ XMLPUBFUN int xmlUCSIsVariationSelectors (int code);
150
+ XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code);
151
+ XMLPUBFUN int xmlUCSIsYiRadicals (int code);
152
+ XMLPUBFUN int xmlUCSIsYiSyllables (int code);
153
+ XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code);
154
+
155
+ XMLPUBFUN int xmlUCSIsBlock (int code, const char *block);
156
+
157
+ XMLPUBFUN int xmlUCSIsCatC (int code);
158
+ XMLPUBFUN int xmlUCSIsCatCc (int code);
159
+ XMLPUBFUN int xmlUCSIsCatCf (int code);
160
+ XMLPUBFUN int xmlUCSIsCatCo (int code);
161
+ XMLPUBFUN int xmlUCSIsCatCs (int code);
162
+ XMLPUBFUN int xmlUCSIsCatL (int code);
163
+ XMLPUBFUN int xmlUCSIsCatLl (int code);
164
+ XMLPUBFUN int xmlUCSIsCatLm (int code);
165
+ XMLPUBFUN int xmlUCSIsCatLo (int code);
166
+ XMLPUBFUN int xmlUCSIsCatLt (int code);
167
+ XMLPUBFUN int xmlUCSIsCatLu (int code);
168
+ XMLPUBFUN int xmlUCSIsCatM (int code);
169
+ XMLPUBFUN int xmlUCSIsCatMc (int code);
170
+ XMLPUBFUN int xmlUCSIsCatMe (int code);
171
+ XMLPUBFUN int xmlUCSIsCatMn (int code);
172
+ XMLPUBFUN int xmlUCSIsCatN (int code);
173
+ XMLPUBFUN int xmlUCSIsCatNd (int code);
174
+ XMLPUBFUN int xmlUCSIsCatNl (int code);
175
+ XMLPUBFUN int xmlUCSIsCatNo (int code);
176
+ XMLPUBFUN int xmlUCSIsCatP (int code);
177
+ XMLPUBFUN int xmlUCSIsCatPc (int code);
178
+ XMLPUBFUN int xmlUCSIsCatPd (int code);
179
+ XMLPUBFUN int xmlUCSIsCatPe (int code);
180
+ XMLPUBFUN int xmlUCSIsCatPf (int code);
181
+ XMLPUBFUN int xmlUCSIsCatPi (int code);
182
+ XMLPUBFUN int xmlUCSIsCatPo (int code);
183
+ XMLPUBFUN int xmlUCSIsCatPs (int code);
184
+ XMLPUBFUN int xmlUCSIsCatS (int code);
185
+ XMLPUBFUN int xmlUCSIsCatSc (int code);
186
+ XMLPUBFUN int xmlUCSIsCatSk (int code);
187
+ XMLPUBFUN int xmlUCSIsCatSm (int code);
188
+ XMLPUBFUN int xmlUCSIsCatSo (int code);
189
+ XMLPUBFUN int xmlUCSIsCatZ (int code);
190
+ XMLPUBFUN int xmlUCSIsCatZl (int code);
191
+ XMLPUBFUN int xmlUCSIsCatZp (int code);
192
+ XMLPUBFUN int xmlUCSIsCatZs (int code);
193
+
194
+ XMLPUBFUN int xmlUCSIsCat (int code, const char *cat);
195
+
196
+ #ifdef __cplusplus
197
+ }
198
+ #endif
199
+
200
+ #endif /* LIBXML_UNICODE_ENABLED */
201
+
202
+ #endif /* __XML_UNICODE_H__ */