r5098
[geany-mirror.git] / tagmanager / options.h
blob73fd6b26e10276e7b10158978e6b49a2586f0dac
1 /*
3 * Copyright (c) 1998-2001, Darren Hiebert
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License.
8 * Defines external interface to option processing.
9 */
10 #ifndef _OPTIONS_H
11 #define _OPTIONS_H
13 #if defined(OPTION_WRITE) || defined(VAXC)
14 # define CONST_OPTION
15 #else
16 # define CONST_OPTION const
17 #endif
20 * INCLUDE FILES
22 #include "general.h" /* must always come first */
24 #include <stdarg.h>
26 #include "args.h"
27 #include "parse.h"
28 #include "strlist.h"
29 #include "vstring.h"
32 * DATA DECLARATIONS
36 /* This stores the command line options.
38 typedef struct sOptionValues {
39 struct sInclude {
40 boolean fileNames; /* include tags for source file names */
41 boolean qualifiedTags; /* include tags for qualified class members */
42 boolean fileScope; /* include tags of file scope only */
43 } include;
44 struct sExtFields { /* extension field content control */
45 boolean access;
46 boolean fileScope;
47 boolean implementation;
48 boolean inheritance;
49 boolean kind;
50 boolean kindKey;
51 boolean kindLong;
52 boolean language;
53 boolean lineNumber;
54 boolean scope;
55 boolean filePosition; /* Write file position */
56 boolean argList; /* Write function and macro argumentlist */
57 } extensionFields;
58 stringList* ignore; /* -I name of file containing tokens to ignore */
59 boolean append; /* -a append to "tags" file */
60 boolean backward; /* -B regexp patterns search backwards */
61 enum eLocate {
62 EX_MIX, /* line numbers for defines, patterns otherwise */
63 EX_LINENUM, /* -n only line numbers in tag file */
64 EX_PATTERN /* -N only patterns in tag file */
65 } locate; /* --excmd EX command used to locate tag */
66 boolean recurse; /* -R recurse into directories */
67 boolean sorted; /* -u,--sort sort tags */
68 boolean verbose; /* -V verbose */
69 boolean xref; /* -x generate xref output instead */
70 char *fileList; /* -L name of file containing names of files */
71 char *tagFileName; /* -o name of tags file */
72 stringList* headerExt; /* -h header extensions */
73 stringList* etagsInclude;/* --etags-include list of TAGS files to include*/
74 unsigned int tagFileFormat;/* --format tag file format (level) */
75 boolean if0; /* --if0 examine code within "#if 0" branch */
76 boolean kindLong; /* --kind-long */
77 langType language; /* --lang specified language override */
78 boolean followLinks; /* --link follow symbolic links? */
79 boolean filter; /* --filter behave as filter: files in, tags out */
80 char* filterTerminator; /* --filter-terminator string to output */
81 boolean qualifiedTags; /* --qualified-tags include class-qualified tag */
82 boolean tagRelative; /* --tag-relative file paths relative to tag file */
83 boolean printTotals; /* --totals print cumulative statistics */
84 boolean lineDirectives; /* --linedirectives process #line directives */
85 boolean nestFunction; /* --nest Nest inside function blocks for tags */
86 } optionValues;
89 * GLOBAL VARIABLES
91 extern CONST_OPTION optionValues Option;
94 * FUNCTION PROTOTYPES
96 extern void verbose (const char *const format, ...) __printf__ (1, 2);
97 extern void freeList (stringList** const pString);
98 extern void setDefaultTagFileName (void);
100 extern const char *fileExtension (const char *const fileName);
101 extern boolean isIncludeFile (const char *const fileName);
102 extern boolean isIgnoreToken (const char *const name, boolean *const pIgnoreParens, const char **const replacement);
103 extern void readOptionConfiguration (void);
104 extern void initOptions (void);
105 extern void freeOptionResources (void);
107 void addIgnoreListFromFile (const char *const fileName);
109 #endif /* _OPTIONS_H */
111 /* vi:set tabstop=8 shiftwidth=4: */