gtksourceview2 0.90.6-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (485) hide show
  1. data/ChangeLog +57 -0
  2. data/README +29 -0
  3. data/Rakefile +14 -0
  4. data/ext/gtksourceview2/depend +5 -0
  5. data/ext/gtksourceview2/extconf.rb +73 -0
  6. data/ext/gtksourceview2/gtksourceview2.def +2 -0
  7. data/ext/gtksourceview2/rbgtksourcebuffer.c +401 -0
  8. data/ext/gtksourceview2/rbgtksourceiter.c +110 -0
  9. data/ext/gtksourceview2/rbgtksourcelanguage.c +126 -0
  10. data/ext/gtksourceview2/rbgtksourcelanguagemanager.c +188 -0
  11. data/ext/gtksourceview2/rbgtksourcemain.c +38 -0
  12. data/ext/gtksourceview2/rbgtksourcemain.h +32 -0
  13. data/ext/gtksourceview2/rbgtksourcemark.c +90 -0
  14. data/ext/gtksourceview2/rbgtksourceprintcompositor.c +249 -0
  15. data/ext/gtksourceview2/rbgtksourcestyle.c +48 -0
  16. data/ext/gtksourceview2/rbgtksourcestylescheme.c +71 -0
  17. data/ext/gtksourceview2/rbgtksourcestyleschememanager.c +211 -0
  18. data/ext/gtksourceview2/rbgtksourceview.c +239 -0
  19. data/extconf.rb +49 -0
  20. data/lib/1.8/gtksourceview2.so +0 -0
  21. data/lib/1.9/gtksourceview2.so +0 -0
  22. data/lib/gtksourceview2.rb +2 -0
  23. data/sample/sourcelanguagemanager.rb +21 -0
  24. data/sample/test.rb +32 -0
  25. data/test/run-test.rb +33 -0
  26. data/test/test_source_view.rb +17 -0
  27. data/vendor/local/bin/libgtksourceview-2.0-0.dll +0 -0
  28. data/vendor/local/bin/libxml2-2.dll +0 -0
  29. data/vendor/local/bin/xmlcatalog.exe +0 -0
  30. data/vendor/local/bin/xmllint.exe +0 -0
  31. data/vendor/local/include/gtksourceview-2.0/gtksourceview/completion-providers/words/gtksourcecompletionwords.h +67 -0
  32. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcebuffer.h +181 -0
  33. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletion.h +131 -0
  34. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletioncontext.h +98 -0
  35. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletioninfo.h +82 -0
  36. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletionitem.h +71 -0
  37. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletionproposal.h +76 -0
  38. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcecompletionprovider.h +119 -0
  39. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcegutter.h +106 -0
  40. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourceiter.h +53 -0
  41. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcelanguage.h +83 -0
  42. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcelanguagemanager.h +86 -0
  43. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcemark.h +71 -0
  44. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourceprintcompositor.h +177 -0
  45. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcestyle.h +41 -0
  46. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcestylescheme.h +91 -0
  47. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourcestyleschememanager.h +90 -0
  48. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourceundomanager.h +77 -0
  49. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourceview-typebuiltins.h +44 -0
  50. data/vendor/local/include/gtksourceview-2.0/gtksourceview/gtksourceview.h +272 -0
  51. data/vendor/local/include/libxml2/libxml/DOCBparser.h +96 -0
  52. data/vendor/local/include/libxml2/libxml/HTMLparser.h +304 -0
  53. data/vendor/local/include/libxml2/libxml/HTMLtree.h +147 -0
  54. data/vendor/local/include/libxml2/libxml/SAX.h +173 -0
  55. data/vendor/local/include/libxml2/libxml/SAX2.h +176 -0
  56. data/vendor/local/include/libxml2/libxml/c14n.h +126 -0
  57. data/vendor/local/include/libxml2/libxml/catalog.h +182 -0
  58. data/vendor/local/include/libxml2/libxml/chvalid.h +230 -0
  59. data/vendor/local/include/libxml2/libxml/debugXML.h +217 -0
  60. data/vendor/local/include/libxml2/libxml/dict.h +69 -0
  61. data/vendor/local/include/libxml2/libxml/encoding.h +226 -0
  62. data/vendor/local/include/libxml2/libxml/entities.h +150 -0
  63. data/vendor/local/include/libxml2/libxml/globals.h +502 -0
  64. data/vendor/local/include/libxml2/libxml/hash.h +233 -0
  65. data/vendor/local/include/libxml2/libxml/list.h +137 -0
  66. data/vendor/local/include/libxml2/libxml/nanoftp.h +143 -0
  67. data/vendor/local/include/libxml2/libxml/nanohttp.h +81 -0
  68. data/vendor/local/include/libxml2/libxml/parser.h +1235 -0
  69. data/vendor/local/include/libxml2/libxml/parserInternals.h +611 -0
  70. data/vendor/local/include/libxml2/libxml/pattern.h +100 -0
  71. data/vendor/local/include/libxml2/libxml/relaxng.h +213 -0
  72. data/vendor/local/include/libxml2/libxml/schemasInternals.h +958 -0
  73. data/vendor/local/include/libxml2/libxml/schematron.h +142 -0
  74. data/vendor/local/include/libxml2/libxml/threads.h +84 -0
  75. data/vendor/local/include/libxml2/libxml/tree.h +1252 -0
  76. data/vendor/local/include/libxml2/libxml/uri.h +94 -0
  77. data/vendor/local/include/libxml2/libxml/valid.h +458 -0
  78. data/vendor/local/include/libxml2/libxml/xinclude.h +129 -0
  79. data/vendor/local/include/libxml2/libxml/xlink.h +189 -0
  80. data/vendor/local/include/libxml2/libxml/xmlIO.h +360 -0
  81. data/vendor/local/include/libxml2/libxml/xmlautomata.h +146 -0
  82. data/vendor/local/include/libxml2/libxml/xmlerror.h +944 -0
  83. data/vendor/local/include/libxml2/libxml/xmlexports.h +162 -0
  84. data/vendor/local/include/libxml2/libxml/xmlmemory.h +224 -0
  85. data/vendor/local/include/libxml2/libxml/xmlmodule.h +57 -0
  86. data/vendor/local/include/libxml2/libxml/xmlreader.h +424 -0
  87. data/vendor/local/include/libxml2/libxml/xmlregexp.h +222 -0
  88. data/vendor/local/include/libxml2/libxml/xmlsave.h +87 -0
  89. data/vendor/local/include/libxml2/libxml/xmlschemas.h +218 -0
  90. data/vendor/local/include/libxml2/libxml/xmlschemastypes.h +151 -0
  91. data/vendor/local/include/libxml2/libxml/xmlstring.h +140 -0
  92. data/vendor/local/include/libxml2/libxml/xmlunicode.h +202 -0
  93. data/vendor/local/include/libxml2/libxml/xmlversion.h +458 -0
  94. data/vendor/local/include/libxml2/libxml/xmlwriter.h +485 -0
  95. data/vendor/local/include/libxml2/libxml/xpath.h +546 -0
  96. data/vendor/local/include/libxml2/libxml/xpathInternals.h +630 -0
  97. data/vendor/local/include/libxml2/libxml/xpointer.h +114 -0
  98. data/vendor/local/lib/libgtksourceview-2.0.dll.a +0 -0
  99. data/vendor/local/lib/libxml2.def +1657 -0
  100. data/vendor/local/lib/libxml2.dll.a +0 -0
  101. data/vendor/local/lib/libxml2.lib +0 -0
  102. data/vendor/local/lib/pkgconfig/gtksourceview-2.0.pc +12 -0
  103. data/vendor/local/lib/pkgconfig/libxml-2.0.pc +13 -0
  104. data/vendor/local/manifest/libxml2-dev_2.7.7-1_win32.mft +267 -0
  105. data/vendor/local/manifest/libxml2_2.7.7-1_win32.mft +2 -0
  106. data/vendor/local/share/aclocal/libxml.m4 +188 -0
  107. data/vendor/local/share/doc/libxml2-2.7.7/Copyright +27 -0
  108. data/vendor/local/share/doc/libxml2-2.7.7/examples/testHTML.c +880 -0
  109. data/vendor/local/share/doc/libxml2-2.7.7/examples/testSAX.c +1198 -0
  110. data/vendor/local/share/doc/libxml2-2.7.7/examples/testXPath.c +227 -0
  111. data/vendor/local/share/doc/libxml2-2.7.7/examples/xmllint.c +3722 -0
  112. data/vendor/local/share/doc/libxml2-2.7.7/html/DOM.gif +0 -0
  113. data/vendor/local/share/doc/libxml2-2.7.7/html/FAQ.html +282 -0
  114. data/vendor/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-180x168.gif +0 -0
  115. data/vendor/local/share/doc/libxml2-2.7.7/html/Libxml2-Logo-90x34.gif +0 -0
  116. data/vendor/local/share/doc/libxml2-2.7.7/html/encoding.html +206 -0
  117. data/vendor/local/share/doc/libxml2-2.7.7/html/examples.xml +751 -0
  118. data/vendor/local/share/doc/libxml2-2.7.7/html/examples.xsl +174 -0
  119. data/vendor/local/share/doc/libxml2-2.7.7/html/html/book1.html +13 -0
  120. data/vendor/local/share/doc/libxml2-2.7.7/html/html/home.png +0 -0
  121. data/vendor/local/share/doc/libxml2-2.7.7/html/html/index.html +13 -0
  122. data/vendor/local/share/doc/libxml2-2.7.7/html/html/left.png +0 -0
  123. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-DOCBparser.html +51 -0
  124. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLparser.html +182 -0
  125. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-HTMLtree.html +73 -0
  126. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX.html +125 -0
  127. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-SAX2.html +128 -0
  128. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-c14n.html +38 -0
  129. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-catalog.html +142 -0
  130. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-chvalid.html +72 -0
  131. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-debugXML.html +120 -0
  132. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-dict.html +49 -0
  133. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-encoding.html +118 -0
  134. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-entities.html +79 -0
  135. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-globals.html +152 -0
  136. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-hash.html +116 -0
  137. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-lib.html +13 -0
  138. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-list.html +120 -0
  139. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-nanoftp.html +92 -0
  140. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-nanohttp.html +65 -0
  141. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-parser.html +555 -0
  142. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-parserInternals.html +319 -0
  143. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-pattern.html +76 -0
  144. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-relaxng.html +162 -0
  145. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-schemasInternals.html +373 -0
  146. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-schematron.html +81 -0
  147. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-threads.html +72 -0
  148. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-tree.html +958 -0
  149. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-uri.html +73 -0
  150. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-valid.html +289 -0
  151. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xinclude.html +59 -0
  152. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xlink.html +82 -0
  153. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlIO.html +206 -0
  154. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlautomata.html +85 -0
  155. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlerror.html +862 -0
  156. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlexports.html +20 -0
  157. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmemory.html +107 -0
  158. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlmodule.html +38 -0
  159. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlreader.html +327 -0
  160. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlregexp.html +143 -0
  161. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlsave.html +59 -0
  162. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemas.html +173 -0
  163. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlschemastypes.html +123 -0
  164. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlstring.html +108 -0
  165. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlunicode.html +512 -0
  166. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlversion.html +60 -0
  167. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xmlwriter.html +258 -0
  168. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xpath.html +307 -0
  169. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xpathInternals.html +394 -0
  170. data/vendor/local/share/doc/libxml2-2.7.7/html/html/libxml-xpointer.html +83 -0
  171. data/vendor/local/share/doc/libxml2-2.7.7/html/html/right.png +0 -0
  172. data/vendor/local/share/doc/libxml2-2.7.7/html/html/up.png +0 -0
  173. data/vendor/local/share/doc/libxml2-2.7.7/html/io1.c +166 -0
  174. data/vendor/local/share/doc/libxml2-2.7.7/html/io1.res +5 -0
  175. data/vendor/local/share/doc/libxml2-2.7.7/html/io2.c +58 -0
  176. data/vendor/local/share/doc/libxml2-2.7.7/html/io2.res +2 -0
  177. data/vendor/local/share/doc/libxml2-2.7.7/html/libxml.gif +0 -0
  178. data/vendor/local/share/doc/libxml2-2.7.7/html/parse1.c +56 -0
  179. data/vendor/local/share/doc/libxml2-2.7.7/html/parse2.c +72 -0
  180. data/vendor/local/share/doc/libxml2-2.7.7/html/parse3.c +60 -0
  181. data/vendor/local/share/doc/libxml2-2.7.7/html/parse4.c +143 -0
  182. data/vendor/local/share/doc/libxml2-2.7.7/html/reader1.c +107 -0
  183. data/vendor/local/share/doc/libxml2-2.7.7/html/reader1.res +14 -0
  184. data/vendor/local/share/doc/libxml2-2.7.7/html/reader2.c +122 -0
  185. data/vendor/local/share/doc/libxml2-2.7.7/html/reader3.c +120 -0
  186. data/vendor/local/share/doc/libxml2-2.7.7/html/reader3.res +13 -0
  187. data/vendor/local/share/doc/libxml2-2.7.7/html/reader4.c +122 -0
  188. data/vendor/local/share/doc/libxml2-2.7.7/html/reader4.res +3 -0
  189. data/vendor/local/share/doc/libxml2-2.7.7/html/redhat.gif +0 -0
  190. data/vendor/local/share/doc/libxml2-2.7.7/html/smallfootonly.gif +0 -0
  191. data/vendor/local/share/doc/libxml2-2.7.7/html/structure.gif +0 -0
  192. data/vendor/local/share/doc/libxml2-2.7.7/html/test1.xml +1 -0
  193. data/vendor/local/share/doc/libxml2-2.7.7/html/test2.xml +13 -0
  194. data/vendor/local/share/doc/libxml2-2.7.7/html/test3.xml +39 -0
  195. data/vendor/local/share/doc/libxml2-2.7.7/html/testWriter.c +1198 -0
  196. data/vendor/local/share/doc/libxml2-2.7.7/html/tree1.c +94 -0
  197. data/vendor/local/share/doc/libxml2-2.7.7/html/tree1.res +4 -0
  198. data/vendor/local/share/doc/libxml2-2.7.7/html/tree2.c +118 -0
  199. data/vendor/local/share/doc/libxml2-2.7.7/html/tree2.res +18 -0
  200. data/vendor/local/share/doc/libxml2-2.7.7/html/tst.xml +7 -0
  201. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apa.html +8 -0
  202. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apb.html +14 -0
  203. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apc.html +82 -0
  204. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apd.html +76 -0
  205. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ape.html +78 -0
  206. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apf.html +67 -0
  207. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/apg.html +75 -0
  208. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/aph.html +76 -0
  209. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/api.html +4 -0
  210. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s02.html +14 -0
  211. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s03.html +47 -0
  212. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s04.html +54 -0
  213. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s05.html +55 -0
  214. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s06.html +35 -0
  215. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s07.html +30 -0
  216. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s08.html +38 -0
  217. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ar01s09.html +63 -0
  218. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/blank.png +0 -0
  219. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/1.png +0 -0
  220. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/10.png +0 -0
  221. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/2.png +0 -0
  222. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/3.png +0 -0
  223. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/4.png +0 -0
  224. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/5.png +0 -0
  225. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/6.png +0 -0
  226. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/7.png +0 -0
  227. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/8.png +0 -0
  228. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/callouts/9.png +0 -0
  229. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/caution.png +0 -0
  230. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/draft.png +0 -0
  231. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/home.png +0 -0
  232. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/important.png +0 -0
  233. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/next.png +0 -0
  234. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/note.png +0 -0
  235. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/prev.png +0 -0
  236. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/tip.png +0 -0
  237. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-blank.png +0 -0
  238. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-minus.png +0 -0
  239. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/toc-plus.png +0 -0
  240. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/up.png +0 -0
  241. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/images/warning.png +0 -0
  242. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddattribute.c +64 -0
  243. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includeaddkeyword.c +75 -0
  244. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includeconvert.c +73 -0
  245. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includegetattribute.c +72 -0
  246. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includekeyword.c +79 -0
  247. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/includexpath.c +74 -0
  248. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/index.html +14 -0
  249. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/ix01.html +1 -0
  250. data/vendor/local/share/doc/libxml2-2.7.7/html/tutorial/xmltutorial.pdf +1336 -0
  251. data/vendor/local/share/doc/libxml2-2.7.7/html/w3c.png +0 -0
  252. data/vendor/local/share/doc/libxml2-2.7.7/html/writer.xml +2 -0
  253. data/vendor/local/share/doc/libxml2-2.7.7/html/xml.html +5344 -0
  254. data/vendor/local/share/doc/libxml2-2.7.7/html/xpath1.c +250 -0
  255. data/vendor/local/share/doc/libxml2-2.7.7/html/xpath1.res +5 -0
  256. data/vendor/local/share/doc/libxml2-2.7.7/html/xpath2.c +190 -0
  257. data/vendor/local/share/doc/libxml2-2.7.7/html/xpath2.res +30 -0
  258. data/vendor/local/share/gtk-doc/html/libxml2/general.html +38 -0
  259. data/vendor/local/share/gtk-doc/html/libxml2/home.png +0 -0
  260. data/vendor/local/share/gtk-doc/html/libxml2/index.html +67 -0
  261. data/vendor/local/share/gtk-doc/html/libxml2/left.png +0 -0
  262. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-DOCBparser.html +138 -0
  263. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-HTMLparser.html +371 -0
  264. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-HTMLtree.html +172 -0
  265. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-SAX.html +243 -0
  266. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-SAX2.html +247 -0
  267. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-c14n.html +91 -0
  268. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-catalog.html +278 -0
  269. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-chvalid.html +241 -0
  270. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-debugXML.html +225 -0
  271. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-dict.html +119 -0
  272. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-encoding.html +208 -0
  273. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-entities.html +166 -0
  274. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-globals.html +383 -0
  275. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-hash.html +214 -0
  276. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-list.html +226 -0
  277. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-nanoftp.html +177 -0
  278. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-nanohttp.html +142 -0
  279. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-parser.html +762 -0
  280. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-parserInternals.html +673 -0
  281. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-pattern.html +166 -0
  282. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-relaxng.html +278 -0
  283. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-schemasInternals.html +860 -0
  284. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-schematron.html +166 -0
  285. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-threads.html +161 -0
  286. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-tree.html +1542 -0
  287. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-uri.html +154 -0
  288. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-valid.html +528 -0
  289. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xinclude.html +169 -0
  290. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xlink.html +160 -0
  291. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlIO.html +337 -0
  292. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlautomata.html +176 -0
  293. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlerror.html +950 -0
  294. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlexports.html +87 -0
  295. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlmemory.html +186 -0
  296. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlmodule.html +97 -0
  297. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlreader.html +560 -0
  298. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlregexp.html +280 -0
  299. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlsave.html +132 -0
  300. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlschemas.html +299 -0
  301. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlschemastypes.html +237 -0
  302. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlstring.html +217 -0
  303. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlunicode.html +887 -0
  304. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlversion.html +277 -0
  305. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xmlwriter.html +474 -0
  306. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpath.html +529 -0
  307. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpathInternals.html +787 -0
  308. data/vendor/local/share/gtk-doc/html/libxml2/libxml2-xpointer.html +171 -0
  309. data/vendor/local/share/gtk-doc/html/libxml2/libxml2.devhelp +3529 -0
  310. data/vendor/local/share/gtk-doc/html/libxml2/right.png +0 -0
  311. data/vendor/local/share/gtk-doc/html/libxml2/style.css +66 -0
  312. data/vendor/local/share/gtk-doc/html/libxml2/up.png +0 -0
  313. data/vendor/local/share/gtksourceview-2.0/language-specs/R.lang +128 -0
  314. data/vendor/local/share/gtksourceview-2.0/language-specs/ada.lang +220 -0
  315. data/vendor/local/share/gtksourceview-2.0/language-specs/asp.lang +1096 -0
  316. data/vendor/local/share/gtksourceview-2.0/language-specs/awk.lang +137 -0
  317. data/vendor/local/share/gtksourceview-2.0/language-specs/bibtex.lang +92 -0
  318. data/vendor/local/share/gtksourceview-2.0/language-specs/boo.lang +256 -0
  319. data/vendor/local/share/gtksourceview-2.0/language-specs/c.lang +272 -0
  320. data/vendor/local/share/gtksourceview-2.0/language-specs/cg.lang +231 -0
  321. data/vendor/local/share/gtksourceview-2.0/language-specs/changelog.lang +91 -0
  322. data/vendor/local/share/gtksourceview-2.0/language-specs/chdr.lang +42 -0
  323. data/vendor/local/share/gtksourceview-2.0/language-specs/cmake.lang +407 -0
  324. data/vendor/local/share/gtksourceview-2.0/language-specs/cpp.lang +106 -0
  325. data/vendor/local/share/gtksourceview-2.0/language-specs/csharp.lang +280 -0
  326. data/vendor/local/share/gtksourceview-2.0/language-specs/css.lang +516 -0
  327. data/vendor/local/share/gtksourceview-2.0/language-specs/cuda.lang +288 -0
  328. data/vendor/local/share/gtksourceview-2.0/language-specs/d.lang +295 -0
  329. data/vendor/local/share/gtksourceview-2.0/language-specs/def.lang +268 -0
  330. data/vendor/local/share/gtksourceview-2.0/language-specs/desktop.lang +299 -0
  331. data/vendor/local/share/gtksourceview-2.0/language-specs/diff.lang +84 -0
  332. data/vendor/local/share/gtksourceview-2.0/language-specs/docbook.lang +475 -0
  333. data/vendor/local/share/gtksourceview-2.0/language-specs/dosbatch.lang +166 -0
  334. data/vendor/local/share/gtksourceview-2.0/language-specs/dot.lang +139 -0
  335. data/vendor/local/share/gtksourceview-2.0/language-specs/dpatch.lang +47 -0
  336. data/vendor/local/share/gtksourceview-2.0/language-specs/dtd.lang +139 -0
  337. data/vendor/local/share/gtksourceview-2.0/language-specs/eiffel.lang +238 -0
  338. data/vendor/local/share/gtksourceview-2.0/language-specs/erlang.lang +248 -0
  339. data/vendor/local/share/gtksourceview-2.0/language-specs/fcl.lang +113 -0
  340. data/vendor/local/share/gtksourceview-2.0/language-specs/forth.lang +234 -0
  341. data/vendor/local/share/gtksourceview-2.0/language-specs/fortran.lang +511 -0
  342. data/vendor/local/share/gtksourceview-2.0/language-specs/fsharp.lang +322 -0
  343. data/vendor/local/share/gtksourceview-2.0/language-specs/gap.lang +84 -0
  344. data/vendor/local/share/gtksourceview-2.0/language-specs/glsl.lang +482 -0
  345. data/vendor/local/share/gtksourceview-2.0/language-specs/gtk-doc.lang +90 -0
  346. data/vendor/local/share/gtksourceview-2.0/language-specs/gtkrc.lang +115 -0
  347. data/vendor/local/share/gtksourceview-2.0/language-specs/haddock.lang +161 -0
  348. data/vendor/local/share/gtksourceview-2.0/language-specs/haskell-literate.lang +58 -0
  349. data/vendor/local/share/gtksourceview-2.0/language-specs/haskell.lang +226 -0
  350. data/vendor/local/share/gtksourceview-2.0/language-specs/html.lang +160 -0
  351. data/vendor/local/share/gtksourceview-2.0/language-specs/idl.lang +153 -0
  352. data/vendor/local/share/gtksourceview-2.0/language-specs/ini.lang +94 -0
  353. data/vendor/local/share/gtksourceview-2.0/language-specs/java.lang +208 -0
  354. data/vendor/local/share/gtksourceview-2.0/language-specs/javascript.lang +334 -0
  355. data/vendor/local/share/gtksourceview-2.0/language-specs/language.dtd +72 -0
  356. data/vendor/local/share/gtksourceview-2.0/language-specs/language.rng +372 -0
  357. data/vendor/local/share/gtksourceview-2.0/language-specs/language2.rng +490 -0
  358. data/vendor/local/share/gtksourceview-2.0/language-specs/latex.lang +298 -0
  359. data/vendor/local/share/gtksourceview-2.0/language-specs/libtool.lang +55 -0
  360. data/vendor/local/share/gtksourceview-2.0/language-specs/lua.lang +156 -0
  361. data/vendor/local/share/gtksourceview-2.0/language-specs/m4.lang +803 -0
  362. data/vendor/local/share/gtksourceview-2.0/language-specs/makefile.lang +195 -0
  363. data/vendor/local/share/gtksourceview-2.0/language-specs/mallard.lang +122 -0
  364. data/vendor/local/share/gtksourceview-2.0/language-specs/msil.lang +490 -0
  365. data/vendor/local/share/gtksourceview-2.0/language-specs/nemerle.lang +262 -0
  366. data/vendor/local/share/gtksourceview-2.0/language-specs/nsis.lang +87 -0
  367. data/vendor/local/share/gtksourceview-2.0/language-specs/objc.lang +119 -0
  368. data/vendor/local/share/gtksourceview-2.0/language-specs/ocaml.lang +299 -0
  369. data/vendor/local/share/gtksourceview-2.0/language-specs/ocl.lang +138 -0
  370. data/vendor/local/share/gtksourceview-2.0/language-specs/octave.lang +238 -0
  371. data/vendor/local/share/gtksourceview-2.0/language-specs/ooc.lang +264 -0
  372. data/vendor/local/share/gtksourceview-2.0/language-specs/pascal.lang +264 -0
  373. data/vendor/local/share/gtksourceview-2.0/language-specs/perl.lang +1017 -0
  374. data/vendor/local/share/gtksourceview-2.0/language-specs/php.lang +329 -0
  375. data/vendor/local/share/gtksourceview-2.0/language-specs/pkgconfig.lang +61 -0
  376. data/vendor/local/share/gtksourceview-2.0/language-specs/po.lang +94 -0
  377. data/vendor/local/share/gtksourceview-2.0/language-specs/prolog.lang +248 -0
  378. data/vendor/local/share/gtksourceview-2.0/language-specs/python.lang +390 -0
  379. data/vendor/local/share/gtksourceview-2.0/language-specs/rpmspec.lang +204 -0
  380. data/vendor/local/share/gtksourceview-2.0/language-specs/ruby.lang +588 -0
  381. data/vendor/local/share/gtksourceview-2.0/language-specs/scheme.lang +301 -0
  382. data/vendor/local/share/gtksourceview-2.0/language-specs/sh.lang +499 -0
  383. data/vendor/local/share/gtksourceview-2.0/language-specs/sparql.lang +447 -0
  384. data/vendor/local/share/gtksourceview-2.0/language-specs/sql.lang +617 -0
  385. data/vendor/local/share/gtksourceview-2.0/language-specs/styles.rng +138 -0
  386. data/vendor/local/share/gtksourceview-2.0/language-specs/t2t.lang +149 -0
  387. data/vendor/local/share/gtksourceview-2.0/language-specs/tcl.lang +145 -0
  388. data/vendor/local/share/gtksourceview-2.0/language-specs/texinfo.lang +447 -0
  389. data/vendor/local/share/gtksourceview-2.0/language-specs/vala.lang +227 -0
  390. data/vendor/local/share/gtksourceview-2.0/language-specs/vbnet.lang +244 -0
  391. data/vendor/local/share/gtksourceview-2.0/language-specs/verilog.lang +249 -0
  392. data/vendor/local/share/gtksourceview-2.0/language-specs/vhdl.lang +247 -0
  393. data/vendor/local/share/gtksourceview-2.0/language-specs/xml.lang +219 -0
  394. data/vendor/local/share/gtksourceview-2.0/language-specs/xslt.lang +107 -0
  395. data/vendor/local/share/gtksourceview-2.0/language-specs/yacc.lang +172 -0
  396. data/vendor/local/share/gtksourceview-2.0/styles/classic.xml +99 -0
  397. data/vendor/local/share/gtksourceview-2.0/styles/cobalt.xml +134 -0
  398. data/vendor/local/share/gtksourceview-2.0/styles/kate.xml +155 -0
  399. data/vendor/local/share/gtksourceview-2.0/styles/oblivion.xml +112 -0
  400. data/vendor/local/share/gtksourceview-2.0/styles/styles.rng +138 -0
  401. data/vendor/local/share/gtksourceview-2.0/styles/tango.xml +116 -0
  402. data/vendor/local/share/locale/ar/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  403. data/vendor/local/share/locale/as/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  404. data/vendor/local/share/locale/ast/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  405. data/vendor/local/share/locale/az/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  406. data/vendor/local/share/locale/be/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  407. data/vendor/local/share/locale/bg/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  408. data/vendor/local/share/locale/bn/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  409. data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  410. data/vendor/local/share/locale/bs/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  411. data/vendor/local/share/locale/ca/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  412. data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  413. data/vendor/local/share/locale/cs/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  414. data/vendor/local/share/locale/cy/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  415. data/vendor/local/share/locale/da/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  416. data/vendor/local/share/locale/de/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  417. data/vendor/local/share/locale/dz/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  418. data/vendor/local/share/locale/el/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  419. data/vendor/local/share/locale/en@shaw/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  420. data/vendor/local/share/locale/en_CA/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  421. data/vendor/local/share/locale/en_GB/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  422. data/vendor/local/share/locale/es/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  423. data/vendor/local/share/locale/et/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  424. data/vendor/local/share/locale/eu/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  425. data/vendor/local/share/locale/fa/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  426. data/vendor/local/share/locale/fi/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  427. data/vendor/local/share/locale/fr/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  428. data/vendor/local/share/locale/ga/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  429. data/vendor/local/share/locale/gl/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  430. data/vendor/local/share/locale/gu/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  431. data/vendor/local/share/locale/he/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  432. data/vendor/local/share/locale/hi/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  433. data/vendor/local/share/locale/hr/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  434. data/vendor/local/share/locale/hu/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  435. data/vendor/local/share/locale/id/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  436. data/vendor/local/share/locale/it/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  437. data/vendor/local/share/locale/ja/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  438. data/vendor/local/share/locale/kn/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  439. data/vendor/local/share/locale/ko/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  440. data/vendor/local/share/locale/lt/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  441. data/vendor/local/share/locale/lv/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  442. data/vendor/local/share/locale/mai/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  443. data/vendor/local/share/locale/mg/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  444. data/vendor/local/share/locale/mk/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  445. data/vendor/local/share/locale/ml/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  446. data/vendor/local/share/locale/mn/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  447. data/vendor/local/share/locale/mr/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  448. data/vendor/local/share/locale/ms/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  449. data/vendor/local/share/locale/nb/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  450. data/vendor/local/share/locale/ne/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  451. data/vendor/local/share/locale/nl/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  452. data/vendor/local/share/locale/nn/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  453. data/vendor/local/share/locale/oc/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  454. data/vendor/local/share/locale/or/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  455. data/vendor/local/share/locale/pa/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  456. data/vendor/local/share/locale/pl/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  457. data/vendor/local/share/locale/pt/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  458. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  459. data/vendor/local/share/locale/ro/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  460. data/vendor/local/share/locale/ru/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  461. data/vendor/local/share/locale/rw/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  462. data/vendor/local/share/locale/si/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  463. data/vendor/local/share/locale/sk/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  464. data/vendor/local/share/locale/sl/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  465. data/vendor/local/share/locale/sq/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  466. data/vendor/local/share/locale/sr/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  467. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  468. data/vendor/local/share/locale/sv/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  469. data/vendor/local/share/locale/ta/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  470. data/vendor/local/share/locale/te/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  471. data/vendor/local/share/locale/th/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  472. data/vendor/local/share/locale/tr/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  473. data/vendor/local/share/locale/uk/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  474. data/vendor/local/share/locale/vi/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  475. data/vendor/local/share/locale/xh/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  476. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  477. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  478. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gtksourceview-2.0.mo +0 -0
  479. data/vendor/local/share/man/man1/xml2-config.1 +31 -0
  480. data/vendor/local/share/man/man1/xmlcatalog.1 +229 -0
  481. data/vendor/local/share/man/man1/xmllint.1 +427 -0
  482. data/vendor/local/share/man/man3/libxml.3 +71 -0
  483. data/vendor/local/src/tml/packaging/libxml2_2.7.7-1_win32.log +1244 -0
  484. data/vendor/local/src/tml/packaging/libxml2_2.7.7-1_win32.sh +66 -0
  485. metadata +567 -0
