* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / remote-array.c
index 7f381cd07048c3d643c99242f43ac6cbbb42749f..2ee7c9a49a03a51d355a1b55e016a236141b0961 100644 (file)
 #include "gdbcore.h"
 #include "target.h"
 #include "wait.h"
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 #include <signal.h>
 #include <string.h>
 #include <sys/types.h>
@@ -62,7 +66,7 @@ static char *hex2mem();
     }                                                                  \
   while (0)
 
-static void debuglogs();
+static void debuglogs PARAMS((int, char *, ...));
 static void array_open();
 static void array_close();
 static void array_detach();
@@ -152,6 +156,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
   array_mourn_inferior,                /* to_mourn_inferior */
   0,                           /* to_can_run */
   0,                           /* to_notice_signals */
+  0,                           /* to_thread_alive */
   0,                            /* to_stop */
   process_stratum,             /* to_stratum */
   0,                           /* to_next */
@@ -169,17 +174,24 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
  * printf_monitor -- send data to monitor.  Works just like printf.
  */
 static void
+#ifdef ANSI_PROTOTYPES
+printf_monitor(char *pattern, ...)
+#else
 printf_monitor(va_alist)
      va_dcl
+#endif
 {
   va_list args;
-  char *pattern;
   char buf[PBUFSIZ];
   int i;
 
+#ifdef ANSI_PROTOTYPES
+  va_start(args, pattern);
+#else
+  char *pattern;
   va_start(args);
-
   pattern = va_arg(args, char *);
+#endif
 
   vsprintf(buf, pattern, args);
 
@@ -213,25 +225,34 @@ write_monitor(data, len)
  *     to be formatted and printed. A CR is added after each string is printed.
  */
 static void
+#ifdef ANSI_PROTOTYPES
+debuglogs(int level, char *pattern, ...)
+#else
 debuglogs(va_alist)
      va_dcl
+#endif
 {
   va_list args;
-  char *pattern, *p;
+  char *p;
   unsigned char buf[PBUFSIZ];
   char newbuf[PBUFSIZ];
-  int level, i;
+  int i;
 
+#ifdef ANSI_PROTOTYPES
+  va_start(args, pattern);
+#else
+  char *pattern;
+  int level;
   va_start(args);
-
   level = va_arg(args, int);                   /* get the debug level */
+  pattern = va_arg(args, char *);              /* get the printf style pattern */
+#endif
+
   if ((level <0) || (level > 100)) {
     error ("Bad argument passed to debuglogs(), needs debug level");
     return;
   }
       
-  pattern = va_arg(args, char *);              /* get the printf style pattern */
-
   vsprintf(buf, pattern, args);                        /* format the string */
   
   /* convert some characters so it'll look right in the log */
This page took 0.02357 seconds and 4 git commands to generate.