ctags.rb 1.0.0 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +2 -1
  3. data/README.md +49 -0
  4. data/Rakefile +19 -0
  5. data/bench.rb +28 -0
  6. data/ctags.rb.gemspec +1 -1
  7. data/ext/.gitignore +1 -1
  8. data/ext/extconf.rb +30 -6
  9. data/ext/vendor/exuberant-ctags/entry.c +70 -1
  10. data/ext/vendor/exuberant-ctags/main.c +68 -7
  11. data/ext/vendor/exuberant-ctags/options.c +12 -12
  12. data/ext/vendor/exuberant-ctags/options.h +1 -1
  13. data/ext/vendor/exuberant-ctags/parse.c +2 -2
  14. data/ext/vendor/exuberant-ctags/read.c +8 -3
  15. data/ext/vendor/exuberant-ctags/read.h +4 -1
  16. data/ext/vendor/exuberant-ctags/routines.c +31 -8
  17. data/ext/vendor/exuberant-ctags/ruby.c +62 -7
  18. data/ext/vendor/fmemopen/README.md +49 -0
  19. data/ext/vendor/fmemopen/fmemopen.c +92 -0
  20. data/ext/vendor/fmemopen/fmemopen.h +52 -0
  21. data/ext/vendor/jansson-2.5/CHANGES +554 -0
  22. data/ext/vendor/jansson-2.5/LICENSE +19 -0
  23. data/ext/vendor/jansson-2.5/Makefile.am +15 -0
  24. data/ext/vendor/jansson-2.5/Makefile.in +825 -0
  25. data/ext/vendor/jansson-2.5/README.rst +63 -0
  26. data/ext/vendor/jansson-2.5/aclocal.m4 +9674 -0
  27. data/ext/vendor/jansson-2.5/config.guess +1530 -0
  28. data/ext/vendor/jansson-2.5/config.h.in +84 -0
  29. data/ext/vendor/jansson-2.5/config.sub +1782 -0
  30. data/ext/vendor/jansson-2.5/configure +13931 -0
  31. data/ext/vendor/jansson-2.5/configure.ac +57 -0
  32. data/ext/vendor/jansson-2.5/depcomp +708 -0
  33. data/ext/vendor/jansson-2.5/doc/Makefile.am +20 -0
  34. data/ext/vendor/jansson-2.5/doc/Makefile.in +401 -0
  35. data/ext/vendor/jansson-2.5/doc/README +5 -0
  36. data/ext/vendor/jansson-2.5/doc/apiref.rst +1487 -0
  37. data/ext/vendor/jansson-2.5/doc/changes.rst +5 -0
  38. data/ext/vendor/jansson-2.5/doc/conf.py +217 -0
  39. data/ext/vendor/jansson-2.5/doc/conformance.rst +114 -0
  40. data/ext/vendor/jansson-2.5/doc/ext/refcounting.py +59 -0
  41. data/ext/vendor/jansson-2.5/doc/gettingstarted.rst +237 -0
  42. data/ext/vendor/jansson-2.5/doc/github_commits.c +192 -0
  43. data/ext/vendor/jansson-2.5/doc/index.rst +53 -0
  44. data/ext/vendor/jansson-2.5/doc/portability.rst +52 -0
  45. data/ext/vendor/jansson-2.5/doc/tutorial.rst +286 -0
  46. data/ext/vendor/jansson-2.5/doc/upgrading.rst +76 -0
  47. data/ext/vendor/jansson-2.5/install-sh +527 -0
  48. data/ext/vendor/jansson-2.5/jansson.pc.in +10 -0
  49. data/ext/vendor/jansson-2.5/ltmain.sh +9661 -0
  50. data/ext/vendor/jansson-2.5/missing +331 -0
  51. data/ext/vendor/jansson-2.5/src/Makefile.am +24 -0
  52. data/ext/vendor/jansson-2.5/src/Makefile.in +613 -0
  53. data/ext/vendor/jansson-2.5/src/dump.c +456 -0
  54. data/ext/vendor/jansson-2.5/src/error.c +63 -0
  55. data/ext/vendor/jansson-2.5/src/hashtable.c +360 -0
  56. data/ext/vendor/jansson-2.5/src/hashtable.h +180 -0
  57. data/ext/vendor/jansson-2.5/src/jansson.def +63 -0
  58. data/ext/vendor/jansson-2.5/src/jansson.h +281 -0
  59. data/ext/vendor/jansson-2.5/src/jansson_config.h +39 -0
  60. data/ext/vendor/jansson-2.5/src/jansson_config.h.in +39 -0
  61. data/ext/vendor/jansson-2.5/src/jansson_private.h +93 -0
  62. data/ext/vendor/jansson-2.5/src/load.c +1077 -0
  63. data/ext/vendor/jansson-2.5/src/memory.c +56 -0
  64. data/ext/vendor/jansson-2.5/src/pack_unpack.c +762 -0
  65. data/ext/vendor/jansson-2.5/src/strbuffer.c +116 -0
  66. data/ext/vendor/jansson-2.5/src/strbuffer.h +33 -0
  67. data/ext/vendor/jansson-2.5/src/strconv.c +134 -0
  68. data/ext/vendor/jansson-2.5/src/utf.c +190 -0
  69. data/ext/vendor/jansson-2.5/src/utf.h +39 -0
  70. data/ext/vendor/jansson-2.5/src/value.c +950 -0
  71. data/ext/vendor/jansson-2.5/test/Makefile.am +10 -0
  72. data/ext/vendor/jansson-2.5/test/Makefile.in +684 -0
  73. data/ext/vendor/jansson-2.5/test/bin/Makefile.am +5 -0
  74. data/ext/vendor/jansson-2.5/test/bin/Makefile.in +498 -0
  75. data/ext/vendor/jansson-2.5/test/bin/json_process.c +349 -0
  76. data/ext/vendor/jansson-2.5/test/run-suites +50 -0
  77. data/ext/vendor/jansson-2.5/test/scripts/run-tests.sh +100 -0
  78. data/ext/vendor/jansson-2.5/test/scripts/valgrind.sh +35 -0
  79. data/ext/vendor/jansson-2.5/test/suites/Makefile.am +2 -0
  80. data/ext/vendor/jansson-2.5/test/suites/Makefile.in +580 -0
  81. data/ext/vendor/jansson-2.5/test/suites/api/Makefile.am +34 -0
  82. data/ext/vendor/jansson-2.5/test/suites/api/Makefile.in +632 -0
  83. data/ext/vendor/jansson-2.5/test/suites/api/check-exports +23 -0
  84. data/ext/vendor/jansson-2.5/test/suites/api/run +36 -0
  85. data/ext/vendor/jansson-2.5/test/suites/api/test_array.c +432 -0
  86. data/ext/vendor/jansson-2.5/test/suites/api/test_copy.c +318 -0
  87. data/ext/vendor/jansson-2.5/test/suites/api/test_dump.c +190 -0
  88. data/ext/vendor/jansson-2.5/test/suites/api/test_dump_callback.c +81 -0
  89. data/ext/vendor/jansson-2.5/test/suites/api/test_equal.c +189 -0
  90. data/ext/vendor/jansson-2.5/test/suites/api/test_load.c +166 -0
  91. data/ext/vendor/jansson-2.5/test/suites/api/test_load_callback.c +75 -0
  92. data/ext/vendor/jansson-2.5/test/suites/api/test_loadb.c +36 -0
  93. data/ext/vendor/jansson-2.5/test/suites/api/test_memory_funcs.c +82 -0
  94. data/ext/vendor/jansson-2.5/test/suites/api/test_number.c +73 -0
  95. data/ext/vendor/jansson-2.5/test/suites/api/test_object.c +511 -0
  96. data/ext/vendor/jansson-2.5/test/suites/api/test_pack.c +283 -0
  97. data/ext/vendor/jansson-2.5/test/suites/api/test_simple.c +199 -0
  98. data/ext/vendor/jansson-2.5/test/suites/api/test_unpack.c +373 -0
  99. data/ext/vendor/jansson-2.5/test/suites/api/util.h +74 -0
  100. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/encoded-surrogate-half/error +2 -0
  101. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/encoded-surrogate-half/input +1 -0
  102. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-after-backslash/error +2 -0
  103. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input +1 -0
  104. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-array/error +2 -0
  105. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-array/input +1 -0
  106. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/error +2 -0
  107. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input +1 -0
  108. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-escape/error +2 -0
  109. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-escape/input +1 -0
  110. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-exponent/error +2 -0
  111. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input +1 -0
  112. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-identifier/error +2 -0
  113. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input +1 -0
  114. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-int/error +2 -0
  115. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-int/input +1 -0
  116. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/error +2 -0
  117. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input +1 -0
  118. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-string/error +2 -0
  119. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-string/input +1 -0
  120. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-invalid-utf-8/error +2 -0
  121. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-invalid-utf-8/input +1 -0
  122. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-utf-8-continuation-byte/error +2 -0
  123. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input +1 -0
  124. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/not-in-unicode-range/error +2 -0
  125. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/not-in-unicode-range/input +1 -0
  126. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-3-byte-encoding/error +2 -0
  127. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-3-byte-encoding/input +1 -0
  128. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-4-byte-encoding/error +2 -0
  129. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-4-byte-encoding/input +1 -0
  130. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-ascii-encoding/error +2 -0
  131. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-ascii-encoding/input +1 -0
  132. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/restricted-utf-8/error +2 -0
  133. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/restricted-utf-8/input +1 -0
  134. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/run +27 -0
  135. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/truncated-utf-8/error +2 -0
  136. data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/truncated-utf-8/input +1 -0
  137. data/ext/vendor/jansson-2.5/test/suites/invalid/apostrophe/error +2 -0
  138. data/ext/vendor/jansson-2.5/test/suites/invalid/apostrophe/input +1 -0
  139. data/ext/vendor/jansson-2.5/test/suites/invalid/ascii-unicode-identifier/error +2 -0
  140. data/ext/vendor/jansson-2.5/test/suites/invalid/ascii-unicode-identifier/input +1 -0
  141. data/ext/vendor/jansson-2.5/test/suites/invalid/brace-comma/error +2 -0
  142. data/ext/vendor/jansson-2.5/test/suites/invalid/brace-comma/input +1 -0
  143. data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-comma/error +2 -0
  144. data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-comma/input +1 -0
  145. data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/error.normal +2 -0
  146. data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/error.strip +2 -0
  147. data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/input +1 -0
  148. data/ext/vendor/jansson-2.5/test/suites/invalid/empty/error +2 -0
  149. data/ext/vendor/jansson-2.5/test/suites/invalid/empty/input +0 -0
  150. data/ext/vendor/jansson-2.5/test/suites/invalid/escaped-null-byte-in-string/error +2 -0
  151. data/ext/vendor/jansson-2.5/test/suites/invalid/escaped-null-byte-in-string/input +1 -0
  152. data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-array/error +2 -0
  153. data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-array/input +1 -0
  154. data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-multiline-array/error +2 -0
  155. data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-multiline-array/input +6 -0
  156. data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-after-newline/error +2 -0
  157. data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-after-newline/input +2 -0
  158. data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-at-the-end/error +2 -0
  159. data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-at-the-end/input +1 -0
  160. data/ext/vendor/jansson-2.5/test/suites/invalid/integer-starting-with-zero/error +2 -0
  161. data/ext/vendor/jansson-2.5/test/suites/invalid/integer-starting-with-zero/input +1 -0
  162. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-escape/error +2 -0
  163. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-escape/input +1 -0
  164. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-identifier/error +2 -0
  165. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-identifier/input +1 -0
  166. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-integer/error +2 -0
  167. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-integer/input +1 -0
  168. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-real/error +2 -0
  169. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-real/input +1 -0
  170. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-second-surrogate/error +2 -0
  171. data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-second-surrogate/input +1 -0
  172. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/error.normal +2 -0
  173. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/error.strip +2 -0
  174. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/input +1 -0
  175. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/error.normal +2 -0
  176. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/error.strip +2 -0
  177. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/input +1 -0
  178. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-second-surrogate/error +2 -0
  179. data/ext/vendor/jansson-2.5/test/suites/invalid/lone-second-surrogate/input +1 -0
  180. data/ext/vendor/jansson-2.5/test/suites/invalid/minus-sign-without-number/error +2 -0
  181. data/ext/vendor/jansson-2.5/test/suites/invalid/minus-sign-without-number/input +1 -0
  182. data/ext/vendor/jansson-2.5/test/suites/invalid/negative-integer-starting-with-zero/error +2 -0
  183. data/ext/vendor/jansson-2.5/test/suites/invalid/negative-integer-starting-with-zero/input +1 -0
  184. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/error +2 -0
  185. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/input +0 -0
  186. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/nostrip +2 -0
  187. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/error +2 -0
  188. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/input +0 -0
  189. data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/nostrip +2 -0
  190. data/ext/vendor/jansson-2.5/test/suites/invalid/null/error +2 -0
  191. data/ext/vendor/jansson-2.5/test/suites/invalid/null/input +1 -0
  192. data/ext/vendor/jansson-2.5/test/suites/invalid/object-apostrophes/error +2 -0
  193. data/ext/vendor/jansson-2.5/test/suites/invalid/object-apostrophes/input +1 -0
  194. data/ext/vendor/jansson-2.5/test/suites/invalid/object-garbage-at-end/error +2 -0
  195. data/ext/vendor/jansson-2.5/test/suites/invalid/object-garbage-at-end/input +1 -0
  196. data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/error.normal +2 -0
  197. data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/error.strip +2 -0
  198. data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/input +1 -0
  199. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/error.normal +2 -0
  200. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/error.strip +2 -0
  201. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/input +1 -0
  202. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/error.normal +2 -0
  203. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/error.strip +2 -0
  204. data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/input +1 -0
  205. data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/error.normal +2 -0
  206. data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/error.strip +2 -0
  207. data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/input +1 -0
  208. data/ext/vendor/jansson-2.5/test/suites/invalid/real-garbage-after-e/error +2 -0
  209. data/ext/vendor/jansson-2.5/test/suites/invalid/real-garbage-after-e/input +1 -0
  210. data/ext/vendor/jansson-2.5/test/suites/invalid/real-negative-overflow/error +2 -0
  211. data/ext/vendor/jansson-2.5/test/suites/invalid/real-negative-overflow/input +1 -0
  212. data/ext/vendor/jansson-2.5/test/suites/invalid/real-positive-overflow/error +2 -0
  213. data/ext/vendor/jansson-2.5/test/suites/invalid/real-positive-overflow/input +1 -0
  214. data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-e/error +2 -0
  215. data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-e/input +1 -0
  216. data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-point/error +2 -0
  217. data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-point/input +1 -0
  218. data/ext/vendor/jansson-2.5/test/suites/invalid/run +57 -0
  219. data/ext/vendor/jansson-2.5/test/suites/invalid/tab-character-in-string/error +2 -0
  220. data/ext/vendor/jansson-2.5/test/suites/invalid/tab-character-in-string/input +1 -0
  221. data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-negative-integer/error +2 -0
  222. data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-negative-integer/input +1 -0
  223. data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-positive-integer/error +2 -0
  224. data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-positive-integer/input +1 -0
  225. data/ext/vendor/jansson-2.5/test/suites/invalid/truncated-unicode-surrogate/error +2 -0
  226. data/ext/vendor/jansson-2.5/test/suites/invalid/truncated-unicode-surrogate/input +1 -0
  227. data/ext/vendor/jansson-2.5/test/suites/invalid/unicode-identifier/error +2 -0
  228. data/ext/vendor/jansson-2.5/test/suites/invalid/unicode-identifier/input +1 -0
  229. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/error.normal +2 -0
  230. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/error.strip +2 -0
  231. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/input +1 -0
  232. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/error.normal +2 -0
  233. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/error.strip +2 -0
  234. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/input +1 -0
  235. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/error.normal +2 -0
  236. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/error.strip +2 -0
  237. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/input +1 -0
  238. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/error.normal +2 -0
  239. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/error.strip +2 -0
  240. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/input +1 -0
  241. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-object-and-array/error +2 -0
  242. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-object-and-array/input +1 -0
  243. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/error.normal +2 -0
  244. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/error.strip +2 -0
  245. data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/input +1 -0
  246. data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/env +1 -0
  247. data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/input +5 -0
  248. data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/output +1 -0
  249. data/ext/vendor/jansson-2.5/test/suites/valid/empty-array/input +1 -0
  250. data/ext/vendor/jansson-2.5/test/suites/valid/empty-array/output +1 -0
  251. data/ext/vendor/jansson-2.5/test/suites/valid/empty-object-in-array/input +1 -0
  252. data/ext/vendor/jansson-2.5/test/suites/valid/empty-object-in-array/output +1 -0
  253. data/ext/vendor/jansson-2.5/test/suites/valid/empty-object/input +1 -0
  254. data/ext/vendor/jansson-2.5/test/suites/valid/empty-object/output +1 -0
  255. data/ext/vendor/jansson-2.5/test/suites/valid/empty-string/input +1 -0
  256. data/ext/vendor/jansson-2.5/test/suites/valid/empty-string/output +1 -0
  257. data/ext/vendor/jansson-2.5/test/suites/valid/escaped-utf-control-char/input +1 -0
  258. data/ext/vendor/jansson-2.5/test/suites/valid/escaped-utf-control-char/output +1 -0
  259. data/ext/vendor/jansson-2.5/test/suites/valid/false/input +1 -0
  260. data/ext/vendor/jansson-2.5/test/suites/valid/false/output +1 -0
  261. data/ext/vendor/jansson-2.5/test/suites/valid/negative-int/input +1 -0
  262. data/ext/vendor/jansson-2.5/test/suites/valid/negative-int/output +1 -0
  263. data/ext/vendor/jansson-2.5/test/suites/valid/negative-one/input +1 -0
  264. data/ext/vendor/jansson-2.5/test/suites/valid/negative-one/output +1 -0
  265. data/ext/vendor/jansson-2.5/test/suites/valid/negative-zero/input +1 -0
  266. data/ext/vendor/jansson-2.5/test/suites/valid/negative-zero/output +1 -0
  267. data/ext/vendor/jansson-2.5/test/suites/valid/null/input +1 -0
  268. data/ext/vendor/jansson-2.5/test/suites/valid/null/output +1 -0
  269. data/ext/vendor/jansson-2.5/test/suites/valid/one-byte-utf-8/input +1 -0
  270. data/ext/vendor/jansson-2.5/test/suites/valid/one-byte-utf-8/output +1 -0
  271. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-negative-exponent/input +1 -0
  272. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-negative-exponent/output +1 -0
  273. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-positive-exponent/input +1 -0
  274. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-positive-exponent/output +1 -0
  275. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e/input +1 -0
  276. data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e/output +1 -0
  277. data/ext/vendor/jansson-2.5/test/suites/valid/real-exponent/input +1 -0
  278. data/ext/vendor/jansson-2.5/test/suites/valid/real-exponent/output +1 -0
  279. data/ext/vendor/jansson-2.5/test/suites/valid/real-fraction-exponent/input +1 -0
  280. data/ext/vendor/jansson-2.5/test/suites/valid/real-fraction-exponent/output +1 -0
  281. data/ext/vendor/jansson-2.5/test/suites/valid/real-negative-exponent/input +1 -0
  282. data/ext/vendor/jansson-2.5/test/suites/valid/real-negative-exponent/output +1 -0
  283. data/ext/vendor/jansson-2.5/test/suites/valid/real-positive-exponent/input +1 -0
  284. data/ext/vendor/jansson-2.5/test/suites/valid/real-positive-exponent/output +1 -0
  285. data/ext/vendor/jansson-2.5/test/suites/valid/real-underflow/input +1 -0
  286. data/ext/vendor/jansson-2.5/test/suites/valid/real-underflow/output +1 -0
  287. data/ext/vendor/jansson-2.5/test/suites/valid/run +56 -0
  288. data/ext/vendor/jansson-2.5/test/suites/valid/short-string/input +1 -0
  289. data/ext/vendor/jansson-2.5/test/suites/valid/short-string/output +1 -0
  290. data/ext/vendor/jansson-2.5/test/suites/valid/simple-ascii-string/input +1 -0
  291. data/ext/vendor/jansson-2.5/test/suites/valid/simple-ascii-string/output +1 -0
  292. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-0/input +1 -0
  293. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-0/output +1 -0
  294. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-1/input +1 -0
  295. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-1/output +1 -0
  296. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-123/input +1 -0
  297. data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-123/output +1 -0
  298. data/ext/vendor/jansson-2.5/test/suites/valid/simple-object/input +1 -0
  299. data/ext/vendor/jansson-2.5/test/suites/valid/simple-object/output +1 -0
  300. data/ext/vendor/jansson-2.5/test/suites/valid/simple-real/input +1 -0
  301. data/ext/vendor/jansson-2.5/test/suites/valid/simple-real/output +1 -0
  302. data/ext/vendor/jansson-2.5/test/suites/valid/string-escapes/input +1 -0
  303. data/ext/vendor/jansson-2.5/test/suites/valid/string-escapes/output +1 -0
  304. data/ext/vendor/jansson-2.5/test/suites/valid/three-byte-utf-8/input +1 -0
  305. data/ext/vendor/jansson-2.5/test/suites/valid/three-byte-utf-8/output +1 -0
  306. data/ext/vendor/jansson-2.5/test/suites/valid/true/input +1 -0
  307. data/ext/vendor/jansson-2.5/test/suites/valid/true/output +1 -0
  308. data/ext/vendor/jansson-2.5/test/suites/valid/two-byte-utf-8/input +1 -0
  309. data/ext/vendor/jansson-2.5/test/suites/valid/two-byte-utf-8/output +1 -0
  310. data/ext/vendor/jansson-2.5/test/suites/valid/utf-8-string/input +1 -0
  311. data/ext/vendor/jansson-2.5/test/suites/valid/utf-8-string/output +1 -0
  312. data/ext/vendor/jansson-2.5/test/suites/valid/utf-surrogate-four-byte-encoding/input +1 -0
  313. data/ext/vendor/jansson-2.5/test/suites/valid/utf-surrogate-four-byte-encoding/output +1 -0
  314. data/ext/vendor/jansson-2.5/win32/jansson_config.h +39 -0
  315. data/ext/vendor/jansson-2.5/win32/vs2010/jansson.sln +20 -0
  316. data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj +108 -0
  317. data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj.filters +69 -0
  318. data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj.user +3 -0
  319. data/lib/ctags.cnf +2 -0
  320. data/lib/ctags/exuberant.rb +129 -17
  321. data/lib/ctags/version.rb +1 -1
  322. data/test/test_ctags.rb +14 -7
  323. metadata +350 -69
