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
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 @@
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. */