OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / cpperror.c
index 360bc8c..cb681f0 100644 (file)
@@ -25,20 +25,20 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 #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);
@@ -70,10 +70,8 @@ print_location (pfile, line, col)
    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);
 
@@ -126,14 +124,12 @@ _cpp_begin_message (pfile, code, line, column)
 
 /* 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)
     {
@@ -157,33 +153,27 @@ cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...))
   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");