ctags.rb 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/Gemfile +2 -0
  2. data/Rakefile +23 -0
  3. data/ctags.rb.gemspec +23 -0
  4. data/ext/.gitignore +3 -0
  5. data/ext/extconf.rb +15 -0
  6. data/ext/vendor/exuberant-ctags/.gitignore +6 -0
  7. data/ext/vendor/exuberant-ctags/.indent.pro +31 -0
  8. data/ext/vendor/exuberant-ctags/COPYING +340 -0
  9. data/ext/vendor/exuberant-ctags/EXTENDING.html +386 -0
  10. data/ext/vendor/exuberant-ctags/FAQ +371 -0
  11. data/ext/vendor/exuberant-ctags/INSTALL +215 -0
  12. data/ext/vendor/exuberant-ctags/INSTALL.oth +73 -0
  13. data/ext/vendor/exuberant-ctags/MAINTAINERS +88 -0
  14. data/ext/vendor/exuberant-ctags/Makefile.in +222 -0
  15. data/ext/vendor/exuberant-ctags/NEWS +871 -0
  16. data/ext/vendor/exuberant-ctags/README +73 -0
  17. data/ext/vendor/exuberant-ctags/ant.c +42 -0
  18. data/ext/vendor/exuberant-ctags/argproc.c +505 -0
  19. data/ext/vendor/exuberant-ctags/args.c +274 -0
  20. data/ext/vendor/exuberant-ctags/args.h +63 -0
  21. data/ext/vendor/exuberant-ctags/asm.c +387 -0
  22. data/ext/vendor/exuberant-ctags/asp.c +328 -0
  23. data/ext/vendor/exuberant-ctags/awk.c +81 -0
  24. data/ext/vendor/exuberant-ctags/basic.c +203 -0
  25. data/ext/vendor/exuberant-ctags/beta.c +321 -0
  26. data/ext/vendor/exuberant-ctags/c.c +2932 -0
  27. data/ext/vendor/exuberant-ctags/cobol.c +50 -0
  28. data/ext/vendor/exuberant-ctags/config.h.in +277 -0
  29. data/ext/vendor/exuberant-ctags/configure +7704 -0
  30. data/ext/vendor/exuberant-ctags/configure.ac +532 -0
  31. data/ext/vendor/exuberant-ctags/ctags.1 +1186 -0
  32. data/ext/vendor/exuberant-ctags/ctags.h +28 -0
  33. data/ext/vendor/exuberant-ctags/ctags.html +2087 -0
  34. data/ext/vendor/exuberant-ctags/ctags.spec +40 -0
  35. data/ext/vendor/exuberant-ctags/debug.c +113 -0
  36. data/ext/vendor/exuberant-ctags/debug.h +70 -0
  37. data/ext/vendor/exuberant-ctags/descrip.mms +68 -0
  38. data/ext/vendor/exuberant-ctags/dosbatch.c +42 -0
  39. data/ext/vendor/exuberant-ctags/e_amiga.h +24 -0
  40. data/ext/vendor/exuberant-ctags/e_djgpp.h +47 -0
  41. data/ext/vendor/exuberant-ctags/e_mac.h +143 -0
  42. data/ext/vendor/exuberant-ctags/e_msoft.h +76 -0
  43. data/ext/vendor/exuberant-ctags/e_os2.h +37 -0
  44. data/ext/vendor/exuberant-ctags/e_qdos.h +34 -0
  45. data/ext/vendor/exuberant-ctags/e_riscos.h +58 -0
  46. data/ext/vendor/exuberant-ctags/e_vms.h +31 -0
  47. data/ext/vendor/exuberant-ctags/eiffel.c +1352 -0
  48. data/ext/vendor/exuberant-ctags/entry.c +847 -0
  49. data/ext/vendor/exuberant-ctags/entry.h +103 -0
  50. data/ext/vendor/exuberant-ctags/erlang.c +189 -0
  51. data/ext/vendor/exuberant-ctags/flex.c +2243 -0
  52. data/ext/vendor/exuberant-ctags/fortran.c +2197 -0
  53. data/ext/vendor/exuberant-ctags/general.h +127 -0
  54. data/ext/vendor/exuberant-ctags/get.c +669 -0
  55. data/ext/vendor/exuberant-ctags/get.h +50 -0
  56. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/all-wcprops +47 -0
  57. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/entries +112 -0
  58. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/README.txt.svn-base +5 -0
  59. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regcomp.c.svn-base +3818 -0
  60. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regex.c.svn-base +74 -0
  61. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regex.h.svn-base +575 -0
  62. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regex_internal.c.svn-base +1713 -0
  63. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regex_internal.h.svn-base +773 -0
  64. data/ext/vendor/exuberant-ctags/gnu_regex/.svn/text-base/regexec.c.svn-base +4338 -0
  65. data/ext/vendor/exuberant-ctags/gnu_regex/README.txt +5 -0
  66. data/ext/vendor/exuberant-ctags/gnu_regex/regcomp.c +3818 -0
  67. data/ext/vendor/exuberant-ctags/gnu_regex/regex.c +74 -0
  68. data/ext/vendor/exuberant-ctags/gnu_regex/regex.h +575 -0
  69. data/ext/vendor/exuberant-ctags/gnu_regex/regex_internal.c +1713 -0
  70. data/ext/vendor/exuberant-ctags/gnu_regex/regex_internal.h +773 -0
  71. data/ext/vendor/exuberant-ctags/gnu_regex/regexec.c +4338 -0
  72. data/ext/vendor/exuberant-ctags/html.c +49 -0
  73. data/ext/vendor/exuberant-ctags/jscript.c +1572 -0
  74. data/ext/vendor/exuberant-ctags/keyword.c +258 -0
  75. data/ext/vendor/exuberant-ctags/keyword.h +34 -0
  76. data/ext/vendor/exuberant-ctags/lisp.c +139 -0
  77. data/ext/vendor/exuberant-ctags/lregex.c +704 -0
  78. data/ext/vendor/exuberant-ctags/lua.c +133 -0
  79. data/ext/vendor/exuberant-ctags/mac.c +273 -0
  80. data/ext/vendor/exuberant-ctags/magic.diff +21 -0
  81. data/ext/vendor/exuberant-ctags/main.c +584 -0
  82. data/ext/vendor/exuberant-ctags/main.h +32 -0
  83. data/ext/vendor/exuberant-ctags/maintainer.mak +476 -0
  84. data/ext/vendor/exuberant-ctags/make.c +217 -0
  85. data/ext/vendor/exuberant-ctags/matlab.c +44 -0
  86. data/ext/vendor/exuberant-ctags/mk_bc3.mak +46 -0
  87. data/ext/vendor/exuberant-ctags/mk_bc5.mak +49 -0
  88. data/ext/vendor/exuberant-ctags/mk_djg.mak +18 -0
  89. data/ext/vendor/exuberant-ctags/mk_manx.mak +65 -0
  90. data/ext/vendor/exuberant-ctags/mk_mingw.mak +31 -0
  91. data/ext/vendor/exuberant-ctags/mk_mpw.mak +130 -0
  92. data/ext/vendor/exuberant-ctags/mk_mvc.mak +40 -0
  93. data/ext/vendor/exuberant-ctags/mk_os2.mak +104 -0
  94. data/ext/vendor/exuberant-ctags/mk_qdos.mak +100 -0
  95. data/ext/vendor/exuberant-ctags/mk_sas.mak +63 -0
  96. data/ext/vendor/exuberant-ctags/mkinstalldirs +40 -0
  97. data/ext/vendor/exuberant-ctags/ocaml.c +1842 -0
  98. data/ext/vendor/exuberant-ctags/options.c +1842 -0
  99. data/ext/vendor/exuberant-ctags/options.h +155 -0
  100. data/ext/vendor/exuberant-ctags/parse.c +677 -0
  101. data/ext/vendor/exuberant-ctags/parse.h +129 -0
  102. data/ext/vendor/exuberant-ctags/parsers.h +63 -0
  103. data/ext/vendor/exuberant-ctags/pascal.c +267 -0
  104. data/ext/vendor/exuberant-ctags/perl.c +382 -0
  105. data/ext/vendor/exuberant-ctags/php.c +237 -0
  106. data/ext/vendor/exuberant-ctags/python.c +771 -0
  107. data/ext/vendor/exuberant-ctags/qdos.c +106 -0
  108. data/ext/vendor/exuberant-ctags/read.c +569 -0
  109. data/ext/vendor/exuberant-ctags/read.h +116 -0
  110. data/ext/vendor/exuberant-ctags/readtags.c +959 -0
  111. data/ext/vendor/exuberant-ctags/readtags.h +252 -0
  112. data/ext/vendor/exuberant-ctags/rexx.c +39 -0
  113. data/ext/vendor/exuberant-ctags/routines.c +891 -0
  114. data/ext/vendor/exuberant-ctags/routines.h +134 -0
  115. data/ext/vendor/exuberant-ctags/ruby.c +408 -0
  116. data/ext/vendor/exuberant-ctags/scheme.c +111 -0
  117. data/ext/vendor/exuberant-ctags/sh.c +115 -0
  118. data/ext/vendor/exuberant-ctags/slang.c +41 -0
  119. data/ext/vendor/exuberant-ctags/sml.c +212 -0
  120. data/ext/vendor/exuberant-ctags/sort.c +230 -0
  121. data/ext/vendor/exuberant-ctags/sort.h +32 -0
  122. data/ext/vendor/exuberant-ctags/source.mak +122 -0
  123. data/ext/vendor/exuberant-ctags/sql.c +2112 -0
  124. data/ext/vendor/exuberant-ctags/strlist.c +281 -0
  125. data/ext/vendor/exuberant-ctags/strlist.h +54 -0
  126. data/ext/vendor/exuberant-ctags/tcl.c +116 -0
  127. data/ext/vendor/exuberant-ctags/tex.c +524 -0
  128. data/ext/vendor/exuberant-ctags/verilog.c +340 -0
  129. data/ext/vendor/exuberant-ctags/vhdl.c +835 -0
  130. data/ext/vendor/exuberant-ctags/vim.c +636 -0
  131. data/ext/vendor/exuberant-ctags/vstring.c +232 -0
  132. data/ext/vendor/exuberant-ctags/vstring.h +85 -0
  133. data/ext/vendor/exuberant-ctags/yacc.c +40 -0
  134. data/lib/ctags/exuberant.rb +45 -0
  135. data/lib/ctags/version.rb +3 -0
  136. data/lib/ctags.rb +6 -0
  137. data/test/test_ctags.rb +24 -0
  138. metadata +233 -0
