]> andersk Git - splint.git/blame - src/Headers/cpplib.h
Committed my changes (but there are several splintme errors currently).
[splint.git] / src / Headers / cpplib.h
CommitLineData
885824d3 1/* Definitions for CPP library.
2 Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3 Written by Per Bothner, 1994-95.
4
5This program is free software; you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by the
7Free Software Foundation; either version 2, or (at your option) any
8later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 In other words, you are welcome to use, share and improve this program.
20 You are forbidden to forbid anyone else to use, share and improve
21 what you give them. Help stamp out software-hoarding! */
22
23#include <sys/types.h>
24#include <sys/stat.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
885824d3 30typedef enum cpp_token (*parseUnderflow) (cppReader *);
31typedef void (*parseCleanup) (cppBuffer *, cppReader *);
32
3e3ec469 33/* Structure returned by create_definition */
34typedef struct s_macrodef macroDef;
35
885824d3 36/* A parse_marker indicates a previous position,
37 which we can backtrack to. */
38
39struct parse_marker {
40 /*@dependent@*/ cppBuffer *buf;
41 /*@dependent@*/ /*@null@*/ struct parse_marker *next;
42 int position;
43};
44
45/* The arglist structure is built by do_define to tell
46 collect_definition where the argument names begin. That
47 is, for a define like "#define f(x,y,z) foo+x-bar*y", the arglist
48 would contain pointers to the strings x, y, and z.
49 Collect_definition would then build a DEFINITION node,
50 with reflist nodes pointing to the places x, y, and z had
51 appeared. So the arglist is just convenience data passed
52 between these two routines. It is not kept around after
53 the current #define has been processed and entered into the
54 hash table. */
55
56struct arglist {
57 /*@null@*/ struct arglist *next;
58 /*@dependent@*/ char *name;
abd7f895 59 size_t length;
885824d3 60 int argno;
61 int rest_args;
62};
63
3e3ec469 64extern enum cpp_token cpplib_getToken (cppReader *);
65extern enum cpp_token cpplib_getTokenForceExpand (cppReader *);
66extern enum cpp_token cpplib_getTokenAux (cppReader *, bool p_forceExpand);
885824d3 67extern int /*@alt void@*/ cppSkipHspace (cppReader *);
68
69/* This frees resources used by PFILE. */
70extern /*@unused@*/ void cppCleanup (cppReader *p_pfile);
71
72struct cppBuffer {
73 /*@null@*/ /*@only@*/ char *buf;
74 /*@null@*/ /*@exposed@*/ char *cur;
75 /*@null@*/ /*@exposed@*/ char *rlimit; /* end of valid data */
76 /*@null@*/ /*@exposed@*/ char *alimit; /* end of allocated buffer */
77 /*@null@*/ /*@exposed@*/ char *prev;
78
79 /*@dependent@*/ cstring fname;
80
81 /* Filename specified with #line command. */
82 /*@exposed@*/ cstring nominal_fname;
83
84 /* Record where in the search path this file was found.
85 For #include_next. */
86
87 /*@dependent@*/ /*@null@*/ struct file_name_list *dir;
88
89 long line_base;
90 int lineno; /* Line number at CPP_LINE_BASE. */
91 int colno; /* Column number at CPP_LINE_BASE. */
92 parseUnderflow underflow;
93 parseCleanup cleanup;
94
cd7d9b17 95 /*@dependent@*/ hashNode hnode;
885824d3 96 /*@dependent@*/ /*@null@*/ struct parse_marker *marks;
97 /* Value of if_stack at start of this file.
98 Used to prohibit unmatched #endif (etc) in an include file. */
99 /*@null@*/ /*@exposed@*/ struct if_stack *if_stack;
100
101 /* True if this is a header file included using <FILENAME>. */
102 char system_header_p;
103 char seen_eof;
104
105 /* True if buffer contains escape sequences.
106 Currently there are three kinds:
107 "@-" means following identifier should not be macro-expanded.
108 "@ " means a token-separator. This turns into " " in final output
109 if not stringizing and needed to separate tokens; otherwise nothing.
110 "@@" means a normal '@'.
111 (An '@' inside a string stands for itself and is never an escape.) */
112 bool has_escapes;
113};
114
115struct cpp_pending; /* Forward declaration - for C++. */
116struct file_name_map_list;
117
118/* Maximum nesting of cppBuffers. We use a static limit, partly for
119 efficiency, and partly to limit runaway recursion. */
120
121/*@constant int CPP_STACK_MAX; @*/
122# define CPP_STACK_MAX 200
123
124/* A cppReader encapsulates the "state" of a pre-processor run.
125 Applying cppGetToken repeatedly yields a stream of pre-processor
126 tokens. Usually, there is only one cppReader object active. */
127
128struct cppReader {
129 parseUnderflow get_token;
130 /*@dependent@*/ /*@null@*/ cppBuffer *buffer;
131 cppBuffer buffer_stack[CPP_STACK_MAX];
132
133 int errors; /* Error counter for exit code */
134 cppOptions *opts;
135 /* void *data; */
136
137 /* A buffer used for both for cppGetToken's output, and also internally. */
138 /*@relnull@*/ char *token_buffer;
139
140 /* Alocated size of token_buffer. cppReader_reserve allocates space. */
141 size_t token_buffer_size;
142 /* End of the written part of token_buffer. */
143 /*@exposed@*/ char *limit;
144
145 /* Line where a newline was first seen in a string constant. */
146 int multiline_string_line;
147
148 /* Current depth in #include directives that use <...>. */
149 int system_include_depth;
150
151 /* List of other included files.
152 If ->control_macro if nonzero, the file had a #ifndef
153 around the entire contents, and ->control_macro gives the macro name. */
154 /*@owned@*/ /*@null@*/ struct file_name_list *all_include_files;
155
156 /* Current maximum length of directory names in the search path
157 for include files. (Altered as we get more of them.) */
158 int max_include_len;
159
160 /*@null@*/ struct if_stack *if_stack;
161
162 /* Nonzero means we are inside an IF during a -pcp run. In this mode
163 macro expansion is done, and preconditions are output for all macro
164 uses requiring them. */
165 char pcp_inside_if;
166
167 /* Nonzero means we have printed (while error reporting) a list of
168 containing files that matches the current status. */
169 char input_stack_listing_current;
170
171 /* If non-zero, macros are not expanded. */
172 bool no_macro_expand;
173
174 /* Print column number in error messages. */
175 bool show_column;
176
177 /* If true, character between '<' and '>' are a single (string) token. */
178 char parsing_include_directive;
179
180 /* True if escape sequences (as described for has_escapes in
181 parse_buffer) should be emitted. */
182 char output_escapes;
183
184 /* 0: Have seen non-white-space on this line.
185 1: Only seen white space so far on this line.
186 2: Only seen white space so far in this file. */
187 char only_seen_white;
188
189 int lineno;
190
191 /*@null@*/ /*@observer@*/ struct tm *timebuf;
885824d3 192};
193
194/*@constant int cppReader_fatalErrorLimit; @*/
195#define cppReader_fatalErrorLimit 1000
196
197/* True if we have seen a "fatal" error. */
3e3ec469 198extern bool cpplib_fatalErrors (cppReader *) /*@*/ ;
199#define cpplib_fatalErrors(READER) ((READER)->errors >= cppReader_fatalErrorLimit)
885824d3 200
3e3ec469 201extern int cpplib_bufPeek (cppBuffer *) /*@*/ ;
885824d3 202
203/* Macros for manipulating the token_buffer. */
204
205/*@notfunction@*/
206#define CPP_OUT_BUFFER(PFILE) ((PFILE)->token_buffer)
207
208/* Number of characters currently in PFILE's output buffer. */
209
3e3ec469 210extern size_t cpplib_getWritten (/*@sef@*/ cppReader *) /*@*/ ;
211# define cpplib_getWritten(PFILE) \
885824d3 212 (size_fromInt ((PFILE)->limit - (PFILE)->token_buffer))
213
3e3ec469 214extern /*@exposed@*/ char *cpplib_getPWritten (cppReader *) /*@*/ ;
215# define cpplib_getPWritten(PFILE) ((PFILE)->limit)
885824d3 216
3e3ec469 217extern /*@null@*/ macroDef
218cpplib_createDefinition (/*@dependent@*/ cstring p_def, fileloc p_loc,
219 bool p_predefinition, bool p_noExpand) ;
220
885824d3 221/* Make sure PFILE->token_buffer has space for at least N more characters. */
222
3e3ec469 223extern void cpplib_reserve (/*@sef@*/ cppReader *, /*@sef@*/ size_t);
224#define cpplib_reserve(PFILE, N) \
225 (cpplib_getWritten (PFILE) + (N) > (PFILE)->token_buffer_size \
885824d3 226 && (cppReader_growBuffer (PFILE, (N)), 0))
227
228/* Append string STR (of length N) to PFILE's output buffer.
229 Assume there is enough space. */
230
231extern void cppReader_putStrN (/*@sef@*/ cppReader *p_file,
232 /*@unique@*/ char *p_str, /*@sef@*/ size_t p_n)
233 /*@modifies *p_file; @*/;
234
235#define cppReader_putStrN(PFILE, STR, N) \
236 (memcpy ((PFILE)->limit, STR, (N)), (PFILE)->limit += (N))
237
238extern void cppReader_setWritten (/*@sef@*/ /*@special@*/ cppReader *p_file, size_t)
239 /*@uses p_file, *p_file, p_file->token_buffer;@*/
240 /*@sets p_file->limit;@*/
241 /*@modifies *p_file@*/ ;
242
243# define cppReader_setWritten(PFILE,N) \
244 ((PFILE)->limit = (PFILE)->token_buffer + (N))
245
246extern /*@dependent@*/ /*@exposed@*/ cppOptions *CPPOPTIONS (/*@special@*/ cppReader *p_pfile)
247 /*@uses p_pfile->opts@*/ ;
248#define CPPOPTIONS(PFILE) ((PFILE)->opts)
249
250/*@notfunction@*/
251#define CPPBUFFER(PFILE) ((PFILE)->buffer)
252
253/* Checks for null */
254extern /*@exposed@*/ cppBuffer *
255cppReader_getBufferSafe (/*@special@*/ cppReader *p_pfile)
256 /*@uses p_pfile->buffer@*/
257 /*@modifies nothing@*/ ;
258
259extern /*@exposed@*/ cppBuffer *cppBuffer_prevBuffer (cppBuffer *) /*@*/ ;
260
261/* The bottom of the buffer stack. */
262extern /*@exposed@*/ cppBuffer *cppReader_nullBuffer (/*@special@*/ cppReader *p_pfile) /*@uses p_pfile->buffer_stack@*/ /*@*/ ;
263# define cppReader_nullBuffer(PFILE) (&(PFILE)->buffer_stack[CPP_STACK_MAX])
264
265/* Pointed to by cppReader::data. */
266struct cppOptions {
267 /*@dependent@*/ cstring in_fname;
268
269 /* Name of output file, for error messages. */
270 /*@dependent@*/ cstring out_fname;
271
6fcd0b1e 272 /*@only@*/ struct file_name_map_list *map_list;
885824d3 273
274 /* Non-0 means -v, so print the full set of include dirs. */
275 bool verbose;
276
277 /* Nonzero means use extra default include directories for C++. */
278
279 bool cplusplus;
280
281 /* Nonzero means handle cplusplus style comments */
282
283 bool cplusplus_comments;
284
285 /* Nonzero means this is an assembly file, and allow
286 unknown directives, which could be comments. */
287
288 int lang_asm;
289
290 /* Nonzero means turn NOTREACHED into #pragma NOTREACHED etc */
291
292 bool for_lint;
293
294 /* Nonzero means handle CHILL comment syntax
295 and output CHILL string delimiter for __DATE___ etc. */
296
297 bool chill;
298
299 /* Nonzero means copy comments into the output file. */
300
301 bool put_out_comments;
302
303 /* Nonzero means don't process the ANSI trigraph sequences. */
304
305 bool no_trigraphs;
306
307 /* Nonzero means print names of header files (-H). */
308
309 bool print_include_names;
310
311 /* Nonzero means try to make failure to fit ANSI C an error. */
312
313 bool pedantic_errors;
314
315 /* Nonzero means don't print warning messages. -w. */
b072092f 316 /* bool inhibit_warnings; -- removed evans 2001-07-19 */
885824d3 317
318 /* Nonzero means warn if slash-star appears in a comment. */
885824d3 319 bool warn_comments;
320
321 /* Nonzero means warn if a macro argument is (or would be)
322 stringified with -traditional. */
323
324 bool warn_stringify;
325 bool warnings_are_errors;
326 bool no_output;
327
328 /* Nonzero means don't output line number information. */
329
330 bool no_line_commands;
331
332/* Nonzero means output the text in failing conditionals,
333 inside #failed ... #endfailed. */
334
335 char output_conditionals;
336
1d239d69 337 bool ignore_srcdir;
885824d3 338
339 /* Zero means dollar signs are punctuation.
340 This used to be needed for conformance to the C Standard,
341 before the C Standard was corrected. */
342 bool dollars_in_ident;
343
344 /* Nonzero means try to imitate old fashioned non-ANSI preprocessor. */
345 bool traditional;
346
347 /* Nonzero for the 1989 C Standard, including corrigenda and amendments. */
348 bool c89;
349
350 /* Nonzero means give all the error messages the ANSI standard requires. */
351 bool pedantic;
352
353 bool done_initializing;
354
355 /* First dir to search */
356 /*@owned@*/ struct file_name_list *include;
6fcd0b1e 357
885824d3 358 /* First dir to search for <file> */
359 /* This is the first element to use for #include <...>.
360 If it is 0, use the entire chain for such includes. */
361 /*@dependent@*/ struct file_name_list *first_bracket_include;
362 /* This is the first element in the chain that corresponds to
363 a directory of system header files. */
364 /*@dependent@*/ struct file_name_list *first_system_include;
365 /*@exposed@*/ struct file_name_list *last_include; /* Last in chain */
366
367 /* Chain of include directories to put at the end of the other chain. */
368 struct file_name_list *after_include;
369 /*@exposed@*/ struct file_name_list *last_after_include; /* Last in chain */
370
371 /* Chain to put at the start of the system include files. */
372 struct file_name_list *before_system;
373 /*@exposed@*/ struct file_name_list *last_before_system; /* Last in chain */
374
375 /* Directory prefix that should replace `/usr' in the standard
376 include file directories. */
377 char *include_prefix;
378
379 char inhibit_predefs;
380 char no_standard_includes;
381 char no_standard_cplusplus_includes;
382
383 /*
384 ** DUMP_NAMES means pass #define and the macro name through to output.
385 ** DUMP_DEFINITIONS means pass the whole definition (plus #define) through
386 */
387
388 /*@-enummemuse@*/
389 enum { DUMP_NONE = 0, DUMP_NAMES, DUMP_DEFINITIONS }
390 dump_macros;
391 /*@=enummemuse@*/
392
393/* Nonzero means pass all #define and #undef directives which we actually
394 process through to the output stream. This feature is used primarily
395 to allow cc1 to record the #defines and #undefs for the sake of
396 debuggers which understand about preprocessor macros, but it may
397 also be useful with -E to figure out how symbols are defined, and
398 where they are defined. */
399 int debug_output;
400};
401
402extern bool cppReader_isTraditional (/*@special@*/ cppReader *p_pfile)
403 /*@uses p_pfile->opts@*/
404 /*@modifies nothing@*/ ;
405
406#define cppReader_isTraditional(PFILE) (CPPOPTIONS(PFILE)-> traditional)
407
408extern bool cppReader_isPedantic (cppReader *) /*@*/;
409#define cppReader_isPedantic(PFILE) (CPPOPTIONS (PFILE)->pedantic)
410
411/* The structure of a node in the hash table. The hash table
412 has entries for all tokens defined by #define commands (type T_MACRO),
413 plus some special tokens like __LINE__ (these each have their own
414 type, and the appropriate code is run when that type of node is seen.
415 It does not contain control words like "#define", which are recognized
416 by a separate piece of code. */
417
418/* different flavors of hash nodes --- also used in keyword table */
419enum node_type {
420 T_NONE = 0,
421 T_DEFINE = 1, /* the `#define' keyword */
422 T_INCLUDE, /* the `#include' keyword */
423 T_INCLUDE_NEXT, /* the `#include_next' keyword */
424 T_IFDEF, /* the `#ifdef' keyword */
425 T_IFNDEF, /* the `#ifndef' keyword */
426 T_IF, /* the `#if' keyword */
427 T_ELSE, /* `#else' */
428 T_PRAGMA, /* `#pragma' */
429 T_ELIF, /* `#elif' */
430 T_UNDEF, /* `#undef' */
431 T_LINE, /* `#line' */
432 T_ERROR, /* `#error' */
433 T_WARNING, /* `#warning' */
434 T_ENDIF, /* `#endif' */
435 T_IDENT, /* `#ident', used on system V. */
436 T_SPECLINE, /* special symbol `__LINE__' */
437 T_DATE, /* `__DATE__' */
438 T_FILE, /* `__FILE__' */
439 T_BASE_FILE, /* `__BASE_FILE__' */
440 T_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */
441 T_VERSION, /* `__VERSION__' */
442 T_SIZE_TYPE, /* `__SIZE_TYPE__' */
443 T_PTRDIFF_TYPE, /* `__PTRDIFF_TYPE__' */
444 T_WCHAR_TYPE, /* `__WCHAR_TYPE__' */
445 T_USER_LABEL_PREFIX_TYPE, /* `__USER_LABEL_PREFIX__' */
446 T_REGISTER_PREFIX_TYPE, /* `__REGISTER_PREFIX__' */
447 T_TIME, /* `__TIME__' */
448 T_CONST, /* Constant value, used by `__STDC__' */
449 T_MACRO, /* macro defined by `#define' */
450 T_DISABLED, /* macro temporarily turned off for rescan */
451 T_SPEC_DEFINED, /* special `defined' macro for use in #if statements */
452 T_PCSTRING, /* precompiled string (hashval is KEYDEF *) */
453 T_UNUSED /* Used for something not defined. */
454} ;
455
3e3ec469 456struct s_macrodef
885824d3 457{
458 /*@null@*/ struct definition *defn;
2209bcb7 459 /*@exposed@*/ /*@relnull@*/ char *symnam; /* null if defn is null */
abd7f895 460 size_t symlen;
885824d3 461};
462
463/* Structure allocated for every #define. For a simple replacement
464 such as
465 #define foo bar ,
466 nargs = -1, the `pattern' list is null, and the expansion is just
467 the replacement text. Nargs = 0 means a functionlike macro with no args,
468 e.g.,
469 #define getchar() getc (stdin) .
470 When there are args, the expansion is the replacement text with the
471 args squashed out, and the reflist is a list describing how to
472 build the output from the input: e.g., "3 chars, then the 1st arg,
473 then 9 chars, then the 3rd arg, then 0 chars, then the 2nd arg".
474 The chars here come from the expansion. Whatever is left of the
475 expansion after the last arg-occurrence is copied after that arg.
476 Note that the reflist can be arbitrarily long---
477 its length depends on the number of times the arguments appear in
478 the replacement text, not how many args there are. Example:
479 #define f(x) x+x+x+x+x+x+x would have replacement text "++++++" and
480 pattern list
481 { (0, 1), (1, 1), (1, 1), ..., (1, 1), NULL }
482 where (x, y) means (nchars, argno). */
483
484typedef struct definition DEFINITION;
485
486struct definition {
487 int nargs;
488 size_t length; /* length of expansion string */
489 bool predefined; /* True if the macro was builtin or */
490 /* came from the command line */
491 /*@dependent@*/ char *expansion;
492 long line; /* Line number of definition */
493 /*@exposed@*/ cstring file; /* File of definition */
494
495 bool noExpand; /* True if macro should not be expanded in code. */
496 bool rest_args; /* Nonzero if last arg. absorbs the rest */
497
498 /*@null@*/ struct reflist {
499 /*@null@*/ /*@dependent@*/ struct reflist *next;
500 bool stringify; /* nonzero if this arg was preceded by a
501 # operator. */
502 bool raw_before; /* Nonzero if a ## operator before arg. */
503 bool raw_after; /* Nonzero if a ## operator after arg. */
504 bool rest_args; /* Nonzero if this arg. absorbs the rest */
505 int nchars; /* Number of literal chars to copy before
506 this arg occurrence. */
507 int argno; /* Number of arg to substitute (origin-0) */
508 } *pattern;
509
510 union {
511 /* Names of macro args, concatenated in reverse order
512 with comma-space between them.
513 The only use of this is that we warn on redefinition
514 if this differs between the old and new definitions. */
515 /*@null@*/ char *argnames;
516 } args;
517};
518
519/* Stack of conditionals currently in progress
520 (including both successful and failing conditionals). */
521
522struct if_stack {
523 /*@null@*/ struct if_stack *next; /* for chaining to the next stack frame */
524 /*@observer@*/ cstring fname; /* copied from input when frame is made */
525 int lineno; /* similarly */
526 int if_succeeded; /* true if a leg of this if-group
527 has been passed through rescan */
528
529 /* For #ifndef at start of file, this is the macro name tested. */
530 /*@null@*/ /*@dependent@*/ char *control_macro;
531
532
533 enum node_type type; /* type of last directive seen in this group */
534};
535typedef struct if_stack cppIfStackFrame;
536
80489f0a 537extern void cppBuffer_getLineAndColumn (/*@null@*/ cppBuffer *, /*@out@*/ int *,
538 /*@out@*/ /*@null@*/ int *);
885824d3 539extern /*@exposed@*/ /*@null@*/ cppBuffer *cppReader_fileBuffer (cppReader *);
540
541extern void cppReader_growBuffer (cppReader *, size_t);
542extern int cppReader_parseEscape (cppReader *, char **);
543
544extern /*@exposed@*/ cppBuffer *cppReader_popBuffer (cppReader *p_pfile)
545 /*@modifies p_pfile@*/ ;
546
547#ifdef __cplusplus
548}
549#endif
550
551extern void cppReader_skipRestOfLine (cppReader *p_pfile);
552
553# include <stdlib.h>
554
885824d3 555/*@constant observer char *GCC_INCLUDE_DIR;@*/
8fe44445 556/* This is defined by config.h now. */
885824d3 557
885824d3 558/*@constant observer char *GCC_INCLUDE_DIR2@*/
8fe44445 559/* This is defined by config.h now. */
885824d3 560
561struct file_name_list
562{
563 /*@owned@*/ /*@null@*/ struct file_name_list *next;
564 /*@dependent@*/ cstring fname;
565
566 /* If the following is nonzero, it is a macro name.
567 Don't include the file again if that macro is defined. */
568
569 /*@dependent@*/ /*@null@*/ char *control_macro;
570 /* If the following is nonzero, it is a C-language system include
571 directory. */
572
573 bool c_system_include_path;
574
575 /* Mapping of file names for this directory. */
576 /*@exposed@*/ /*@relnull@*/ /*@reldef@*/ struct file_name_map *name_map;
577
578 /* Non-zero if name_map is valid. */
579 bool got_name_map;
580};
581
582extern void cppReader_addIncludeChain (/*@special@*/ cppReader *p_pfile,
6fcd0b1e 583 /*@only@*/ struct file_name_list *p_dir)
885824d3 584 /*@uses p_pfile->opts, p_pfile->max_include_len@*/
585 /*@modifies p_pfile, p_dir@*/ ;
586
587extern void cppReader_define (cppReader *p_pfile, char *p_str);
588extern void cppReader_finish (cppReader *p_pfile);
3e3ec469 589extern void cpplib_init (/*@out@*/ cppReader *p_pfile) ;
885824d3 590extern void cppOptions_init (/*@out@*/ cppOptions *p_opts);
3e3ec469 591extern void cpplib_initializeReader (cppReader *p_pfile) /*@modifies p_pfile@*/ ;
885824d3 592
593extern int cppReader_startProcess (cppReader *p_pfile, cstring p_fname);
594
595extern bool isIdentifierChar (char) /*@*/ ;
596
597/* Find the largest host integer type and set its size and type. */
598
599#ifndef HOST_BITS_PER_WIDE_INT
600
601#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
602/*@notfunction@*/
603#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
604/*@notfunction@*/
605#define HOST_WIDE_INT long
606#else
607/*@notfunction@*/
608#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
609/*@notfunction@*/
610#define HOST_WIDE_INT long
611/* was int */
612#endif
613
614#endif
615
616#ifndef S_ISREG
617/*@-macrounrecog@*/
618#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
619/*@=macrounrecog@*/
620#endif
621
622#ifndef S_ISDIR
623/*@-macrounrecog@*/
624#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
625/*@=macrounrecog@*/
626#endif
627
628#ifndef INCLUDE_LEN_FUDGE
629/*@constant int INCLUDE_LEN_FUDGE@*/
630#define INCLUDE_LEN_FUDGE 0
631#endif
632
abd7f895 633extern size_t cppReader_checkMacroName (cppReader *p_pfile, char *p_symname,
634 cstring p_usage);
885824d3 635
86d93ed3 636extern struct operation cppReader_parseNumber (cppReader * p_pfile, char * p_start, int p_olen) /*@requires maxRead(p_start) >= (p_olen - 1) @*/;
885824d3 637
This page took 0.18633 seconds and 5 git commands to generate.