Debian Codegraph @

include/private/io.h

raw
1 #ifndef XML_IO_H_PRIVATE__
2 #define XML_IO_H_PRIVATE__
3
4 #include <libxml/encoding.h>
5 #include <libxml/tree.h>
6 #include <libxml/xmlversion.h>
7
8 #ifndef SIZE_MAX
9 #define SIZE_MAX ((size_t)(-1))
10 #endif
11
12 /*
13 * Initial buffer size should include
14 *
15 * - MINLEN = 4000 (I/O chunk size)
16 * - INPUT_CHUNK = 250 (parser prefetch)
17 * - LINE_LEN = 80 (shrink limit for error messages)
18 * - some amount for unshrunken content.
19 */
20 #define XML_IO_BUFFER_SIZE 6000
21
22 #define XML_ESCAPE_ATTR (1u << 0)
23 #define XML_ESCAPE_NON_ASCII (1u << 1)
24 #define XML_ESCAPE_HTML (1u << 2)
25 #define XML_ESCAPE_QUOT (1u << 3)
26
27 XML_HIDDEN xmlChar *
28 xmlEscapeText(const xmlChar *text, int flags);
29 #ifdef LIBXML_OUTPUT_ENABLED
30 XML_HIDDEN void
31 xmlSerializeText(xmlOutputBuffer *buf, const xmlChar *string, size_t maxSize,
32 unsigned flags);
33 #endif
34
35 XML_HIDDEN void
36 xmlInitIOCallbacks(void);
37
38 XML_HIDDEN int
39 xmlNoNetExists(const char *filename);
40
41 XML_HIDDEN xmlParserErrors
42 xmlParserInputBufferCreateUrl(const char *URI, xmlCharEncoding enc,
43 xmlParserInputFlags flags,
44 xmlParserInputBuffer **out);
45
46 XML_HIDDEN xmlParserInputBuffer *
47 xmlNewInputBufferString(const char *str, xmlParserInputFlags flags);
48 XML_HIDDEN xmlParserInputBuffer *
49 xmlNewInputBufferMemory(const void *mem, size_t size,
50 xmlParserInputFlags flags, xmlCharEncoding enc);
51
52 XML_HIDDEN xmlParserErrors
53 xmlInputFromFd(xmlParserInputBuffer *buf, int fd, xmlParserInputFlags flags);
54
55 #ifdef LIBXML_OUTPUT_ENABLED
56 XML_HIDDEN void
57 xmlOutputBufferWriteQuotedString(xmlOutputBuffer *buf,
58 const xmlChar *string);
59 #endif
60
61 #endif /* XML_IO_H_PRIVATE__ */