Making "inline" behave like an attribute. Fixes #1
[arduino-ctags.git] / options.h
blob28b276fd5662af9cff7d814c721c51a501550e77
1 /*
2 * $Id: options.h 443 2006-05-30 04:37:13Z darren $
4 * Copyright (c) 1998-2003, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * Defines external interface to option processing.
11 #ifndef _OPTIONS_H
12 #define _OPTIONS_H
14 #if defined(OPTION_WRITE) || defined(VAXC)
15 # define CONST_OPTION
16 #else
17 # define CONST_OPTION const
18 #endif
21 * INCLUDE FILES
23 #include "general.h" /* must always come first */
25 #include <stdarg.h>
27 #include "args.h"
28 #include "parse.h"
29 #include "strlist.h"
30 #include "vstring.h"
33 * DATA DECLARATIONS
36 typedef enum { OPTION_NONE, OPTION_SHORT, OPTION_LONG } optionType;
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;
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;
56 typedef enum sortType {
57 SO_UNSORTED,
58 SO_SORTED,
59 SO_FOLDSORTED
60 } sortType;
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 */
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 returnType;
81 boolean typeRef;
84 /* This stores the command line options.
86 typedef struct sOptionValues {
87 struct sInclude include;/* --extra extra tag inclusion */
88 struct sExtFields extensionFields;/* --fields extension field control */
89 stringList* ignore; /* -I name of file containing tokens to ignore */
90 boolean append; /* -a append to "tags" file */
91 boolean backward; /* -B regexp patterns search backwards */
92 boolean etags; /* -e output Emacs style tags file */
93 exCmd locate; /* --excmd EX command used to locate tag */
94 boolean recurse; /* -R recurse into directories */
95 sortType sorted; /* -u,--sort sort tags */
96 boolean verbose; /* -V verbose */
97 boolean xref; /* -x generate xref output instead */
98 char *fileList; /* -L name of file containing names of files */
99 char *tagFileName; /* -o name of tags file */
100 stringList* headerExt; /* -h header extensions */
101 stringList* etagsInclude;/* --etags-include list of TAGS files to include*/
102 unsigned int tagFileFormat;/* --format tag file format (level) */
103 boolean if0; /* --if0 examine code within "#if 0" branch */
104 boolean kindLong; /* --kind-long */
105 langType language; /* --lang specified language override */
106 boolean followLinks; /* --link follow symbolic links? */
107 boolean filter; /* --filter behave as filter: files in, tags out */
108 char* filterTerminator; /* --filter-terminator string to output */
109 boolean tagRelative; /* --tag-relative file paths relative to tag file */
110 boolean printTotals; /* --totals print cumulative statistics */
111 boolean lineDirectives; /* --linedirectives process #line directives */
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;
119 * GLOBAL VARIABLES
121 extern CONST_OPTION optionValues Option;
124 * FUNCTION PROTOTYPES
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);
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);
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);
153 #endif /* _OPTIONS_H */
155 /* vi:set tabstop=4 shiftwidth=4: */