Permalink
Browse files

include libxml vendor source in repo

This makes it easier to build on multiple OSes as well as avoids having
to install additional packages or external deps when trying to use this
module.
  • Loading branch information...
1 parent bfaeafe commit 63a4cf205a221f74471d47dc8f0e7dc7ad247bfc @defunctzombie defunctzombie committed May 1, 2013
Showing with 231,833 additions and 20 deletions.
  1. +2 −20 binding.gyp
  2. +305 −0 vendor/libxml/DOCBparser.c
  3. +7,074 −0 vendor/libxml/HTMLparser.c
  4. +1,253 −0 vendor/libxml/HTMLtree.c
  5. +180 −0 vendor/libxml/SAX.c
  6. +3,020 −0 vendor/libxml/SAX2.c
  7. +1,301 −0 vendor/libxml/buf.c
  8. +72 −0 vendor/libxml/buf.h
  9. +2,237 −0 vendor/libxml/c14n.c
  10. +3,818 −0 vendor/libxml/catalog.c
  11. +336 −0 vendor/libxml/chvalid.c
  12. +325 −0 vendor/libxml/config.h
  13. +3,422 −0 vendor/libxml/debugXML.c
  14. +1,244 −0 vendor/libxml/dict.c
  15. +17,610 −0 vendor/libxml/elfgcchack.h
  16. +32 −0 vendor/libxml/enc.h
  17. +4,068 −0 vendor/libxml/encoding.c
  18. +1,105 −0 vendor/libxml/entities.c
  19. +996 −0 vendor/libxml/error.c
  20. +1,114 −0 vendor/libxml/globals.c
  21. +1,117 −0 vendor/libxml/hash.c
  22. +96 −0 vendor/libxml/include/libxml/DOCBparser.h
  23. +306 −0 vendor/libxml/include/libxml/HTMLparser.h
  24. +147 −0 vendor/libxml/include/libxml/HTMLtree.h
  25. +631 −0 vendor/libxml/include/libxml/Makefile
  26. +54 −0 vendor/libxml/include/libxml/Makefile.am
  27. +631 −0 vendor/libxml/include/libxml/Makefile.in
  28. +173 −0 vendor/libxml/include/libxml/SAX.h
  29. +176 −0 vendor/libxml/include/libxml/SAX2.h
  30. +126 −0 vendor/libxml/include/libxml/c14n.h
  31. +182 −0 vendor/libxml/include/libxml/catalog.h
  32. +230 −0 vendor/libxml/include/libxml/chvalid.h
  33. +217 −0 vendor/libxml/include/libxml/debugXML.h
  34. +80 −0 vendor/libxml/include/libxml/dict.h
  35. +240 −0 vendor/libxml/include/libxml/encoding.h
  36. +150 −0 vendor/libxml/include/libxml/entities.h
  37. +502 −0 vendor/libxml/include/libxml/globals.h
  38. +233 −0 vendor/libxml/include/libxml/hash.h
  39. +137 −0 vendor/libxml/include/libxml/list.h
  40. +163 −0 vendor/libxml/include/libxml/nanoftp.h
  41. +81 −0 vendor/libxml/include/libxml/nanohttp.h
  42. +1,240 −0 vendor/libxml/include/libxml/parser.h
  43. +644 −0 vendor/libxml/include/libxml/parserInternals.h
  44. +100 −0 vendor/libxml/include/libxml/pattern.h
  45. +213 −0 vendor/libxml/include/libxml/relaxng.h
  46. +958 −0 vendor/libxml/include/libxml/schemasInternals.h
  47. +142 −0 vendor/libxml/include/libxml/schematron.h
  48. +84 −0 vendor/libxml/include/libxml/threads.h
  49. +1,303 −0 vendor/libxml/include/libxml/tree.h
  50. +94 −0 vendor/libxml/include/libxml/uri.h
  51. +458 −0 vendor/libxml/include/libxml/valid.h
  52. +129 −0 vendor/libxml/include/libxml/xinclude.h
  53. +189 −0 vendor/libxml/include/libxml/xlink.h
  54. +366 −0 vendor/libxml/include/libxml/xmlIO.h
  55. +146 −0 vendor/libxml/include/libxml/xmlautomata.h
  56. +944 −0 vendor/libxml/include/libxml/xmlerror.h
  57. +162 −0 vendor/libxml/include/libxml/xmlexports.h
  58. +224 −0 vendor/libxml/include/libxml/xmlmemory.h
  59. +57 −0 vendor/libxml/include/libxml/xmlmodule.h
  60. +428 −0 vendor/libxml/include/libxml/xmlreader.h
  61. +222 −0 vendor/libxml/include/libxml/xmlregexp.h
  62. +88 −0 vendor/libxml/include/libxml/xmlsave.h
  63. +246 −0 vendor/libxml/include/libxml/xmlschemas.h
  64. +151 −0 vendor/libxml/include/libxml/xmlschemastypes.h
  65. +140 −0 vendor/libxml/include/libxml/xmlstring.h
  66. +202 −0 vendor/libxml/include/libxml/xmlunicode.h
  67. +480 −0 vendor/libxml/include/libxml/xmlversion.h
  68. +488 −0 vendor/libxml/include/libxml/xmlwriter.h
  69. +550 −0 vendor/libxml/include/libxml/xpath.h
  70. +632 −0 vendor/libxml/include/libxml/xpathInternals.h
  71. +114 −0 vendor/libxml/include/libxml/xpointer.h
  72. +124 −0 vendor/libxml/include/win32config.h
  73. +86 −0 vendor/libxml/include/wsockcompat.h
  74. +1,343 −0 vendor/libxml/legacy.c
  75. +56 −0 vendor/libxml/libxml.gyp
  76. +115 −0 vendor/libxml/libxml.h
  77. +779 −0 vendor/libxml/list.c
  78. +2,113 −0 vendor/libxml/nanoftp.c
  79. +1,879 −0 vendor/libxml/nanohttp.c
  80. +15,437 −0 vendor/libxml/parser.c
  81. +2,125 −0 vendor/libxml/parserInternals.c
  82. +2,617 −0 vendor/libxml/pattern.c
  83. +11,033 −0 vendor/libxml/relaxng.c
  84. +1,172 −0 vendor/libxml/runsuite.c
  85. +35 −0 vendor/libxml/save.h
  86. +1,785 −0 vendor/libxml/schematron.c
  87. +1,035 −0 vendor/libxml/threads.c
  88. +506 −0 vendor/libxml/timsort.h
  89. +10,083 −0 vendor/libxml/tree.c
  90. +6,873 −0 vendor/libxml/trio.c
  91. +216 −0 vendor/libxml/trio.h
  92. +222 −0 vendor/libxml/triodef.h
  93. +914 −0 vendor/libxml/trionan.c
  94. +84 −0 vendor/libxml/trionan.h
  95. +150 −0 vendor/libxml/triop.h
  96. +2,106 −0 vendor/libxml/triostr.c
  97. +144 −0 vendor/libxml/triostr.h
  98. +2,564 −0 vendor/libxml/uri.c
  99. +7,050 −0 vendor/libxml/valid.c
  100. +2,623 −0 vendor/libxml/xinclude.c
  101. +183 −0 vendor/libxml/xlink.c
  102. +4,153 −0 vendor/libxml/xmlIO.c
  103. +614 −0 vendor/libxml/xmlcatalog.c
  104. +3,770 −0 vendor/libxml/xmllint.c
  105. +1,123 −0 vendor/libxml/xmlmemory.c
  106. +460 −0 vendor/libxml/xmlmodule.c
  107. +5,920 −0 vendor/libxml/xmlreader.c
  108. +8,167 −0 vendor/libxml/xmlregexp.c
  109. +2,784 −0 vendor/libxml/xmlsave.c
  110. +28,885 −0 vendor/libxml/xmlschemas.c
  111. +6,134 −0 vendor/libxml/xmlschemastypes.c
  112. +984 −0 vendor/libxml/xmlstring.c
  113. +3,179 −0 vendor/libxml/xmlunicode.c
  114. +4,737 −0 vendor/libxml/xmlwriter.c
  115. +15,313 −0 vendor/libxml/xpath.c
  116. +3,005 −0 vendor/libxml/xpointer.c
  117. +755 −0 vendor/libxml/xzlib.c
  118. +18 −0 vendor/libxml/xzlib.h
