{
va_list ap;
va_start (ap, format);
- vprintf_filtered (format, ap);
+ gdb_vprintf (format, ap);
va_end (ap);
for (const auto &sal : sals)
va_list args;
va_start (args, fmt);
- vprintf_filtered (fmt, args);
+ gdb_vprintf (fmt, args);
va_end (args);
puts_filtered ("\n");
}
else
{
fputs_filtered (_("During symbol reading: "), gdb_stderr);
- vfprintf_filtered (gdb_stderr, fmt, args);
+ gdb_vprintf (gdb_stderr, fmt, args);
fputs_filtered ("\n", gdb_stderr);
}
void
debug_vprintf (const char *fmt, va_list ap)
{
- vfprintf_unfiltered (gdb_stdlog, fmt, ap);
+ gdb_vprintf (gdb_stdlog, fmt, ap);
}
va_list args;
va_start (args, format);
- vfprintf_filtered ((struct ui_file *) stream, format, args);
+ gdb_vprintf ((struct ui_file *) stream, format, args);
va_end (args);
/* Something non -ve. */
return 0;
/* Print the prefix. */
va_start (args, prefix);
- vfprintf_filtered (file, prefix, args);
+ gdb_vprintf (file, prefix, args);
va_end (args);
print_exception (file, e);
case range_check_off:
/* FIXME: cagney/2002-01-30: Should this function print anything
when range error is off? */
- vfprintf_filtered (gdb_stderr, string, args);
+ gdb_vprintf (gdb_stderr, string, args);
fprintf_filtered (gdb_stderr, "\n");
break;
default:
fprintf_unfiltered (stream, "%s=\"", fldname);
else
fputs_unfiltered ("\"", stream);
- vfprintf_unfiltered (stream, format, args);
+ gdb_vprintf (stream, format, args);
fputs_unfiltered ("\"", stream);
}
va_start (args, y);
if (x == stderr)
- vfprintf_unfiltered (gdb_stderr, y, args);
+ gdb_vprintf (gdb_stderr, y, args);
else
{
fprintf_unfiltered (gdb_stderr, " Unknown FILE used.\n");
- vfprintf_unfiltered (gdb_stderr, y, args);
+ gdb_vprintf (gdb_stderr, y, args);
}
va_end (args);
}
va_list args;
va_start (args, format);
- vfprintf_filtered (gdb_stdout, format, args);
+ gdb_vprintf (gdb_stdout, format, args);
va_end (args);
}
-/* GDB version of error vprintf_filtered. */
+/* GDB version of error gdb_vprintf. */
static void ATTRIBUTE_PRINTF (2, 0)
gdb_os_vprintf_filtered (host_callback * p, const char *format, va_list ap)
{
- vfprintf_filtered (gdb_stdout, format, ap);
+ gdb_vprintf (gdb_stdout, format, ap);
}
/* GDB version of error evprintf_filtered. */
static void ATTRIBUTE_PRINTF (2, 0)
gdb_os_evprintf_filtered (host_callback * p, const char *format, va_list ap)
{
- vfprintf_filtered (gdb_stderr, format, ap);
+ gdb_vprintf (gdb_stderr, format, ap);
}
/* GDB version of error callback. */
va_start (args, fmt);
- vfprintf_filtered (gdb_stderr, fmt, args);
+ gdb_vprintf (gdb_stderr, fmt, args);
}
/* Get size of extra register set. Currently a noop. */
va_list args;
va_start (args, fmt);
- vprintf_filtered (fmt, args);
+ gdb_vprintf (fmt, args);
va_end (args);
}
va_list args;
va_start (args, format);
- vfprintf_unfiltered (this, format, args);
+ vprintf (format, args);
va_end (args);
}
/* Prototypes for local functions */
-static void vfprintf_maybe_filtered (struct ui_file *, const char *,
- va_list, bool)
- ATTRIBUTE_PRINTF (2, 0);
-
static void set_screen_size (void);
static void set_width (void);
gdb_flush (gdb_stdout);
if (warning_pre_print)
fputs_unfiltered (warning_pre_print, gdb_stderr);
- vfprintf_unfiltered (gdb_stderr, string, args);
+ gdb_vprintf (gdb_stderr, string, args);
fprintf_unfiltered (gdb_stderr, "\n");
}
}
target_terminal::scoped_restore_terminal_state term_state;
target_terminal::ours_for_output ();
gdb_stdout->wrap_here (0);
- vfprintf_filtered (gdb_stdout, ctlstr, args);
+ gdb_vprintf (gdb_stdout, ctlstr, args);
printf_filtered (_("(%s or %s) [answered %c; "
"input not from terminal]\n"),
return c;
}
-/* Print a variable number of ARGS using format FORMAT. If this
- information is going to put the amount written (since the last call
- to REINITIALIZE_MORE_FILTER or the last page break) over the page size,
- call prompt_for_continue to get the users permission to continue.
-
- Unlike fprintf, this function does not return a value.
-
- We implement three variants, vfprintf (takes a vararg list and stream),
- fprintf (takes a stream to write on), and printf (the usual).
-
- Note also that this may throw a quit (since prompt_for_continue may
- do so). */
-
-static void
-vfprintf_maybe_filtered (struct ui_file *stream, const char *format,
- va_list args, bool filter)
-{
- stream->vprintf (format, args);
-}
-
-
-void
-vfprintf_filtered (struct ui_file *stream, const char *format, va_list args)
-{
- vfprintf_maybe_filtered (stream, format, args, true);
-}
-
void
-vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args)
+gdb_vprintf (struct ui_file *stream, const char *format, va_list args)
{
- vfprintf_maybe_filtered (stream, format, args, false);
-}
-
-void
-vprintf_filtered (const char *format, va_list args)
-{
- vfprintf_filtered (gdb_stdout, format, args);
+ stream->vprintf (format, args);
}
void
-vprintf_unfiltered (const char *format, va_list args)
+gdb_vprintf (const char *format, va_list args)
{
- vfprintf_unfiltered (gdb_stdout, format, args);
+ gdb_stdout->vprintf (format, args);
}
void
va_list args;
va_start (args, format);
- vfprintf_filtered (stream, format, args);
+ gdb_vprintf (stream, format, args);
va_end (args);
}
va_list args;
va_start (args, format);
- vfprintf_unfiltered (stream, format, args);
+ gdb_vprintf (stream, format, args);
va_end (args);
}
stream->emit_style_escape (style);
va_start (args, format);
- vfprintf_filtered (stream, format, args);
+ gdb_vprintf (stream, format, args);
va_end (args);
stream->emit_style_escape (ui_file_style ());
}
const char *format, va_list args)
{
stream->emit_style_escape (style);
- vfprintf_filtered (stream, format, args);
+ gdb_vprintf (stream, format, args);
stream->emit_style_escape (ui_file_style ());
}
va_list args;
va_start (args, format);
- vfprintf_filtered (gdb_stdout, format, args);
+ gdb_vprintf (gdb_stdout, format, args);
va_end (args);
}
extern void puts_filtered_tabular (char *string, int width, int right);
-extern void vprintf_filtered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
+extern void gdb_vprintf (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
-extern void vfprintf_filtered (struct ui_file *, const char *, va_list)
+extern void gdb_vprintf (struct ui_file *, const char *, va_list)
ATTRIBUTE_PRINTF (2, 0);
extern void fprintf_filtered (struct ui_file *, const char *, ...)
extern void printf_filtered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
-extern void vprintf_unfiltered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
-
-extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list)
- ATTRIBUTE_PRINTF (2, 0);
-
extern void fprintf_unfiltered (struct ui_file *, const char *, ...)
ATTRIBUTE_PRINTF (2, 3);