diff options
author | J.T. Conklin <jtc@acorntoolworks.com> | 1995-05-18 23:45:31 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@acorntoolworks.com> | 1995-05-18 23:45:31 +0000 |
commit | 85c613aaa7092f8dfc8ce0c475e0ef210685bc16 (patch) | |
tree | 782eeb1652f743b8539d33cdd299772f15fb5de0 /gdb/monitor.c | |
parent | ff15324f6383f5532d167eba6f4e80f67d94a84a (diff) | |
download | binutils-gdb-85c613aaa7092f8dfc8ce0c475e0ef210685bc16.tar.gz |
* utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
printf_filtered, printf_unfiltered, printfi_filtered, query, warning,
error, fatal, fatal_dump_core): Use stdarg.h macros when compiling
with an ANSI compiler.
* complain.c (complain): Likewise.
* language.c (type_error, range_error): Likewise.
* monitor.c (monitor_printf, monitor_printf_noecho): Likewise.
* remote-array.c (printf_monitor, debuglogs): Likewise.
* remote-mips.c (mips_error): Likewise.
* remote-os9k.c (printf_monitor): Likewise.
* remote-st.c (printf_stdebug): Likewise.
* gdbtk.c (gdbtk_query): Likewise.
* defs.h, complain.h, language.h, monitor.h: Add prototypes to
match above changes.
* printcmd.c: Remove uneeded #include <varargs.h>.
* remote-e7000.c: Likewise.
* f-typeprint.c (f_type_print_base): Fix typo found by above
changes.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index 5693d4c69fe..ba54719548c 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -32,7 +32,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcore.h" #include "target.h" #include "wait.h" +#ifdef __STDC__ +#include <stdarg.h> +#else #include <varargs.h> +#endif #include <signal.h> #include <string.h> #include <sys/types.h> @@ -111,17 +115,24 @@ static int dump_reg_flag; /* Non-zero means do a dump_registers cmd when Works just like printf. */ void +#ifdef __STDC__ +monitor_printf_noecho (char *pattern, ...) +#else monitor_printf_noecho (va_alist) va_dcl +#endif { va_list args; - char *pattern; char sndbuf[2000]; int len; +#if __STDC__ + va_start (args, pattern); +#else + char *pattern; va_start (args); - pattern = va_arg (args, char *); +#endif vsprintf (sndbuf, pattern, args); @@ -141,18 +152,25 @@ monitor_printf_noecho (va_alist) printf. */ void +#ifdef __STDC__ +monitor_printf (char *pattern, ...) +#else monitor_printf (va_alist) va_dcl +#endif { va_list args; - char *pattern; char sndbuf[2000]; int len; int i, c; +#ifdef __STDC__ + va_start (args, pattern); +#else + char *pattern; va_start (args); - pattern = va_arg (args, char *); +#endif vsprintf (sndbuf, pattern, args); |