View
@@ -13,26 +13,8 @@
'src/xml_syntax_error.cc',
'src/xml_xpath_context.cc',
],
- 'conditions': [
- ['OS=="win"', {
- # no Windows support yet...
- }, {
- 'libraries': [
- '<!@(xml2-config --libs)'
- ],
- }],
- ['OS=="mac"', {
- # cflags on OS X are stupid and have to be defined like this
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '<!@(xml2-config --cflags)'
- ]
- }
- }, {
- 'cflags': [
- '<!@(xml2-config --cflags)'
- ],
- }]
+ 'dependencies': [
+ './vendor/libxml/libxml.gyp:libxml'
]
}
]
View
@@ -0,0 +1,305 @@
+/*
+ * DOCBparser.c : an attempt to parse SGML Docbook documents
+ *
+ * This is deprecated !!!
+ * Code removed with release 2.6.0 it was broken.
+ * The doc are expect to be migrated to XML DocBook
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_DOCB_ENABLED
+
+#include <libxml/xmlerror.h>
+#include <libxml/DOCBparser.h>
+
+/**
+ * docbEncodeEntities:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ * @quoteChar: the quote character to escape (' or ") or zero.
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ASCII
+ * plus SGML entities block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
+ int *outlen ATTRIBUTE_UNUSED,
+ const unsigned char *in ATTRIBUTE_UNUSED,
+ int *inlen ATTRIBUTE_UNUSED,
+ int quoteChar ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbEncodeEntities() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return(-1);
+}
+
+/**
+ * docbParseDocument:
+ * @ctxt: an SGML parser context
+ *
+ * parse an SGML document (and build a tree if using the standard SAX
+ * interface).
+ *
+ * Returns 0, -1 in case of error. the parser context is augmented
+ * as a result of the parsing.
+ */
+
+int
+docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseDocument() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (xmlParseDocument(ctxt));
+}
+
+/**
+ * docbFreeParserCtxt:
+ * @ctxt: an SGML parser context
+ *
+ * Free all the memory used by a parser context. However the parsed
+ * document in ctxt->myDoc is not freed.
+ */
+
+void
+docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbFreeParserCtxt() deprecated function reached\n");
+ deprecated = 1;
+ }
+ xmlFreeParserCtxt(ctxt);
+}
+
+/**
+ * docbParseChunk:
+ * @ctxt: an XML parser context
+ * @chunk: an char array
+ * @size: the size in byte of the chunk
+ * @terminate: last chunk indicator
+ *
+ * Parse a Chunk of memory
+ *
+ * Returns zero if no error, the xmlParserErrors otherwise.
+ */
+int
+docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ const char *chunk ATTRIBUTE_UNUSED,
+ int size ATTRIBUTE_UNUSED,
+ int terminate ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseChunk(ctxt, chunk, size, terminate));
+}
+
+/**
+ * docbCreatePushParserCtxt:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @chunk: a pointer to an array of chars
+ * @size: number of chars in the array
+ * @filename: an optional file name or URI
+ * @enc: an optional encoding
+ *
+ * Create a parser context for using the DocBook SGML parser in push mode
+ * To allow content encoding detection, @size should be >= 4
+ * The value of @filename is used for fetching external entities
+ * and error/warning reports.
+ *
+ * Returns the new parser context or NULL
+ */
+docbParserCtxtPtr
+docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *user_data ATTRIBUTE_UNUSED,
+ const char *chunk ATTRIBUTE_UNUSED,
+ int size ATTRIBUTE_UNUSED,
+ const char *filename ATTRIBUTE_UNUSED,
+ xmlCharEncoding enc ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
+}
+
+/**
+ * docbSAXParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * parse an SGML in-memory document and build a tree.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED,
+ docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *userData ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
+ xmlStrlen((const xmlChar *) cur), 0, userData));
+}
+
+/**
+ * docbParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ *
+ * parse an SGML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseDoc(cur));
+}
+
+
+/**
+ * docbCreateFileParserCtxt:
+ * @filename: the filename
+ * @encoding: the SGML document encoding, or NULL
+ *
+ * Create a parser context for a file content.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+docbParserCtxtPtr
+docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbCreateFileParserCtxt() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlCreateFileParserCtxt(filename));
+}
+
+/**
+ * docbSAXParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * parse an SGML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED,
+ docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *userData ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbSAXParseFile() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlSAXParseFileWithData(sax, filename, 0, userData));
+}
+
+/**
+ * docbParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing document encoding, or NULL
+ *
+ * parse a Docbook SGML file and build a tree. Automatic support for
+ * ZLIB/Compress compressed document is provided by default if found
+ * at compile-time.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbParseFile(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseFile() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseFile(filename));
+}
+#define bottom_DOCBparser
+#include "elfgcchack.h"
+#endif /* LIBXML_DOCB_ENABLED */
Oops, something went wrong.

0 comments on commit 63a4cf2

Please sign in to comment.