#include <sys/param.h>
#include <pwd.h>
#endif
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
warning (char *string, ...)
#else
warning (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, string);
#else
char *string;
The first argument STRING is the error message, used as a fprintf string,
and the remaining args are passed as arguments to it. */
-/* VARARGS */
+#ifdef ANSI_PROTOTYPES
NORETURN void
-#ifdef __STDC__
error (char *string, ...)
#else
error (va_alist)
va_dcl
#endif
{
+#ifdef ANSI_PROTOTYPES
va_list args;
-#ifdef __STDC__
va_start (args, string);
#else
- char *string;
-
va_start (args);
- string = va_arg (args, char *);
#endif
- error_begin ();
- vfprintf_filtered (gdb_stderr, string, args);
- fprintf_filtered (gdb_stderr, "\n");
- va_end (args);
- return_to_top_level (RETURN_ERROR);
+ if (error_hook)
+ error_hook();
+ else
+ {
+ char *string1;
+ error_begin ();
+#ifdef ANSI_PROTOTYPES
+ vfprintf_filtered (gdb_stderr, string, args);
+#else
+ string1 = va_arg (args, char *);
+ vfprintf_filtered (gdb_stderr, string1, args);
+#endif
+ fprintf_filtered (gdb_stderr, "\n");
+ va_end (args);
+ return_to_top_level (RETURN_ERROR);
+ }
}
+
/* Print an error message and exit reporting failure.
This is for a error that we cannot continue from.
The arguments are printed a la printf.
/* VARARGS */
NORETURN void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
fatal (char *string, ...)
#else
fatal (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, string);
#else
char *string;
-
va_start (args);
string = va_arg (args, char *);
#endif
/* VARARGS */
static void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
fatal_dump_core (char *string, ...)
#else
fatal_dump_core (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, string);
#else
char *string;
/* VARARGS */
int
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
query (char *ctlstr, ...)
#else
query (va_alist)
register int ans2;
int retval;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, ctlstr);
#else
char *ctlstr;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
fprintf_filtered (FILE *stream, char *format, ...)
#else
fprintf_filtered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
FILE *stream;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
fprintf_unfiltered (FILE *stream, char *format, ...)
#else
fprintf_unfiltered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
FILE *stream;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
fprintfi_filtered (int spaces, FILE *stream, char *format, ...)
#else
fprintfi_filtered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
int spaces;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
printf_filtered (char *format, ...)
#else
printf_filtered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
char *format;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
printf_unfiltered (char *format, ...)
#else
printf_unfiltered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
char *format;
/* VARARGS */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
printfi_filtered (int spaces, char *format, ...)
#else
printfi_filtered (va_alist)
#endif
{
va_list args;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, format);
#else
int spaces;