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.
13 #if defined(OPTION_WRITE) || defined(VAXC)
16 # define CONST_OPTION const
22 #include "general.h" /* must always come first */
36 /* This stores the command line options.
38 typedef struct sOptionValues
{
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 */
44 struct sExtFields
{ /* extension field content control */
47 boolean implementation
;
55 boolean filePosition
; /* Write file position */
56 boolean argList
; /* Write function and macro argumentlist */
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 */
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 */
91 extern CONST_OPTION optionValues Option
;
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: */