diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-13 01:00:01 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-13 01:00:01 +0000 |
commit | 72b04ca42cc8cde82b0106d3c15f9024a7706923 (patch) | |
tree | 954953c60f9ccf103dbd07196bae6f6aedd8d36c /gcc/cpplib.c | |
parent | 215d428dec85a4c0a5639140a540505c8262796a (diff) | |
download | gcc-72b04ca42cc8cde82b0106d3c15f9024a7706923.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38971 138bc75d-0d04-0410-961f-82ee72b054a4
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 c915f774540..20641200ec9 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. */ |