cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
[deliverable/binutils-gdb.git] / libiberty / _doprnt.c
index 8ce14158c991bd6f47a3fb0ea31bc3db3df32cbf..6aa3fd88f0523d8b07c080f90b87728bd9331a57 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a version of _doprnt in terms of fprintf.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002   Free Software Foundation, Inc.
+   Copyright (C) 1998-2017 Free Software Foundation, Inc.
    Contributed by Kaveh Ghazi  (ghazi@caip.rutgers.edu)  3/29/98
 
 This program is free software; you can redistribute it and/or modify it
@@ -14,18 +14,14 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include "config.h"
 #include "ansidecl.h"
 #include "safe-ctype.h"
 
 #include <stdio.h>
-#ifdef ANSI_PROTOTYPES
 #include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
@@ -79,10 +75,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
       } while (0)
 
 int
-_doprnt (format, ap, stream)
-  const char * format;
-  va_list ap;
-  FILE * stream;
+_doprnt (const char *format, va_list ap, FILE *stream)
 {
   const char * ptr = format;
   char specifier[128];
@@ -223,23 +216,23 @@ _doprnt (format, ap, stream)
     fflush(stdin); \
 } while (0)
 
-static int checkit PARAMS ((const char * format, ...)) ATTRIBUTE_PRINTF_1;
+static int checkit (const char * format, ...) ATTRIBUTE_PRINTF_1;
 
 static int
-checkit VPARAMS ((const char* format, ...))
+checkit (const char* format, ...)
 {
   int result;
-  VA_OPEN (args, format);
-  VA_FIXEDARG (args, char *, format);
+  va_list args;
+  va_start (args, format);
 
   result = _doprnt (format, args, stdout);
-  VA_CLOSE (args);
+  va_end (args);
 
   return result;
 }
 
 int
-main ()
+main (void)
 {
   RESULT(checkit ("<%d>\n", 0x12345678));
   RESULT(printf ("<%d>\n", 0x12345678));
This page took 0.036906 seconds and 4 git commands to generate.