pygments.rb 0.6.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (606) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +6 -6
  4. data/Rakefile +2 -1
  5. data/cache-lexers.rb +1 -1
  6. data/circle.yml +7 -0
  7. data/lib/pygments/lexer.rb +3 -3
  8. data/lib/pygments/popen.rb +67 -30
  9. data/lib/pygments/version.rb +1 -1
  10. data/pygments.rb.gemspec +2 -1
  11. data/test/test_pygments.rb +16 -16
  12. data/vendor/pygments-main/AUTHORS +54 -8
  13. data/vendor/pygments-main/CHANGES +247 -25
  14. data/vendor/pygments-main/LICENSE +1 -1
  15. data/vendor/pygments-main/Makefile +15 -6
  16. data/vendor/pygments-main/README.rst +39 -0
  17. data/vendor/pygments-main/REVISION +1 -1
  18. data/vendor/pygments-main/TODO +0 -3
  19. data/vendor/pygments-main/doc/_themes/pygments14/layout.html +1 -1
  20. data/vendor/pygments-main/doc/_themes/pygments14/static/pygments14.css_t +1 -1
  21. data/vendor/pygments-main/doc/conf.py +3 -11
  22. data/vendor/pygments-main/doc/docs/api.rst +15 -0
  23. data/vendor/pygments-main/doc/docs/cmdline.rst +6 -2
  24. data/vendor/pygments-main/doc/docs/filterdevelopment.rst +4 -3
  25. data/vendor/pygments-main/doc/docs/integrate.rst +11 -15
  26. data/vendor/pygments-main/doc/docs/java.rst +7 -7
  27. data/vendor/pygments-main/doc/docs/lexerdevelopment.rst +258 -171
  28. data/vendor/pygments-main/doc/docs/lexers.rst +2 -2
  29. data/vendor/pygments-main/doc/docs/styles.rst +58 -0
  30. data/vendor/pygments-main/doc/docs/tokens.rst +22 -2
  31. data/vendor/pygments-main/doc/docs/unicode.rst +15 -7
  32. data/vendor/pygments-main/doc/faq.rst +17 -21
  33. data/vendor/pygments-main/doc/index.rst +12 -11
  34. data/vendor/pygments-main/doc/languages.rst +10 -7
  35. data/vendor/pygments-main/external/autopygmentize +9 -6
  36. data/vendor/pygments-main/external/lasso-builtins-generator-9.lasso +70 -52
  37. data/vendor/pygments-main/external/markdown-processor.py +1 -1
  38. data/vendor/pygments-main/external/moin-parser.py +1 -1
  39. data/vendor/pygments-main/external/rst-directive.py +1 -1
  40. data/vendor/pygments-main/pygmentize +2 -1
  41. data/vendor/pygments-main/pygments/__init__.py +14 -15
  42. data/vendor/pygments-main/pygments/cmdline.py +188 -113
  43. data/vendor/pygments-main/pygments/console.py +13 -13
  44. data/vendor/pygments-main/pygments/filter.py +7 -7
  45. data/vendor/pygments-main/pygments/filters/__init__.py +24 -32
  46. data/vendor/pygments-main/pygments/formatter.py +5 -5
  47. data/vendor/pygments-main/pygments/formatters/__init__.py +92 -44
  48. data/vendor/pygments-main/pygments/formatters/_mapping.py +51 -69
  49. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
  50. data/vendor/pygments-main/pygments/formatters/html.py +63 -51
  51. data/vendor/pygments-main/pygments/formatters/img.py +25 -22
  52. data/vendor/pygments-main/pygments/formatters/irc.py +182 -0
  53. data/vendor/pygments-main/pygments/formatters/latex.py +34 -22
  54. data/vendor/pygments-main/pygments/formatters/other.py +5 -7
  55. data/vendor/pygments-main/pygments/formatters/rtf.py +28 -31
  56. data/vendor/pygments-main/pygments/formatters/svg.py +1 -2
  57. data/vendor/pygments-main/pygments/formatters/terminal.py +29 -45
  58. data/vendor/pygments-main/pygments/formatters/terminal256.py +118 -31
  59. data/vendor/pygments-main/pygments/lexer.py +120 -34
  60. data/vendor/pygments-main/pygments/lexers/__init__.py +85 -53
  61. data/vendor/pygments-main/pygments/lexers/{_asybuiltins.py → _asy_builtins.py} +7 -7
  62. data/vendor/pygments-main/pygments/lexers/{_clbuiltins.py → _cl_builtins.py} +17 -17
  63. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +72 -0
  64. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1346 -0
  65. data/vendor/pygments-main/pygments/lexers/{_lassobuiltins.py → _lasso_builtins.py} +4699 -4561
  66. data/vendor/pygments-main/pygments/lexers/{_luabuiltins.py → _lua_builtins.py} +91 -51
  67. data/vendor/pygments-main/pygments/lexers/_mapping.py +342 -242
  68. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1172 -0
  69. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +2547 -0
  70. data/vendor/pygments-main/pygments/lexers/{_phpbuiltins.py → _php_builtins.py} +350 -353
  71. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +600 -212
  72. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3084 -30
  73. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +1163 -0
  74. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +91 -13
  75. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +419 -0
  76. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1004 -0
  77. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1939 -0
  78. data/vendor/pygments-main/pygments/lexers/actionscript.py +240 -0
  79. data/vendor/pygments-main/pygments/lexers/agile.py +14 -2542
  80. data/vendor/pygments-main/pygments/lexers/algebra.py +221 -0
  81. data/vendor/pygments-main/pygments/lexers/ambient.py +76 -0
  82. data/vendor/pygments-main/pygments/lexers/ampl.py +87 -0
  83. data/vendor/pygments-main/pygments/lexers/apl.py +101 -0
  84. data/vendor/pygments-main/pygments/lexers/archetype.py +318 -0
  85. data/vendor/pygments-main/pygments/lexers/asm.py +276 -81
  86. data/vendor/pygments-main/pygments/lexers/automation.py +374 -0
  87. data/vendor/pygments-main/pygments/lexers/basic.py +500 -0
  88. data/vendor/pygments-main/pygments/lexers/bibtex.py +156 -0
  89. data/vendor/pygments-main/pygments/lexers/business.py +594 -0
  90. data/vendor/pygments-main/pygments/lexers/c_cpp.py +252 -0
  91. data/vendor/pygments-main/pygments/lexers/c_like.py +541 -0
  92. data/vendor/pygments-main/pygments/lexers/capnproto.py +79 -0
  93. data/vendor/pygments-main/pygments/lexers/chapel.py +101 -0
  94. data/vendor/pygments-main/pygments/lexers/clean.py +288 -0
  95. data/vendor/pygments-main/pygments/lexers/compiled.py +24 -5182
  96. data/vendor/pygments-main/pygments/lexers/configs.py +833 -0
  97. data/vendor/pygments-main/pygments/lexers/console.py +114 -0
  98. data/vendor/pygments-main/pygments/lexers/crystal.py +384 -0
  99. data/vendor/pygments-main/pygments/lexers/csound.py +366 -0
  100. data/vendor/pygments-main/pygments/lexers/css.py +689 -0
  101. data/vendor/pygments-main/pygments/lexers/d.py +251 -0
  102. data/vendor/pygments-main/pygments/lexers/dalvik.py +6 -6
  103. data/vendor/pygments-main/pygments/lexers/data.py +555 -0
  104. data/vendor/pygments-main/pygments/lexers/diff.py +165 -0
  105. data/vendor/pygments-main/pygments/lexers/dotnet.py +96 -88
  106. data/vendor/pygments-main/pygments/lexers/dsls.py +878 -0
  107. data/vendor/pygments-main/pygments/lexers/dylan.py +289 -0
  108. data/vendor/pygments-main/pygments/lexers/ecl.py +125 -0
  109. data/vendor/pygments-main/pygments/lexers/eiffel.py +65 -0
  110. data/vendor/pygments-main/pygments/lexers/elm.py +121 -0
  111. data/vendor/pygments-main/pygments/lexers/erlang.py +533 -0
  112. data/vendor/pygments-main/pygments/lexers/esoteric.py +275 -0
  113. data/vendor/pygments-main/pygments/lexers/ezhil.py +68 -0
  114. data/vendor/pygments-main/pygments/lexers/factor.py +344 -0
  115. data/vendor/pygments-main/pygments/lexers/fantom.py +250 -0
  116. data/vendor/pygments-main/pygments/lexers/felix.py +273 -0
  117. data/vendor/pygments-main/pygments/lexers/forth.py +177 -0
  118. data/vendor/pygments-main/pygments/lexers/fortran.py +205 -0
  119. data/vendor/pygments-main/pygments/lexers/foxpro.py +1 -1
  120. data/vendor/pygments-main/pygments/lexers/functional.py +11 -3661
  121. data/vendor/pygments-main/pygments/lexers/go.py +101 -0
  122. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +213 -0
  123. data/vendor/pygments-main/pygments/lexers/graph.py +7 -8
  124. data/vendor/pygments-main/pygments/lexers/graphics.py +553 -0
  125. data/vendor/pygments-main/pygments/lexers/haskell.py +840 -0
  126. data/vendor/pygments-main/pygments/lexers/haxe.py +936 -0
  127. data/vendor/pygments-main/pygments/lexers/hdl.py +172 -145
  128. data/vendor/pygments-main/pygments/lexers/hexdump.py +97 -0
  129. data/vendor/pygments-main/pygments/lexers/html.py +602 -0
  130. data/vendor/pygments-main/pygments/lexers/idl.py +270 -0
  131. data/vendor/pygments-main/pygments/lexers/igor.py +288 -0
  132. data/vendor/pygments-main/pygments/lexers/inferno.py +3 -3
  133. data/vendor/pygments-main/pygments/lexers/installers.py +322 -0
  134. data/vendor/pygments-main/pygments/lexers/int_fiction.py +1343 -0
  135. data/vendor/pygments-main/pygments/lexers/iolang.py +63 -0
  136. data/vendor/pygments-main/pygments/lexers/j.py +146 -0
  137. data/vendor/pygments-main/pygments/lexers/javascript.py +1506 -0
  138. data/vendor/pygments-main/pygments/lexers/julia.py +333 -0
  139. data/vendor/pygments-main/pygments/lexers/jvm.py +232 -186
  140. data/vendor/pygments-main/pygments/lexers/lisp.py +2621 -0
  141. data/vendor/pygments-main/pygments/lexers/make.py +202 -0
  142. data/vendor/pygments-main/pygments/lexers/markup.py +595 -0
  143. data/vendor/pygments-main/pygments/lexers/math.py +11 -2276
  144. data/vendor/pygments-main/pygments/lexers/matlab.py +663 -0
  145. data/vendor/pygments-main/pygments/lexers/ml.py +769 -0
  146. data/vendor/pygments-main/pygments/lexers/modeling.py +358 -0
  147. data/vendor/pygments-main/pygments/lexers/modula2.py +1561 -0
  148. data/vendor/pygments-main/pygments/lexers/monte.py +203 -0
  149. data/vendor/pygments-main/pygments/lexers/ncl.py +1053 -0
  150. data/vendor/pygments-main/pygments/lexers/nimrod.py +159 -0
  151. data/vendor/pygments-main/pygments/lexers/nit.py +64 -0
  152. data/vendor/pygments-main/pygments/lexers/nix.py +136 -0
  153. data/vendor/pygments-main/pygments/lexers/oberon.py +105 -0
  154. data/vendor/pygments-main/pygments/lexers/objective.py +504 -0
  155. data/vendor/pygments-main/pygments/lexers/ooc.py +85 -0
  156. data/vendor/pygments-main/pygments/lexers/other.py +30 -4481
  157. data/vendor/pygments-main/pygments/lexers/parasail.py +79 -0
  158. data/vendor/pygments-main/pygments/lexers/parsers.py +171 -114
  159. data/vendor/pygments-main/pygments/lexers/pascal.py +644 -0
  160. data/vendor/pygments-main/pygments/lexers/pawn.py +199 -0
  161. data/vendor/pygments-main/pygments/lexers/perl.py +616 -0
  162. data/vendor/pygments-main/pygments/lexers/php.py +267 -0
  163. data/vendor/pygments-main/pygments/lexers/praat.py +294 -0
  164. data/vendor/pygments-main/pygments/lexers/prolog.py +306 -0
  165. data/vendor/pygments-main/pygments/lexers/python.py +938 -0
  166. data/vendor/pygments-main/pygments/lexers/qvt.py +152 -0
  167. data/vendor/pygments-main/pygments/lexers/r.py +453 -0
  168. data/vendor/pygments-main/pygments/lexers/rdf.py +195 -24
  169. data/vendor/pygments-main/pygments/lexers/rebol.py +431 -0
  170. data/vendor/pygments-main/pygments/lexers/resource.py +85 -0
  171. data/vendor/pygments-main/pygments/lexers/rnc.py +67 -0
  172. data/vendor/pygments-main/pygments/lexers/roboconf.py +82 -0
  173. data/vendor/pygments-main/pygments/lexers/{_robotframeworklexer.py → robotframework.py} +20 -18
  174. data/vendor/pygments-main/pygments/lexers/ruby.py +519 -0
  175. data/vendor/pygments-main/pygments/lexers/rust.py +209 -0
  176. data/vendor/pygments-main/pygments/lexers/sas.py +228 -0
  177. data/vendor/pygments-main/pygments/lexers/scripting.py +1222 -0
  178. data/vendor/pygments-main/pygments/lexers/shell.py +478 -115
  179. data/vendor/pygments-main/pygments/lexers/smalltalk.py +195 -0
  180. data/vendor/pygments-main/pygments/lexers/smv.py +75 -0
  181. data/vendor/pygments-main/pygments/lexers/snobol.py +83 -0
  182. data/vendor/pygments-main/pygments/lexers/special.py +6 -2
  183. data/vendor/pygments-main/pygments/lexers/sql.py +209 -120
  184. data/vendor/pygments-main/pygments/lexers/stata.py +106 -0
  185. data/vendor/pygments-main/pygments/lexers/supercollider.py +90 -0
  186. data/vendor/pygments-main/pygments/lexers/tcl.py +145 -0
  187. data/vendor/pygments-main/pygments/lexers/templates.py +282 -90
  188. data/vendor/pygments-main/pygments/lexers/testing.py +207 -0
  189. data/vendor/pygments-main/pygments/lexers/text.py +15 -2045
  190. data/vendor/pygments-main/pygments/lexers/textedit.py +169 -0
  191. data/vendor/pygments-main/pygments/lexers/textfmts.py +297 -0
  192. data/vendor/pygments-main/pygments/lexers/theorem.py +458 -0
  193. data/vendor/pygments-main/pygments/lexers/trafficscript.py +54 -0
  194. data/vendor/pygments-main/pygments/lexers/typoscript.py +225 -0
  195. data/vendor/pygments-main/pygments/lexers/urbi.py +133 -0
  196. data/vendor/pygments-main/pygments/lexers/varnish.py +190 -0
  197. data/vendor/pygments-main/pygments/lexers/verification.py +111 -0
  198. data/vendor/pygments-main/pygments/lexers/web.py +13 -4499
  199. data/vendor/pygments-main/pygments/lexers/webmisc.py +979 -0
  200. data/vendor/pygments-main/pygments/lexers/whiley.py +117 -0
  201. data/vendor/pygments-main/pygments/lexers/x10.py +69 -0
  202. data/vendor/pygments-main/pygments/modeline.py +5 -2
  203. data/vendor/pygments-main/pygments/plugin.py +1 -1
  204. data/vendor/pygments-main/pygments/regexopt.py +92 -0
  205. data/vendor/pygments-main/pygments/scanner.py +3 -2
  206. data/vendor/pygments-main/pygments/sphinxext.py +11 -6
  207. data/vendor/pygments-main/pygments/style.py +41 -4
  208. data/vendor/pygments-main/pygments/styles/__init__.py +5 -1
  209. data/vendor/pygments-main/pygments/styles/algol.py +63 -0
  210. data/vendor/pygments-main/pygments/styles/algol_nu.py +63 -0
  211. data/vendor/pygments-main/pygments/styles/arduino.py +98 -0
  212. data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
  213. data/vendor/pygments-main/pygments/styles/borland.py +1 -1
  214. data/vendor/pygments-main/pygments/styles/bw.py +1 -1
  215. data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
  216. data/vendor/pygments-main/pygments/styles/default.py +1 -1
  217. data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
  218. data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
  219. data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
  220. data/vendor/pygments-main/pygments/styles/igor.py +1 -1
  221. data/vendor/pygments-main/pygments/styles/lovelace.py +97 -0
  222. data/vendor/pygments-main/pygments/styles/manni.py +1 -1
  223. data/vendor/pygments-main/pygments/styles/monokai.py +1 -1
  224. data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
  225. data/vendor/pygments-main/pygments/styles/native.py +1 -1
  226. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -1
  227. data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -1
  228. data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
  229. data/vendor/pygments-main/pygments/styles/perldoc.py +2 -2
  230. data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
  231. data/vendor/pygments-main/pygments/styles/sas.py +41 -0
  232. data/vendor/pygments-main/pygments/styles/stata.py +37 -0
  233. data/vendor/pygments-main/pygments/styles/tango.py +1 -1
  234. data/vendor/pygments-main/pygments/styles/trac.py +1 -1
  235. data/vendor/pygments-main/pygments/styles/vim.py +1 -1
  236. data/vendor/pygments-main/pygments/styles/vs.py +1 -1
  237. data/vendor/pygments-main/pygments/styles/xcode.py +1 -1
  238. data/vendor/pygments-main/pygments/token.py +31 -16
  239. data/vendor/pygments-main/pygments/unistring.py +141 -65
  240. data/vendor/pygments-main/pygments/util.py +129 -33
  241. data/vendor/pygments-main/requirements.txt +5 -0
  242. data/vendor/pygments-main/scripts/check_sources.py +25 -40
  243. data/vendor/pygments-main/scripts/debug_lexer.py +246 -0
  244. data/vendor/pygments-main/scripts/find_error.py +1 -0
  245. data/vendor/pygments-main/scripts/get_vimkw.py +35 -4
  246. data/vendor/pygments-main/setup.cfg +3 -0
  247. data/vendor/pygments-main/setup.py +17 -30
  248. data/vendor/pygments-main/tox.ini +7 -0
  249. metadata +159 -387
  250. data/vendor/pygments-main/ez_setup.py +0 -382
  251. data/vendor/pygments-main/pygments/lexers/_cocoabuiltins.py +0 -73
  252. data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +0 -562
  253. data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +0 -1077
  254. data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +0 -13
  255. data/vendor/pygments-main/pygments/lexers/qbasic.py +0 -157
  256. data/vendor/pygments-main/scripts/find_codetags.py +0 -213
  257. data/vendor/pygments-main/scripts/find_error.py +0 -173
  258. data/vendor/pygments-main/tests/dtds/HTML4-f.dtd +0 -37
  259. data/vendor/pygments-main/tests/dtds/HTML4-s.dtd +0 -869
  260. data/vendor/pygments-main/tests/dtds/HTML4.dcl +0 -88
  261. data/vendor/pygments-main/tests/dtds/HTML4.dtd +0 -1092
  262. data/vendor/pygments-main/tests/dtds/HTML4.soc +0 -9
  263. data/vendor/pygments-main/tests/dtds/HTMLlat1.ent +0 -195
  264. data/vendor/pygments-main/tests/dtds/HTMLspec.ent +0 -77
  265. data/vendor/pygments-main/tests/dtds/HTMLsym.ent +0 -241
  266. data/vendor/pygments-main/tests/examplefiles/99_bottles_of_beer.chpl +0 -118
  267. data/vendor/pygments-main/tests/examplefiles/AcidStateAdvanced.hs +0 -209
  268. data/vendor/pygments-main/tests/examplefiles/AlternatingGroup.mu +0 -102
  269. data/vendor/pygments-main/tests/examplefiles/BOM.js +0 -1
  270. data/vendor/pygments-main/tests/examplefiles/CPDictionary.j +0 -611
  271. data/vendor/pygments-main/tests/examplefiles/Config.in.cache +0 -1973
  272. data/vendor/pygments-main/tests/examplefiles/Constants.mo +0 -158
  273. data/vendor/pygments-main/tests/examplefiles/DancingSudoku.lhs +0 -411
  274. data/vendor/pygments-main/tests/examplefiles/Deflate.fs +0 -578
  275. data/vendor/pygments-main/tests/examplefiles/Error.pmod +0 -38
  276. data/vendor/pygments-main/tests/examplefiles/Errors.scala +0 -18
  277. data/vendor/pygments-main/tests/examplefiles/FakeFile.pike +0 -360
  278. data/vendor/pygments-main/tests/examplefiles/Get-CommandDefinitionHtml.ps1 +0 -66
  279. data/vendor/pygments-main/tests/examplefiles/IPDispatchC.nc +0 -104
  280. data/vendor/pygments-main/tests/examplefiles/IPDispatchP.nc +0 -671
  281. data/vendor/pygments-main/tests/examplefiles/Intro.java +0 -1660
  282. data/vendor/pygments-main/tests/examplefiles/Makefile +0 -1131
  283. data/vendor/pygments-main/tests/examplefiles/Object.st +0 -4394
  284. data/vendor/pygments-main/tests/examplefiles/OrderedMap.hx +0 -584
  285. data/vendor/pygments-main/tests/examplefiles/RoleQ.pm6 +0 -23
  286. data/vendor/pygments-main/tests/examplefiles/SmallCheck.hs +0 -378
  287. data/vendor/pygments-main/tests/examplefiles/Sorting.mod +0 -470
  288. data/vendor/pygments-main/tests/examplefiles/Sudoku.lhs +0 -382
  289. data/vendor/pygments-main/tests/examplefiles/addressbook.proto +0 -30
  290. data/vendor/pygments-main/tests/examplefiles/antlr_ANTLRv3.g +0 -608
  291. data/vendor/pygments-main/tests/examplefiles/antlr_throws +0 -1
  292. data/vendor/pygments-main/tests/examplefiles/apache2.conf +0 -393
  293. data/vendor/pygments-main/tests/examplefiles/as3_test.as +0 -143
  294. data/vendor/pygments-main/tests/examplefiles/as3_test2.as +0 -46
  295. data/vendor/pygments-main/tests/examplefiles/as3_test3.as +0 -3
  296. data/vendor/pygments-main/tests/examplefiles/aspx-cs_example +0 -27
  297. data/vendor/pygments-main/tests/examplefiles/autoit_submit.au3 +0 -25
  298. data/vendor/pygments-main/tests/examplefiles/badcase.java +0 -2
  299. data/vendor/pygments-main/tests/examplefiles/batchfile.bat +0 -49
  300. data/vendor/pygments-main/tests/examplefiles/bigtest.nsi +0 -308
  301. data/vendor/pygments-main/tests/examplefiles/boot-9.scm +0 -1557
  302. data/vendor/pygments-main/tests/examplefiles/ca65_example +0 -284
  303. data/vendor/pygments-main/tests/examplefiles/cbmbas_example +0 -9
  304. data/vendor/pygments-main/tests/examplefiles/cells.ps +0 -515
  305. data/vendor/pygments-main/tests/examplefiles/ceval.c +0 -2604
  306. data/vendor/pygments-main/tests/examplefiles/cheetah_example.html +0 -13
  307. data/vendor/pygments-main/tests/examplefiles/classes.dylan +0 -125
  308. data/vendor/pygments-main/tests/examplefiles/clojure-weird-keywords.clj +0 -5
  309. data/vendor/pygments-main/tests/examplefiles/condensed_ruby.rb +0 -10
  310. data/vendor/pygments-main/tests/examplefiles/coq_RelationClasses +0 -447
  311. data/vendor/pygments-main/tests/examplefiles/core.cljs +0 -52
  312. data/vendor/pygments-main/tests/examplefiles/database.pytb +0 -20
  313. data/vendor/pygments-main/tests/examplefiles/de.MoinMoin.po +0 -2461
  314. data/vendor/pygments-main/tests/examplefiles/demo.ahk +0 -181
  315. data/vendor/pygments-main/tests/examplefiles/demo.cfm +0 -50
  316. data/vendor/pygments-main/tests/examplefiles/demo.hbs +0 -12
  317. data/vendor/pygments-main/tests/examplefiles/django_sample.html+django +0 -68
  318. data/vendor/pygments-main/tests/examplefiles/dwarf.cw +0 -17
  319. data/vendor/pygments-main/tests/examplefiles/ember.handlebars +0 -33
  320. data/vendor/pygments-main/tests/examplefiles/erl_session +0 -10
  321. data/vendor/pygments-main/tests/examplefiles/escape_semicolon.clj +0 -1
  322. data/vendor/pygments-main/tests/examplefiles/evil_regex.js +0 -48
  323. data/vendor/pygments-main/tests/examplefiles/example.Rd +0 -78
  324. data/vendor/pygments-main/tests/examplefiles/example.als +0 -217
  325. data/vendor/pygments-main/tests/examplefiles/example.bug +0 -54
  326. data/vendor/pygments-main/tests/examplefiles/example.c +0 -2080
  327. data/vendor/pygments-main/tests/examplefiles/example.ceylon +0 -52
  328. data/vendor/pygments-main/tests/examplefiles/example.chai +0 -6
  329. data/vendor/pygments-main/tests/examplefiles/example.clay +0 -33
  330. data/vendor/pygments-main/tests/examplefiles/example.cls +0 -15
  331. data/vendor/pygments-main/tests/examplefiles/example.cob +0 -3556
  332. data/vendor/pygments-main/tests/examplefiles/example.coffee +0 -27
  333. data/vendor/pygments-main/tests/examplefiles/example.cpp +0 -2363
  334. data/vendor/pygments-main/tests/examplefiles/example.e +0 -124
  335. data/vendor/pygments-main/tests/examplefiles/example.f90 +0 -8
  336. data/vendor/pygments-main/tests/examplefiles/example.feature +0 -16
  337. data/vendor/pygments-main/tests/examplefiles/example.gd +0 -23
  338. data/vendor/pygments-main/tests/examplefiles/example.gi +0 -64
  339. data/vendor/pygments-main/tests/examplefiles/example.groovy +0 -2
  340. data/vendor/pygments-main/tests/examplefiles/example.gs +0 -106
  341. data/vendor/pygments-main/tests/examplefiles/example.gst +0 -7
  342. data/vendor/pygments-main/tests/examplefiles/example.hs +0 -27
  343. data/vendor/pygments-main/tests/examplefiles/example.hx +0 -185
  344. data/vendor/pygments-main/tests/examplefiles/example.i6t +0 -32
  345. data/vendor/pygments-main/tests/examplefiles/example.i7x +0 -45
  346. data/vendor/pygments-main/tests/examplefiles/example.inf +0 -374
  347. data/vendor/pygments-main/tests/examplefiles/example.j +0 -564
  348. data/vendor/pygments-main/tests/examplefiles/example.jag +0 -48
  349. data/vendor/pygments-main/tests/examplefiles/example.java +0 -16
  350. data/vendor/pygments-main/tests/examplefiles/example.kal +0 -75
  351. data/vendor/pygments-main/tests/examplefiles/example.kt +0 -47
  352. data/vendor/pygments-main/tests/examplefiles/example.lagda +0 -19
  353. data/vendor/pygments-main/tests/examplefiles/example.liquid +0 -42
  354. data/vendor/pygments-main/tests/examplefiles/example.lua +0 -250
  355. data/vendor/pygments-main/tests/examplefiles/example.ma +0 -8
  356. data/vendor/pygments-main/tests/examplefiles/example.monkey +0 -152
  357. data/vendor/pygments-main/tests/examplefiles/example.moo +0 -26
  358. data/vendor/pygments-main/tests/examplefiles/example.moon +0 -629
  359. data/vendor/pygments-main/tests/examplefiles/example.mq4 +0 -187
  360. data/vendor/pygments-main/tests/examplefiles/example.mqh +0 -123
  361. data/vendor/pygments-main/tests/examplefiles/example.msc +0 -43
  362. data/vendor/pygments-main/tests/examplefiles/example.ni +0 -57
  363. data/vendor/pygments-main/tests/examplefiles/example.nim +0 -1010
  364. data/vendor/pygments-main/tests/examplefiles/example.nix +0 -80
  365. data/vendor/pygments-main/tests/examplefiles/example.ns2 +0 -69
  366. data/vendor/pygments-main/tests/examplefiles/example.pas +0 -2708
  367. data/vendor/pygments-main/tests/examplefiles/example.pp +0 -8
  368. data/vendor/pygments-main/tests/examplefiles/example.prg +0 -161
  369. data/vendor/pygments-main/tests/examplefiles/example.rb +0 -1852
  370. data/vendor/pygments-main/tests/examplefiles/example.red +0 -257
  371. data/vendor/pygments-main/tests/examplefiles/example.reds +0 -150
  372. data/vendor/pygments-main/tests/examplefiles/example.reg +0 -19
  373. data/vendor/pygments-main/tests/examplefiles/example.rexx +0 -50
  374. data/vendor/pygments-main/tests/examplefiles/example.rhtml +0 -561
  375. data/vendor/pygments-main/tests/examplefiles/example.rkt +0 -743
  376. data/vendor/pygments-main/tests/examplefiles/example.rpf +0 -4
  377. data/vendor/pygments-main/tests/examplefiles/example.sh +0 -22
  378. data/vendor/pygments-main/tests/examplefiles/example.sh-session +0 -19
  379. data/vendor/pygments-main/tests/examplefiles/example.shell-session +0 -45
  380. data/vendor/pygments-main/tests/examplefiles/example.slim +0 -31
  381. data/vendor/pygments-main/tests/examplefiles/example.sls +0 -51
  382. data/vendor/pygments-main/tests/examplefiles/example.sml +0 -156
  383. data/vendor/pygments-main/tests/examplefiles/example.snobol +0 -15
  384. data/vendor/pygments-main/tests/examplefiles/example.stan +0 -110
  385. data/vendor/pygments-main/tests/examplefiles/example.tea +0 -34
  386. data/vendor/pygments-main/tests/examplefiles/example.todotxt +0 -9
  387. data/vendor/pygments-main/tests/examplefiles/example.ts +0 -28
  388. data/vendor/pygments-main/tests/examplefiles/example.u +0 -548
  389. data/vendor/pygments-main/tests/examplefiles/example.weechatlog +0 -9
  390. data/vendor/pygments-main/tests/examplefiles/example.xhtml +0 -376
  391. data/vendor/pygments-main/tests/examplefiles/example.xtend +0 -34
  392. data/vendor/pygments-main/tests/examplefiles/example.yaml +0 -302
  393. data/vendor/pygments-main/tests/examplefiles/example2.aspx +0 -29
  394. data/vendor/pygments-main/tests/examplefiles/example2.msc +0 -79
  395. data/vendor/pygments-main/tests/examplefiles/exampleScript.cfc +0 -241
  396. data/vendor/pygments-main/tests/examplefiles/exampleTag.cfc +0 -18
  397. data/vendor/pygments-main/tests/examplefiles/example_elixir.ex +0 -205
  398. data/vendor/pygments-main/tests/examplefiles/example_file.fy +0 -128
  399. data/vendor/pygments-main/tests/examplefiles/firefox.mak +0 -586
  400. data/vendor/pygments-main/tests/examplefiles/flipflop.sv +0 -19
  401. data/vendor/pygments-main/tests/examplefiles/foo.sce +0 -6
  402. data/vendor/pygments-main/tests/examplefiles/format.ml +0 -1213
  403. data/vendor/pygments-main/tests/examplefiles/fucked_up.rb +0 -77
  404. data/vendor/pygments-main/tests/examplefiles/function.mu +0 -1
  405. data/vendor/pygments-main/tests/examplefiles/functional.rst +0 -1472
  406. data/vendor/pygments-main/tests/examplefiles/garcia-wachs.kk +0 -133
  407. data/vendor/pygments-main/tests/examplefiles/genclass.clj +0 -510
  408. data/vendor/pygments-main/tests/examplefiles/genshi_example.xml+genshi +0 -193
  409. data/vendor/pygments-main/tests/examplefiles/genshitext_example.genshitext +0 -33
  410. data/vendor/pygments-main/tests/examplefiles/glsl.frag +0 -7
  411. data/vendor/pygments-main/tests/examplefiles/glsl.vert +0 -13
  412. data/vendor/pygments-main/tests/examplefiles/grammar-test.p6 +0 -22
  413. data/vendor/pygments-main/tests/examplefiles/hash_syntax.rb +0 -5
  414. data/vendor/pygments-main/tests/examplefiles/hello.at +0 -6
  415. data/vendor/pygments-main/tests/examplefiles/hello.golo +0 -5
  416. data/vendor/pygments-main/tests/examplefiles/hello.lsl +0 -12
  417. data/vendor/pygments-main/tests/examplefiles/hello.smali +0 -40
  418. data/vendor/pygments-main/tests/examplefiles/hello.sp +0 -9
  419. data/vendor/pygments-main/tests/examplefiles/html+php_faulty.php +0 -1
  420. data/vendor/pygments-main/tests/examplefiles/http_request_example +0 -15
  421. data/vendor/pygments-main/tests/examplefiles/http_response_example +0 -29
  422. data/vendor/pygments-main/tests/examplefiles/hybris_File.hy +0 -174
  423. data/vendor/pygments-main/tests/examplefiles/idl_sample.pro +0 -73
  424. data/vendor/pygments-main/tests/examplefiles/iex_example +0 -23
  425. data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +0 -71
  426. data/vendor/pygments-main/tests/examplefiles/intro.ik +0 -24
  427. data/vendor/pygments-main/tests/examplefiles/ints.php +0 -10
  428. data/vendor/pygments-main/tests/examplefiles/intsyn.fun +0 -675
  429. data/vendor/pygments-main/tests/examplefiles/intsyn.sig +0 -286
  430. data/vendor/pygments-main/tests/examplefiles/irb_heredoc +0 -8
  431. data/vendor/pygments-main/tests/examplefiles/irc.lsp +0 -214
  432. data/vendor/pygments-main/tests/examplefiles/java.properties +0 -16
  433. data/vendor/pygments-main/tests/examplefiles/jbst_example1.jbst +0 -28
  434. data/vendor/pygments-main/tests/examplefiles/jbst_example2.jbst +0 -45
  435. data/vendor/pygments-main/tests/examplefiles/jinjadesignerdoc.rst +0 -713
  436. data/vendor/pygments-main/tests/examplefiles/json.lasso +0 -301
  437. data/vendor/pygments-main/tests/examplefiles/json.lasso9 +0 -213
  438. data/vendor/pygments-main/tests/examplefiles/language.hy +0 -165
  439. data/vendor/pygments-main/tests/examplefiles/lighttpd_config.conf +0 -13
  440. data/vendor/pygments-main/tests/examplefiles/limbo.b +0 -456
  441. data/vendor/pygments-main/tests/examplefiles/linecontinuation.py +0 -47
  442. data/vendor/pygments-main/tests/examplefiles/livescript-demo.ls +0 -43
  443. data/vendor/pygments-main/tests/examplefiles/logos_example.xm +0 -28
  444. data/vendor/pygments-main/tests/examplefiles/ltmain.sh +0 -2849
  445. data/vendor/pygments-main/tests/examplefiles/main.cmake +0 -44
  446. data/vendor/pygments-main/tests/examplefiles/markdown.lsp +0 -679
  447. data/vendor/pygments-main/tests/examplefiles/matlab_noreturn +0 -3
  448. data/vendor/pygments-main/tests/examplefiles/matlab_sample +0 -30
  449. data/vendor/pygments-main/tests/examplefiles/matlabsession_sample.txt +0 -37
  450. data/vendor/pygments-main/tests/examplefiles/metagrammar.treetop +0 -455
  451. data/vendor/pygments-main/tests/examplefiles/minehunt.qml +0 -112
  452. data/vendor/pygments-main/tests/examplefiles/minimal.ns2 +0 -4
  453. data/vendor/pygments-main/tests/examplefiles/moin_SyntaxReference.txt +0 -340
  454. data/vendor/pygments-main/tests/examplefiles/multiline_regexes.rb +0 -38
  455. data/vendor/pygments-main/tests/examplefiles/nanomsg.intr +0 -95
  456. data/vendor/pygments-main/tests/examplefiles/nasm_aoutso.asm +0 -96
  457. data/vendor/pygments-main/tests/examplefiles/nasm_objexe.asm +0 -30
  458. data/vendor/pygments-main/tests/examplefiles/nemerle_sample.n +0 -87
  459. data/vendor/pygments-main/tests/examplefiles/nginx_nginx.conf +0 -118
  460. data/vendor/pygments-main/tests/examplefiles/numbers.c +0 -12
  461. data/vendor/pygments-main/tests/examplefiles/objc_example.m +0 -179
  462. data/vendor/pygments-main/tests/examplefiles/openedge_example +0 -34
  463. data/vendor/pygments-main/tests/examplefiles/pawn_example +0 -25
  464. data/vendor/pygments-main/tests/examplefiles/perl_misc +0 -62
  465. data/vendor/pygments-main/tests/examplefiles/perl_perl5db +0 -998
  466. data/vendor/pygments-main/tests/examplefiles/perl_regex-delims +0 -120
  467. data/vendor/pygments-main/tests/examplefiles/perlfunc.1 +0 -856
  468. data/vendor/pygments-main/tests/examplefiles/phpMyAdmin.spec +0 -163
  469. data/vendor/pygments-main/tests/examplefiles/phpcomplete.vim +0 -567
  470. data/vendor/pygments-main/tests/examplefiles/pleac.in.rb +0 -1223
  471. data/vendor/pygments-main/tests/examplefiles/postgresql_test.txt +0 -47
  472. data/vendor/pygments-main/tests/examplefiles/pppoe.applescript +0 -10
  473. data/vendor/pygments-main/tests/examplefiles/psql_session.txt +0 -122
  474. data/vendor/pygments-main/tests/examplefiles/py3_test.txt +0 -2
  475. data/vendor/pygments-main/tests/examplefiles/py3tb_test.py3tb +0 -4
  476. data/vendor/pygments-main/tests/examplefiles/pycon_test.pycon +0 -14
  477. data/vendor/pygments-main/tests/examplefiles/pytb_test2.pytb +0 -2
  478. data/vendor/pygments-main/tests/examplefiles/pytb_test3.pytb +0 -4
  479. data/vendor/pygments-main/tests/examplefiles/python25-bsd.mak +0 -234
  480. data/vendor/pygments-main/tests/examplefiles/qbasic_example +0 -2
  481. data/vendor/pygments-main/tests/examplefiles/qsort.prolog +0 -13
  482. data/vendor/pygments-main/tests/examplefiles/r-console-transcript.Rout +0 -38
  483. data/vendor/pygments-main/tests/examplefiles/r6rs-comments.scm +0 -23
  484. data/vendor/pygments-main/tests/examplefiles/ragel-cpp_rlscan +0 -280
  485. data/vendor/pygments-main/tests/examplefiles/ragel-cpp_snippet +0 -2
  486. data/vendor/pygments-main/tests/examplefiles/regex.js +0 -22
  487. data/vendor/pygments-main/tests/examplefiles/reversi.lsp +0 -427
  488. data/vendor/pygments-main/tests/examplefiles/robotframework_test.txt +0 -39
  489. data/vendor/pygments-main/tests/examplefiles/rql-queries.rql +0 -34
  490. data/vendor/pygments-main/tests/examplefiles/ruby_func_def.rb +0 -11
  491. data/vendor/pygments-main/tests/examplefiles/rust_example.rs +0 -233
  492. data/vendor/pygments-main/tests/examplefiles/scilab.sci +0 -30
  493. data/vendor/pygments-main/tests/examplefiles/scope.cirru +0 -43
  494. data/vendor/pygments-main/tests/examplefiles/session.dylan-console +0 -9
  495. data/vendor/pygments-main/tests/examplefiles/sibling.prolog +0 -19
  496. data/vendor/pygments-main/tests/examplefiles/simple.md +0 -747
  497. data/vendor/pygments-main/tests/examplefiles/smarty_example.html +0 -209
  498. data/vendor/pygments-main/tests/examplefiles/source.lgt +0 -343
  499. data/vendor/pygments-main/tests/examplefiles/sources.list +0 -62
  500. data/vendor/pygments-main/tests/examplefiles/sparql.rq +0 -23
  501. data/vendor/pygments-main/tests/examplefiles/sphere.pov +0 -18
  502. data/vendor/pygments-main/tests/examplefiles/sqlite3.sqlite3-console +0 -27
  503. data/vendor/pygments-main/tests/examplefiles/squid.conf +0 -30
  504. data/vendor/pygments-main/tests/examplefiles/string.jl +0 -1031
  505. data/vendor/pygments-main/tests/examplefiles/string_delimiters.d +0 -21
  506. data/vendor/pygments-main/tests/examplefiles/stripheredoc.sh +0 -3
  507. data/vendor/pygments-main/tests/examplefiles/swig_java.swg +0 -1329
  508. data/vendor/pygments-main/tests/examplefiles/swig_std_vector.i +0 -225
  509. data/vendor/pygments-main/tests/examplefiles/test.R +0 -185
  510. data/vendor/pygments-main/tests/examplefiles/test.adb +0 -211
  511. data/vendor/pygments-main/tests/examplefiles/test.agda +0 -102
  512. data/vendor/pygments-main/tests/examplefiles/test.apl +0 -26
  513. data/vendor/pygments-main/tests/examplefiles/test.asy +0 -131
  514. data/vendor/pygments-main/tests/examplefiles/test.awk +0 -121
  515. data/vendor/pygments-main/tests/examplefiles/test.bb +0 -95
  516. data/vendor/pygments-main/tests/examplefiles/test.bmx +0 -145
  517. data/vendor/pygments-main/tests/examplefiles/test.boo +0 -39
  518. data/vendor/pygments-main/tests/examplefiles/test.bro +0 -250
  519. data/vendor/pygments-main/tests/examplefiles/test.cs +0 -374
  520. data/vendor/pygments-main/tests/examplefiles/test.css +0 -54
  521. data/vendor/pygments-main/tests/examplefiles/test.cu +0 -36
  522. data/vendor/pygments-main/tests/examplefiles/test.cyp +0 -123
  523. data/vendor/pygments-main/tests/examplefiles/test.d +0 -135
  524. data/vendor/pygments-main/tests/examplefiles/test.dart +0 -23
  525. data/vendor/pygments-main/tests/examplefiles/test.dtd +0 -89
  526. data/vendor/pygments-main/tests/examplefiles/test.ebnf +0 -31
  527. data/vendor/pygments-main/tests/examplefiles/test.ec +0 -605
  528. data/vendor/pygments-main/tests/examplefiles/test.ecl +0 -58
  529. data/vendor/pygments-main/tests/examplefiles/test.eh +0 -315
  530. data/vendor/pygments-main/tests/examplefiles/test.erl +0 -169
  531. data/vendor/pygments-main/tests/examplefiles/test.evoque +0 -33
  532. data/vendor/pygments-main/tests/examplefiles/test.fan +0 -818
  533. data/vendor/pygments-main/tests/examplefiles/test.flx +0 -57
  534. data/vendor/pygments-main/tests/examplefiles/test.gdc +0 -13
  535. data/vendor/pygments-main/tests/examplefiles/test.groovy +0 -97
  536. data/vendor/pygments-main/tests/examplefiles/test.html +0 -339
  537. data/vendor/pygments-main/tests/examplefiles/test.idr +0 -93
  538. data/vendor/pygments-main/tests/examplefiles/test.ini +0 -10
  539. data/vendor/pygments-main/tests/examplefiles/test.java +0 -653
  540. data/vendor/pygments-main/tests/examplefiles/test.jsp +0 -24
  541. data/vendor/pygments-main/tests/examplefiles/test.maql +0 -45
  542. data/vendor/pygments-main/tests/examplefiles/test.mask +0 -41
  543. data/vendor/pygments-main/tests/examplefiles/test.mod +0 -374
  544. data/vendor/pygments-main/tests/examplefiles/test.moo +0 -51
  545. data/vendor/pygments-main/tests/examplefiles/test.myt +0 -166
  546. data/vendor/pygments-main/tests/examplefiles/test.nim +0 -93
  547. data/vendor/pygments-main/tests/examplefiles/test.opa +0 -10
  548. data/vendor/pygments-main/tests/examplefiles/test.p6 +0 -252
  549. data/vendor/pygments-main/tests/examplefiles/test.pan +0 -54
  550. data/vendor/pygments-main/tests/examplefiles/test.pas +0 -743
  551. data/vendor/pygments-main/tests/examplefiles/test.php +0 -507
  552. data/vendor/pygments-main/tests/examplefiles/test.pig +0 -148
  553. data/vendor/pygments-main/tests/examplefiles/test.plot +0 -333
  554. data/vendor/pygments-main/tests/examplefiles/test.ps1 +0 -108
  555. data/vendor/pygments-main/tests/examplefiles/test.pwn +0 -253
  556. data/vendor/pygments-main/tests/examplefiles/test.pypylog +0 -1839
  557. data/vendor/pygments-main/tests/examplefiles/test.r3 +0 -114
  558. data/vendor/pygments-main/tests/examplefiles/test.rb +0 -177
  559. data/vendor/pygments-main/tests/examplefiles/test.rhtml +0 -43
  560. data/vendor/pygments-main/tests/examplefiles/test.rsl +0 -111
  561. data/vendor/pygments-main/tests/examplefiles/test.scaml +0 -8
  562. data/vendor/pygments-main/tests/examplefiles/test.ssp +0 -12
  563. data/vendor/pygments-main/tests/examplefiles/test.swift +0 -65
  564. data/vendor/pygments-main/tests/examplefiles/test.tcsh +0 -830
  565. data/vendor/pygments-main/tests/examplefiles/test.vb +0 -407
  566. data/vendor/pygments-main/tests/examplefiles/test.vhdl +0 -161
  567. data/vendor/pygments-main/tests/examplefiles/test.xqy +0 -138
  568. data/vendor/pygments-main/tests/examplefiles/test.xsl +0 -23
  569. data/vendor/pygments-main/tests/examplefiles/test.zep +0 -33
  570. data/vendor/pygments-main/tests/examplefiles/test2.pypylog +0 -120
  571. data/vendor/pygments-main/tests/examplefiles/truncated.pytb +0 -15
  572. data/vendor/pygments-main/tests/examplefiles/type.lisp +0 -1218
  573. data/vendor/pygments-main/tests/examplefiles/underscore.coffee +0 -603
  574. data/vendor/pygments-main/tests/examplefiles/unicode.applescript +0 -5
  575. data/vendor/pygments-main/tests/examplefiles/unicode.go +0 -10
  576. data/vendor/pygments-main/tests/examplefiles/unicodedoc.py +0 -11
  577. data/vendor/pygments-main/tests/examplefiles/unix-io.lid +0 -37
  578. data/vendor/pygments-main/tests/examplefiles/vbnet_test.bas +0 -29
  579. data/vendor/pygments-main/tests/examplefiles/vctreestatus_hg +0 -4
  580. data/vendor/pygments-main/tests/examplefiles/vimrc +0 -21
  581. data/vendor/pygments-main/tests/examplefiles/webkit-transition.css +0 -3
  582. data/vendor/pygments-main/tests/examplefiles/while.pov +0 -13
  583. data/vendor/pygments-main/tests/examplefiles/wiki.factor +0 -384
  584. data/vendor/pygments-main/tests/examplefiles/xml_example +0 -1897
  585. data/vendor/pygments-main/tests/examplefiles/zmlrpc.f90 +0 -798
  586. data/vendor/pygments-main/tests/run.py +0 -44
  587. data/vendor/pygments-main/tests/string_asserts.py +0 -22
  588. data/vendor/pygments-main/tests/support.py +0 -15
  589. data/vendor/pygments-main/tests/support/tags +0 -36
  590. data/vendor/pygments-main/tests/test_basic_api.py +0 -309
  591. data/vendor/pygments-main/tests/test_cfm.py +0 -46
  592. data/vendor/pygments-main/tests/test_clexer.py +0 -236
  593. data/vendor/pygments-main/tests/test_cmdline.py +0 -106
  594. data/vendor/pygments-main/tests/test_examplefiles.py +0 -110
  595. data/vendor/pygments-main/tests/test_html_formatter.py +0 -180
  596. data/vendor/pygments-main/tests/test_latex_formatter.py +0 -57
  597. data/vendor/pygments-main/tests/test_lexers_other.py +0 -68
  598. data/vendor/pygments-main/tests/test_objectiveclexer.py +0 -81
  599. data/vendor/pygments-main/tests/test_perllexer.py +0 -137
  600. data/vendor/pygments-main/tests/test_qbasiclexer.py +0 -43
  601. data/vendor/pygments-main/tests/test_regexlexer.py +0 -54
  602. data/vendor/pygments-main/tests/test_rtf_formatter.py +0 -109
  603. data/vendor/pygments-main/tests/test_string_asserts.py +0 -39
  604. data/vendor/pygments-main/tests/test_token.py +0 -46
  605. data/vendor/pygments-main/tests/test_using_api.py +0 -40
  606. data/vendor/pygments-main/tests/test_util.py +0 -135
