@img/sharp-libvips-dev 1.1.0-rc4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/include/archive.h +3 -3
  2. package/include/archive_entry.h +3 -2
  3. package/include/expat.h +3 -3
  4. package/include/expat_config.h +3 -3
  5. package/include/fontconfig/fcfreetype.h +5 -5
  6. package/include/fontconfig/fcprivate.h +86 -92
  7. package/include/fontconfig/fontconfig.h +327 -320
  8. package/include/glib-2.0/gio/gdbusnameowning.h +12 -10
  9. package/include/glib-2.0/gio/gsettings.h +35 -31
  10. package/include/glib-2.0/gobject/gsignal.h +33 -8
  11. package/include/harfbuzz/hb-buffer.h +62 -3
  12. package/include/harfbuzz/hb-common.h +11 -0
  13. package/include/harfbuzz/hb-draw.h +10 -2
  14. package/include/harfbuzz/hb-face.h +14 -0
  15. package/include/harfbuzz/hb-font.h +6 -0
  16. package/include/harfbuzz/hb-ft.h +4 -0
  17. package/include/harfbuzz/hb-paint.h +8 -0
  18. package/include/harfbuzz/hb-version.h +3 -3
  19. package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
  20. package/include/libxml2/libxml/HTMLparser.h +33 -30
  21. package/include/libxml2/libxml/HTMLtree.h +1 -0
  22. package/include/libxml2/libxml/SAX.h +2 -186
  23. package/include/libxml2/libxml/SAX2.h +2 -3
  24. package/include/libxml2/libxml/catalog.h +1 -0
  25. package/include/libxml2/libxml/debugXML.h +0 -138
  26. package/include/libxml2/libxml/encoding.h +124 -61
  27. package/include/libxml2/libxml/entities.h +0 -19
  28. package/include/libxml2/libxml/globals.h +0 -16
  29. package/include/libxml2/libxml/nanoftp.h +3 -173
  30. package/include/libxml2/libxml/parser.h +472 -231
  31. package/include/libxml2/libxml/parserInternals.h +21 -101
  32. package/include/libxml2/libxml/relaxng.h +7 -2
  33. package/include/libxml2/libxml/threads.h +0 -6
  34. package/include/libxml2/libxml/tree.h +29 -85
  35. package/include/libxml2/libxml/valid.h +20 -12
  36. package/include/libxml2/libxml/xinclude.h +5 -0
  37. package/include/libxml2/libxml/xlink.h +4 -0
  38. package/include/libxml2/libxml/xmlIO.h +13 -32
  39. package/include/libxml2/libxml/xmlautomata.h +19 -2
  40. package/include/libxml2/libxml/xmlerror.h +17 -18
  41. package/include/libxml2/libxml/xmlexports.h +6 -56
  42. package/include/libxml2/libxml/xmlmemory.h +19 -19
  43. package/include/libxml2/libxml/xmlmodule.h +4 -0
  44. package/include/libxml2/libxml/xmlreader.h +11 -3
  45. package/include/libxml2/libxml/xmlregexp.h +7 -106
  46. package/include/libxml2/libxml/xmlsave.h +11 -2
  47. package/include/libxml2/libxml/xmlschemas.h +10 -5
  48. package/include/libxml2/libxml/xmlunicode.h +3 -354
  49. package/include/libxml2/libxml/xmlversion.h +18 -33
  50. package/include/libxml2/libxml/xpath.h +5 -15
  51. package/include/libxml2/libxml/xpathInternals.h +9 -3
  52. package/include/libxml2/libxml/xpointer.h +1 -91
  53. package/include/pango-1.0/pango/pango-features.h +2 -2
  54. package/include/pango-1.0/pango/pango-font.h +1 -1
  55. package/package.json +1 -1
  56. package/versions.json +8 -8
@@ -8,195 +8,11 @@
8
8
  * Author: Daniel Veillard
9
9
  */
10
10
 
11
-
12
11
  #ifndef __XML_SAX_H__
13
12
  #define __XML_SAX_H__
14
13
 
