]> andersk Git - splint.git/blob - src/Headers/flags.h
Cleaned up flags to generate manual help.
[splint.git] / src / Headers / flags.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
4 **
5 */
6 # ifndef FLAGS_H
7 # define FLAGS_H
8
9
10 typedef enum 
11 {
12   FK_ABSTRACT, FK_ANSI, FK_BEHAVIOR, FK_BOUNDS,
13   FK_COMMENTS, FK_COMPLETE, FK_CONTROL, FK_DEBUG, FK_DECL,
14   FK_SYNCOMMENTS, FK_HINTS, FK_SYSTEMFUNCTIONS, FK_ITS4,
15   FK_DEF, FK_DIRECT, FK_DISPLAY, FK_EFFECT, FK_EXPORT,
16   FK_EXPOSURE, 
17   FK_EXTENSIBLE,
18   FK_FORMAT, FK_GLOBAL, FK_GLOBALS, FK_HEADERS,
19   FK_HELP, FK_IGNORERET, FK_INIT, FK_ITER, FK_LIBS, FK_LIMITS,
20   FK_MACROS, FK_MEMORY, FK_MODIFIES, FK_NAMES, FK_NONE,
21   FK_NULL, FK_OPS, FK_PRED, FK_PREPROC, FK_SECRET,
22   FK_SUPPRESS, FK_SYNTAX, FK_TYPE, FK_TYPEEQ, FK_NUMBERS, 
23   FK_POINTER, FK_UNRECOG, FK_USE, FK_BOOL, FK_ALIAS, 
24   FK_PROTOS, FK_SPEC, 
25   FK_IMPLICIT, FK_FILES, FK_ERRORS, FK_UNSPEC, 
26   FK_SPEED, FK_PARAMS, FK_DEAD, FK_SECURITY,
27   FK_LEAK, FK_ARRAY, FK_OBSOLETE, FK_PREFIX, FK_WARNUSE
28 } flagkind;
29
30 extern void listAllCategories (void);
31 extern void printAlphaFlags (void);
32 extern void printAllFlags (bool p_desc, bool p_full);
33 extern void printFlagManual (void);
34
35 extern void flagcode_recordError (flagcode p_f);
36 extern void flagcode_recordSuppressed (flagcode p_f);
37 extern int flagcode_numReported (flagcode p_f);
38 extern bool flagcode_isNamePrefixFlag (flagcode p_f);
39
40 extern /*@only@*/ cstring  describeFlag (cstring p_flagname);
41
42 extern flagcode flags_identifyFlag (cstring p_s) /*@modifies g_msgstream@*/ ;
43 extern flagcode flags_identifyFlagQuiet (cstring p_s) /*@modifies nothing@*/ ;
44
45 extern void setValueFlag (flagcode p_opt, cstring p_arg);
46 extern void setStringFlag (flagcode p_opt, /*@only@*/ cstring p_arg);
47
48 extern /*@observer@*/ cstring flagcode_unparse (flagcode p_code) /*@*/ ;
49 extern int flagcode_valueIndex (flagcode p_f) /*@*/ ;
50 extern int flagcode_stringIndex (flagcode p_f) /*@*/ ;
51
52 extern /*@observer@*/ cstring flagcodeHint (flagcode p_f);
53
54 extern flagkind identifyCategory (cstring p_s) /*@*/ ;
55 extern void printCategory (flagkind p_kind) /*@modifies g_msgstream@*/ ;
56
57 extern bool flagcode_isInvalid (flagcode p_f) /*@*/ ;
58 # define flagcode_isInvalid(f) ((f) == INVALID_FLAG)
59
60 extern bool flagcode_isSkip (flagcode p_f) /*@*/ ;
61 # define flagcode_isSkip(f) ((f) == SKIP_FLAG)
62
63 extern bool flagcode_isValid (flagcode p_f) /*@*/ ;
64 # define flagcode_isValid(f) ((f) != INVALID_FLAG)
65
66 extern bool flagcode_isPassThrough (/*@sef@*/ flagcode p_f);
67 # define flagcode_isPassThrough(f) ((f) == FLG_DEFINE || (f) == FLG_UNDEFINE)
68
69 extern bool flagcode_isLibraryFlag (/*@sef@*/ flagcode p_f);
70 # define flagcode_isLibraryFlag(f) \
71    ((f) == FLG_POSIXLIB || (f) == FLG_POSIXSTRICTLIB \
72     || (f) == FLG_UNIXLIB || (f) == FLG_UNIXSTRICTLIB \
73     || (f) == FLG_STRICTLIB || (f) == FLG_NOLIB \
74     || (f) == FLG_ANSILIB)
75
76 extern bool flagcode_isWarnUseFlag (/*@sef@*/ flagcode p_f);
77 # define flagcode_isWarnUseFlag(f) \
78    ((f) == FLG_BUFFEROVERFLOW || (f) == FLG_BUFFEROVERFLOWHIGH)
79
80 extern bool flagcode_hasNumber (flagcode p_f);
81 extern bool flagcode_hasChar (flagcode p_f);
82 extern bool flagcode_hasString (flagcode p_f);
83 extern bool flagcode_hasArgument (flagcode p_f);
84
85 /*@constant observer cstring DEFAULT_MODE;@*/
86 # define DEFAULT_MODE (cstring_makeLiteralTemp ("standard"))
87
88 extern void flags_initMod (void);
89
90 extern bool isMode (cstring p_s);
91 extern /*@only@*/ cstring describeModes (void);
92 extern void summarizeErrors (void);
93
94 extern bool flagcode_isNameChecksFlag (flagcode p_f);
95 extern bool flagcode_isIdemFlag (flagcode p_f);
96 extern bool flagcode_isModeFlag (flagcode p_f);
97 extern bool flagcode_isSpecialFlag (flagcode p_f);
98 extern bool flagcode_isGlobalFlag (flagcode p_f);
99
100 # else
101 # error "Multiple include"
102 # endif
103
104
105
106
107
108
109
110
111
112
113
114
115
This page took 0.073455 seconds and 5 git commands to generate.