]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
28bf4b0b | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | /* | |
7 | ** invariant: line1 <= line2 | |
8 | ** if line1 == line2, col1 <= col2. | |
9 | */ | |
10 | ||
11 | # ifndef FLAGMARKER_H | |
12 | # define FLAGMARKER_H | |
13 | ||
14 | typedef enum | |
15 | { | |
16 | FMK_LOCALSET, | |
17 | FMK_IGNOREON, | |
18 | FMK_IGNORECOUNT, | |
19 | FMK_IGNOREOFF, | |
20 | FMK_SUPPRESS | |
21 | } flagMarkerKind ; | |
22 | ||
28bf4b0b | 23 | typedef struct |
885824d3 | 24 | { |
25 | flagMarkerKind kind; | |
26 | flagcode code; | |
27 | ||
28 | /*@reldef@*/ union { | |
29 | ynm set; | |
30 | int nerrors; | |
31 | } info; | |
32 | ||
28bf4b0b | 33 | fileloc loc; |
885824d3 | 34 | } *flagMarker ; |
35 | ||
36 | extern bool flagMarker_isLocalSet (flagMarker p_c) /*@*/ ; | |
37 | # define flagMarker_isLocalSet(c) ((c)->kind == FMK_LOCALSET) | |
38 | ||
39 | extern bool flagMarker_isSuppress (flagMarker p_c) /*@*/ ; | |
40 | # define flagMarker_isSuppress(c) ((c)->kind == FMK_SUPPRESS) | |
41 | ||
42 | extern bool flagMarker_isIgnoreOn (flagMarker p_c) /*@*/ ; | |
43 | # define flagMarker_isIgnoreOn(c) ((c)->kind == FMK_IGNOREON) | |
44 | ||
45 | extern bool flagMarker_isIgnoreOff (flagMarker p_c) /*@*/ ; | |
46 | # define flagMarker_isIgnoreOff(c) ((c)->kind == FMK_IGNOREOFF) | |
47 | ||
48 | extern bool flagMarker_isIgnoreCount (flagMarker p_c) /*@*/ ; | |
49 | # define flagMarker_isIgnoreCount(c) ((c)->kind == FMK_IGNORECOUNT) | |
50 | ||
51 | extern flagMarker | |
52 | flagMarker_createLocalSet (flagcode p_code, ynm p_set, fileloc p_loc) /*@*/ ; | |
53 | ||
54 | extern flagMarker | |
55 | flagMarker_createIgnoreOn (fileloc p_loc) /*@*/ ; | |
56 | ||
57 | extern flagMarker | |
58 | flagMarker_createIgnoreOff (fileloc p_loc) /*@*/ ; | |
59 | ||
60 | extern flagMarker | |
61 | flagMarker_createIgnoreCount (int p_count, fileloc p_loc) /*@*/ ; | |
62 | ||
63 | extern flagMarker | |
64 | flagMarker_createSuppress (flagcode p_code, fileloc p_loc) /*@*/ ; | |
65 | ||
66 | extern void flagMarker_free (/*@only@*/ flagMarker p_c) ; | |
67 | ||
68 | extern bool flagMarker_sameFile (flagMarker p_c, fileloc p_loc) /*@*/ ; | |
69 | extern /*@only@*/ cstring flagMarker_unparse (flagMarker p_c) /*@*/ ; | |
70 | ||
71 | extern bool flagMarker_beforeMarker (flagMarker p_c, fileloc p_loc) /*@*/ ; | |
72 | ||
73 | extern ynm flagMarker_getSet (flagMarker p_f) /*@*/ ; | |
74 | extern flagcode flagMarker_getCode (flagMarker p_f) /*@*/ ; | |
75 | extern int flagMarker_getCount (flagMarker p_f) /*@*/ ; | |
76 | ||
77 | extern /*@observer@*/ fileloc flagMarker_getLoc (flagMarker p_f) /*@*/ ; | |
78 | ||
79 | # define flagMarker_getLoc(f) ((f)->loc) | |
80 | ||
81 | # else | |
82 | # error "Multiple include" | |
83 | # endif |