15
- #include <libxml/xmlversion.h>
16
- #include <libxml/parser.h>
17
-
18
- #ifdef LIBXML_LEGACY_ENABLED
19
-
20
- #ifdef __cplusplus
21
- extern "C" {
14
+ #ifdef __GNUC__
15
+ #warning "libxml/SAX.h is deprecated"
22
16
  #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
17
 
202
18
  #endif /* __XML_SAX_H__ */
@@ -95,16 +95,15 @@ XMLPUBFUN void
95
95
  xmlSAX2StartDocument (void *ctx);
96
96
  XMLPUBFUN void
97
97
  xmlSAX2EndDocument (void *ctx);
98
- #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
99
- defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
98
+ XML_DEPRECATED
100
99
  XMLPUBFUN void
101
100
  xmlSAX2StartElement (void *ctx,
102
101
  const xmlChar *fullname,
103
102
  const xmlChar **atts);
103
+ XML_DEPRECATED
104
104
  XMLPUBFUN void
105
105
  xmlSAX2EndElement (void *ctx,
106
106
  const xmlChar *name);
107
- #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
108
107
  XMLPUBFUN void
109
108
  xmlSAX2StartElementNs (void *ctx,
110
109
  const xmlChar *localname,
@@ -161,6 +161,7 @@ XMLPUBFUN xmlChar *
161
161
  */
162
162
  XMLPUBFUN int
163
163
  xmlCatalogSetDebug (int level);
164
+ XML_DEPRECATED
164
165
  XMLPUBFUN xmlCatalogPrefer
165
166
  xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
166
167
  XMLPUBFUN void
@@ -71,144 +71,6 @@ XMLPUBFUN int
71
71
  xmlDebugCheckDocument (FILE * output,
72
72
  xmlDocPtr doc);
73
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
- const char *filename,
207
- xmlShellReadlineFunc input,
208
- FILE *output);
209
-
210
- #endif /* LIBXML_XPATH_ENABLED */
211
-
212
74
  #ifdef __cplusplus
213
75
  }
214
76
  #endif
@@ -23,44 +23,30 @@
23
23
  #define __XML_CHAR_ENCODING_H__
24
24
 
25
25
  #include <libxml/xmlversion.h>
26
-
27
- #ifdef LIBXML_ICONV_ENABLED
28
- #include <iconv.h>
29
- #endif
26
+ #include <libxml/xmlerror.h>
30
27
 
31
28
  #ifdef __cplusplus
32
29
  extern "C" {
33
30
  #endif
34
31
 
32
+ /*
33
+ * Backward compatibility
34
+ */
35
+ #define UTF8Toisolat1 xmlUTF8ToIsolat1
36
+ #define isolat1ToUTF8 xmlIsolat1ToUTF8
37
+
35
38
  typedef enum {
36
39
  XML_ENC_ERR_SUCCESS = 0,
37
- XML_ENC_ERR_SPACE = -1,
40
+ XML_ENC_ERR_INTERNAL = -1,
38
41
  XML_ENC_ERR_INPUT = -2,
39
- XML_ENC_ERR_PARTIAL = -3,
40
- XML_ENC_ERR_INTERNAL = -4,
41
- XML_ENC_ERR_MEMORY = -5
42
+ XML_ENC_ERR_SPACE = -3,
43
+ XML_ENC_ERR_MEMORY = -4
42
44
  } xmlCharEncError;
43
45
 
44
46
  /*
45
47
  * xmlCharEncoding:
46
48
  *
47
49
  * 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
50
  */
65
51
  typedef enum {
66
52
  XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
@@ -86,9 +72,23 @@ typedef enum {
86
72
  XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
87
73
  XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
88
74
  XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
89
- XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
75
+ XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
76
+ /* Available since 2.14.0 */
77
+ XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
78
+ XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
79
+ XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
80
+ XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
81
+ XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
82
+ XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
83
+ XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
84
+ XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
90
85
  } xmlCharEncoding;
91
86
 
87
+ typedef enum {
88
+ XML_ENC_INPUT = (1 << 0),
89
+ XML_ENC_OUTPUT = (1 << 1)
90
+ } xmlCharEncFlags;
91
+
92
92
  /**
93
93
  * xmlCharEncodingInputFunc:
94
94
  * @out: a pointer to an array of bytes to store the UTF-8 result
@@ -96,17 +96,15 @@ typedef enum {
96
96
  * @in: a pointer to an array of chars in the original encoding
97
97
  * @inlen: the length of @in
98
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.
99
+ * Convert characters to UTF-8.
101
100
  *
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.
101
+ * On success, the value of @inlen after return is the number of
102
+ * bytes consumed and @outlen is the number of bytes produced.
103
+ *
104
+ * Returns the number of bytes written or an XML_ENC_ERR code.
107
105
  */
108
- typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
109
- const unsigned char *in, int *inlen);
106
+ typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
107
+ const unsigned char *in, int *inlen);
110
108
 