@@ -0,0 +1,155 @@
1
+ /*
2
+ * $Id: options.h 443 2006-05-30 04:37:13Z darren $
3
+ *
4
+ * Copyright (c) 1998-2003, Darren Hiebert
5
+ *
6
+ * This source code is released for free distribution under the terms of the
7
+ * GNU General Public License.
8
+ *
9
+ * Defines external interface to option processing.
10
+ */
11
+ #ifndef _OPTIONS_H
12
+ #define _OPTIONS_H
13
+
14
+ #if defined(OPTION_WRITE) || defined(VAXC)
15
+ # define CONST_OPTION
16
+ #else
17
+ # define CONST_OPTION const
18
+ #endif
19
+
20
+ /*
21
+ * INCLUDE FILES
22
+ */
23
+ #include "general.h" /* must always come first */
24
+
25
+ #include <stdarg.h>
26
+
27
+ #include "args.h"
28
+ #include "parse.h"
29
+ #include "strlist.h"
30
+ #include "vstring.h"
31
+
32
+ /*
33
+ * DATA DECLARATIONS
34
+ */
35
+
36
+ typedef enum { OPTION_NONE, OPTION_SHORT, OPTION_LONG } optionType;
37
+
38
+ typedef struct sCookedArgs {
39
+ /* private */
40
+ Arguments* args;
41
+ char *shortOptions;
42
+ char simple[2];
43
+ boolean isOption;
44
+ boolean longOption;
45
+ const char* parameter;
46
+ /* public */
47
+ char* item;
48
+ } cookedArgs;
49
+
50
+ typedef enum eLocate {
51
+ EX_MIX, /* line numbers for defines, patterns otherwise */
52
+ EX_LINENUM, /* -n only line numbers in tag file */
53
+ EX_PATTERN /* -N only patterns in tag file */
54
+ } exCmd;
55
+
56
+ typedef enum sortType {
57
+ SO_UNSORTED,
58
+ SO_SORTED,
59
+ SO_FOLDSORTED
60
+ } sortType;
61
+
62
+ struct sInclude {
63
+ boolean fileNames; /* include tags for source file names */
64
+ boolean qualifiedTags; /* include tags for qualified class members */
65
+ boolean fileScope; /* include tags of file scope only */
66
+ };
67
+
68
+ struct sExtFields { /* extension field content control */
69
+ boolean access;
70
+ boolean fileScope;
71
+ boolean implementation;
72
+ boolean inheritance;
73
+ boolean kind;
74
+ boolean kindKey;
75
+ boolean kindLong;
76
+ boolean language;
77
+ boolean lineNumber;
78
+ boolean scope;
79
+ boolean signature;
80
+ boolean typeRef;
81
+ };
82
+
83
+ /* This stores the command line options.
84
+ */
85
+ typedef struct sOptionValues {
86
+ struct sInclude include;/* --extra extra tag inclusion */
87
+ struct sExtFields extensionFields;/* --fields extension field control */
88
+ stringList* ignore; /* -I name of file containing tokens to ignore */
89
+ boolean append; /* -a append to "tags" file */
90
+ boolean backward; /* -B regexp patterns search backwards */
91
+ boolean etags; /* -e output Emacs style tags file */
92
+ exCmd locate; /* --excmd EX command used to locate tag */
93
+ boolean recurse; /* -R recurse into directories */
94
+ sortType sorted; /* -u,--sort sort tags */
95
+ boolean verbose; /* -V verbose */
96
+ boolean xref; /* -x generate xref output instead */
97
+ char *fileList; /* -L name of file containing names of files */
98
+ char *tagFileName; /* -o name of tags file */
99
+ stringList* headerExt; /* -h header extensions */
100
+ stringList* etagsInclude;/* --etags-include list of TAGS files to include*/
101
+ unsigned int tagFileFormat;/* --format tag file format (level) */
102
+ boolean if0; /* --if0 examine code within "#if 0" branch */
103
+ boolean kindLong; /* --kind-long */
104
+ langType language; /* --lang specified language override */
105
+ boolean followLinks; /* --link follow symbolic links? */
106
+ boolean filter; /* --filter behave as filter: files in, tags out */
107
+ char* filterTerminator; /* --filter-terminator string to output */
108
+ boolean tagRelative; /* --tag-relative file paths relative to tag file */
109
+ boolean printTotals; /* --totals print cumulative statistics */
110
+ boolean lineDirectives; /* --linedirectives process #line directives */
111
+ char* stdinFileName; /* --from-stdin use this as the filename and get the file content from stdin */
112
+ #ifdef DEBUG
113
+ long debugLevel; /* -D debugging output */
114
+ unsigned long breakLine;/* -b source line at which to call lineBreak() */
115
+ #endif
116
+ } optionValues;
117
+
118
+ /*
119
+ * GLOBAL VARIABLES
120
+ */
121
+ extern CONST_OPTION optionValues Option;
122
+
123
+ /*
124
+ * FUNCTION PROTOTYPES
125
+ */
126
+ extern void verbose (const char *const format, ...) __printf__ (1, 2);
127
+ extern void freeList (stringList** const pString);
128
+ extern void setDefaultTagFileName (void);
129
+ extern void checkOptions (void);
130
+ extern boolean filesRequired (void);
131
+ extern void testEtagsInvocation (void);
132
+
133
+ extern cookedArgs* cArgNewFromString (const char* string);
134
+ extern cookedArgs* cArgNewFromArgv (char* const* const argv);
135
+ extern cookedArgs* cArgNewFromFile (FILE* const fp);
136
+ extern cookedArgs* cArgNewFromLineFile (FILE* const fp);
137
+ extern void cArgDelete (cookedArgs* const current);
138
+ extern boolean cArgOff (cookedArgs* const current);
139
+ extern boolean cArgIsOption (cookedArgs* const current);
140
+ extern const char* cArgItem (cookedArgs* const current);
141
+ extern void cArgForth (cookedArgs* const current);
142
+
143
+ extern boolean isExcludedFile (const char* const name);
144
+ extern boolean isIncludeFile (const char *const fileName);
145
+ extern boolean isIgnoreToken (const char *const name, boolean *const pIgnoreParens, const char **const replacement);
146
+ extern void parseOption (cookedArgs* const cargs);
147
+ extern void parseOptions (cookedArgs* const cargs);
148
+ extern void previewFirstOption (cookedArgs* const cargs);
149
+ extern void readOptionConfiguration (void);
150
+ extern void initOptions (void);
151
+ extern void freeOptionResources (void);
152
+
153
+ #endif /* _OPTIONS_H */
154
+
155
+ /* vi:set tabstop=4 shiftwidth=4: */