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