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.
- checksums.yaml +15 -0
- data/Gemfile +2 -1
- data/README.md +49 -0
- data/Rakefile +19 -0
- data/bench.rb +28 -0
- data/ctags.rb.gemspec +1 -1
- data/ext/.gitignore +1 -1
- data/ext/extconf.rb +30 -6
- data/ext/vendor/exuberant-ctags/entry.c +70 -1
- data/ext/vendor/exuberant-ctags/main.c +68 -7
- data/ext/vendor/exuberant-ctags/options.c +12 -12
- data/ext/vendor/exuberant-ctags/options.h +1 -1
- data/ext/vendor/exuberant-ctags/parse.c +2 -2
- data/ext/vendor/exuberant-ctags/read.c +8 -3
- data/ext/vendor/exuberant-ctags/read.h +4 -1
- data/ext/vendor/exuberant-ctags/routines.c +31 -8
- data/ext/vendor/exuberant-ctags/ruby.c +62 -7
- data/ext/vendor/fmemopen/README.md +49 -0
- data/ext/vendor/fmemopen/fmemopen.c +92 -0
- data/ext/vendor/fmemopen/fmemopen.h +52 -0
- data/ext/vendor/jansson-2.5/CHANGES +554 -0
- data/ext/vendor/jansson-2.5/LICENSE +19 -0
- data/ext/vendor/jansson-2.5/Makefile.am +15 -0
- data/ext/vendor/jansson-2.5/Makefile.in +825 -0
- data/ext/vendor/jansson-2.5/README.rst +63 -0
- data/ext/vendor/jansson-2.5/aclocal.m4 +9674 -0
- data/ext/vendor/jansson-2.5/config.guess +1530 -0
- data/ext/vendor/jansson-2.5/config.h.in +84 -0
- data/ext/vendor/jansson-2.5/config.sub +1782 -0
- data/ext/vendor/jansson-2.5/configure +13931 -0
- data/ext/vendor/jansson-2.5/configure.ac +57 -0
- data/ext/vendor/jansson-2.5/depcomp +708 -0
- data/ext/vendor/jansson-2.5/doc/Makefile.am +20 -0
- data/ext/vendor/jansson-2.5/doc/Makefile.in +401 -0
- data/ext/vendor/jansson-2.5/doc/README +5 -0
- data/ext/vendor/jansson-2.5/doc/apiref.rst +1487 -0
- data/ext/vendor/jansson-2.5/doc/changes.rst +5 -0
- data/ext/vendor/jansson-2.5/doc/conf.py +217 -0
- data/ext/vendor/jansson-2.5/doc/conformance.rst +114 -0
- data/ext/vendor/jansson-2.5/doc/ext/refcounting.py +59 -0
- data/ext/vendor/jansson-2.5/doc/gettingstarted.rst +237 -0
- data/ext/vendor/jansson-2.5/doc/github_commits.c +192 -0
- data/ext/vendor/jansson-2.5/doc/index.rst +53 -0
- data/ext/vendor/jansson-2.5/doc/portability.rst +52 -0
- data/ext/vendor/jansson-2.5/doc/tutorial.rst +286 -0
- data/ext/vendor/jansson-2.5/doc/upgrading.rst +76 -0
- data/ext/vendor/jansson-2.5/install-sh +527 -0
- data/ext/vendor/jansson-2.5/jansson.pc.in +10 -0
- data/ext/vendor/jansson-2.5/ltmain.sh +9661 -0
- data/ext/vendor/jansson-2.5/missing +331 -0
- data/ext/vendor/jansson-2.5/src/Makefile.am +24 -0
- data/ext/vendor/jansson-2.5/src/Makefile.in +613 -0
- data/ext/vendor/jansson-2.5/src/dump.c +456 -0
- data/ext/vendor/jansson-2.5/src/error.c +63 -0
- data/ext/vendor/jansson-2.5/src/hashtable.c +360 -0
- data/ext/vendor/jansson-2.5/src/hashtable.h +180 -0
- data/ext/vendor/jansson-2.5/src/jansson.def +63 -0
- data/ext/vendor/jansson-2.5/src/jansson.h +281 -0
- data/ext/vendor/jansson-2.5/src/jansson_config.h +39 -0
- data/ext/vendor/jansson-2.5/src/jansson_config.h.in +39 -0
- data/ext/vendor/jansson-2.5/src/jansson_private.h +93 -0
- data/ext/vendor/jansson-2.5/src/load.c +1077 -0
- data/ext/vendor/jansson-2.5/src/memory.c +56 -0
- data/ext/vendor/jansson-2.5/src/pack_unpack.c +762 -0
- data/ext/vendor/jansson-2.5/src/strbuffer.c +116 -0
- data/ext/vendor/jansson-2.5/src/strbuffer.h +33 -0
- data/ext/vendor/jansson-2.5/src/strconv.c +134 -0
- data/ext/vendor/jansson-2.5/src/utf.c +190 -0
- data/ext/vendor/jansson-2.5/src/utf.h +39 -0
- data/ext/vendor/jansson-2.5/src/value.c +950 -0
- data/ext/vendor/jansson-2.5/test/Makefile.am +10 -0
- data/ext/vendor/jansson-2.5/test/Makefile.in +684 -0
- data/ext/vendor/jansson-2.5/test/bin/Makefile.am +5 -0
- data/ext/vendor/jansson-2.5/test/bin/Makefile.in +498 -0
- data/ext/vendor/jansson-2.5/test/bin/json_process.c +349 -0
- data/ext/vendor/jansson-2.5/test/run-suites +50 -0
- data/ext/vendor/jansson-2.5/test/scripts/run-tests.sh +100 -0
- data/ext/vendor/jansson-2.5/test/scripts/valgrind.sh +35 -0
- data/ext/vendor/jansson-2.5/test/suites/Makefile.am +2 -0
- data/ext/vendor/jansson-2.5/test/suites/Makefile.in +580 -0
- data/ext/vendor/jansson-2.5/test/suites/api/Makefile.am +34 -0
- data/ext/vendor/jansson-2.5/test/suites/api/Makefile.in +632 -0
- data/ext/vendor/jansson-2.5/test/suites/api/check-exports +23 -0
- data/ext/vendor/jansson-2.5/test/suites/api/run +36 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_array.c +432 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_copy.c +318 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_dump.c +190 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_dump_callback.c +81 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_equal.c +189 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_load.c +166 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_load_callback.c +75 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_loadb.c +36 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_memory_funcs.c +82 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_number.c +73 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_object.c +511 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_pack.c +283 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_simple.c +199 -0
- data/ext/vendor/jansson-2.5/test/suites/api/test_unpack.c +373 -0
- data/ext/vendor/jansson-2.5/test/suites/api/util.h +74 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/encoded-surrogate-half/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/encoded-surrogate-half/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-after-backslash/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-after-backslash/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-array/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-bigger-int/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-escape/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-escape/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-exponent/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-identifier/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-identifier/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-int/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-int/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-real-after-e/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-string/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/invalid-utf-8-in-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-invalid-utf-8/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-invalid-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-utf-8-continuation-byte/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/lone-utf-8-continuation-byte/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/not-in-unicode-range/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/not-in-unicode-range/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-3-byte-encoding/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-3-byte-encoding/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-4-byte-encoding/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-4-byte-encoding/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-ascii-encoding/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/overlong-ascii-encoding/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/restricted-utf-8/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/restricted-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/run +27 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/truncated-utf-8/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid-unicode/truncated-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/apostrophe/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/apostrophe/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/ascii-unicode-identifier/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/ascii-unicode-identifier/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/brace-comma/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/brace-comma/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-comma/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-comma/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/bracket-one-comma/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/empty/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/empty/input +0 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/escaped-null-byte-in-string/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/escaped-null-byte-in-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-array/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-multiline-array/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/extra-comma-in-multiline-array/input +6 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-after-newline/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-after-newline/input +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-at-the-end/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/garbage-at-the-end/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/integer-starting-with-zero/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/integer-starting-with-zero/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-escape/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-escape/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-identifier/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-identifier/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-integer/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-integer/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-real/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-negative-real/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-second-surrogate/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/invalid-second-surrogate/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-brace/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-open-bracket/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-second-surrogate/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/lone-second-surrogate/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/minus-sign-without-number/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/minus-sign-without-number/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/negative-integer-starting-with-zero/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/negative-integer-starting-with-zero/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/input +0 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-in-string/nostrip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/input +0 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null-byte-outside-string/nostrip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/null/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-apostrophes/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-apostrophes/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-garbage-at-end/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-garbage-at-end/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-in-unterminated-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-colon/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-no-value/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/object-unterminated-value/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-garbage-after-e/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-garbage-after-e/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-negative-overflow/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-negative-overflow/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-positive-overflow/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-positive-overflow/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-e/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-e/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-point/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/real-truncated-at-point/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/run +57 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/tab-character-in-string/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/tab-character-in-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-negative-integer/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-negative-integer/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-positive-integer/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/too-big-positive-integer/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/truncated-unicode-surrogate/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/truncated-unicode-surrogate/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unicode-identifier/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unicode-identifier/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array-and-object/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-empty-key/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-key/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-object-and-array/error +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-object-and-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/error.normal +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/error.strip +2 -0
- data/ext/vendor/jansson-2.5/test/suites/invalid/unterminated-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/env +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/input +5 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/complex-array/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-array/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-object-in-array/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-object-in-array/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-object/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-object/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/empty-string/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/escaped-utf-control-char/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/escaped-utf-control-char/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/false/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/false/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-int/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-int/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-one/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-one/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-zero/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/negative-zero/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/null/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/null/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/one-byte-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/one-byte-utf-8/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-negative-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-negative-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-positive-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e-positive-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-capital-e/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-fraction-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-fraction-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-negative-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-negative-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-positive-exponent/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-positive-exponent/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-underflow/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/real-underflow/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/run +56 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/short-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/short-string/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-ascii-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-ascii-string/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-0/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-0/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-1/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-1/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-123/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-int-123/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-object/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-object/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-real/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/simple-real/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/string-escapes/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/string-escapes/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/three-byte-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/three-byte-utf-8/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/true/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/true/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/two-byte-utf-8/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/two-byte-utf-8/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/utf-8-string/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/utf-8-string/output +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/utf-surrogate-four-byte-encoding/input +1 -0
- data/ext/vendor/jansson-2.5/test/suites/valid/utf-surrogate-four-byte-encoding/output +1 -0
- data/ext/vendor/jansson-2.5/win32/jansson_config.h +39 -0
- data/ext/vendor/jansson-2.5/win32/vs2010/jansson.sln +20 -0
- data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj +108 -0
- data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj.filters +69 -0
- data/ext/vendor/jansson-2.5/win32/vs2010/jansson.vcxproj.user +3 -0
- data/lib/ctags.cnf +2 -0
- data/lib/ctags/exuberant.rb +129 -17
- data/lib/ctags/version.rb +1 -1
- data/test/test_ctags.rb +14 -7
- metadata +350 -69
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjY3ODkyNTBlOWM4ZjMwOTY5ZmQyMmViNTY0NDYyZWJhNDQxYTI1OQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTk4OGZiZWU2NzY5MDdjOWQ5YWY4YzljM2M4MTc5ZmIwNzBlOTAzNA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YzliMGVjZjIyNmY4YzBhZDVmY2I4ZDIzMmRmMmM5YTdlZjlkNDM2NzNmMGYx
|
10
|
+
Nzk3MTFlYWM5MmVkYTI3MmZlYmUzOTZlNzQ4ZjYxYzgzY2FiMDYwYTllYzI0
|
11
|
+
MjZmOTg3ZTZiZjFmNWY5ODI3M2U1MDU1YTAwNjRlZjA0OGM5Njk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NmU4ZjBjZTUzODhiZGM0MDM0MjU5ZTQ2ODBjYTM4YmIxNWVlNjhjM2Q4OTg2
|
14
|
+
Y2E1N2I5MGJlY2QzZDM4MzkwMmVhZDUxNGI2Y2M0MGFhZjE0OWM5OThjNzZh
|
15
|
+
OWJmMzE3ZGM0MzM5ZTNkNjdiMWM3YzlhNDlmMzc4MmQzNGQ5YTI=
|
data/Gemfile
CHANGED
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
## ctags.rb
|
2
|
+
|
3
|
+
simple ruby wrapper for exuberant-ctags
|
4
|
+
|
5
|
+
### usage
|
6
|
+
|
7
|
+
``` ruby
|
8
|
+
>> pp Ctags.tags_for_file('/usr/lib/ruby/1.8/timeout.rb')
|
9
|
+
[
|
10
|
+
{:path=>
|
11
|
+
"/usr/lib/ruby/1.8/timeout.rb",
|
12
|
+
:kind=>"module",
|
13
|
+
:language=>"Ruby",
|
14
|
+
:pattern=>"module Timeout",
|
15
|
+
:name=>"Timeout",
|
16
|
+
:line=>30},
|
17
|
+
{:path=>
|
18
|
+
"/usr/lib/ruby/1.8/timeout.rb",
|
19
|
+
:kind=>"class",
|
20
|
+
:class=>"Timeout",
|
21
|
+
:language=>"Ruby",
|
22
|
+
:pattern=>"class Error < Interrupt",
|
23
|
+
:name=>"Error",
|
24
|
+
:line=>35},
|
25
|
+
{:path=>
|
26
|
+
"/usr/lib/ruby/1.8/timeout.rb",
|
27
|
+
:kind=>"class",
|
28
|
+
:class=>"Timeout",
|
29
|
+
:language=>"Ruby",
|
30
|
+
:pattern=>"class ExitException < ::Exception # :nodoc:",
|
31
|
+
:name=>"ExitException",
|
32
|
+
:line=>37},
|
33
|
+
{:path=>
|
34
|
+
"/usr/lib/ruby/1.8/timeout.rb",
|
35
|
+
:kind=>"method",
|
36
|
+
:class=>"Timeout",
|
37
|
+
:language=>"Ruby",
|
38
|
+
:pattern=>"def timeout(sec, klass = nil)",
|
39
|
+
:name=>"timeout",
|
40
|
+
:line=>52},
|
41
|
+
{:path=>
|
42
|
+
"/usr/lib/ruby/1.8/timeout.rb",
|
43
|
+
:kind=>"method",
|
44
|
+
:language=>"Ruby",
|
45
|
+
:pattern=>"def timeout(n, e = nil, &block) # :nodoc:",
|
46
|
+
:name=>"timeout",
|
47
|
+
:line=>100}
|
48
|
+
]
|
49
|
+
```
|
data/Rakefile
CHANGED
@@ -12,6 +12,16 @@ require 'rubygems/package_task'
|
|
12
12
|
Gem::PackageTask.new(GEMSPEC) do |pkg|
|
13
13
|
end
|
14
14
|
|
15
|
+
# ==========================================================
|
16
|
+
# Compiling
|
17
|
+
# ==========================================================
|
18
|
+
|
19
|
+
task :build do
|
20
|
+
Dir.chdir('ext') do
|
21
|
+
ruby 'extconf.rb'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
15
25
|
# ==========================================================
|
16
26
|
# Testing
|
17
27
|
# ==========================================================
|
@@ -21,3 +31,12 @@ Rake::TestTask.new 'test' do |t|
|
|
21
31
|
t.test_files = FileList['test/test_*.rb']
|
22
32
|
t.ruby_opts = ['-rubygems']
|
23
33
|
end
|
34
|
+
task :test => :build
|
35
|
+
|
36
|
+
# ==========================================================
|
37
|
+
# Benchmarks
|
38
|
+
# ==========================================================
|
39
|
+
|
40
|
+
task :bench => :build do
|
41
|
+
ruby 'bench.rb'
|
42
|
+
end
|
data/bench.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
require 'rubygems'
|
3
|
+
$:.unshift File.expand_path('../lib', __FILE__)
|
4
|
+
require 'ctags'
|
5
|
+
|
6
|
+
Benchmark.bmbm(30) do |b|
|
7
|
+
[
|
8
|
+
['small', __FILE__],
|
9
|
+
['medium', Gem.find_files('mkmf.rb')[0]],
|
10
|
+
['big', Gem.find_files('tk.rb')[0]]
|
11
|
+
].each do |type, file|
|
12
|
+
b.report("tags for #{type} file") do
|
13
|
+
Ctags.tags_for_file(file)
|
14
|
+
end
|
15
|
+
|
16
|
+
b.report("tags for #{type} file x500") do
|
17
|
+
500.times{ Ctags.tags_for_file(file) }
|
18
|
+
end
|
19
|
+
|
20
|
+
b.report("tags for #{type} blob") do
|
21
|
+
Ctags.tags_for_file(file, File.read(file))
|
22
|
+
end
|
23
|
+
|
24
|
+
b.report("tags for #{type} blob x500") do
|
25
|
+
500.times{ Ctags.tags_for_file(file, File.read(file)) }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/ctags.rb.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.email = ['aman@tmm1.net']
|
15
15
|
|
16
16
|
s.add_dependency 'posix-spawn', '~> 0.3.6'
|
17
|
-
s.
|
17
|
+
s.add_dependency 'yajl-ruby'
|
18
18
|
|
19
19
|
s.extensions = ['ext/extconf.rb']
|
20
20
|
s.require_paths = ['lib']
|
data/ext/.gitignore
CHANGED
data/ext/extconf.rb
CHANGED
@@ -1,13 +1,37 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
def sys(cmd)
|
5
|
+
puts " -- #{cmd}"
|
6
|
+
unless ret = xsystem(cmd)
|
7
|
+
puts " ==> tail -10 #{CWD}/mkmf.log"
|
8
|
+
puts File.readlines("#{CWD}/mkmf.log").last(10).join("")
|
9
|
+
raise "#{cmd} failed"
|
10
|
+
end
|
11
|
+
ret
|
12
|
+
end
|
13
|
+
|
14
|
+
CWD = File.expand_path('../', __FILE__)
|
15
|
+
FileUtils.mkdir_p "#{CWD}/dst"
|
16
|
+
xsystem('pwd') # to create mkmf.log before the chdir
|
17
|
+
|
18
|
+
Dir.chdir("#{CWD}/vendor/jansson-2.5") do
|
19
|
+
sys "./configure --prefix=#{CWD}/dst --disable-shared" unless File.exists?('config.h')
|
20
|
+
sys "make install"
|
21
|
+
end
|
22
|
+
|
23
|
+
ENV['CFLAGS'] = "-ggdb -I#{CWD}/dst/include"
|
24
|
+
ENV['LDFLAGS'] = "-L#{CWD}/dst/lib"
|
25
|
+
ENV['LIBS'] = "-ljansson"
|
26
|
+
|
27
|
+
if !have_func('fmemopen','stdio.h') && have_func('funopen','stdio.h')
|
28
|
+
ENV['CFLAGS'] += " -DHAVE_FMEMOPEN_C"
|
29
|
+
FileUtils.cp "#{CWD}/vendor/fmemopen/fmemopen.c", "#{CWD}/dst/include"
|
30
|
+
end
|
6
31
|
|
7
|
-
Dir.chdir("#{
|
8
|
-
|
9
|
-
|
10
|
-
system "make install"
|
32
|
+
Dir.chdir("#{CWD}/vendor/exuberant-ctags") do
|
33
|
+
sys "./configure --prefix=#{CWD}/dst" unless File.exists?('config.h')
|
34
|
+
sys "make install"
|
11
35
|
end
|
12
36
|
|
13
37
|
File.open('Makefile', 'w') do |f|
|
@@ -38,6 +38,8 @@
|
|
38
38
|
# include <io.h>
|
39
39
|
#endif
|
40
40
|
|
41
|
+
#include <jansson.h>
|
42
|
+
|
41
43
|
#include "debug.h"
|
42
44
|
#include "ctags.h"
|
43
45
|
#include "entry.h"
|
@@ -806,6 +808,69 @@ static int writeCtagsEntry (const tagEntryInfo *const tag)
|
|
806
808
|
return length;
|
807
809
|
}
|
808
810
|
|
811
|
+
static int writeJsonEntry (const tagEntryInfo *const tag)
|
812
|
+
{
|
813
|
+
char *const line = readSourceLine (TagFile.vLine, tag->filePosition, 0);
|
814
|
+
json_t *response = json_pack ("{ss ss si ss ss ss ss}",
|
815
|
+
"_type", "tag",
|
816
|
+
"name", tag->name,
|
817
|
+
"line", tag->lineNumber,
|
818
|
+
"path", tag->sourceFileName,
|
819
|
+
"kind", tag->kindName,
|
820
|
+
"language", tag->language,
|
821
|
+
"pattern", line
|
822
|
+
);
|
823
|
+
|
824
|
+
if (Option.extensionFields.scope &&
|
825
|
+
tag->extensionFields.scope [0] != NULL &&
|
826
|
+
tag->extensionFields.scope [1] != NULL)
|
827
|
+
json_object_set_new (response,
|
828
|
+
tag->extensionFields.scope [0],
|
829
|
+
json_string (tag->extensionFields.scope [1]));
|
830
|
+
|
831
|
+
if (Option.extensionFields.typeRef &&
|
832
|
+
tag->extensionFields.typeRef [0] != NULL &&
|
833
|
+
tag->extensionFields.typeRef [1] != NULL) {
|
834
|
+
char *val;
|
835
|
+
asprintf(&val, "%s:%s",
|
836
|
+
tag->extensionFields.typeRef [0],
|
837
|
+
tag->extensionFields.typeRef [1]);
|
838
|
+
json_object_set_new (response,
|
839
|
+
"typeref",
|
840
|
+
json_string (val));
|
841
|
+
free (val);
|
842
|
+
}
|
843
|
+
|
844
|
+
if (Option.extensionFields.fileScope && tag->isFileScope)
|
845
|
+
json_object_set_new (response, "scope",
|
846
|
+
json_string ("file"));
|
847
|
+
|
848
|
+
if (Option.extensionFields.inheritance &&
|
849
|
+
tag->extensionFields.inheritance != NULL)
|
850
|
+
json_object_set_new (response, "inherits",
|
851
|
+
json_string (tag->extensionFields.inheritance));
|
852
|
+
|
853
|
+
if (Option.extensionFields.access && tag->extensionFields.access != NULL)
|
854
|
+
json_object_set_new (response, "access",
|
855
|
+
json_string (tag->extensionFields.access));
|
856
|
+
|
857
|
+
if (Option.extensionFields.implementation &&
|
858
|
+
tag->extensionFields.implementation != NULL)
|
859
|
+
json_object_set_new (response, "implementation",
|
860
|
+
json_string (tag->extensionFields.implementation));
|
861
|
+
|
862
|
+
if (Option.extensionFields.signature &&
|
863
|
+
tag->extensionFields.signature != NULL)
|
864
|
+
json_object_set_new (response, "signature",
|
865
|
+
json_string (tag->extensionFields.signature));
|
866
|
+
|
867
|
+
json_dumpf (response, stdout, 0);
|
868
|
+
fprintf (stdout, "\n");
|
869
|
+
fflush (stdout);
|
870
|
+
|
871
|
+
json_decref (response);
|
872
|
+
}
|
873
|
+
|
809
874
|
extern void makeTagEntry (const tagEntryInfo *const tag)
|
810
875
|
{
|
811
876
|
Assert (tag->name != NULL);
|
@@ -816,7 +881,11 @@ extern void makeTagEntry (const tagEntryInfo *const tag)
|
|
816
881
|
int length = 0;
|
817
882
|
|
818
883
|
DebugStatement ( debugEntry (tag); )
|
819
|
-
if (Option.
|
884
|
+
if (Option.json)
|
885
|
+
{
|
886
|
+
writeJsonEntry (tag);
|
887
|
+
}
|
888
|
+
else if (Option.xref)
|
820
889
|
{
|
821
890
|
if (! tag->isFileEntry)
|
822
891
|
length = writeXrefEntry (tag);
|
@@ -22,7 +22,9 @@
|
|
22
22
|
* INCLUDE FILES
|
23
23
|
*/
|
24
24
|
#include "general.h" /* must always come first */
|
25
|
+
#include "ctags.h"
|
25
26
|
|
27
|
+
#include <jansson.h>
|
26
28
|
#include <string.h>
|
27
29
|
|
28
30
|
/* To provide timings features if available.
|
@@ -293,7 +295,7 @@ static boolean createTagsForEntry (const char *const entryName)
|
|
293
295
|
verbose ("excluding \"%s\"\n", entryName);
|
294
296
|
else if (status->isSymbolicLink && ! Option.followLinks)
|
295
297
|
verbose ("ignoring \"%s\" (symbolic link)\n", entryName);
|
296
|
-
else if (! status->exists
|
298
|
+
else if (! status->exists)
|
297
299
|
error (WARNING | PERROR, "cannot open source file \"%s\"", entryName);
|
298
300
|
else if (status->isDirectory)
|
299
301
|
resize = recurseIntoDirectory (entryName);
|
@@ -466,6 +468,65 @@ static boolean etagsInclude (void)
|
|
466
468
|
return (boolean)(Option.etags && Option.etagsInclude != NULL);
|
467
469
|
}
|
468
470
|
|
471
|
+
static void interactiveJsonMode ()
|
472
|
+
{
|
473
|
+
char buffer[1024];
|
474
|
+
json_t *request;
|
475
|
+
|
476
|
+
openTagFile ();
|
477
|
+
fprintf (stdout, "{\"name\": \"" PROGRAM_NAME "\", \"version\": \"" PROGRAM_VERSION "\"}\n");
|
478
|
+
fflush (stdout);
|
479
|
+
|
480
|
+
while (fgets (buffer, sizeof(buffer), stdin)) {
|
481
|
+
if (buffer[0] == '\n')
|
482
|
+
continue;
|
483
|
+
|
484
|
+
request = json_loads (buffer, JSON_DISABLE_EOF_CHECK, NULL);
|
485
|
+
if (! request) {
|
486
|
+
error (FATAL, "invalid json");
|
487
|
+
goto next;
|
488
|
+
}
|
489
|
+
|
490
|
+
json_t *command = json_object_get (request, "command");
|
491
|
+
if (! command) {
|
492
|
+
error (FATAL, "command name not found");
|
493
|
+
goto next;
|
494
|
+
}
|
495
|
+
|
496
|
+
if (!strcmp ("list-parsers", json_string_value (command))) {
|
497
|
+
} else if (!strcmp ("generate-tags", json_string_value (command))) {
|
498
|
+
json_int_t size = -1;
|
499
|
+
const char *filename;
|
500
|
+
|
501
|
+
if (json_unpack (request, "{s?I ss}", "size", &size, "filename", &filename) == -1) {
|
502
|
+
error (FATAL, "invalid generate-tags request");
|
503
|
+
goto next;
|
504
|
+
}
|
505
|
+
|
506
|
+
if (size == -1) { /* read from disk */
|
507
|
+
createTagsForEntry (filename);
|
508
|
+
} else { /* read nbytes from stream */
|
509
|
+
size_t nbytes = (size_t)size;
|
510
|
+
File.buffer = malloc (nbytes+1);
|
511
|
+
File.buffer [nbytes] = 0;
|
512
|
+
File.buffer_size = fread (File.buffer, 1, nbytes, stdin);
|
513
|
+
parseFile (filename);
|
514
|
+
free (File.buffer);
|
515
|
+
File.buffer = NULL;
|
516
|
+
}
|
517
|
+
|
518
|
+
fprintf (stdout, "{\"completed\": \"generate-tags\"}\n");
|
519
|
+
fflush (stdout);
|
520
|
+
} else {
|
521
|
+
error (FATAL, "unknown command name");
|
522
|
+
goto next;
|
523
|
+
}
|
524
|
+
|
525
|
+
next:
|
526
|
+
json_decref (request);
|
527
|
+
}
|
528
|
+
}
|
529
|
+
|
469
530
|
static void makeTags (cookedArgs *args)
|
470
531
|
{
|
471
532
|
clock_t timeStamps [3];
|
@@ -478,7 +539,7 @@ static void makeTags (cookedArgs *args)
|
|
478
539
|
if (filesRequired ())
|
479
540
|
error (FATAL, "No files specified. Try \"%s --help\".",
|
480
541
|
getExecutableName ());
|
481
|
-
else if (! Option.recurse && !
|
542
|
+
else if (! Option.recurse && ! etagsInclude ())
|
482
543
|
return;
|
483
544
|
}
|
484
545
|
|
@@ -506,10 +567,6 @@ static void makeTags (cookedArgs *args)
|
|
506
567
|
if (! files && Option.recurse)
|
507
568
|
resize = recurseIntoDirectory (".");
|
508
569
|
|
509
|
-
if (Option.stdinFileName)
|
510
|
-
{
|
511
|
-
resize = createTagsForEntry(Option.stdinFileName);
|
512
|
-
}
|
513
570
|
|
514
571
|
timeStamp (1);
|
515
572
|
|
@@ -564,7 +621,11 @@ extern int main (int __unused__ argc, char **argv)
|
|
564
621
|
verbose ("Reading initial options from command line\n");
|
565
622
|
parseOptions (args);
|
566
623
|
checkOptions ();
|
567
|
-
|
624
|
+
if (Option.json)
|
625
|
+
interactiveJsonMode ();
|
626
|
+
else
|
627
|
+
makeTags (args);
|
628
|
+
|
568
629
|
|
569
630
|
/* Clean up.
|
570
631
|
*/
|
@@ -148,6 +148,7 @@ optionValues Option = {
|
|
148
148
|
FALSE, /* --tag-relative */
|
149
149
|
FALSE, /* --totals */
|
150
150
|
FALSE, /* --line-directives */
|
151
|
+
FALSE, /* --json */
|
151
152
|
#ifdef DEBUG
|
152
153
|
0, 0 /* -D, -b */
|
153
154
|
#endif
|
@@ -228,6 +229,8 @@ static optionDescription LongOptionDescription [] = {
|
|
228
229
|
{1," Print this option summary."},
|
229
230
|
{1," --if0=[yes|no]"},
|
230
231
|
{1," Should C code within #if 0 conditional branches be parsed [no]?"},
|
232
|
+
{1," --json"},
|
233
|
+
{1," Enter interactive json command mode."},
|
231
234
|
{1," --<LANG>-kinds=[+|-]kinds"},
|
232
235
|
{1," Enable/disable tag kinds for language <LANG>."},
|
233
236
|
{1," --langdef=name"},
|
@@ -396,7 +399,7 @@ extern void setDefaultTagFileName (void)
|
|
396
399
|
extern boolean filesRequired (void)
|
397
400
|
{
|
398
401
|
boolean result = FilesRequired;
|
399
|
-
if (Option.recurse || Option.
|
402
|
+
if (Option.recurse || Option.json)
|
400
403
|
result = FALSE;
|
401
404
|
return result;
|
402
405
|
}
|
@@ -960,14 +963,12 @@ static void processLanguageForceOption (
|
|
960
963
|
Option.language = language;
|
961
964
|
}
|
962
965
|
|
963
|
-
static void
|
964
|
-
|
966
|
+
static void processJsonOption (
|
967
|
+
const char *const option,
|
968
|
+
const char *const parameter __unused__)
|
965
969
|
{
|
966
|
-
|
967
|
-
|
968
|
-
}
|
969
|
-
|
970
|
-
Option.stdinFileName = stringCopy(parameter);
|
970
|
+
Option.json = TRUE;
|
971
|
+
Option.tagFileName = stringCopy ("-");
|
971
972
|
}
|
972
973
|
|
973
974
|
static char* skipPastMap (char* p)
|
@@ -1389,6 +1390,7 @@ static parametricOption ParametricOptions [] = {
|
|
1389
1390
|
{ "filter-terminator", processFilterTerminatorOption, TRUE },
|
1390
1391
|
{ "format", processFormatOption, TRUE },
|
1391
1392
|
{ "help", processHelpOption, TRUE },
|
1393
|
+
{ "json", processJsonOption, TRUE },
|
1392
1394
|
{ "lang", processLanguageForceOption, FALSE },
|
1393
1395
|
{ "language", processLanguageForceOption, FALSE },
|
1394
1396
|
{ "language-force", processLanguageForceOption, FALSE },
|
@@ -1401,8 +1403,7 @@ static parametricOption ParametricOptions [] = {
|
|
1401
1403
|
{ "list-languages", processListLanguagesOption, TRUE },
|
1402
1404
|
{ "options", processOptionFile, FALSE },
|
1403
1405
|
{ "sort", processSortOption, TRUE },
|
1404
|
-
{ "version", processVersionOption, TRUE }
|
1405
|
-
{ "stdin-filename", processStdinFileName, FALSE }
|
1406
|
+
{ "version", processVersionOption, TRUE }
|
1406
1407
|
};
|
1407
1408
|
|
1408
1409
|
static booleanOption BooleanOptions [] = {
|
@@ -1693,7 +1694,7 @@ extern void previewFirstOption (cookedArgs* const args)
|
|
1693
1694
|
else if (strcmp (args->item, "options") == 0 &&
|
1694
1695
|
strcmp (args->parameter, "NONE") == 0)
|
1695
1696
|
{
|
1696
|
-
fprintf (stderr, "No options will be read from files or environment\n")
|
1697
|
+
/* fprintf (stderr, "No options will be read from files or environment\n");*/
|
1697
1698
|
SkipConfiguration = TRUE;
|
1698
1699
|
cArgForth (args);
|
1699
1700
|
}
|
@@ -1830,7 +1831,6 @@ extern void freeOptionResources (void)
|
|
1830
1831
|
freeString (&Option.tagFileName);
|
1831
1832
|
freeString (&Option.fileList);
|
1832
1833
|
freeString (&Option.filterTerminator);
|
1833
|
-
freeString (&Option.stdinFileName);
|
1834
1834
|
|
1835
1835
|
freeList (&Excluded);
|
1836
1836
|
freeList (&Option.ignore);
|