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