111
109
 
112
110
  /**
@@ -116,41 +114,92 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
116
114
  * @in: a pointer to an array of UTF-8 chars
117
115
  * @inlen: the length of @in
118
116
  *
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.
117
+ * Convert characters from UTF-8.
123
118
  *
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.
119
+ * On success, the value of @inlen after return is the number of
120
+ * bytes consumed and @outlen is the number of bytes produced.
121
+ *
122
+ * Returns the number of bytes written or an XML_ENC_ERR code.
129
123
  */
130
- typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
131
- const unsigned char *in, int *inlen);
124
+ typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
125
+ const unsigned char *in, int *inlen);
132
126
 
133
127
 
128
+ /**
129
+ * xmlCharEncConvFunc:
130
+ * @vctxt: conversion context
131
+ * @out: a pointer to an array of bytes to store the result
132
+ * @outlen: the length of @out
133
+ * @in: a pointer to an array of input bytes
134
+ * @inlen: the length of @in
135
+ * @flush: end of input
136
+ *
137
+ * Convert between character encodings.
138
+ *
139
+ * The value of @inlen after return is the number of bytes consumed
140
+ * and @outlen is the number of bytes produced.
141
+ *
142
+ * If the converter can consume partial multi-byte sequences, the
143
+ * @flush flag can be used to detect truncated sequences at EOF.
144
+ * Otherwise, the flag can be ignored.
145
+ *
146
+ * Returns an XML_ENC_ERR code.
147
+ */
148
+ typedef xmlCharEncError
149
+ (*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
150
+ const unsigned char *in, int *inlen, int flush);
151
+
152
+ /**
153
+ * xmlCharEncConvCtxtDtor:
154
+ * @vctxt: conversion context
155
+ *
156
+ * Free a conversion context.
157
+ */
158
+ typedef void
159
+ (*xmlCharEncConvCtxtDtor)(void *vctxt);
160
+
134
161
  /*
135
162
  * Block defining the handlers for non UTF-8 encodings.
136
- * If iconv is supported, there are two extra fields.
163
+ *
164
+ * This structure will be made private.
137
165
  */
138
166
  typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
139
167
  typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
140
168
  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 */
169
+ char *name XML_DEPRECATED_MEMBER;
170
+ union {
171
+ xmlCharEncConvFunc func;
172
+ xmlCharEncodingInputFunc legacyFunc;
173
+ } input XML_DEPRECATED_MEMBER;
174
+ union {
175
+ xmlCharEncConvFunc func;
176
+ xmlCharEncodingOutputFunc legacyFunc;
177
+ } output XML_DEPRECATED_MEMBER;
178
+ void *inputCtxt XML_DEPRECATED_MEMBER;
179
+ void *outputCtxt XML_DEPRECATED_MEMBER;
180
+ xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
181
+ int flags XML_DEPRECATED_MEMBER;
152
182
  };
153
183
 
184
+ /**
185
+ * xmlCharEncConvImpl:
186
+ * @vctxt: user data
187
+ * @name: encoding name
188
+ * @flags: bit mask of flags
189
+ * @out: pointer to resulting handler
190
+ *
191
+ * If this function returns XML_ERR_OK, it must fill the @out
192
+ * pointer with an encoding handler. The handler can be obtained
193
+ * from xmlCharEncNewCustomHandler.
194
+ *
195
+ * @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
196
+ *
197
+ * Returns an xmlParserErrors code.
198
+ */
199
+ typedef xmlParserErrors
200
+ (*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
201
+ xmlCharEncodingHandler **out);
202
+
154
203
  /*
155
204
  * Interfaces for encoding handlers.
156
205
  */
@@ -162,13 +211,19 @@ XMLPUBFUN void
162
211
  xmlCleanupCharEncodingHandlers (void);
163
212
  XMLPUBFUN void
164
213
  xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
165
- XMLPUBFUN int
214
+ XMLPUBFUN xmlParserErrors
166
215
  xmlLookupCharEncodingHandler (xmlCharEncoding enc,
167
216
  xmlCharEncodingHandlerPtr *out);
168
- XMLPUBFUN int
217
+ XMLPUBFUN xmlParserErrors
169
218
  xmlOpenCharEncodingHandler (const char *name,
170
219
  int output,
171
220
  xmlCharEncodingHandlerPtr *out);