@@ -1,21 +0,0 @@
1
- import std.stdio;
2
-
3
- void main() {
4
- // Nesting delimited strings
5
- auto a = q"{foo " {bar} baz}";
6
- auto b = q"[foo [bar] " baz]";
7
- auto c = q"(foo " (bar) baz)";
8
- auto d = q"<foo <bar> " baz>";
9
- // Non-nesting delimited strings
10
- auto e = q"/foo " bar/";
11
- auto f = q"-Another " string-";
12
- // "heredoc" strings
13
- auto g = q"FOO
14
- This is a string!
15
- FOO";
16
- // Token strings (only the q{} should be highlighted as a string)
17
- auto h = q{
18
- int i;
19
- void foo() { writefln("Hello, world!"); }
20
- };
21
- }
@@ -1,3 +0,0 @@
1
- cat <<-EOF
2
- Hello world $PATH
3
- EOF
@@ -1,1329 +0,0 @@
1
- /* -----------------------------------------------------------------------------
2
- * java.swg
3
- *
4
- * Java typemaps
5
- * ----------------------------------------------------------------------------- */
6
-
7
- %include <javahead.swg>
8
-
9
- /* The jni, jtype and jstype typemaps work together and so there should be one of each.
10
- * The jni typemap contains the JNI type used in the JNI (C/C++) code.
11
- * The jtype typemap contains the Java type used in the JNI intermediary class.
12
- * The jstype typemap contains the Java type used in the Java proxy classes, type wrapper classes and module class. */
13
-
14
- /* Fragments */
15
- %fragment("SWIG_PackData", "header") {
16
- /* Pack binary data into a string */
17
- SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
18
- static const char hex[17] = "0123456789abcdef";
19
- register const unsigned char *u = (unsigned char *) ptr;
20
- register const unsigned char *eu = u + sz;
21
- for (; u != eu; ++u) {
22
- register unsigned char uu = *u;
23
- *(c++) = hex[(uu & 0xf0) >> 4];
24
- *(c++) = hex[uu & 0xf];
25
- }
26
- return c;
27
- }
28
- }
29
-
30
- %fragment("SWIG_UnPackData", "header") {
31
- /* Unpack binary data from a string */
32
- SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
33
- register unsigned char *u = (unsigned char *) ptr;
34
- register const unsigned char *eu = u + sz;
35
- for (; u != eu; ++u) {
36
- register char d = *(c++);
37
- register unsigned char uu;
38
- if ((d >= '0') && (d <= '9'))
39
- uu = ((d - '0') << 4);
40
- else if ((d >= 'a') && (d <= 'f'))
41
- uu = ((d - ('a'-10)) << 4);
42
- else
43
- return (char *) 0;
44
- d = *(c++);
45
- if ((d >= '0') && (d <= '9'))
46
- uu |= (d - '0');
47
- else if ((d >= 'a') && (d <= 'f'))
48
- uu |= (d - ('a'-10));
49
- else
50
- return (char *) 0;
51
- *u = uu;
52
- }
53
- return c;
54
- }
55
- }
56
-
57
- /* Primitive types */
58
- %typemap(jni) bool, const bool & "jboolean"
59
- %typemap(jni) char, const char & "jchar"
60
- %typemap(jni) signed char, const signed char & "jbyte"
61
- %typemap(jni) unsigned char, const unsigned char & "jshort"
62
- %typemap(jni) short, const short & "jshort"
63
- %typemap(jni) unsigned short, const unsigned short & "jint"
64
- %typemap(jni) int, const int & "jint"
65
- %typemap(jni) unsigned int, const unsigned int & "jlong"
66
- %typemap(jni) long, const long & "jint"
67
- %typemap(jni) unsigned long, const unsigned long & "jlong"
68
- %typemap(jni) long long, const long long & "jlong"
69
- %typemap(jni) unsigned long long, const unsigned long long & "jobject"
70
- %typemap(jni) float, const float & "jfloat"
71
- %typemap(jni) double, const double & "jdouble"
72
- %typemap(jni) void "void"
73
-
74
- %typemap(jtype) bool, const bool & "boolean"
75
- %typemap(jtype) char, const char & "char"
76
- %typemap(jtype) signed char, const signed char & "byte"
77
- %typemap(jtype) unsigned char, const unsigned char & "short"
78
- %typemap(jtype) short, const short & "short"
79
- %typemap(jtype) unsigned short, const unsigned short & "int"
80
- %typemap(jtype) int, const int & "int"
81
- %typemap(jtype) unsigned int, const unsigned int & "long"
82
- %typemap(jtype) long, const long & "int"
83
- %typemap(jtype) unsigned long, const unsigned long & "long"
84
- %typemap(jtype) long long, const long long & "long"
85
- %typemap(jtype) unsigned long long, const unsigned long long & "java.math.BigInteger"
86
- %typemap(jtype) float, const float & "float"
87
- %typemap(jtype) double, const double & "double"
88
- %typemap(jtype) void "void"
89
-
90
- %typemap(jstype) bool, const bool & "boolean"
91
- %typemap(jstype) char, const char & "char"
92
- %typemap(jstype) signed char, const signed char & "byte"
93
- %typemap(jstype) unsigned char, const unsigned char & "short"
94
- %typemap(jstype) short, const short & "short"
95
- %typemap(jstype) unsigned short, const unsigned short & "int"
96
- %typemap(jstype) int, const int & "int"
97
- %typemap(jstype) unsigned int, const unsigned int & "long"
98
- %typemap(jstype) long, const long & "int"
99
- %typemap(jstype) unsigned long, const unsigned long & "long"
100
- %typemap(jstype) long long, const long long & "long"
101
- %typemap(jstype) unsigned long long, const unsigned long long & "java.math.BigInteger"
102
- %typemap(jstype) float, const float & "float"
103
- %typemap(jstype) double, const double & "double"
104
- %typemap(jstype) void "void"
105
-
106
- %typemap(jni) char *, char *&, char[ANY], char[] "jstring"
107
- %typemap(jtype) char *, char *&, char[ANY], char[] "String"
108
- %typemap(jstype) char *, char *&, char[ANY], char[] "String"
109
-
110
- /* JNI types */
111
- %typemap(jni) jboolean "jboolean"
112
- %typemap(jni) jchar "jchar"
113
- %typemap(jni) jbyte "jbyte"
114
- %typemap(jni) jshort "jshort"
115
- %typemap(jni) jint "jint"
116
- %typemap(jni) jlong "jlong"
117
- %typemap(jni) jfloat "jfloat"
118
- %typemap(jni) jdouble "jdouble"
119
- %typemap(jni) jstring "jstring"
120
- %typemap(jni) jobject "jobject"
121
- %typemap(jni) jbooleanArray "jbooleanArray"
122
- %typemap(jni) jcharArray "jcharArray"
123
- %typemap(jni) jbyteArray "jbyteArray"
124
- %typemap(jni) jshortArray "jshortArray"
125
- %typemap(jni) jintArray "jintArray"
126
- %typemap(jni) jlongArray "jlongArray"
127
- %typemap(jni) jfloatArray "jfloatArray"
128
- %typemap(jni) jdoubleArray "jdoubleArray"
129
- %typemap(jni) jobjectArray "jobjectArray"
130
-
131
- %typemap(jtype) jboolean "boolean"
132
- %typemap(jtype) jchar "char"
133
- %typemap(jtype) jbyte "byte"
134
- %typemap(jtype) jshort "short"
135
- %typemap(jtype) jint "int"
136
- %typemap(jtype) jlong "long"
137
- %typemap(jtype) jfloat "float"
138
- %typemap(jtype) jdouble "double"
139
- %typemap(jtype) jstring "String"
140
- %typemap(jtype) jobject "Object"
141
- %typemap(jtype) jbooleanArray "boolean[]"
142
- %typemap(jtype) jcharArray "char[]"
143
- %typemap(jtype) jbyteArray "byte[]"
144
- %typemap(jtype) jshortArray "short[]"
145
- %typemap(jtype) jintArray "int[]"
146
- %typemap(jtype) jlongArray "long[]"
147
- %typemap(jtype) jfloatArray "float[]"
148
- %typemap(jtype) jdoubleArray "double[]"
149
- %typemap(jtype) jobjectArray "Object[]"
150
-
151
- %typemap(jstype) jboolean "boolean"
152
- %typemap(jstype) jchar "char"
153
- %typemap(jstype) jbyte "byte"
154
- %typemap(jstype) jshort "short"
155
- %typemap(jstype) jint "int"
156
- %typemap(jstype) jlong "long"
157
- %typemap(jstype) jfloat "float"
158
- %typemap(jstype) jdouble "double"
159
- %typemap(jstype) jstring "String"
160
- %typemap(jstype) jobject "Object"
161
- %typemap(jstype) jbooleanArray "boolean[]"
162
- %typemap(jstype) jcharArray "char[]"
163
- %typemap(jstype) jbyteArray "byte[]"
164
- %typemap(jstype) jshortArray "short[]"
165
- %typemap(jstype) jintArray "int[]"
166
- %typemap(jstype) jlongArray "long[]"
167
- %typemap(jstype) jfloatArray "float[]"
168
- %typemap(jstype) jdoubleArray "double[]"
169
- %typemap(jstype) jobjectArray "Object[]"
170
-
171
- /* Non primitive types */
172
- %typemap(jni) SWIGTYPE "jlong"
173
- %typemap(jtype) SWIGTYPE "long"
174
- %typemap(jstype) SWIGTYPE "$&javaclassname"
175
-
176
- %typemap(jni) SWIGTYPE [] "jlong"
177
- %typemap(jtype) SWIGTYPE [] "long"
178
- %typemap(jstype) SWIGTYPE [] "$javaclassname"
179
-
180
- %typemap(jni) SWIGTYPE * "jlong"
181
- %typemap(jtype) SWIGTYPE * "long"
182
- %typemap(jstype) SWIGTYPE * "$javaclassname"
183
-
184
- %typemap(jni) SWIGTYPE & "jlong"
185
- %typemap(jtype) SWIGTYPE & "long"
186
- %typemap(jstype) SWIGTYPE & "$javaclassname"
187
-
188
- /* pointer to a class member */
189
- %typemap(jni) SWIGTYPE (CLASS::*) "jstring"
190
- %typemap(jtype) SWIGTYPE (CLASS::*) "String"
191
- %typemap(jstype) SWIGTYPE (CLASS::*) "$javaclassname"
192
-
193
- /* The following are the in, out, freearg, argout typemaps. These are the JNI code generating typemaps for converting from Java to C and visa versa. */
194
-
195
- /* primitive types */
196
- %typemap(in) bool
197
- %{ $1 = $input ? true : false; %}
198
-
199
- %typemap(directorout) bool
200
- %{ $result = $input ? true : false; %}
201
-
202
- %typemap(javadirectorin) bool "$jniinput"
203
- %typemap(javadirectorout) bool "$javacall"
204
-
205
- %typemap(in) char,
206
- signed char,
207
- unsigned char,
208
- short,
209
- unsigned short,
210
- int,
211
- unsigned int,
212
- long,
213
- unsigned long,
214
- long long,
215
- float,
216
- double
217
- %{ $1 = ($1_ltype)$input; %}
218
-
219
- %typemap(directorout) char,
220
- signed char,
221
- unsigned char,
222
- short,
223
- unsigned short,
224
- int,
225
- unsigned int,
226
- long,
227
- unsigned long,
228
- long long,
229
- float,
230
- double
231
- %{ $result = ($1_ltype)$input; %}
232
-
233
- %typemap(directorin, descriptor="Z") bool "$input = (jboolean) $1;"
234
- %typemap(directorin, descriptor="C") char "$input = (jint) $1;"
235
- %typemap(directorin, descriptor="B") signed char "$input = (jbyte) $1;"
236
- %typemap(directorin, descriptor="S") unsigned char "$input = (jshort) $1;"
237
- %typemap(directorin, descriptor="S") short "$input = (jshort) $1;"
238
- %typemap(directorin, descriptor="I") unsigned short "$input = (jint) $1;"
239
- %typemap(directorin, descriptor="I") int "$input = (jint) $1;"
240
- %typemap(directorin, descriptor="J") unsigned int "$input = (jlong) $1;"
241
- %typemap(directorin, descriptor="I") long "$input = (jint) $1;"
242
- %typemap(directorin, descriptor="J") unsigned long "$input = (jlong) $1;"
243
- %typemap(directorin, descriptor="J") long long "$input = (jlong) $1;"
244
- %typemap(directorin, descriptor="F") float "$input = (jfloat) $1;"
245
- %typemap(directorin, descriptor="D") double "$input = (jdouble) $1;"
246
-
247
- %typemap(javadirectorin) char,
248
- signed char,
249
- unsigned char,
250
- short,
251
- unsigned short,
252
- int,
253
- unsigned int,
254
- long,
255
- unsigned long,
256
- long long,
257
- float,
258
- double
259
- "$jniinput"
260
-
261
- %typemap(javadirectorout) char,
262
- signed char,
263
- unsigned char,
264
- short,
265
- unsigned short,
266
- int,
267
- unsigned int,
268
- long,
269
- unsigned long,
270
- long long,
271
- float,
272
- double
273
- "$javacall"
274
-
275
- %typemap(out) bool %{ $result = (jboolean)$1; %}
276
- %typemap(out) char %{ $result = (jchar)$1; %}
277
- %typemap(out) signed char %{ $result = (jbyte)$1; %}
278
- %typemap(out) unsigned char %{ $result = (jshort)$1; %}
279
- %typemap(out) short %{ $result = (jshort)$1; %}
280
- %typemap(out) unsigned short %{ $result = (jint)$1; %}
281
- %typemap(out) int %{ $result = (jint)$1; %}
282
- %typemap(out) unsigned int %{ $result = (jlong)$1; %}
283
- %typemap(out) long %{ $result = (jint)$1; %}
284
- %typemap(out) unsigned long %{ $result = (jlong)$1; %}
285
- %typemap(out) long long %{ $result = (jlong)$1; %}
286
- %typemap(out) float %{ $result = (jfloat)$1; %}
287
- %typemap(out) double %{ $result = (jdouble)$1; %}
288
-
289
- /* unsigned long long */
290
- /* Convert from BigInteger using the toByteArray member function */
291
- %typemap(in) unsigned long long {
292
- jclass clazz;
293
- jmethodID mid;
294
- jbyteArray ba;
295
- jbyte* bae;
296
- jsize sz;
297
- int i;
298
-
299
- if (!$input) {
300
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
301
- return $null;
302
- }
303
- clazz = JCALL1(GetObjectClass, jenv, $input);
304
- mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
305
- ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
306
- bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
307
- sz = JCALL1(GetArrayLength, jenv, ba);
308
- $1 = 0;
309
- for(i=0; i<sz; i++) {
310
- $1 = ($1 << 8) | ($1_type)(unsigned char)bae[i];
311
- }
312
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
313
- }
314
-
315
- %typemap(directorout) unsigned long long {
316
- jclass clazz;
317
- jmethodID mid;
318
- jbyteArray ba;
319
- jbyte* bae;
320
- jsize sz;
321
- int i;
322
-
323
- if (!$input) {
324
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
325
- return $null;
326
- }
327
- clazz = JCALL1(GetObjectClass, jenv, $input);
328
- mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
329
- ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
330
- bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
331
- sz = JCALL1(GetArrayLength, jenv, ba);
332
- $result = 0;
333
- for(i=0; i<sz; i++) {
334
- $result = ($result << 8) | ($1_type)(unsigned char)bae[i];
335
- }
336
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
337
- }
338
-
339
-
340
- /* Convert to BigInteger - byte array holds number in 2's complement big endian format */
341
- %typemap(out) unsigned long long {
342
- jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
343
- jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
344
- jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
345
- jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
346
- jobject bigint;
347
- int i;
348
-
349
- bae[0] = 0;
350
- for(i=1; i<9; i++ ) {
351
- bae[i] = (jbyte)($1>>8*(8-i));
352
- }
353
-
354
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
355
- bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
356
- $result = bigint;
357
- }
358
-
359
- /* Convert to BigInteger (see out typemap) */
360
- %typemap(directorin, descriptor="Ljava/math/BigInteger;") unsigned long long, const unsigned long long & {
361
- jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
362
- jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
363
- jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
364
- jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
365
- jobject bigint;
366
- int swig_i;
367
-
368
- bae[0] = 0;
369
- for(swig_i=1; swig_i<9; swig_i++ ) {
370
- bae[swig_i] = (jbyte)($1>>8*(8-swig_i));
371
- }
372
-
373
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
374
- bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
375
- $input = bigint;
376
- }
377
-
378
- %typemap(javadirectorin) unsigned long long "$jniinput"
379
- %typemap(javadirectorout) unsigned long long "$javacall"
380
-
381
- /* char * - treat as String */
382
- %typemap(in, noblock=1) char * {
383
- $1 = 0;
384
- if ($input) {
385
- $1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
386
- if (!$1) return $null;
387
- }
388
- }
389
-
390
- %typemap(directorout, noblock=1, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) char * {
391
- $1 = 0;
392
- if ($input) {
393
- $result = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
394
- if (!$result) return $null;
395
- }
396
- }
397
-
398
- %typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char * {
399
- $input = 0;
400
- if ($1) {
401
- $input = JCALL1(NewStringUTF, jenv, (const char *)$1);
402
- if (!$input) return $null;
403
- }
404
- }
405
-
406
- %typemap(freearg, noblock=1) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
407
- %typemap(out, noblock=1) char * { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
408
- %typemap(javadirectorin) char * "$jniinput"
409
- %typemap(javadirectorout) char * "$javacall"
410
-
411
- /* char *& - treat as String */
412
- %typemap(in, noblock=1) char *& ($*1_ltype temp = 0) {
413
- $1 = 0;
414
- if ($input) {
415
- temp = ($*1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
416
- if (!temp) return $null;
417
- }
418
- $1 = &temp;
419
- }
420
- %typemap(freearg, noblock=1) char *& { if ($1 && *$1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)*$1); }
421
- %typemap(out, noblock=1) char *& { if (*$1) $result = JCALL1(NewStringUTF, jenv, (const char *)*$1); }
422
-
423
- %typemap(out) void ""
424
- %typemap(javadirectorin) void "$jniinput"
425
- %typemap(javadirectorout) void "$javacall"
426
- %typemap(directorin, descriptor="V") void ""
427
-
428
- /* primitive types by reference */
429
- %typemap(in) const bool & ($*1_ltype temp)
430
- %{ temp = $input ? true : false;
431
- $1 = &temp; %}
432
-
433
- %typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const bool &
434
- %{ static $*1_ltype temp;
435
- temp = $input ? true : false;
436
- $result = &temp; %}
437
-
438
- %typemap(javadirectorin) const bool & "$jniinput"
439
- %typemap(javadirectorout) const bool & "$javacall"
440
-
441
- %typemap(in) const char & ($*1_ltype temp),
442
- const signed char & ($*1_ltype temp),
443
- const unsigned char & ($*1_ltype temp),
444
- const short & ($*1_ltype temp),
445
- const unsigned short & ($*1_ltype temp),
446
- const int & ($*1_ltype temp),
447
- const unsigned int & ($*1_ltype temp),
448
- const long & ($*1_ltype temp),
449
- const unsigned long & ($*1_ltype temp),
450
- const long long & ($*1_ltype temp),
451
- const float & ($*1_ltype temp),
452
- const double & ($*1_ltype temp)
453
- %{ temp = ($*1_ltype)$input;
454
- $1 = &temp; %}
455
-
456
- %typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const char &,
457
- const signed char &,
458
- const unsigned char &,
459
- const short &,
460
- const unsigned short &,
461
- const int &,
462
- const unsigned int &,
463
- const long &,
464
- const unsigned long &,
465
- const long long &,
466
- const float &,
467
- const double &
468
- %{ static $*1_ltype temp;
469
- temp = ($*1_ltype)$input;
470
- $result = &temp; %}
471
-
472
- %typemap(directorin, descriptor="Z") const bool & "$input = (jboolean)$1;"
473
- %typemap(directorin, descriptor="C") const char & "$input = (jchar)$1;"
474
- %typemap(directorin, descriptor="B") const signed char & "$input = (jbyte)$1;"
475
- %typemap(directorin, descriptor="S") const unsigned char & "$input = (jshort)$1;"
476
- %typemap(directorin, descriptor="S") const short & "$input = (jshort)$1;"
477
- %typemap(directorin, descriptor="I") const unsigned short & "$input = (jint)$1;"
478
- %typemap(directorin, descriptor="I") const int & "$input = (jint)$1;"
479
- %typemap(directorin, descriptor="J") const unsigned int & "$input = (jlong)$1;"
480
- %typemap(directorin, descriptor="I") const long & "$input = (jint)$1;"
481
- %typemap(directorin, descriptor="J") const unsigned long & "$input = (jlong)$1;"
482
- %typemap(directorin, descriptor="J") const long long & "$input = (jlong)$1;"
483
- %typemap(directorin, descriptor="F") const float & "$input = (jfloat)$1;"
484
- %typemap(directorin, descriptor="D") const double & "$input = (jdouble)$1;"
485
-
486
- %typemap(javadirectorin) const char & ($*1_ltype temp),
487
- const signed char & ($*1_ltype temp),
488
- const unsigned char & ($*1_ltype temp),
489
- const short & ($*1_ltype temp),
490
- const unsigned short & ($*1_ltype temp),
491
- const int & ($*1_ltype temp),
492
- const unsigned int & ($*1_ltype temp),
493
- const long & ($*1_ltype temp),
494
- const unsigned long & ($*1_ltype temp),
495
- const long long & ($*1_ltype temp),
496
- const float & ($*1_ltype temp),
497
- const double & ($*1_ltype temp)
498
- "$jniinput"
499
-
500
- %typemap(javadirectorout) const char & ($*1_ltype temp),
501
- const signed char & ($*1_ltype temp),
502
- const unsigned char & ($*1_ltype temp),
503
- const short & ($*1_ltype temp),
504
- const unsigned short & ($*1_ltype temp),
505
- const int & ($*1_ltype temp),
506
- const unsigned int & ($*1_ltype temp),
507
- const long & ($*1_ltype temp),
508
- const unsigned long & ($*1_ltype temp),
509
- const long long & ($*1_ltype temp),
510
- const float & ($*1_ltype temp),
511
- const double & ($*1_ltype temp)
512
- "$javacall"
513
-
514
-
515
- %typemap(out) const bool & %{ $result = (jboolean)*$1; %}
516
- %typemap(out) const char & %{ $result = (jchar)*$1; %}
517
- %typemap(out) const signed char & %{ $result = (jbyte)*$1; %}
518
- %typemap(out) const unsigned char & %{ $result = (jshort)*$1; %}
519
- %typemap(out) const short & %{ $result = (jshort)*$1; %}
520
- %typemap(out) const unsigned short & %{ $result = (jint)*$1; %}
521
- %typemap(out) const int & %{ $result = (jint)*$1; %}
522
- %typemap(out) const unsigned int & %{ $result = (jlong)*$1; %}
523
- %typemap(out) const long & %{ $result = (jint)*$1; %}
524
- %typemap(out) const unsigned long & %{ $result = (jlong)*$1; %}
525
- %typemap(out) const long long & %{ $result = (jlong)*$1; %}
526
- %typemap(out) const float & %{ $result = (jfloat)*$1; %}
527
- %typemap(out) const double & %{ $result = (jdouble)*$1; %}
528
-
529
- /* const unsigned long long & */
530
- /* Similar to unsigned long long */
531
- %typemap(in) const unsigned long long & ($*1_ltype temp) {
532
- jclass clazz;
533
- jmethodID mid;
534
- jbyteArray ba;
535
- jbyte* bae;
536
- jsize sz;
537
- int i;
538
-
539
- if (!$input) {
540
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
541
- return $null;
542
- }
543
- clazz = JCALL1(GetObjectClass, jenv, $input);
544
- mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
545
- ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
546
- bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
547
- sz = JCALL1(GetArrayLength, jenv, ba);
548
- $1 = &temp;
549
- temp = 0;
550
- for(i=0; i<sz; i++) {
551
- temp = (temp << 8) | ($*1_ltype)(unsigned char)bae[i];
552
- }
553
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
554
- }
555
-
556
- %typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const unsigned long long & {
557
- static $*1_ltype temp;
558
- jclass clazz;
559
- jmethodID mid;
560
- jbyteArray ba;
561
- jbyte* bae;
562
- jsize sz;
563
- int i;
564
-
565
- if (!$input) {
566
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
567
- return $null;
568
- }
569
- clazz = JCALL1(GetObjectClass, jenv, $input);
570
- mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
571
- ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
572
- bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
573
- sz = JCALL1(GetArrayLength, jenv, ba);
574
- $result = &temp;
575
- temp = 0;
576
- for(i=0; i<sz; i++) {
577
- temp = (temp << 8) | ($*1_ltype)(unsigned char)bae[i];
578
- }
579
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
580
- }
581
-
582
- %typemap(out) const unsigned long long & {
583
- jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
584
- jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
585
- jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
586
- jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
587
- jobject bigint;
588
- int i;
589
-
590
- bae[0] = 0;
591
- for(i=1; i<9; i++ ) {
592
- bae[i] = (jbyte)(*$1>>8*(8-i));
593
- }
594
-
595
- JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
596
- bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
597
- $result = bigint;
598
- }
599
-
600
- %typemap(javadirectorin) const unsigned long long & "$jniinput"
601
- %typemap(javadirectorout) const unsigned long long & "$javacall"
602
-
603
- /* Default handling. Object passed by value. Convert to a pointer */
604
- %typemap(in) SWIGTYPE ($&1_type argp)
605
- %{ argp = *($&1_ltype*)&$input;
606
- if (!argp) {
607
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null $1_type");
608
- return $null;
609
- }
610
- $1 = *argp; %}
611
-
612
- %typemap(directorout) SWIGTYPE ($&1_type argp)
613
- %{ argp = *($&1_ltype*)&$input;
614
- if (!argp) {
615
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
616
- return $null;
617
- }
618
- $result = *argp; %}
619
-
620
- %typemap(out) SWIGTYPE
621
- #ifdef __cplusplus
622
- %{ *($&1_ltype*)&$result = new $1_ltype((const $1_ltype &)$1); %}
623
- #else
624
- {
625
- $&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
626
- memmove($1ptr, &$1, sizeof($1_type));
627
- *($&1_ltype*)&$result = $1ptr;
628
- }
629
- #endif
630
-
631
- %typemap(directorin,descriptor="L$packagepath/$&javaclassname;") SWIGTYPE
632
- %{ $input = 0;
633
- *(($&1_ltype*)&$input) = &$1; %}
634
- %typemap(javadirectorin) SWIGTYPE "new $&javaclassname($jniinput, false)"
635
- %typemap(javadirectorout) SWIGTYPE "$&javaclassname.getCPtr($javacall)"
636
-
637
- /* Generic pointers and references */
638
- %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %}
639
- %typemap(in, fragment="SWIG_UnPackData") SWIGTYPE (CLASS::*) {
640
- const char *temp = 0;
641
- if ($input) {
642
- temp = JCALL2(GetStringUTFChars, jenv, $input, 0);
643
- if (!temp) return $null;
644
- }
645
- SWIG_UnpackData(temp, (void *)&$1, sizeof($1));
646
- }
647
- %typemap(in) SWIGTYPE & %{ $1 = *($&1_ltype)&$input;
648
- if (!$1) {
649
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null");
650
- return $null;
651
- } %}
652
- %typemap(out) SWIGTYPE *
653
- %{ *($&1_ltype)&$result = $1; %}
654
- %typemap(out, fragment="SWIG_PackData", noblock=1) SWIGTYPE (CLASS::*) {
655
- char buf[128];
656
- char *data = SWIG_PackData(buf, (void *)&$1, sizeof($1));
657
- *data = '\0';
658
- $result = JCALL1(NewStringUTF, jenv, buf);
659
- }
660
- %typemap(out) SWIGTYPE &
661
- %{ *($&1_ltype)&$result = $1; %}
662
-
663
- %typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *
664
- %{ $result = *($&1_ltype)&$input; %}
665
- %typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE (CLASS::*)
666
- %{ $result = *($&1_ltype)&$input; %}
667
-
668
- %typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE *
669
- %{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
670
- %typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE (CLASS::*)
671
- %{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
672
-
673
- %typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE &
674
- %{ if (!$input) {
675
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
676
- return $null;
677
- }
678
- $result = *($&1_ltype)&$input; %}
679
- %typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE &
680
- %{ *($&1_ltype)&$input = ($1_ltype) &$1; %}
681
-
682
- %typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*) "($jniinput == 0) ? null : new $javaclassname($jniinput, false)"
683
- %typemap(javadirectorin) SWIGTYPE & "new $javaclassname($jniinput, false)"
684
- %typemap(javadirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "$javaclassname.getCPtr($javacall)"
685
-
686
- /* Default array handling */
687
- %typemap(in) SWIGTYPE [] %{ $1 = *($&1_ltype)&$input; %}
688
- %typemap(out) SWIGTYPE [] %{ *($&1_ltype)&$result = $1; %}
689
- %typemap(freearg) SWIGTYPE [ANY], SWIGTYPE [] ""
690
-
691
- /* char arrays - treat as String */
692
- %typemap(in, noblock=1) char[ANY], char[] {
693
- $1 = 0;
694
- if ($input) {
695
- $1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
696
- if (!$1) return $null;
697
- }
698
- }
699
-
700
- %typemap(directorout, noblock=1) char[ANY], char[] {
701
- $1 = 0;
702
- if ($input) {
703
- $result = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
704
- if (!$result) return $null;
705
- }
706
- }
707
-
708
- %typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char[ANY], char[] {
709
- $input = 0;
710
- if ($1) {
711
- $input = JCALL1(NewStringUTF, jenv, (const char *)$1);
712
- if (!$input) return $null;
713
- }
714
- }
715
-
716
- %typemap(argout) char[ANY], char[] ""
717
- %typemap(freearg, noblock=1) char[ANY], char[] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
718
- %typemap(out, noblock=1) char[ANY], char[] { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
719
- %typemap(javadirectorin) char[ANY], char[] "$jniinput"
720
- %typemap(javadirectorout) char[ANY], char[] "$javacall"
721
-
722
- /* JNI types */
723
- %typemap(in) jboolean,
724
- jchar,
725
- jbyte,
726
- jshort,
727
- jint,
728
- jlong,
729
- jfloat,
730
- jdouble,
731
- jstring,
732
- jobject,
733
- jbooleanArray,
734
- jcharArray,
735
- jbyteArray,
736
- jshortArray,
737
- jintArray,
738
- jlongArray,
739
- jfloatArray,
740
- jdoubleArray,
741
- jobjectArray
742
- %{ $1 = $input; %}
743
-
744
- %typemap(directorout) jboolean,
745
- jchar,
746
- jbyte,
747
- jshort,
748
- jint,
749
- jlong,
750
- jfloat,
751
- jdouble,
752
- jstring,
753
- jobject,
754
- jbooleanArray,
755
- jcharArray,
756
- jbyteArray,
757
- jshortArray,
758
- jintArray,
759
- jlongArray,
760
- jfloatArray,
761
- jdoubleArray,
762
- jobjectArray
763
- %{ $result = $input; %}
764
-
765
- %typemap(out) jboolean,
766
- jchar,
767
- jbyte,
768
- jshort,
769
- jint,
770
- jlong,
771
- jfloat,
772
- jdouble,
773
- jstring,
774
- jobject,
775
- jbooleanArray,
776
- jcharArray,
777
- jbyteArray,
778
- jshortArray,
779
- jintArray,
780
- jlongArray,
781
- jfloatArray,
782
- jdoubleArray,
783
- jobjectArray
784
- %{ $result = $1; %}
785
-
786
- %typemap(directorin,descriptor="Z") jboolean "$input = $1;"
787
- %typemap(directorin,descriptor="C") jchar "$input = $1;"
788
- %typemap(directorin,descriptor="B") jbyte "$input = $1;"
789
- %typemap(directorin,descriptor="S") jshort "$input = $1;"
790
- %typemap(directorin,descriptor="I") jint "$input = $1;"
791
- %typemap(directorin,descriptor="J") jlong "$input = $1;"
792
- %typemap(directorin,descriptor="F") jfloat "$input = $1;"
793
- %typemap(directorin,descriptor="D") jdouble "$input = $1;"
794
- %typemap(directorin,descriptor="Ljava/lang/String;") jstring "$input = $1;"
795
- %typemap(directorin,descriptor="Ljava/lang/Object;",nouse="1") jobject "$input = $1;"
796
- %typemap(directorin,descriptor="[Z") jbooleanArray "$input = $1;"
797
- %typemap(directorin,descriptor="[C") jcharArray "$input = $1;"
798
- %typemap(directorin,descriptor="[B") jbyteArray "$input = $1;"
799
- %typemap(directorin,descriptor="[S") jshortArray "$input = $1;"
800
- %typemap(directorin,descriptor="[I") jintArray "$input = $1;"
801
- %typemap(directorin,descriptor="[J") jlongArray "$input = $1;"
802
- %typemap(directorin,descriptor="[F") jfloatArray "$input = $1;"
803
- %typemap(directorin,descriptor="[D") jdoubleArray "$input = $1;"
804
- %typemap(directorin,descriptor="[Ljava/lang/Object;",nouse="1") jobjectArray "$input = $1;"
805
-
806
- %typemap(javadirectorin) jboolean,
807
- jchar,
808
- jbyte,
809
- jshort,
810
- jint,
811
- jlong,
812
- jfloat,
813
- jdouble,
814
- jstring,
815
- jobject,
816
- jbooleanArray,
817
- jcharArray,
818
- jbyteArray,
819
- jshortArray,
820
- jintArray,
821
- jlongArray,
822
- jfloatArray,
823
- jdoubleArray,
824
- jobjectArray
825
- "$jniinput"
826
-
827
- %typemap(javadirectorout) jboolean,
828
- jchar,
829
- jbyte,
830
- jshort,
831
- jint,
832
- jlong,
833
- jfloat,
834
- jdouble,
835
- jstring,
836
- jobject,
837
- jbooleanArray,
838
- jcharArray,
839
- jbyteArray,
840
- jshortArray,
841
- jintArray,
842
- jlongArray,
843
- jfloatArray,
844
- jdoubleArray,
845
- jobjectArray
846
- "$javacall"
847
-
848
- /* Typecheck typemaps - The purpose of these is merely to issue a warning for overloaded C++ functions
849
- * that cannot be overloaded in Java as more than one C++ type maps to a single Java type */
850
-
851
- %typecheck(SWIG_TYPECHECK_BOOL) /* Java boolean */
852
- jboolean,
853
- bool,
854
- const bool &
855
- ""
856
-
857
- %typecheck(SWIG_TYPECHECK_CHAR) /* Java char */
858
- jchar,
859
- char,
860
- const char &
861
- ""
862
-
863
- %typecheck(SWIG_TYPECHECK_INT8) /* Java byte */
864
- jbyte,
865
- signed char,
866
- const signed char &
867
- ""
868
-
869
- %typecheck(SWIG_TYPECHECK_INT16) /* Java short */
870
- jshort,
871
- unsigned char,
872
- short,
873
- const unsigned char &,
874
- const short &
875
- ""
876
-
877
- %typecheck(SWIG_TYPECHECK_INT32) /* Java int */
878
- jint,
879
- unsigned short,
880
- int,
881
- long,
882
- const unsigned short &,
883
- const int &,
884
- const long &
885
- ""
886
-
887
- %typecheck(SWIG_TYPECHECK_INT64) /* Java long */
888
- jlong,
889
- unsigned int,
890
- unsigned long,
891
- long long,
892
- const unsigned int &,
893
- const unsigned long &,
894
- const long long &
895
- ""
896
-
897
- %typecheck(SWIG_TYPECHECK_INT128) /* Java BigInteger */
898
- unsigned long long,
899
- const unsigned long long &
900
- ""
901
-
902
- %typecheck(SWIG_TYPECHECK_FLOAT) /* Java float */
903
- jfloat,
904
- float,
905
- const float &
906
- ""
907
-
908
- %typecheck(SWIG_TYPECHECK_DOUBLE) /* Java double */
909
- jdouble,
910
- double,
911
- const double &
912
- ""
913
-
914
- %typecheck(SWIG_TYPECHECK_STRING) /* Java String */
915
- jstring,
916
- char *,
917
- char *&,
918
- char[ANY],
919
- char []
920
- ""
921
-
922
- %typecheck(SWIG_TYPECHECK_BOOL_ARRAY) /* Java boolean[] */
923
- jbooleanArray
924
- ""
925
-
926
- %typecheck(SWIG_TYPECHECK_CHAR_ARRAY) /* Java char[] */
927
- jcharArray
928
- ""
929
-
930
- %typecheck(SWIG_TYPECHECK_INT8_ARRAY) /* Java byte[] */
931
- jbyteArray
932
- ""
933
-
934
- %typecheck(SWIG_TYPECHECK_INT16_ARRAY) /* Java short[] */
935
- jshortArray
936
- ""
937
-
938
- %typecheck(SWIG_TYPECHECK_INT32_ARRAY) /* Java int[] */
939
- jintArray
940
- ""
941
-
942
- %typecheck(SWIG_TYPECHECK_INT64_ARRAY) /* Java long[] */
943
- jlongArray
944
- ""
945
-
946
- %typecheck(SWIG_TYPECHECK_FLOAT_ARRAY) /* Java float[] */
947
- jfloatArray
948
- ""
949
-
950
- %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY) /* Java double[] */
951
- jdoubleArray
952
- ""
953
-
954
- %typecheck(SWIG_TYPECHECK_OBJECT_ARRAY) /* Java jobject[] */
955
- jobjectArray
956
- ""
957
-
958
- %typecheck(SWIG_TYPECHECK_POINTER) /* Default */
959
- SWIGTYPE,
960
- SWIGTYPE *,
961
- SWIGTYPE &,
962
- SWIGTYPE *const&,
963
- SWIGTYPE [],
964
- SWIGTYPE (CLASS::*)
965
- ""
966
-
967
-
968
- /* Exception handling */
969
-
970
- %typemap(throws) int,
971
- long,
972
- short,
973
- unsigned int,
974
- unsigned long,
975
- unsigned short
976
- %{ char error_msg[256];
977
- sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
978
- SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, error_msg);
979
- return $null; %}
980
-
981
- %typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY]
982
- %{ (void)$1;
983
- SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
984
- return $null; %}
985
-
986
- %typemap(throws) char *
987
- %{ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1);
988
- return $null; %}
989
-
990
-
991
- /* Typemaps for code generation in proxy classes and Java type wrapper classes */
992
-
993
- /* The javain typemap is used for converting function parameter types from the type
994
- * used in the proxy, module or type wrapper class to the type used in the JNI class. */
995
- %typemap(javain) bool, const bool &,
996
- char, const char &,
997
- signed char, const signed char &,
998
- unsigned char, const unsigned char &,
999
- short, const short &,
1000
- unsigned short, const unsigned short &,
1001
- int, const int &,
1002
- unsigned int, const unsigned int &,
1003
- long, const long &,
1004
- unsigned long, const unsigned long &,
1005
- long long, const long long &,
1006
- unsigned long long, const unsigned long long &,
1007
- float, const float &,
1008
- double, const double &
1009
- "$javainput"
1010
- %typemap(javain) char *, char *&, char[ANY], char[] "$javainput"
1011
- %typemap(javain) jboolean,
1012
- jchar,
1013
- jbyte,
1014
- jshort,
1015
- jint,
1016
- jlong,
1017
- jfloat,
1018
- jdouble,
1019
- jstring,
1020
- jobject,
1021
- jbooleanArray,
1022
- jcharArray,
1023
- jbyteArray,
1024
- jshortArray,
1025
- jintArray,
1026
- jlongArray,
1027
- jfloatArray,
1028
- jdoubleArray,
1029
- jobjectArray
1030
- "$javainput"
1031
- %typemap(javain) SWIGTYPE "$&javaclassname.getCPtr($javainput)"
1032
- %typemap(javain) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] "$javaclassname.getCPtr($javainput)"
1033
- %typemap(javain) SWIGTYPE (CLASS::*) "$javaclassname.getCMemberPtr($javainput)"
1034
-
1035
- /* The javaout typemap is used for converting function return types from the return type
1036
- * used in the JNI class to the type returned by the proxy, module or type wrapper class. */
1037
- %typemap(javaout) bool, const bool &,
1038
- char, const char &,
1039
- signed char, const signed char &,
1040
- unsigned char, const unsigned char &,
1041
- short, const short &,
1042
- unsigned short, const unsigned short &,
1043
- int, const int &,
1044
- unsigned int, const unsigned int &,
1045
- long, const long &,
1046
- unsigned long, const unsigned long &,
1047
- long long, const long long &,
1048
- unsigned long long, const unsigned long long &,
1049
- float, const float &,
1050
- double, const double & {
1051
- return $jnicall;
1052
- }
1053
- %typemap(javaout) char *, char *&, char[ANY], char[] {
1054
- return $jnicall;
1055
- }
1056
- %typemap(javaout) jboolean,
1057
- jchar,
1058
- jbyte,
1059
- jshort,
1060
- jint,
1061
- jlong,
1062
- jfloat,
1063
- jdouble,
1064
- jstring,
1065
- jobject,
1066
- jbooleanArray,
1067
- jcharArray,
1068
- jbyteArray,
1069
- jshortArray,
1070
- jintArray,
1071
- jlongArray,
1072
- jfloatArray,
1073
- jdoubleArray,
1074
- jobjectArray {
1075
- return $jnicall;
1076
- }
1077
- %typemap(javaout) void {
1078
- $jnicall;
1079
- }
1080
- %typemap(javaout) SWIGTYPE {
1081
- return new $&javaclassname($jnicall, true);
1082
- }
1083
- %typemap(javaout) SWIGTYPE & {
1084
- return new $javaclassname($jnicall, $owner);
1085
- }
1086
- %typemap(javaout) SWIGTYPE *, SWIGTYPE [] {
1087
- long cPtr = $jnicall;
1088
- return (cPtr == 0) ? null : new $javaclassname(cPtr, $owner);
1089
- }
1090
- %typemap(javaout) SWIGTYPE (CLASS::*) {
1091
- String cMemberPtr = $jnicall;
1092
- return (cMemberPtr == null) ? null : new $javaclassname(cMemberPtr, $owner);
1093
- }
1094
-
1095
- /* Pointer reference typemaps */
1096
- %typemap(jni) SWIGTYPE *const& "jlong"
1097
- %typemap(jtype) SWIGTYPE *const& "long"
1098
- %typemap(jstype) SWIGTYPE *const& "$*javaclassname"
1099
- %typemap(javain) SWIGTYPE *const& "$*javaclassname.getCPtr($javainput)"
1100
- %typemap(javaout) SWIGTYPE *const& {
1101
- long cPtr = $jnicall;
1102
- return (cPtr == 0) ? null : new $*javaclassname(cPtr, $owner);
1103
- }
1104
- %typemap(in) SWIGTYPE *const& ($*1_ltype temp = 0)
1105
- %{ temp = *($1_ltype)&$input;
1106
- $1 = ($1_ltype)&temp; %}
1107
- %typemap(out) SWIGTYPE *const&
1108
- %{ *($1_ltype)&$result = *$1; %}
1109
-
1110
- /* Typemaps used for the generation of proxy and type wrapper class code */
1111
- %typemap(javabase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
1112
- %typemap(javaclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
1113
- %typemap(javacode) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
1114
- %typemap(javaimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
1115
- %typemap(javainterfaces) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
1116
-
1117
- /* javabody typemaps */
1118
-
1119
- %define SWIG_JAVABODY_METHODS(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...) SWIG_JAVABODY_PROXY(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE) %enddef // legacy name
1120
-
1121
- %define SWIG_JAVABODY_PROXY(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
1122
- // Base proxy classes
1123
- %typemap(javabody) TYPE %{
1124
- private long swigCPtr;
1125
- protected boolean swigCMemOwn;
1126
-
1127
- PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
1128
- swigCMemOwn = cMemoryOwn;
1129
- swigCPtr = cPtr;
1130
- }
1131
-
1132
- CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
1133
- return (obj == null) ? 0 : obj.swigCPtr;
1134
- }
1135
- %}
1136
-
1137
- // Derived proxy classes
1138
- %typemap(javabody_derived) TYPE %{
1139
- private long swigCPtr;
1140
-
1141
- PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
1142
- super($imclassname.$javaclazznameSWIGUpcast(cPtr), cMemoryOwn);
1143
- swigCPtr = cPtr;
1144
- }
1145
-
1146
- CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
1147
- return (obj == null) ? 0 : obj.swigCPtr;
1148
- }
1149
- %}
1150
- %enddef
1151
-
1152
- %define SWIG_JAVABODY_TYPEWRAPPER(PTRCTOR_VISIBILITY, DEFAULTCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
1153
- // Typewrapper classes
1154
- %typemap(javabody) TYPE *, TYPE &, TYPE [] %{
1155
- private long swigCPtr;
1156
-
1157
- PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean futureUse) {
1158
- swigCPtr = cPtr;
1159
- }
1160
-
1161
- DEFAULTCTOR_VISIBILITY $javaclassname() {
1162
- swigCPtr = 0;
1163
- }
1164
-
1165
- CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
1166
- return (obj == null) ? 0 : obj.swigCPtr;
1167
- }
1168
- %}
1169
-
1170
- %typemap(javabody) TYPE (CLASS::*) %{
1171
- private String swigCMemberPtr;
1172
-
1173
- PTRCTOR_VISIBILITY $javaclassname(String cMemberPtr, boolean futureUse) {
1174
- swigCMemberPtr = cMemberPtr;
1175
- }
1176
-
1177
- DEFAULTCTOR_VISIBILITY $javaclassname() {
1178
- swigCMemberPtr = null;
1179
- }
1180
-
1181
- CPTR_VISIBILITY static String getCMemberPtr($javaclassname obj) {
1182
- return obj.swigCMemberPtr;
1183
- }
1184
- %}
1185
- %enddef
1186
-
1187
- /* Set the default javabody typemaps to use protected visibility.
1188
- Use the macros to change to public if using multiple modules. */
1189
- SWIG_JAVABODY_PROXY(protected, protected, SWIGTYPE)
1190
- SWIG_JAVABODY_TYPEWRAPPER(protected, protected, protected, SWIGTYPE)
1191
-
1192
- %typemap(javafinalize) SWIGTYPE %{
1193
- protected void finalize() {
1194
- delete();
1195
- }
1196
- %}
1197
-
1198
- /*
1199
- * Java constructor typemaps:
1200
- *
1201
- * The javaconstruct typemap is inserted when a proxy class's constructor is generated.
1202
- * This typemap allows control over what code is executed in the constructor as
1203
- * well as specifying who owns the underlying C/C++ object. Normally, Java has
1204
- * ownership and the underlying C/C++ object is deallocated when the Java object
1205
- * is finalized (swigCMemOwn is true.) If swigCMemOwn is false, C/C++ is
1206
- * ultimately responsible for deallocating the underlying object's memory.
1207
- *
1208
- * The SWIG_PROXY_CONSTRUCTOR macro defines the javaconstruct typemap for a proxy
1209
- * class for a particular TYPENAME. OWNERSHIP is passed as the value of
1210
- * swigCMemOwn to the pointer constructor method. WEAKREF determines which kind
1211
- * of Java object reference will be used by the C++ director class (WeakGlobalRef
1212
- * vs. GlobalRef.)
1213
- *
1214
- * The SWIG_DIRECTOR_OWNED macro sets the ownership of director-based proxy
1215
- * classes and the weak reference flag to false, meaning that the underlying C++
1216
- * object will be reclaimed by C++.
1217
- */
1218
-
1219
- %define SWIG_PROXY_CONSTRUCTOR(OWNERSHIP, WEAKREF, TYPENAME...)
1220
- %typemap(javaconstruct,directorconnect="\n $imclassname.$javaclazznamedirector_connect(this, swigCPtr, swigCMemOwn, WEAKREF);") TYPENAME {
1221
- this($imcall, OWNERSHIP);$directorconnect
1222
- }
1223
- %enddef
1224
-
1225
- %define SWIG_DIRECTOR_OWNED(TYPENAME...)
1226
- SWIG_PROXY_CONSTRUCTOR(true, false, TYPENAME)
1227
- %enddef
1228
-
1229
- // Set the default for SWIGTYPE: Java owns the C/C++ object.
1230
- SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
1231
-
1232
- %typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
1233
- if (swigCPtr != 0) {
1234
- if (swigCMemOwn) {
1235
- swigCMemOwn = false;
1236
- $jnicall;
1237
- }
1238
- swigCPtr = 0;
1239
- }
1240
- }
1241
-
1242
- %typemap(javadestruct_derived, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
1243
- if (swigCPtr != 0) {
1244
- if (swigCMemOwn) {
1245
- swigCMemOwn = false;
1246
- $jnicall;
1247
- }
1248
- swigCPtr = 0;
1249
- }
1250
- super.delete();
1251
- }
1252
-
1253
- %typemap(directordisconnect, methodname="swigDirectorDisconnect") SWIGTYPE %{
1254
- protected void $methodname() {
1255
- swigCMemOwn = false;
1256
- $jnicall;
1257
- }
1258
- %}
1259
-
1260
- %typemap(directorowner_release, methodname="swigReleaseOwnership") SWIGTYPE %{
1261
- public void $methodname() {
1262
- swigCMemOwn = false;
1263
- $jnicall;
1264
- }
1265
- %}
1266
-
1267
- %typemap(directorowner_take, methodname="swigTakeOwnership") SWIGTYPE %{
1268
- public void $methodname() {
1269
- swigCMemOwn = true;
1270
- $jnicall;
1271
- }
1272
- %}
1273
-
1274
- /* Java specific directives */
1275
- #define %javaconst(flag) %feature("java:const","flag")
1276
- #define %javaconstvalue(value) %feature("java:constvalue",value)
1277
- #define %javaenum(wrapapproach) %feature("java:enum","wrapapproach")
1278
- #define %javamethodmodifiers %feature("java:methodmodifiers")
1279
- #define %javaexception(exceptionclasses) %feature("except",throws=exceptionclasses)
1280
- #define %nojavaexception %feature("except","0",throws="")
1281
- #define %clearjavaexception %feature("except","",throws="")
1282
-
1283
- %pragma(java) jniclassclassmodifiers="public class"
1284
- %pragma(java) moduleclassmodifiers="public class"
1285
-
1286
- /* Some ANSI C typemaps */
1287
-
1288
- %apply unsigned long { size_t };
1289
- %apply const unsigned long & { const size_t & };
1290
-
1291
- /* Array reference typemaps */
1292
- %apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }
1293
-
1294
- /* const pointers */
1295
- %apply SWIGTYPE * { SWIGTYPE *const }
1296
-
1297
- /* String & length */
1298
- %typemap(jni) (char *STRING, size_t LENGTH) "jbyteArray"
1299
- %typemap(jtype) (char *STRING, size_t LENGTH) "byte[]"
1300
- %typemap(jstype) (char *STRING, size_t LENGTH) "byte[]"
1301
- %typemap(javain) (char *STRING, size_t LENGTH) "$javainput"
1302
- %typemap(freearg) (char *STRING, size_t LENGTH) ""
1303
- %typemap(in) (char *STRING, size_t LENGTH) {
1304
- if ($input) {
1305
- $1 = (char *) JCALL2(GetByteArrayElements, jenv, $input, 0);
1306
- $2 = (size_t) JCALL1(GetArrayLength, jenv, $input);
1307
- } else {
1308
- $1 = 0;
1309
- $2 = 0;
1310
- }
1311
- }
1312
- %typemap(argout) (char *STRING, size_t LENGTH) {
1313
- if ($input) JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte *)$1, 0);
1314
- }
1315
- %typemap(directorin, descriptor="[B") (char *STRING, size_t LENGTH) {
1316
- jbyteArray jb = (jenv)->NewByteArray($2);
1317
- (jenv)->SetByteArrayRegion(jb, 0, $2, (jbyte *)$1);
1318
- $input = jb;
1319
- }
1320
- %typemap(directorargout) (char *STRING, size_t LENGTH)
1321
- %{(jenv)->GetByteArrayRegion($input, 0, $2, (jbyte *)$1); %}
1322
- %apply (char *STRING, size_t LENGTH) { (char *STRING, int LENGTH) }
1323
-
1324
- /* java keywords */
1325
- %include <javakw.swg>
1326
-
1327
- // Default enum handling
1328
- %include <enumtypesafe.swg>
1329
-