ReactOS  0.4.15-dev-3303-g1ade494
DOCBparser.c
Go to the documentation of this file.
1 /*
2  * DOCBparser.c : an attempt to parse SGML Docbook documents
3  *
4  * This is deprecated !!!
5  * Code removed with release 2.6.0 it was broken.
6  * The doc are expect to be migrated to XML DocBook
7  *
8  * See Copyright for the status of this software.
9  *
10  * daniel@veillard.com
11  */
12 
13 #define IN_LIBXML
14 #include "libxml.h"
15 #ifdef LIBXML_DOCB_ENABLED
16 
17 #include <libxml/xmlerror.h>
18 #include <libxml/DOCBparser.h>
19 
36 int
37 docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
38  int *outlen ATTRIBUTE_UNUSED,
39  const unsigned char *in ATTRIBUTE_UNUSED,
40  int *inlen ATTRIBUTE_UNUSED,
41  int quoteChar ATTRIBUTE_UNUSED)
42 {
43  static int deprecated = 0;
44 
45  if (!deprecated) {
47  "docbEncodeEntities() deprecated function reached\n");
48  deprecated = 1;
49  }
50  return(-1);
51 }
52 
64 int
65 docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
66 {
67  static int deprecated = 0;
68 
69  if (!deprecated) {
71  "docbParseDocument() deprecated function reached\n");
72  deprecated = 1;
73  }
74  return (xmlParseDocument(ctxt));
75 }
76 
85 void
86 docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
87 {
88  static int deprecated = 0;
89 
90  if (!deprecated) {
92  "docbFreeParserCtxt() deprecated function reached\n");
93  deprecated = 1;
94  }
95  xmlFreeParserCtxt(ctxt);
96 }
97 
109 int
110 docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
111  const char *chunk ATTRIBUTE_UNUSED,
114 {
115  static int deprecated = 0;
116 
117  if (!deprecated) {
119  "docbParseChunk() deprecated function reached\n");
120  deprecated = 1;
121  }
122 
123  return (xmlParseChunk(ctxt, chunk, size, terminate));
124 }
125 
142 docbParserCtxtPtr
143 docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
144  void *user_data ATTRIBUTE_UNUSED,
145  const char *chunk ATTRIBUTE_UNUSED,
147  const char *filename ATTRIBUTE_UNUSED,
149 {
150  static int deprecated = 0;
151 
152  if (!deprecated) {
154  "docbParseChunk() deprecated function reached\n");
155  deprecated = 1;
156  }
157 
158  return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
159 }
160 
175 docbDocPtr
176 docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
177  const char *encoding ATTRIBUTE_UNUSED,
178  docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
179  void *userData ATTRIBUTE_UNUSED)
180 {
181  static int deprecated = 0;
182 
183  if (!deprecated) {
185  "docbParseChunk() deprecated function reached\n");
186  deprecated = 1;
187  }
188 
189  return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
190  xmlStrlen((const xmlChar *) cur), 0, userData));
191 }
192 
203 docbDocPtr
204 docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
205  const char *encoding ATTRIBUTE_UNUSED)
206 {
207  static int deprecated = 0;
208 
209  if (!deprecated) {
211  "docbParseChunk() deprecated function reached\n");
212  deprecated = 1;
213  }
214 
215  return (xmlParseDoc(cur));
216 }
217 
218 
230 docbParserCtxtPtr
231 docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
232  const char *encoding ATTRIBUTE_UNUSED)
233 {
234  static int deprecated = 0;
235 
236  if (!deprecated) {
238  "docbCreateFileParserCtxt() deprecated function reached\n");
239  deprecated = 1;
240  }
241 
243 }
244 
260 docbDocPtr
261 docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
262  const char *encoding ATTRIBUTE_UNUSED,
263  docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
264  void *userData ATTRIBUTE_UNUSED)
265 {
266  static int deprecated = 0;
267 
268  if (!deprecated) {
270  "docbSAXParseFile() deprecated function reached\n");
271  deprecated = 1;
272  }
273 
274  return (xmlSAXParseFileWithData(sax, filename, 0, userData));
275 }
276 
289 docbDocPtr
290 docbParseFile(const char *filename ATTRIBUTE_UNUSED,
291  const char *encoding ATTRIBUTE_UNUSED)
292 {
293  static int deprecated = 0;
294 
295  if (!deprecated) {
297  "docbParseFile() deprecated function reached\n");
298  deprecated = 1;
299  }
300 
301  return (xmlParseFile(filename));
302 }
303 #define bottom_DOCBparser
304 #include "elfgcchack.h"
305 #endif /* LIBXML_DOCB_ENABLED */
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:425
XMLPUBFUN void XMLCALL xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
xmlCharEncoding
Definition: encoding.h:58
const char * filename
Definition: ioapi.h:135
static int sax
Definition: xmllint.c:199
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
void MSVCRT() terminate()
GLsizeiptr size
Definition: glext.h:5919
static FILE * out
Definition: regtests2xml.c:44
XMLPUBFUN int XMLCALL xmlParseDocument(xmlParserCtxtPtr ctxt)
Definition: parser.c:10689
unsigned char xmlChar
Definition: xmlstring.h:28
ed encoding
Definition: write.c:2825
FxCollectionEntry * cur
GLuint in
Definition: glext.h:9616
#define ATTRIBUTE_UNUSED
Definition: win32config.h:132
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateFileParserCtxt(const char *filename)
Definition: parser.c:14087
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362