221
+ XMLPUBFUN xmlParserErrors
222
+ xmlCreateCharEncodingHandler (const char *name,
223
+ xmlCharEncFlags flags,
224
+ xmlCharEncConvImpl impl,
225
+ void *implCtxt,
226
+ xmlCharEncodingHandlerPtr *out);
172
227
  XMLPUBFUN xmlCharEncodingHandlerPtr
173
228
  xmlGetCharEncodingHandler (xmlCharEncoding enc);
174
229
  XMLPUBFUN xmlCharEncodingHandlerPtr
@@ -177,6 +232,14 @@ XMLPUBFUN xmlCharEncodingHandlerPtr
177
232
  xmlNewCharEncodingHandler (const char *name,
178
233
  xmlCharEncodingInputFunc input,
179
234
  xmlCharEncodingOutputFunc output);
235
+ XMLPUBFUN xmlParserErrors
236
+ xmlCharEncNewCustomHandler (const char *name,
237
+ xmlCharEncConvFunc input,
238
+ xmlCharEncConvFunc output,
239
+ xmlCharEncConvCtxtDtor ctxtDtor,
240
+ void *inputCtxt,
241
+ void *outputCtxt,
242
+ xmlCharEncodingHandler **out);
180
243
 
181
244
  /*
182
245
  * Interfaces for encoding names and aliases.
@@ -227,13 +290,13 @@ XMLPUBFUN int
227
290
  */
228
291
  #ifdef LIBXML_OUTPUT_ENABLED
229
292
  XMLPUBFUN int
230
- UTF8Toisolat1 (unsigned char *out,
293
+ xmlUTF8ToIsolat1 (unsigned char *out,
231
294
  int *outlen,
232
295
  const unsigned char *in,
233
296
  int *inlen);
234
297
  #endif /* LIBXML_OUTPUT_ENABLED */
235
298
  XMLPUBFUN int
236
- isolat1ToUTF8 (unsigned char *out,
299
+ xmlIsolat1ToUTF8 (unsigned char *out,
237
300
  int *outlen,
238
301
  const unsigned char *in,
239
302
  int *inlen);
@@ -76,12 +76,6 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
76
76
  * External functions:
77
77
  */
78
78
 
79
- #ifdef LIBXML_LEGACY_ENABLED
80
- XML_DEPRECATED
81
- XMLPUBFUN void
82
- xmlInitializePredefinedEntities (void);
83
- #endif /* LIBXML_LEGACY_ENABLED */
84
-
85
79
  XMLPUBFUN xmlEntityPtr
86
80
  xmlNewEntity (xmlDocPtr doc,
87
81
  const xmlChar *name,
@@ -125,12 +119,6 @@ XMLPUBFUN xmlEntityPtr
125
119
  XMLPUBFUN xmlEntityPtr
126
120
  xmlGetParameterEntity (xmlDocPtr doc,
127
121
  const xmlChar *name);
128
- #ifdef LIBXML_LEGACY_ENABLED
129
- XML_DEPRECATED
130
- XMLPUBFUN const xmlChar *
131
- xmlEncodeEntities (xmlDocPtr doc,
132
- const xmlChar *input);
133
- #endif /* LIBXML_LEGACY_ENABLED */
134
122
  XMLPUBFUN xmlChar *
135
123
  xmlEncodeEntitiesReentrant(xmlDocPtr doc,
136
124
  const xmlChar *input);
@@ -139,10 +127,8 @@ XMLPUBFUN xmlChar *
139
127
  const xmlChar *input);
140
128
  XMLPUBFUN xmlEntitiesTablePtr
141
129
  xmlCreateEntitiesTable (void);
142
- #ifdef LIBXML_TREE_ENABLED
143
130
  XMLPUBFUN xmlEntitiesTablePtr
144
131
  xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
145
- #endif /* LIBXML_TREE_ENABLED */
146
132
  XMLPUBFUN void
147
133
  xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
148
134
  #ifdef LIBXML_OUTPUT_ENABLED
@@ -153,11 +139,6 @@ XMLPUBFUN void
153
139
  xmlDumpEntityDecl (xmlBufferPtr buf,
154
140
  xmlEntityPtr ent);
155
141
  #endif /* LIBXML_OUTPUT_ENABLED */
156
- #ifdef LIBXML_LEGACY_ENABLED
157
- XMLPUBFUN void
158
- xmlCleanupPredefinedEntities(void);
159
- #endif /* LIBXML_LEGACY_ENABLED */
160
-
161
142
 
162
143
  #ifdef __cplusplus
163
144
  }