@@ -0,0 +1,880 @@
1
+ /*
2
+ * testHTML.c : a small tester program for HTML input.
3
+ *
4
+ * See Copyright for the status of this software.
5
+ *
6
+ * daniel@veillard.com
7
+ */
8
+
9
+ #include "libxml.h"
10
+
11
+ #ifdef LIBXML_HTML_ENABLED
12
+
13
+ #include <string.h>
14
+ #include <stdarg.h>
15
+
16
+
17
+ #ifdef HAVE_SYS_TYPES_H
18
+ #include <sys/types.h>
19
+ #endif
20
+ #ifdef HAVE_SYS_STAT_H
21
+ #include <sys/stat.h>
22
+ #endif
23
+ #ifdef HAVE_FCNTL_H
24
+ #include <fcntl.h>
25
+ #endif
26
+ #ifdef HAVE_UNISTD_H
27
+ #include <unistd.h>
28
+ #endif
29
+ #ifdef HAVE_STDLIB_H
30
+ #include <stdlib.h>
31
+ #endif
32
+
33
+ #include <libxml/xmlmemory.h>
34
+ #include <libxml/HTMLparser.h>
35
+ #include <libxml/HTMLtree.h>
36
+ #include <libxml/debugXML.h>
37
+ #include <libxml/xmlerror.h>
38
+ #include <libxml/globals.h>
39
+
40
+ #ifdef LIBXML_DEBUG_ENABLED
41
+ static int debug = 0;
42
+ #endif
43
+ static int copy = 0;
44
+ static int sax = 0;
45
+ static int repeat = 0;
46
+ static int noout = 0;
47
+ #ifdef LIBXML_PUSH_ENABLED
48
+ static int push = 0;
49
+ #endif /* LIBXML_PUSH_ENABLED */
50
+ static char *encoding = NULL;
51
+ static int options = 0;
52
+
53
+ static xmlSAXHandler emptySAXHandlerStruct = {
54
+ NULL, /* internalSubset */
55
+ NULL, /* isStandalone */
56
+ NULL, /* hasInternalSubset */
57
+ NULL, /* hasExternalSubset */
58
+ NULL, /* resolveEntity */
59
+ NULL, /* getEntity */
60
+ NULL, /* entityDecl */
61
+ NULL, /* notationDecl */
62
+ NULL, /* attributeDecl */
63
+ NULL, /* elementDecl */
64
+ NULL, /* unparsedEntityDecl */
65
+ NULL, /* setDocumentLocator */
66
+ NULL, /* startDocument */
67
+ NULL, /* endDocument */
68
+ NULL, /* startElement */
69
+ NULL, /* endElement */
70
+ NULL, /* reference */
71
+ NULL, /* characters */
72
+ NULL, /* ignorableWhitespace */
73
+ NULL, /* processingInstruction */
74
+ NULL, /* comment */
75
+ NULL, /* xmlParserWarning */
76
+ NULL, /* xmlParserError */
77
+ NULL, /* xmlParserError */
78
+ NULL, /* getParameterEntity */
79
+ NULL, /* cdataBlock */
80
+ NULL, /* externalSubset */
81
+ 1, /* initialized */
82
+ NULL, /* private */
83
+ NULL, /* startElementNsSAX2Func */
84
+ NULL, /* endElementNsSAX2Func */
85
+ NULL /* xmlStructuredErrorFunc */
86
+ };
87
+
88
+ static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
89
+ extern xmlSAXHandlerPtr debugSAXHandler;
90
+
91
+ /************************************************************************
92
+ * *
93
+ * Debug Handlers *
94
+ * *
95
+ ************************************************************************/
96
+
97
+ /**
98
+ * isStandaloneDebug:
99
+ * @ctxt: An XML parser context
100
+ *
101
+ * Is this document tagged standalone ?
102
+ *
103
+ * Returns 1 if true
104
+ */
105
+ static int
106
+ isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
107
+ {
108
+ fprintf(stdout, "SAX.isStandalone()\n");
109
+ return(0);
110
+ }
111
+
112
+ /**
113
+ * hasInternalSubsetDebug:
114
+ * @ctxt: An XML parser context
115
+ *
116
+ * Does this document has an internal subset
117
+ *
118
+ * Returns 1 if true
119
+ */
120
+ static int
121
+ hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
122
+ {
123
+ fprintf(stdout, "SAX.hasInternalSubset()\n");
124
+ return(0);
125
+ }
126
+
127
+ /**
128
+ * hasExternalSubsetDebug:
129
+ * @ctxt: An XML parser context
130
+ *
131
+ * Does this document has an external subset
132
+ *
133
+ * Returns 1 if true
134
+ */
135
+ static int
136
+ hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
137
+ {
138
+ fprintf(stdout, "SAX.hasExternalSubset()\n");
139
+ return(0);
140
+ }
141
+
142
+ /**
143
+ * hasInternalSubsetDebug:
144
+ * @ctxt: An XML parser context
145
+ *
146
+ * Does this document has an internal subset
147
+ */
148
+ static void
149
+ internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
150
+ const xmlChar *ExternalID, const xmlChar *SystemID)
151
+ {
152
+ fprintf(stdout, "SAX.internalSubset(%s,", name);
153
+ if (ExternalID == NULL)
154
+ fprintf(stdout, " ,");
155
+ else
156
+ fprintf(stdout, " %s,", ExternalID);
157
+ if (SystemID == NULL)
158
+ fprintf(stdout, " )\n");
159
+ else
160
+ fprintf(stdout, " %s)\n", SystemID);
161
+ }
162
+
163
+ /**
164
+ * resolveEntityDebug:
165
+ * @ctxt: An XML parser context
166
+ * @publicId: The public ID of the entity
167
+ * @systemId: The system ID of the entity
168
+ *
169
+ * Special entity resolver, better left to the parser, it has
170
+ * more context than the application layer.
171
+ * The default behaviour is to NOT resolve the entities, in that case
172
+ * the ENTITY_REF nodes are built in the structure (and the parameter
173
+ * values).
174
+ *
175
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
176
+ */
177
+ static xmlParserInputPtr
178
+ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
179
+ {
180
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
181
+
182
+
183
+ fprintf(stdout, "SAX.resolveEntity(");
184
+ if (publicId != NULL)
185
+ fprintf(stdout, "%s", (char *)publicId);
186
+ else
187
+ fprintf(stdout, " ");
188
+ if (systemId != NULL)
189
+ fprintf(stdout, ", %s)\n", (char *)systemId);
190
+ else
191
+ fprintf(stdout, ", )\n");
192
+ /*********
193
+ if (systemId != NULL) {
194
+ return(xmlNewInputFromFile(ctxt, (char *) systemId));
195
+ }
196
+ *********/
197
+ return(NULL);
198
+ }
199
+
200
+ /**
201
+ * getEntityDebug:
202
+ * @ctxt: An XML parser context
203
+ * @name: The entity name
204
+ *
205
+ * Get an entity by name
206
+ *
207
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
208
+ */
209
+ static xmlEntityPtr
210
+ getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
211
+ {
212
+ fprintf(stdout, "SAX.getEntity(%s)\n", name);
213
+ return(NULL);
214
+ }
215
+
216
+ /**
217
+ * getParameterEntityDebug:
218
+ * @ctxt: An XML parser context
219
+ * @name: The entity name
220
+ *
221
+ * Get a parameter entity by name
222
+ *
223
+ * Returns the xmlParserInputPtr
224
+ */
225
+ static xmlEntityPtr
226
+ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
227
+ {
228
+ fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);
229
+ return(NULL);
230
+ }
231
+
232
+
233
+ /**
234
+ * entityDeclDebug:
235
+ * @ctxt: An XML parser context
236
+ * @name: the entity name
237
+ * @type: the entity type
238
+ * @publicId: The public ID of the entity
239
+ * @systemId: The system ID of the entity
240
+ * @content: the entity value (without processing).
241
+ *
242
+ * An entity definition has been parsed
243
+ */
244
+ static void
245
+ entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
246
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
247
+ {
248
+ fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
249
+ name, type, publicId, systemId, content);
250
+ }
251
+
252
+ /**
253
+ * attributeDeclDebug:
254
+ * @ctxt: An XML parser context
255
+ * @name: the attribute name
256
+ * @type: the attribute type
257
+ *
258
+ * An attribute definition has been parsed
259
+ */
260
+ static void
261
+ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlChar *name,
262
+ int type, int def, const xmlChar *defaultValue,
263
+ xmlEnumerationPtr tree ATTRIBUTE_UNUSED)
264
+ {
265
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
266
+ elem, name, type, def, defaultValue);
267
+ }
268
+
269
+ /**
270
+ * elementDeclDebug:
271
+ * @ctxt: An XML parser context
272
+ * @name: the element name
273
+ * @type: the element type
274
+ * @content: the element value (without processing).
275
+ *
276
+ * An element definition has been parsed
277
+ */
278
+ static void
279
+ elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
280
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
281
+ {
282
+ fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",
283
+ name, type);
284
+ }
285
+
286
+ /**
287
+ * notationDeclDebug:
288
+ * @ctxt: An XML parser context
289
+ * @name: The name of the notation
290
+ * @publicId: The public ID of the entity
291
+ * @systemId: The system ID of the entity
292
+ *
293
+ * What to do when a notation declaration has been parsed.
294
+ */
295
+ static void
296
+ notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
297
+ const xmlChar *publicId, const xmlChar *systemId)
298
+ {
299
+ fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",
300
+ (char *) name, (char *) publicId, (char *) systemId);
301
+ }
302
+
303
+ /**
304
+ * unparsedEntityDeclDebug:
305
+ * @ctxt: An XML parser context
306
+ * @name: The name of the entity
307
+ * @publicId: The public ID of the entity
308
+ * @systemId: The system ID of the entity
309
+ * @notationName: the name of the notation
310
+ *
311
+ * What to do when an unparsed entity declaration is parsed
312
+ */
313
+ static void
314
+ unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
315
+ const xmlChar *publicId, const xmlChar *systemId,
316
+ const xmlChar *notationName)
317
+ {
318
+ fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
319
+ (char *) name, (char *) publicId, (char *) systemId,
320
+ (char *) notationName);
321
+ }
322
+
323
+ /**
324
+ * setDocumentLocatorDebug:
325
+ * @ctxt: An XML parser context
326
+ * @loc: A SAX Locator
327
+ *
328
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
329
+ * Everything is available on the context, so this is useless in our case.
330
+ */
331
+ static void
332
+ setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
333
+ {
334
+ fprintf(stdout, "SAX.setDocumentLocator()\n");
335
+ }
336
+
337
+ /**
338
+ * startDocumentDebug:
339
+ * @ctxt: An XML parser context
340
+ *
341
+ * called when the document start being processed.
342
+ */
343
+ static void
344
+ startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
345
+ {
346
+ fprintf(stdout, "SAX.startDocument()\n");
347
+ }
348
+
349
+ /**
350
+ * endDocumentDebug:
351
+ * @ctxt: An XML parser context
352
+ *
353
+ * called when the document end has been detected.
354
+ */
355
+ static void
356
+ endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
357
+ {
358
+ fprintf(stdout, "SAX.endDocument()\n");
359
+ }
360
+
361
+ /**
362
+ * startElementDebug:
363
+ * @ctxt: An XML parser context
364
+ * @name: The element name
365
+ *
366
+ * called when an opening tag has been processed.
367
+ */
368
+ static void
369
+ startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
370
+ {
371
+ int i;
372
+
373
+ fprintf(stdout, "SAX.startElement(%s", (char *) name);
374
+ if (atts != NULL) {
375
+ for (i = 0;(atts[i] != NULL);i++) {
376
+ fprintf(stdout, ", %s", atts[i++]);
377
+ if (atts[i] != NULL) {
378
+ unsigned char output[40];
379
+ const unsigned char *att = atts[i];
380
+ int outlen, attlen;
381
+ fprintf(stdout, "='");
382
+ while ((attlen = strlen((char*)att)) > 0) {
383
+ outlen = sizeof output - 1;
384
+ htmlEncodeEntities(output, &outlen, att, &attlen, '\'');
385
+ output[outlen] = 0;
386
+ fprintf(stdout, "%s", (char *) output);
387
+ att += attlen;
388
+ }
389
+ fprintf(stdout, "'");
390
+ }
391
+ }
392
+ }
393
+ fprintf(stdout, ")\n");
394
+ }
395
+
396
+ /**
397
+ * endElementDebug:
398
+ * @ctxt: An XML parser context
399
+ * @name: The element name
400
+ *
401
+ * called when the end of an element has been detected.
402
+ */
403
+ static void
404
+ endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
405
+ {
406
+ fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);
407
+ }
408
+
409
+ /**
410
+ * charactersDebug:
411
+ * @ctxt: An XML parser context
412
+ * @ch: a xmlChar string
413
+ * @len: the number of xmlChar
414
+ *
415
+ * receiving some chars from the parser.
416
+ * Question: how much at a time ???
417
+ */
418
+ static void
419
+ charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
420
+ {
421
+ unsigned char output[40];
422
+ int inlen = len, outlen = 30;
423
+
424
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
425
+ output[outlen] = 0;
426
+
427
+ fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);
428
+ }
429
+
430
+ /**
431
+ * cdataDebug:
432
+ * @ctxt: An XML parser context
433
+ * @ch: a xmlChar string
434
+ * @len: the number of xmlChar
435
+ *
436
+ * receiving some cdata chars from the parser.
437
+ * Question: how much at a time ???
438
+ */
439
+ static void
440
+ cdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
441
+ {
442
+ unsigned char output[40];
443
+ int inlen = len, outlen = 30;
444
+
445
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
446
+ output[outlen] = 0;
447
+
448
+ fprintf(stdout, "SAX.cdata(%s, %d)\n", output, len);
449
+ }
450
+
451
+ /**
452
+ * referenceDebug:
453
+ * @ctxt: An XML parser context
454
+ * @name: The entity name
455
+ *
456
+ * called when an entity reference is detected.
457
+ */
458
+ static void
459
+ referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
460
+ {
461
+ fprintf(stdout, "SAX.reference(%s)\n", name);
462
+ }
463
+
464
+ /**
465
+ * ignorableWhitespaceDebug:
466
+ * @ctxt: An XML parser context
467
+ * @ch: a xmlChar string
468
+ * @start: the first char in the string
469
+ * @len: the number of xmlChar
470
+ *
471
+ * receiving some ignorable whitespaces from the parser.
472
+ * Question: how much at a time ???
473
+ */
474
+ static void
475
+ ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
476
+ {
477
+ char output[40];
478
+ int i;
479
+
480
+ for (i = 0;(i<len) && (i < 30);i++)
481
+ output[i] = ch[i];
482
+ output[i] = 0;
483
+
484
+ fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", output, len);
485
+ }
486
+
487
+ /**
488
+ * processingInstructionDebug:
489
+ * @ctxt: An XML parser context
490
+ * @target: the target name
491
+ * @data: the PI data's
492
+ * @len: the number of xmlChar
493
+ *
494
+ * A processing instruction has been parsed.
495
+ */
496
+ static void
497
+ processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,
498
+ const xmlChar *data)
499
+ {
500
+ fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",
501
+ (char *) target, (char *) data);
502
+ }
503
+
504
+ /**
505
+ * commentDebug:
506
+ * @ctxt: An XML parser context
507
+ * @value: the comment content
508
+ *
509
+ * A comment has been parsed.
510
+ */
511
+ static void
512
+ commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
513
+ {
514
+ fprintf(stdout, "SAX.comment(%s)\n", value);
515
+ }
516
+
517
+ /**
518
+ * warningDebug:
519
+ * @ctxt: An XML parser context
520
+ * @msg: the message to display/transmit
521
+ * @...: extra parameters for the message display
522
+ *
523
+ * Display and format a warning messages, gives file, line, position and
524
+ * extra parameters.
525
+ */
526
+ static void XMLCDECL
527
+ warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
528
+ {
529
+ va_list args;
530
+
531
+ va_start(args, msg);
532
+ fprintf(stdout, "SAX.warning: ");
533
+ vfprintf(stdout, msg, args);
534
+ va_end(args);
535
+ }
536
+
537
+ /**
538
+ * errorDebug:
539
+ * @ctxt: An XML parser context
540
+ * @msg: the message to display/transmit
541
+ * @...: extra parameters for the message display
542
+ *
543
+ * Display and format a error messages, gives file, line, position and
544
+ * extra parameters.
545
+ */
546
+ static void XMLCDECL
547
+ errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
548
+ {
549
+ va_list args;
550
+
551
+ va_start(args, msg);
552
+ fprintf(stdout, "SAX.error: ");
553
+ vfprintf(stdout, msg, args);
554
+ va_end(args);
555
+ }
556
+
557
+ /**
558
+ * fatalErrorDebug:
559
+ * @ctxt: An XML parser context
560
+ * @msg: the message to display/transmit
561
+ * @...: extra parameters for the message display
562
+ *
563
+ * Display and format a fatalError messages, gives file, line, position and
564
+ * extra parameters.
565
+ */
566
+ static void XMLCDECL
567
+ fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
568
+ {
569
+ va_list args;
570
+
571
+ va_start(args, msg);
572
+ fprintf(stdout, "SAX.fatalError: ");
573
+ vfprintf(stdout, msg, args);
574
+ va_end(args);
575
+ }
576
+
577
+ static xmlSAXHandler debugSAXHandlerStruct = {
578
+ internalSubsetDebug,
579
+ isStandaloneDebug,
580
+ hasInternalSubsetDebug,
581
+ hasExternalSubsetDebug,
582
+ resolveEntityDebug,
583
+ getEntityDebug,
584
+ entityDeclDebug,
585
+ notationDeclDebug,
586
+ attributeDeclDebug,
587
+ elementDeclDebug,
588
+ unparsedEntityDeclDebug,
589
+ setDocumentLocatorDebug,
590
+ startDocumentDebug,
591
+ endDocumentDebug,
592
+ startElementDebug,
593
+ endElementDebug,
594
+ referenceDebug,
595
+ charactersDebug,
596
+ ignorableWhitespaceDebug,
597
+ processingInstructionDebug,
598
+ commentDebug,
599
+ warningDebug,
600
+ errorDebug,
601
+ fatalErrorDebug,
602
+ getParameterEntityDebug,
603
+ cdataDebug,
604
+ NULL,
605
+ 1,
606
+ NULL,
607
+ NULL,
608
+ NULL,
609
+ NULL
610
+ };
611
+
612
+ xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
613
+ /************************************************************************
614
+ * *
615
+ * Debug *
616
+ * *
617
+ ************************************************************************/
618
+
619
+ static void
620
+ parseSAXFile(char *filename) {
621
+ htmlDocPtr doc = NULL;
622
+
623
+ /*
624
+ * Empty callbacks for checking
625
+ */
626
+ #ifdef LIBXML_PUSH_ENABLED
627
+ if (push) {
628
+ FILE *f;
629
+
630
+ #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
631
+ f = fopen(filename, "rb");
632
+ #else
633
+ f = fopen(filename, "r");
634
+ #endif
635
+ if (f != NULL) {
636
+ int res, size = 3;
637
+ char chars[4096];
638
+ htmlParserCtxtPtr ctxt;
639
+
640
+ /* if (repeat) */
641
+ size = 4096;
642
+ res = fread(chars, 1, 4, f);
643
+ if (res > 0) {
644
+ ctxt = htmlCreatePushParserCtxt(emptySAXHandler, NULL,
645
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
646
+ while ((res = fread(chars, 1, size, f)) > 0) {
647
+ htmlParseChunk(ctxt, chars, res, 0);
648
+ }
649
+ htmlParseChunk(ctxt, chars, 0, 1);
650
+ doc = ctxt->myDoc;
651
+ htmlFreeParserCtxt(ctxt);
652
+ }
653
+ if (doc != NULL) {
654
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
655
+ xmlFreeDoc(doc);
656
+ }
657
+ fclose(f);
658
+ }
659
+ if (!noout) {
660
+ #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
661
+ f = fopen(filename, "rb");
662
+ #else
663
+ f = fopen(filename, "r");
664
+ #endif
665
+ if (f != NULL) {
666
+ int res, size = 3;
667
+ char chars[4096];
668
+ htmlParserCtxtPtr ctxt;
669
+
670
+ /* if (repeat) */
671
+ size = 4096;
672
+ res = fread(chars, 1, 4, f);
673
+ if (res > 0) {
674
+ ctxt = htmlCreatePushParserCtxt(debugSAXHandler, NULL,
675
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
676
+ while ((res = fread(chars, 1, size, f)) > 0) {
677
+ htmlParseChunk(ctxt, chars, res, 0);
678
+ }
679
+ htmlParseChunk(ctxt, chars, 0, 1);
680
+ doc = ctxt->myDoc;
681
+ htmlFreeParserCtxt(ctxt);
682
+ }
683
+ if (doc != NULL) {
684
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
685
+ xmlFreeDoc(doc);
686
+ }
687
+ fclose(f);
688
+ }
689
+ }
690
+ } else {
691
+ #endif /* LIBXML_PUSH_ENABLED */
692
+ doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL);
693
+ if (doc != NULL) {
694
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
695
+ xmlFreeDoc(doc);
696
+ }
697
+
698
+ if (!noout) {
699
+ /*
700
+ * Debug callback
701
+ */
702
+ doc = htmlSAXParseFile(filename, NULL, debugSAXHandler, NULL);
703
+ if (doc != NULL) {
704
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
705
+ xmlFreeDoc(doc);
706
+ }
707
+ }
708
+ #ifdef LIBXML_PUSH_ENABLED
709
+ }
710
+ #endif /* LIBXML_PUSH_ENABLED */
711
+ }
712
+
713
+ static void
714
+ parseAndPrintFile(char *filename) {
715
+ htmlDocPtr doc = NULL;
716
+
717
+ /*
718
+ * build an HTML tree from a string;
719
+ */
720
+ #ifdef LIBXML_PUSH_ENABLED
721
+ if (push) {
722
+ FILE *f;
723
+
724
+ #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
725
+ f = fopen(filename, "rb");
726
+ #else
727
+ f = fopen(filename, "r");
728
+ #endif
729
+ if (f != NULL) {
730
+ int res, size = 3;
731
+ char chars[4096];
732
+ htmlParserCtxtPtr ctxt;
733
+
734
+ /* if (repeat) */
735
+ size = 4096;
736
+ res = fread(chars, 1, 4, f);
737
+ if (res > 0) {
738
+ ctxt = htmlCreatePushParserCtxt(NULL, NULL,
739
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
740
+ while ((res = fread(chars, 1, size, f)) > 0) {
741
+ htmlParseChunk(ctxt, chars, res, 0);
742
+ }
743
+ htmlParseChunk(ctxt, chars, 0, 1);
744
+ doc = ctxt->myDoc;
745
+ htmlFreeParserCtxt(ctxt);
746
+ }
747
+ fclose(f);
748
+ }
749
+ } else {
750
+ doc = htmlReadFile(filename, NULL, options);
751
+ }
752
+ #else
753
+ doc = htmlReadFile(filename,NULL,options);
754
+ #endif
755
+ if (doc == NULL) {
756
+ xmlGenericError(xmlGenericErrorContext,
757
+ "Could not parse %s\n", filename);
758
+ }
759
+
760
+ #ifdef LIBXML_TREE_ENABLED
761
+ /*
762
+ * test intermediate copy if needed.
763
+ */
764
+ if (copy) {
765
+ htmlDocPtr tmp;
766
+
767
+ tmp = doc;
768
+ doc = xmlCopyDoc(doc, 1);
769
+ xmlFreeDoc(tmp);
770
+ }
771
+ #endif
772
+
773
+ #ifdef LIBXML_OUTPUT_ENABLED
774
+ /*
775
+ * print it.
776
+ */
777
+ if (!noout) {
778
+ #ifdef LIBXML_DEBUG_ENABLED
779
+ if (!debug) {
780
+ if (encoding)
781
+ htmlSaveFileEnc("-", doc, encoding);
782
+ else
783
+ htmlDocDump(stdout, doc);
784
+ } else
785
+ xmlDebugDumpDocument(stdout, doc);
786
+ #else
787
+ if (encoding)
788
+ htmlSaveFileEnc("-", doc, encoding);
789
+ else
790
+ htmlDocDump(stdout, doc);
791
+ #endif
792
+ }
793
+ #endif /* LIBXML_OUTPUT_ENABLED */
794
+
795
+ /*
796
+ * free it.
797
+ */
798
+ xmlFreeDoc(doc);
799
+ }
800
+
801
+ int main(int argc, char **argv) {
802
+ int i, count;
803
+ int files = 0;
804
+
805
+ for (i = 1; i < argc ; i++) {
806
+ #ifdef LIBXML_DEBUG_ENABLED
807
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
808
+ debug++;
809
+ else
810
+ #endif
811
+ if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
812
+ copy++;
813
+ #ifdef LIBXML_PUSH_ENABLED
814
+ else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push")))
815
+ push++;
816
+ #endif /* LIBXML_PUSH_ENABLED */
817
+ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax")))
818
+ sax++;
819
+ else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout")))
820
+ noout++;
821
+ else if ((!strcmp(argv[i], "-repeat")) ||
822
+ (!strcmp(argv[i], "--repeat")))
823
+ repeat++;
824
+ else if ((!strcmp(argv[i], "-encode")) ||
825
+ (!strcmp(argv[i], "--encode"))) {
826
+ i++;
827
+ encoding = argv[i];
828
+ }
829
+ }
830
+ for (i = 1; i < argc ; i++) {
831
+ if ((!strcmp(argv[i], "-encode")) ||
832
+ (!strcmp(argv[i], "--encode"))) {
833
+ i++;
834
+ continue;
835
+ }
836
+ if (argv[i][0] != '-') {
837
+ if (repeat) {
838
+ for (count = 0;count < 100 * repeat;count++) {
839
+ if (sax)
840
+ parseSAXFile(argv[i]);
841
+ else
842
+ parseAndPrintFile(argv[i]);
843
+ }
844
+ } else {
845
+ if (sax)
846
+ parseSAXFile(argv[i]);
847
+ else
848
+ parseAndPrintFile(argv[i]);
849
+ }
850
+ files ++;
851
+ }
852
+ }
853
+ if (files == 0) {
854
+ printf("Usage : %s [--debug] [--copy] [--copy] HTMLfiles ...\n",
855
+ argv[0]);
856
+ printf("\tParse the HTML files and output the result of the parsing\n");
857
+ #ifdef LIBXML_DEBUG_ENABLED
858
+ printf("\t--debug : dump a debug tree of the in-memory document\n");
859
+ #endif
860
+ printf("\t--copy : used to test the internal copy implementation\n");
861
+ printf("\t--sax : debug the sequence of SAX callbacks\n");
862
+ printf("\t--repeat : parse the file 100 times, for timing\n");
863
+ printf("\t--noout : do not print the result\n");
864
+ #ifdef LIBXML_PUSH_ENABLED
865
+ printf("\t--push : use the push mode parser\n");
866
+ #endif /* LIBXML_PUSH_ENABLED */
867
+ printf("\t--encode encoding : output in the given encoding\n");
868
+ }
869
+ xmlCleanupParser();
870
+ xmlMemoryDump();
871
+
872
+ return(0);
873
+ }
874
+ #else /* !LIBXML_HTML_ENABLED */
875
+ #include <stdio.h>
876
+ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
877
+ printf("%s : HTML support not compiled in\n", argv[0]);
878
+ return(0);
879
+ }
880
+ #endif