diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1996-06-06 20:04:04 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1996-06-06 20:04:04 -0700 |
commit | 194d74937daf2a08daec380a974382916bc3cfeb (patch) | |
tree | e18a4f66177eeb779feffa12e1d17b43732e2068 /gcc/cpplib.h | |
parent | 1c20ae99caa2fc9cef616a71d9a85b88ede29d03 (diff) | |
download | gcc-194d74937daf2a08daec380a974382916bc3cfeb.tar.gz |
cpplib.h (struct parse_file): Removed.
* cpplib.h (struct parse_file): Removed.
(CPP_FATAL_LIMIT, CPP_FATAL_ERRORS, CPP_OUT_BUFFER): New macros.
From-SVN: r12199
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 26171a30485..44a949d2e59 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -29,7 +29,6 @@ extern "C" { typedef unsigned char U_CHAR; -struct parse_file; typedef struct cpp_reader cpp_reader; typedef struct cpp_buffer cpp_buffer; typedef struct cpp_options cpp_options; @@ -266,12 +265,20 @@ struct cpp_reader { #endif }; +#define CPP_FATAL_LIMIT 1000 +/* True if we have seen a "fatal" error. */ +#define CPP_FATAL_ERRORS(READER) ((READER)->errors >= CPP_FATAL_LIMIT) + #define CPP_BUF_PEEK(BUFFER) \ ((BUFFER)->cur < (BUFFER)->rlimit ? *(BUFFER)->cur : EOF) #define CPP_BUF_GET(BUFFER) \ ((BUFFER)->cur < (BUFFER)->rlimit ? *(BUFFER)->cur++ : EOF) #define CPP_FORWARD(BUFFER, N) ((BUFFER)->cur += (N)) +/* Macros for manipulating the token_buffer. */ + +#define CPP_OUT_BUFFER(PFILE) ((PFILE)->token_buffer) + /* Number of characters currently in PFILE's output buffer. */ #define CPP_WRITTEN(PFILE) ((PFILE)->limit - (PFILE)->token_buffer) #define CPP_PWRITTEN(PFILE) ((PFILE)->limit) @@ -298,8 +305,10 @@ struct cpp_reader { #define CPP_SET_WRITTEN(PFILE,N) ((PFILE)->limit = (PFILE)->token_buffer + (N)) #define CPP_OPTIONS(PFILE) ((cpp_options*)(PFILE)->data) + #define CPP_BUFFER(PFILE) ((PFILE)->buffer) #define CPP_PREV_BUFFER(BUFFER) ((BUFFER)+1) +/* The bottom of the buffer stack. */ #define CPP_NULL_BUFFER(PFILE) (&(PFILE)->buffer_stack[CPP_STACK_MAX]) /* Pointed to by cpp_reader::data. */ |