@@ -0,0 +1,5 @@
1
+ ******************
2
+ Changes in Jansson
3
+ ******************
4
+
5
+ .. include:: ../CHANGES
@@ -0,0 +1,217 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Jansson documentation build configuration file, created by
4
+ # sphinx-quickstart on Sun Sep 5 21:47:20 2010.
5
+ #
6
+ # This file is execfile()d with the current directory set to its containing dir.
7
+ #
8
+ # Note that not all possible configuration values are present in this
9
+ # autogenerated file.
10
+ #
11
+ # All configuration values have a default; values that are commented out
12
+ # serve to show the default.
13
+
14
+ import sys, os
15
+
16
+ # If extensions (or modules to document with autodoc) are in another directory,
17
+ # add these directories to sys.path here. If the directory is relative to the
18
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
19
+ sys.path.insert(0, os.path.abspath('ext'))
20
+
21
+ # -- General configuration -----------------------------------------------------
22
+
23
+ # If your documentation needs a minimal Sphinx version, state it here.
24
+ needs_sphinx = '1.0'
25
+
26
+ # Add any Sphinx extension module names here, as strings. They can be extensions
27
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28
+ extensions = ['refcounting']
29
+
30
+ # Add any paths that contain templates here, relative to this directory.
31
+ templates_path = ['_templates']
32
+
33
+ # The suffix of source filenames.
34
+ source_suffix = '.rst'
35
+
36
+ # The encoding of source files.
37
+ #source_encoding = 'utf-8-sig'
38
+
39
+ # The master toctree document.
40
+ master_doc = 'index'
41
+
42
+ # General information about the project.
43
+ project = u'Jansson'
44
+ copyright = u'2009-2013, Petri Lehtinen'
45
+
46
+ # The version info for the project you're documenting, acts as replacement for
47
+ # |version| and |release|, also used in various other places throughout the
48
+ # built documents.
49
+ #
50
+ # The short X.Y version.
51
+ version = '2.5'
52
+ # The full version, including alpha/beta/rc tags.
53
+ release = version
54
+
55
+ # The language for content autogenerated by Sphinx. Refer to documentation
56
+ # for a list of supported languages.
57
+ #language = None
58
+
59
+ # There are two options for replacing |today|: either, you set today to some
60
+ # non-false value, then it is used:
61
+ #today = ''
62
+ # Else, today_fmt is used as the format for a strftime call.
63
+ #today_fmt = '%B %d, %Y'
64
+
65
+ # List of patterns, relative to source directory, that match files and
66
+ # directories to ignore when looking for source files.
67
+ exclude_patterns = ['_build']
68
+
69
+ # The reST default role (used for this markup: `text`) to use for all documents.
70
+ default_role = 'c:func'
71
+ primary_domain = 'c'
72
+
73
+ # If true, '()' will be appended to :func: etc. cross-reference text.
74
+ #add_function_parentheses = True
75
+
76
+ # If true, the current module name will be prepended to all description
77
+ # unit titles (such as .. function::).
78
+ #add_module_names = True
79
+
80
+ # If true, sectionauthor and moduleauthor directives will be shown in the
81
+ # output. They are ignored by default.
82
+ #show_authors = False
83
+
84
+ # The name of the Pygments (syntax highlighting) style to use.
85
+ pygments_style = 'sphinx'
86
+
87
+ # A list of ignored prefixes for module index sorting.
88
+ #modindex_common_prefix = []
89
+
90
+
91
+ # -- Options for HTML output ---------------------------------------------------
92
+
93
+ # The theme to use for HTML and HTML Help pages. See the documentation for
94
+ # a list of builtin themes.
95
+ #html_theme = 'default'
96
+
97
+ # Theme options are theme-specific and customize the look and feel of a theme
98
+ # further. For a list of options available for each theme, see the
99
+ # documentation.
100
+ #html_theme_options = {}
101
+
102
+ # Add any paths that contain custom themes here, relative to this directory.
103
+ #html_theme_path = []
104
+
105
+ # The name for this set of Sphinx documents. If None, it defaults to
106
+ # "<project> v<release> documentation".
107
+ #html_title = None
108
+
109
+ # A shorter title for the navigation bar. Default is the same as html_title.
110
+ #html_short_title = None
111
+
112
+ # The name of an image file (relative to this directory) to place at the top
113
+ # of the sidebar.
114
+ #html_logo = None
115
+
116
+ # The name of an image file (within the static path) to use as favicon of the
117
+ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
118
+ # pixels large.
119
+ #html_favicon = None
120
+
121
+ # Add any paths that contain custom static files (such as style sheets) here,
122
+ # relative to this directory. They are copied after the builtin static files,
123
+ # so a file named "default.css" will overwrite the builtin "default.css".
124
+ #html_static_path = ['_static']
125
+
126
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
127
+ # using the given strftime format.
128
+ #html_last_updated_fmt = '%b %d, %Y'
129
+
130
+ # If true, SmartyPants will be used to convert quotes and dashes to
131
+ # typographically correct entities.
132
+ #html_use_smartypants = True
133
+
134
+ # Custom sidebar templates, maps document names to template names.
135
+ #html_sidebars = {}
136
+
137
+ # Additional templates that should be rendered to pages, maps page names to
138
+ # template names.
139
+ #html_additional_pages = {}
140
+
141
+ # If false, no module index is generated.
142
+ #html_domain_indices = True
143
+
144
+ # If false, no index is generated.
145
+ #html_use_index = True
146
+
147
+ # If true, the index is split into individual pages for each letter.
148
+ #html_split_index = False
149
+
150
+ # If true, links to the reST sources are added to the pages.
151
+ #html_show_sourcelink = True
152
+
153
+ # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
154
+ #html_show_sphinx = True
155
+
156
+ # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
157
+ #html_show_copyright = True
158
+
159
+ # If true, an OpenSearch description file will be output, and all pages will
160
+ # contain a <link> tag referring to it. The value of this option must be the
161
+ # base URL from which the finished HTML is served.
162
+ #html_use_opensearch = ''
163
+
164
+ # This is the file name suffix for HTML files (e.g. ".xhtml").
165
+ #html_file_suffix = None
166
+
167
+ # Output file base name for HTML help builder.
168
+ htmlhelp_basename = 'Janssondoc'
169
+
170
+
171
+ # -- Options for LaTeX output --------------------------------------------------
172
+
173
+ # The paper size ('letter' or 'a4').
174
+ #latex_paper_size = 'letter'
175
+
176
+ # The font size ('10pt', '11pt' or '12pt').
177
+ #latex_font_size = '10pt'
178
+
179
+ # Grouping the document tree into LaTeX files. List of tuples
180
+ # (source start file, target name, title, author, documentclass [howto/manual]).
181
+ latex_documents = [
182
+ ('index', 'Jansson.tex', u'Jansson Documentation',
183
+ u'Petri Lehtinen', 'manual'),
184
+ ]
185
+
186
+ # The name of an image file (relative to this directory) to place at the top of
187
+ # the title page.
188
+ #latex_logo = None
189
+
190
+ # For "manual" documents, if this is true, then toplevel headings are parts,
191
+ # not chapters.
192
+ #latex_use_parts = False
193
+
194
+ # If true, show page references after internal links.
195
+ #latex_show_pagerefs = False
196
+
197
+ # If true, show URL addresses after external links.
198
+ #latex_show_urls = False
199
+
200
+ # Additional stuff for the LaTeX preamble.
201
+ #latex_preamble = ''
202
+
203
+ # Documents to append as an appendix to all manuals.
204
+ #latex_appendices = []
205
+
206
+ # If false, no module index is generated.
207
+ #latex_domain_indices = True
208
+
209
+
210
+ # -- Options for manual page output --------------------------------------------
211
+
212
+ # One entry per manual page. List of tuples
213
+ # (source start file, name, description, authors, manual section).
214
+ man_pages = [
215
+ ('index', 'jansson', u'Jansson Documentation',
216
+ [u'Petri Lehtinen'], 1)
217
+ ]
@@ -0,0 +1,114 @@
1
+ .. _rfc-conformance:
2
+
3
+ ***************
4
+ RFC Conformance
5
+ ***************
6
+
7
+ JSON is specified in :rfc:`4627`, *"The application/json Media Type
8
+ for JavaScript Object Notation (JSON)"*.
9
+
10
+ Character Encoding
11
+ ==================
12
+
13
+ Jansson only supports UTF-8 encoded JSON texts. It does not support or
14
+ auto-detect any of the other encodings mentioned in the RFC, namely
15
+ UTF-16LE, UTF-16BE, UTF-32LE or UTF-32BE. Pure ASCII is supported, as
16
+ it's a subset of UTF-8.
17
+
18
+ Strings
19
+ =======
20
+
21
+ JSON strings are mapped to C-style null-terminated character arrays,
22
+ and UTF-8 encoding is used internally. Strings may not contain
23
+ embedded null characters, not even escaped ones.
24
+
25
+ For example, trying to decode the following JSON text leads to a parse
26
+ error::
27
+
28
+ ["this string contains the null character: \u0000"]
29
+
30
+ All other Unicode codepoints U+0001 through U+10FFFF are allowed.
31
+
32
+ Unicode normalization or any other transformation is never performed
33
+ on any strings (string values or object keys). When checking for
34
+ equivalence of strings or object keys, the comparison is performed
35
+ byte by byte between the original UTF-8 representations of the
36
+ strings.
37
+
38
+ Numbers
39
+ =======
40
+
41
+ .. _real-vs-integer:
42
+
43
+ Real vs. Integer
44
+ ----------------
45
+
46
+ JSON makes no distinction between real and integer numbers; Jansson
47
+ does. Real numbers are mapped to the ``double`` type and integers to
48
+ the ``json_int_t`` type, which is a typedef of ``long long`` or
49
+ ``long``, depending on whether ``long long`` is supported by your
50
+ compiler or not.
51
+
52
+ A JSON number is considered to be a real number if its lexical
53
+ representation includes one of ``e``, ``E``, or ``.``; regardless if
54
+ its actual numeric value is a true integer (e.g., all of ``1E6``,
55
+ ``3.0``, ``400E-2``, and ``3.14E3`` are mathematical integers, but
56
+ will be treated as real values). With the ``JSON_DECODE_INT_AS_REAL``
57
+ decoder flag set all numbers are interpreted as real.
58
+
59
+ All other JSON numbers are considered integers.
60
+
61
+ When encoding to JSON, real values are always represented
62
+ with a fractional part; e.g., the ``double`` value 3.0 will be
63
+ represented in JSON as ``3.0``, not ``3``.
64
+
65
+ Overflow, Underflow & Precision
66
+ -------------------------------
67
+
68
+ Real numbers whose absolute values are too small to be represented in
69
+ a C ``double`` will be silently estimated with 0.0. Thus, depending on
70
+ platform, JSON numbers very close to zero such as 1E-999 may result in
71
+ 0.0.
72
+
73
+ Real numbers whose absolute values are too large to be represented in
74
+ a C ``double`` will result in an overflow error (a JSON decoding
75
+ error). Thus, depending on platform, JSON numbers like 1E+999 or
76
+ -1E+999 may result in a parsing error.
77
+
78
+ Likewise, integer numbers whose absolute values are too large to be
79
+ represented in the ``json_int_t`` type (see above) will result in an
80
+ overflow error (a JSON decoding error). Thus, depending on platform,
81
+ JSON numbers like 1000000000000000 may result in parsing error.
82
+
83
+ Parsing JSON real numbers may result in a loss of precision. As long
84
+ as overflow does not occur (i.e. a total loss of precision), the
85
+ rounded approximate value is silently used. Thus the JSON number
86
+ 1.000000000000000005 may, depending on platform, result in the
87
+ ``double`` value 1.0.
88
+
89
+ Signed zeros
90
+ ------------
91
+
92
+ JSON makes no statement about what a number means; however Javascript
93
+ (ECMAscript) does state that +0.0 and -0.0 must be treated as being
94
+ distinct values, i.e. -0.0 |not-equal| 0.0. Jansson relies on the
95
+ underlying floating point library in the C environment in which it is
96
+ compiled. Therefore it is platform-dependent whether 0.0 and -0.0 will
97
+ be distinct values. Most platforms that use the IEEE 754
98
+ floating-point standard will support signed zeros.
99
+
100
+ Note that this only applies to floating-point; neither JSON, C, or
101
+ IEEE support the concept of signed integer zeros.
102
+
103
+ .. |not-equal| unicode:: U+2260
104
+
105
+ Types
106
+ -----
107
+
108
+ No support is provided in Jansson for any C numeric types other than
109
+ ``json_int_t`` and ``double``. This excludes things such as unsigned
110
+ types, ``long double``, etc. Obviously, shorter types like ``short``,
111
+ ``int``, ``long`` (if ``json_int_t`` is ``long long``) and ``float``
112
+ are implicitly handled via the ordinary C type coercion rules (subject
113
+ to overflow semantics). Also, no support or hooks are provided for any
114
+ supplemental "bignum" type add-on packages.
@@ -0,0 +1,59 @@
1
+ """
2
+ refcounting
3
+ ~~~~~~~~~~~
4
+
5
+ Reference count annotations for C API functions. Has the same
6
+ result as the sphinx.ext.refcounting extension but works for all
7
+ functions regardless of the signature, and the reference counting
8
+ information is written inline with the documentation instead of a
9
+ separate file.
10
+
11
+ Adds a new directive "refcounting". The directive has no content
12
+ and one required positional parameter:: "new" or "borrow".
13
+
14
+ Example:
15
+
16
+ .. cfunction:: json_t *json_object(void)
17
+
18
+ .. refcounting:: new
19
+
20
+ <description of the json_object function>
21
+
22
+ :copyright: Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
23
+ :license: MIT, see LICENSE for details.
24
+ """
25
+
26
+ from docutils import nodes
27
+
28
+ class refcounting(nodes.emphasis): pass
29
+
30
+ def visit(self, node):
31
+ self.visit_emphasis(node)
32
+
33
+ def depart(self, node):
34
+ self.depart_emphasis(node)
35
+
36
+ def html_visit(self, node):
37
+ self.body.append(self.starttag(node, 'em', '', CLASS='refcount'))
38
+
39
+ def html_depart(self, node):
40
+ self.body.append('</em>')
41
+
42
+
43
+ def refcounting_directive(name, arguments, options, content, lineno,
44
+ content_offset, block_text, state, state_machine):
45
+ if arguments[0] == 'borrow':
46
+ text = 'Return value: Borrowed reference.'
47
+ elif arguments[0] == 'new':
48
+ text = 'Return value: New reference.'
49
+ else:
50
+ raise Error('Valid arguments: new, borrow')
51
+
52
+ return [refcounting(text, text)]
53
+
54
+ def setup(app):
55
+ app.add_node(refcounting,
56
+ html=(html_visit, html_depart),
57
+ latex=(visit, depart),
58
+ text=(visit, depart))
59
+ app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0))
@@ -0,0 +1,237 @@
1
+ ***************
2
+ Getting Started
3
+ ***************
4
+
5
+ .. highlight:: c
6
+
7
+ Compiling and Installing Jansson
8
+ ================================
9
+
10
+ The Jansson source is available at
11
+ http://www.digip.org/jansson/releases/.
12
+
13
+ Unix-like systems (including MinGW)
14
+ -----------------------------------
15
+
16
+ Unpack the source tarball and change to the source directory:
17
+
18
+ .. parsed-literal::
19
+
20
+ bunzip2 -c jansson-|release|.tar.bz2 | tar xf -
21
+ cd jansson-|release|
22
+
23
+ The source uses GNU Autotools (autoconf_, automake_, libtool_), so
24
+ compiling and installing is extremely simple::
25
+
26
+ ./configure
27
+ make
28
+ make check
29
+ make install
30
+
31
+ To change the destination directory (``/usr/local`` by default), use
32
+ the ``--prefix=DIR`` argument to ``./configure``. See ``./configure
33
+ --help`` for the list of all possible installation options. (There are
34
+ no options to customize the resulting Jansson binary.)
35
+
36
+ The command ``make check`` runs the test suite distributed with
37
+ Jansson. This step is not strictly necessary, but it may find possible
38
+ problems that Jansson has on your platform. If any problems are found,
39
+ please report them.
40
+
41
+ If you obtained the source from a Git repository (or any other source
42
+ control system), there's no ``./configure`` script as it's not kept in
43
+ version control. To create the script, the build system needs to be
44
+ bootstrapped. There are many ways to do this, but the easiest one is
45
+ to use ``autoreconf``::
46
+
47
+ autoreconf -vi
48
+
49
+ This command creates the ``./configure`` script, which can then be
50
+ used as described above.
51
+
52
+ .. _autoconf: http://www.gnu.org/software/autoconf/
53
+ .. _automake: http://www.gnu.org/software/automake/
54
+ .. _libtool: http://www.gnu.org/software/libtool/
55
+
56
+
57
+ .. _build-cmake:
58
+
59
+ CMake (various platforms, including Windows)
60
+ --------------------------------------------
61
+
62
+ Jansson can be built using CMake_. Create a build directory for an
63
+ out-of-tree build, change to that directory, and run ``cmake`` (or ``ccmake``,
64
+ ``cmake-gui``, or similar) to configure the project.
65
+
66
+ See the examples below for more detailed information.
67
+
68
+ .. note:: In the below examples ``..`` is used as an argument for ``cmake``.
69
+ This is simply the path to the jansson project root directory.
70
+ In the example it is assumed you've created a sub-directory ``build``
71
+ and are using that. You could use any path you want.
72
+
73
+ .. _build-cmake-unix:
74
+
75
+ Unix (Make files)
76
+ ^^^^^^^^^^^^^^^^^
77
+ Generating make files on unix:
78
+
79
+ .. parsed-literal::
80
+
81
+ bunzip2 -c jansson-|release|.tar.bz2 | tar xf -
82
+ cd jansson-|release|
83
+
84
+ mkdir build
85
+ cd build
86
+ cmake .. # or `ccmake ..` for a GUI.
87
+
88
+ Then to build::
89
+
90
+ make
91
+ make check
92
+ make install
93
+
94
+ Windows (Visual Studio)
95
+ ^^^^^^^^^^^^^^^^^^^^^^^
96
+ Creating Visual Studio project files from the command line:
97
+
98
+ .. parsed-literal::
99
+
100
+ <unpack>
101
+ cd jansson-|release|
102
+
103
+ md build
104
+ cd build
105
+ cmake -G "Visual Studio 10" ..
106
+
107
+ You will now have a *Visual Studio Solution* in your build directory.
108
+ To run the unit tests build the ``RUN_TESTS`` project.
109
+
110
+ If you prefer a GUI the ``cmake`` line in the above example can
111
+ be replaced with::
112
+
113
+ cmake-gui ..
114
+
115
+ For command line help (including a list of available generators)
116
+ for CMake_ simply run::
117
+
118
+ cmake
119
+
120
+ To list available CMake_ settings (and what they are currently set to)
121
+ for the project, run::
122
+
123
+ cmake -LH ..
124
+
125
+ Mac OSX (Xcode)
126
+ ^^^^^^^^^^^^^^^
127
+ If you prefer using Xcode instead of make files on OSX,
128
+ do the following. (Use the same steps as
129
+ for :ref:`Unix <build-cmake-unix>`)::
130
+
131
+ ...
132
+ cmake -G "Xcode" ..
133
+
134
+ Additional CMake settings
135
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
136
+
137
+ Shared library
138
+ """"""""""""""
139
+ By default the CMake_ project will generate build files for building the
140
+ static library. To build the shared version use::
141
+
142
+ ...
143
+ cmake -DBUILD_SHARED=1 ..
144
+
145
+ Changing install directory (same as autoconf --prefix)
146
+ """"""""""""""""""""""""""""""""""""""""""""""""""""""
147
+ Just as with the autoconf_ project you can change the destination directory
148
+ for ``make install``. The equivalent for autoconfs ``./configure --prefix``
149
+ in CMake_ is::
150
+
151
+ ...
152
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/some/other/path ..
153
+ make install
154
+
155
+ .. _CMake: http://www.cmake.org
156
+
157
+ Android
158
+ -------
159
+
160
+ Jansson can be built for Android platforms. Android.mk is in the
161
+ source root directory. The configuration header file is located in the
162
+ ``android`` directory in the source distribution.
163
+
164
+
165
+ Windows
166
+ -------
167
+
168
+ **This method is deprecated**. Using :ref:`CMake <build-cmake>` is now
169
+ preferred.
170
+
171
+ Jansson can be built with Visual Studio 2010 (and probably newer
172
+ versions, too). The solution and project files are in the
173
+ ``win32/vs2010/`` directory in the source distribution.
174
+
175
+
176
+ Other Systems
177
+ -------------
178
+
179
+ On non Unix-like systems, you may be unable to run the ``./configure``
180
+ script. In this case, follow these steps. All the files mentioned can
181
+ be found in the ``src/`` directory.
182
+
183
+ 1. Create ``jansson_config.h`` (which has some platform-specific
184
+ parameters that are normally filled in by the ``./configure``
185
+ script). Edit ``jansson_config.h.in``, replacing all ``@variable@``
186
+ placeholders, and rename the file to ``jansson_config.h``.
187
+
188
+ 2. Make ``jansson.h`` and ``jansson_config.h`` available to the
189
+ compiler, so that they can be found when compiling programs that
190
+ use Jansson.
191
+
192
+ 3. Compile all the ``.c`` files (in the ``src/`` directory) into a
193
+ library file. Make the library available to the compiler, as in
194
+ step 2.
195
+
196
+
197
+ Building the Documentation
198
+ --------------------------
199
+
200
+ (This subsection describes how to build the HTML documentation you are
201
+ currently reading, so it can be safely skipped.)
202
+
203
+ Documentation is in the ``doc/`` subdirectory. It's written in
204
+ reStructuredText_ with Sphinx_ annotations. To generate the HTML
205
+ documentation, invoke::
206
+
207
+ make html
208
+
209
+ and point your browser to ``doc/_build/html/index.html``. Sphinx_ 1.0
210
+ or newer is required to generate the documentation.
211
+
212
+ .. _reStructuredText: http://docutils.sourceforge.net/rst.html
213
+ .. _Sphinx: http://sphinx.pocoo.org/
214
+
215
+
216
+ Compiling Programs that Use Jansson
217
+ ===================================
218
+
219
+ Jansson involves one C header file, :file:`jansson.h`, so it's enough
220
+ to put the line
221
+
222
+ ::
223
+
224
+ #include <jansson.h>
225
+
226
+ in the beginning of every source file that uses Jansson.
227
+
228
+ There's also just one library to link with, ``libjansson``. Compile and
229
+ link the program as follows::
230
+
231
+ cc -o prog prog.c -ljansson
232
+
233
+ Starting from version 1.2, there's also support for pkg-config_::
234
+
235
+ cc -o prog prog.c `pkg-config --cflags --libs jansson`
236
+
237
+ .. _pkg-config: http://pkg-config.freedesktop.org/