]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
c0de361f | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | /* | |
7 | ** constants.h | |
8 | */ | |
9 | ||
10 | /* | |
1b8ae690 | 11 | * This is constants.h from Mike Smith's Win32 port of splint. |
885824d3 | 12 | * Modified by Herbert 04/19/97: |
13 | * added conditional 'OS2' to conditional 'MSDOS' | |
14 | */ | |
15 | ||
16 | # ifndef CONSTANTS_H | |
17 | # define CONSTANTS_H | |
18 | ||
fbace05a | 19 | # if defined(MSDOS) |
885824d3 | 20 | /*@constant observer char *RCFILE; @*/ |
11db3170 | 21 | # define RCFILE "splint.rc" |
885824d3 | 22 | # else |
23 | /*@constant observer char *RCFILE; @*/ | |
11db3170 | 24 | # define RCFILE ".splintrc" |
25 | ||
26 | /*@constant observer char *ALTRCFILE; @*/ | |
27 | # define ALTRCFILE ".lclintrc" | |
885824d3 | 28 | # endif |
29 | ||
28bf4b0b | 30 | /*@constant observer cstring LARCH_PATH; @*/ |
31 | # define LARCH_PATH cstring_makeLiteralTemp ("LARCH_PATH") | |
885824d3 | 32 | |
33 | /*@constant observer char *LCLIMPORTDIR; @*/ | |
34 | # define LCLIMPORTDIR "LCLIMPORTDIR" | |
35 | ||
36 | /*@constant observer char *LLSTDLIBS_NAME; @*/ | |
155af98d | 37 | # define LLSTDLIBS_NAME "standard" |
885824d3 | 38 | |
39 | /*@constant observer char *LLSTRICTLIBS_NAME; @*/ | |
155af98d | 40 | # define LLSTRICTLIBS_NAME "standardstrict" |
885824d3 | 41 | |
42 | /*@constant observer char *LLUNIXLIBS_NAME; @*/ | |
43 | # define LLUNIXLIBS_NAME "unix" | |
44 | ||
45 | /*@constant observer char *LLUNIXSTRICTLIBS_NAME; @*/ | |
46 | # define LLUNIXSTRICTLIBS_NAME "unixstrict" | |
47 | ||
48 | /*@constant observer char *LLPOSIXLIBS_NAME; @*/ | |
49 | # define LLPOSIXLIBS_NAME "posix" | |
50 | ||
51 | /*@constant observer char *LLPOSIXSTRICTLIBS_NAME; @*/ | |
52 | # define LLPOSIXSTRICTLIBS_NAME "posixstrict" | |
53 | ||
54 | /*@constant observer cstring REFSNAME; @*/ | |
55 | # define REFSNAME cstring_makeLiteralTemp ("refs") | |
56 | ||
57 | /* | |
58 | ** Used to be .lldmp. Truncated to .lcd to fix within | |
59 | ** MS-DOS filename limitations. | |
60 | */ | |
61 | ||
62 | /*@constant observer char *DUMP_SUFFIX; @*/ | |
63 | # define DUMP_SUFFIX ".lcd" | |
64 | ||
11db3170 | 65 | /* |
66 | ** All valid libraries start with this | |
67 | */ | |
68 | ||
69 | /*@constant observer char *LIBRARY_MARKER@*/ | |
70 | # define LIBRARY_MARKER ";;; Splint Library " | |
71 | ||
3be9a165 | 72 | /*@constant int MAX_NAME_LENGTH=256; @*/ |
fc97bef4 | 73 | # define MAX_NAME_LENGTH 1024 |
885824d3 | 74 | |
3be9a165 | 75 | /*@constant int MAX_LINE_LENGTH=1024; @*/ |
885824d3 | 76 | # define MAX_LINE_LENGTH 1024 |
77 | ||
3be9a165 | 78 | /*@constant int MAX_DUMP_LINE_LENGTH=16384; @*/ |
28bf4b0b | 79 | # define MAX_DUMP_LINE_LENGTH 16384 |
885824d3 | 80 | |
3be9a165 | 81 | /*@constant int MINLINELEN=20; @*/ |
885824d3 | 82 | # define MINLINELEN 20 |
83 | ||
11db3170 | 84 | |
885824d3 | 85 | /* |
86 | ** WARNING: Can't use macros in token for cgrammar.l --> | |
87 | ** must keep these consistent! | |
88 | */ | |
89 | ||
90 | /*@constant observer char *LLMRCODE; @*/ | |
91 | # define LLMRCODE "@QLMR" | |
92 | /* MUST be 5 chars = defin[e]. The number of spaces between the | |
93 | # and the d is the sixth tag. | |
94 | */ | |
95 | ||
96 | /*@constant observer char *PPMRCODE; @*/ | |
97 | # define PPMRCODE "@@MR@@" | |
98 | ||
6ee276d2 | 99 | # ifdef OS2 |
210066f9 | 100 | /*@constant observer char *DEFAULT_SYSTEMDIR; @*/ |
6ee276d2 | 101 | # define DEFAULT_SYSTEMDIR "/os2/" |
102 | # else | |
210066f9 | 103 | /*@constant observer char *DEFAULT_SYSTEMDIR; @*/ |
885824d3 | 104 | # define DEFAULT_SYSTEMDIR "/usr/" |
6ee276d2 | 105 | # endif |
885824d3 | 106 | |
107 | /*@constant char DEFAULT_COMMENTCHAR; @*/ | |
108 | # define DEFAULT_COMMENTCHAR '@' | |
109 | ||
3be9a165 | 110 | /*@constant int DEFAULT_LINELEN=80; @*/ |
885824d3 | 111 | # define DEFAULT_LINELEN 80 |
112 | ||
3be9a165 | 113 | /*@constant int DEFAULT_BUGSLIMIT=3; @*/ |
28bf4b0b | 114 | # define DEFAULT_BUGSLIMIT 3 |
115 | ||
3be9a165 | 116 | /*@constant int DEFAULT_INDENTSPACES=3; @*/ |
28bf4b0b | 117 | # define DEFAULT_INDENTSPACES 3 |
118 | ||
16c024b5 | 119 | /* |
120 | ** Setting this to 0 means emacs compile mode will | |
121 | ** jump to the locations in message hints. | |
122 | */ | |
123 | ||
124 | /*@constant int DEFAULT_LOCINDENTSPACES=3; @*/ | |
125 | # define DEFAULT_LOCINDENTSPACES 3 | |
126 | ||
885824d3 | 127 | /* |
128 | ** These constants are based on implementation limits in ANSI standard, | |
129 | ** Section 3.1. | |
130 | */ | |
131 | ||
27c9e640 | 132 | /*@constant int ANSI89_EXTERNALNAMELEN=6; @*/ |
133 | # define ANSI89_EXTERNALNAMELEN 6 | |
885824d3 | 134 | |
27c9e640 | 135 | /*@constant int ANSI89_INTERNALNAMELEN=31; @*/ |
136 | # define ANSI89_INTERNALNAMELEN 31 | |
885824d3 | 137 | |
27c9e640 | 138 | /*@constant int ANSI89_CONTROLNESTDEPTH=15; @*/ |
139 | # define ANSI89_CONTROLNESTDEPTH 15 | |
885824d3 | 140 | |
27c9e640 | 141 | /*@constant int ANSI89_STRINGLITERALLEN=509; @*/ |
142 | # define ANSI89_STRINGLITERALLEN 509 | |
885824d3 | 143 | |
27c9e640 | 144 | /*@constant int ANSI89_INCLUDENEST=8; @*/ |
145 | # define ANSI89_INCLUDENEST 8 | |
885824d3 | 146 | |
27c9e640 | 147 | /*@constant int ANSI89_NUMSTRUCTFIELDS=127; @*/ |
148 | # define ANSI89_NUMSTRUCTFIELDS 127 | |
885824d3 | 149 | |
27c9e640 | 150 | /*@constant int ANSI89_NUMENUMMEMBERS=127; @*/ |
151 | # define ANSI89_NUMENUMMEMBERS 127 | |
152 | ||
153 | /* | |
154 | ** From ISO C99 5.2.4.1 | |
155 | */ | |
156 | ||
157 | /*@constant int ISO99_EXTERNALNAMELEN=31; @*/ | |
158 | # define ISO99_EXTERNALNAMELEN 31 | |
159 | ||
160 | /*@constant int ISO99_INTERNALNAMELEN=63; @*/ | |
161 | # define ISO99_INTERNALNAMELEN 63 | |
162 | ||
163 | /*@constant int ISO99_CONTROLNESTDEPTH=63; @*/ | |
164 | # define ISO99_CONTROLNESTDEPTH 63 | |
165 | ||
166 | /*@constant int ISO99_STRINGLITERALLEN=4095; @*/ | |
167 | # define ISO99_STRINGLITERALLEN 4095 | |
168 | ||
169 | /*@constant int ISO99_INCLUDENEST=63; @*/ | |
170 | # define ISO99_INCLUDENEST 63 | |
171 | ||
172 | /*@constant int ISO99_NUMSTRUCTFIELDS=1023 @*/ | |
173 | # define ISO99_NUMSTRUCTFIELDS 1023 | |
174 | ||
175 | /*@constant int ISO99_NUMENUMMEMBERS=1023 @*/ | |
176 | # define ISO99_NUMENUMMEMBERS 1023 | |
885824d3 | 177 | |
3be9a165 | 178 | /*@constant int DEFAULT_LIMIT=-1; @*/ |
885824d3 | 179 | # define DEFAULT_LIMIT -1 /* unlimited messages */ |
180 | ||
181 | /*@constant char PFX_UPPERCASE; @*/ | |
182 | # define PFX_UPPERCASE '^' | |
183 | ||
184 | /*@constant char PFX_LOWERCASE; @*/ | |
185 | # define PFX_LOWERCASE '&' | |
186 | ||
187 | /*@constant char PFX_ANY; @*/ | |
188 | # define PFX_ANY '?' | |
189 | ||
190 | /*@constant char PFX_DIGIT; @*/ | |
191 | # define PFX_DIGIT '#' | |
192 | ||
193 | /*@constant char PFX_NOTUPPER; @*/ | |
194 | # define PFX_NOTUPPER '%' | |
195 | ||
196 | /*@constant char PFX_NOTLOWER; @*/ | |
197 | # define PFX_NOTLOWER '~' | |
198 | ||
199 | /*@constant char PFX_ANYLETTER; @*/ | |
200 | # define PFX_ANYLETTER '$' | |
201 | ||
202 | /*@constant char PFX_ANYLETTERDIGIT; @*/ | |
203 | # define PFX_ANYLETTERDIGIT '/' | |
11db3170 | 204 | |
885824d3 | 205 | /* |
0bd4c301 | 206 | ** _Bool is defined by ISO C99 (replaced old lltx_Bool) |
885824d3 | 207 | */ |
208 | ||
209 | /*@constant observer char *DEFAULT_BOOLTYPE;@*/ | |
0bd4c301 | 210 | # define DEFAULT_BOOLTYPE "_Bool" |
885824d3 | 211 | |
212 | /*@constant observer char *PRAGMA_EXPAND; @*/ | |
213 | # define PRAGMA_EXPAND "expand" | |
214 | ||
3be9a165 | 215 | /*@constant int PRAGMA_LEN_EXPAND=6; @*/ |
885824d3 | 216 | # define PRAGMA_LEN_EXPAND 6 |
217 | ||
218 | /*@constant int MAX_PRAGMA_LEN; @*/ | |
219 | # define MAX_PRAGMA_LEN PRAGMA_LEN_EXPAND | |
220 | ||
885824d3 | 221 | /* |
222 | ** Flex doesn't pre-process input, so remember to copy these manually | |
223 | ** to cscanner.l. | |
224 | */ | |
225 | ||
226 | /*@constant observer char *BEFORE_COMMENT_MARKER@*/ | |
227 | # define BEFORE_COMMENT_MARKER "%{" | |
228 | ||
229 | /*@constant observer char *AFTER_COMMENT_MARKER@*/ | |
230 | # define AFTER_COMMENT_MARKER "%}" | |
231 | ||
232 | # else | |
233 | # error "Multiple include" | |
234 | # endif |