diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-01-13 01:00:01 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-01-13 01:00:01 +0000 |
commit | 7e96d768fe4e8fa821372cc7c7cd707efb917a3b (patch) | |
tree | 954953c60f9ccf103dbd07196bae6f6aedd8d36c /gcc/cpplib.c | |
parent | 23de1fbfd0e36837e18117cb79a5f336a375eb40 (diff) | |
download | gcc-7e96d768fe4e8fa821372cc7c7cd707efb917a3b.zip gcc-7e96d768fe4e8fa821372cc7c7cd707efb917a3b.tar.gz gcc-7e96d768fe4e8fa821372cc7c7cd707efb917a3b.tar.bz2 |
cppinit.c (cpp_handle_option): help_only is now part of the cpp_options structure.
* cppinit.c (cpp_handle_option): help_only is now part of the
cpp_options structure.
* cpplib.c (cpp_errors, cpp_get_options, cpp_get_callbacks,
cpp_set_callbacks): New functions.
* cpplib.h (cpp_callbacks): Break out as a named structure.
(cpp_options): Move help_only here from cpp_reader.
(CPP_FATAL_ERRORS): Update to use cpp_errors.
(cpp_errors, cpp_get_options, cpp_get_callbacks,
cpp_set_callbacks): New prototypes.
* cppmain.c (main): Update for help_only.
From-SVN: r38971
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index c915f77..2064120 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1714,6 +1714,39 @@ handle_assertion (pfile, str, type) run_directive (pfile, type, BUF_CL_OPTION, str, count); } +/* The number of errors for a given reader. */ +unsigned int +cpp_errors (pfile) + cpp_reader *pfile; +{ + return pfile->errors; +} + +/* The options structure. */ +cpp_options * +cpp_get_options (pfile) + cpp_reader *pfile; +{ + return &pfile->opts; +} + +/* The callbacks structure. */ +cpp_callbacks * +cpp_get_callbacks (pfile) + cpp_reader *pfile; +{ + return &pfile->cb; +} + +/* Copy the given callbacks structure to our own. */ +void +cpp_set_callbacks (pfile, cb) + cpp_reader *pfile; + cpp_callbacks *cb; +{ + pfile->cb = *cb; +} + /* Push a new buffer on the buffer stack. Returns the new buffer; it doesn't fail. It does not generate a file change call back; that is the responsibility of the caller. */ |