#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "cpplib.h"
#include "cpphash.h"
#include "intl.h"
-static void print_location PARAMS ((cpp_reader *, unsigned int, unsigned int));
+static void print_location (cpp_reader *, unsigned int, unsigned int);
/* Print the logical file location (LINE, COL) in preparation for a
diagnostic. Outputs the #include chain if it has changed. A line
of zero suppresses the include stack, and outputs the program name
instead. */
static void
-print_location (pfile, line, col)
- cpp_reader *pfile;
- unsigned int line, col;
+print_location (cpp_reader *pfile, unsigned int line, unsigned int col)
{
if (!pfile->buffer || line == 0)
fprintf (stderr, "%s: ", progname);
the correct place by default. Returns 0 if the error has been
suppressed. */
int
-_cpp_begin_message (pfile, code, line, column)
- cpp_reader *pfile;
- int code;
- unsigned int line, column;
+_cpp_begin_message (cpp_reader *pfile, int code, unsigned int line,
+ unsigned int column)
{
int level = DL_EXTRACT (code);
/* Print an error at the location of the previously lexed token. */
void
-cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...))
+cpp_error (cpp_reader * pfile, int level, const char *msgid, ...)
{
unsigned int line, column;
-
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, cpp_reader *, pfile);
- VA_FIXEDARG (ap, int, level);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_list ap;
+
+ va_start (ap, msgid);
if (pfile->buffer)
{
if (_cpp_begin_message (pfile, level, line, column))
v_message (msgid, ap);
- VA_CLOSE (ap);
+ va_end (ap);
}
/* Print an error at a specific location. */
void
-cpp_error_with_line VPARAMS ((cpp_reader *pfile, int level,
- unsigned int line, unsigned int column,
- const char *msgid, ...))
+cpp_error_with_line (cpp_reader *pfile, int level,
+ unsigned int line, unsigned int column,
+ const char *msgid, ...)
{
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, cpp_reader *, pfile);
- VA_FIXEDARG (ap, int, level);
- VA_FIXEDARG (ap, unsigned int, line);
- VA_FIXEDARG (ap, unsigned int, column);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_list ap;
+
+ va_start (ap, msgid);
if (_cpp_begin_message (pfile, level, line, column))
v_message (msgid, ap);
- VA_CLOSE (ap);
+ va_end (ap);
}
void
-cpp_errno (pfile, level, msgid)
- cpp_reader *pfile;
- int level;
- const char *msgid;
+cpp_errno (cpp_reader *pfile, int level, const char *msgid)
{
if (msgid[0] == '\0')
msgid = _("stdout");