]> andersk Git - splint.git/blob - src/Headers/flags.h
Initial revision
[splint.git] / src / Headers / flags.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
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_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, 
24   FK_LEAK, FK_ARRAY, FK_OBSOLETE, FK_PREFIX
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 extern flagcode identifyFlag (cstring p_s);
38 extern void setValueFlag (flagcode p_opt, cstring p_arg);
39 extern void setStringFlag (flagcode p_opt, /*@only@*/ cstring p_arg);
40
41 extern /*@observer@*/ cstring flagcode_name (flagcode p_code) /*@*/ ;
42 extern int flagcode_valueIndex (flagcode p_f) /*@*/ ;
43 extern int flagcode_stringIndex (flagcode p_f) /*@*/ ;
44 extern /*@observer@*/ cstring flagcode_unparse (flagcode p_f) /*@*/ ;
45 # define flagcode_unparse flagcode_name
46
47 extern /*@observer@*/ cstring flagcodeHint (flagcode p_f);
48
49 extern flagkind identifyCategory (cstring p_s) /*@*/ ;
50 extern void printCategory (flagkind p_kind) /*@modifies g_msgstream@*/ ;
51
52 extern bool flagcode_isInvalid (flagcode p_f);
53 # define flagcode_isInvalid(f) ((f) == INVALID_FLAG)
54
55 extern bool flagcode_isSkip (flagcode p_f);
56 # define flagcode_isSkip(f) ((f) == SKIP_FLAG)
57
58 extern bool flagcode_isValid (flagcode p_f);
59 # define flagcode_isValid(f) ((f) != INVALID_FLAG)
60
61 extern bool flagcode_isPassThrough (/*@sef@*/ flagcode p_f);
62 # define flagcode_isPassThrough(f) ((f) == FLG_DEFINE || (f) == FLG_UNDEFINE)
63
64 extern bool flagcode_isLibraryFlag (/*@sef@*/ flagcode p_f);
65 # define flagcode_isLibraryFlag(f) \
66    ((f) == FLG_POSIXLIB || (f) == FLG_POSIXSTRICTLIB \
67     || (f) == FLG_UNIXLIB || (f) == FLG_UNIXSTRICTLIB \
68     || (f) == FLG_STRICTLIB || (f) == FLG_NOLIB \
69     || (f) == FLG_ANSILIB)
70
71 extern bool flagcode_hasValue (flagcode p_f);
72 extern bool flagcode_hasString (flagcode p_f);
73 extern bool flagcode_hasArgument (flagcode p_f);
74
75 /*@constant observer cstring DEFAULT_MODE;@*/
76 # define DEFAULT_MODE (cstring_makeLiteralTemp ("standard"))
77
78 extern void flags_initMod (void);
79
80 extern bool isMode (cstring p_s);
81 extern /*@only@*/ cstring describeModes (void);
82 extern void summarizeErrors (void);
83
84 extern bool flagcode_isNameChecksFlag (flagcode p_f);
85 extern bool flagcode_isIdemFlag (flagcode p_f);
86 extern bool flagcode_isModeFlag (flagcode p_f);
87 extern bool flagcode_isSpecialFlag (flagcode p_f);
88 extern bool flagcode_isGlobalFlag (flagcode p_f);
89
90 # else
91 # error "Multiple include"
92 # endif
93
94
95
96
97
98
99
100
101
102
103
104
105
This page took 0.054746 seconds and 5 git commands to generate.