return c;
}
-/* puts_debug is like fputs_unfiltered, except it prints special
- characters in printable fashion. */
-
-void
-puts_debug (char *prefix, char *string, char *suffix)
-{
- int ch;
-
- /* Print prefix and suffix after each line. */
- static int new_line = 1;
- static int return_p = 0;
- static const char *prev_prefix = "";
- static const char *prev_suffix = "";
-
- if (*string == '\n')
- return_p = 0;
-
- /* If the prefix is changing, print the previous suffix, a new line,
- and the new prefix. */
- if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line)
- {
- fputs_unfiltered (prev_suffix, gdb_stdlog);
- fputs_unfiltered ("\n", gdb_stdlog);
- fputs_unfiltered (prefix, gdb_stdlog);
- }
-
- /* Print prefix if we printed a newline during the previous call. */
- if (new_line)
- {
- new_line = 0;
- fputs_unfiltered (prefix, gdb_stdlog);
- }
-
- prev_prefix = prefix;
- prev_suffix = suffix;
-
- /* Output characters in a printable format. */
- while ((ch = *string++) != '\0')
- {
- switch (ch)
- {
- default:
- if (gdb_isprint (ch))
- fputc_unfiltered (ch, gdb_stdlog);
-
- else
- fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff);
- break;
-
- case '\\':
- fputs_unfiltered ("\\\\", gdb_stdlog);
- break;
- case '\b':
- fputs_unfiltered ("\\b", gdb_stdlog);
- break;
- case '\f':
- fputs_unfiltered ("\\f", gdb_stdlog);
- break;
- case '\n':
- new_line = 1;
- fputs_unfiltered ("\\n", gdb_stdlog);
- break;
- case '\r':
- fputs_unfiltered ("\\r", gdb_stdlog);
- break;
- case '\t':
- fputs_unfiltered ("\\t", gdb_stdlog);
- break;
- case '\v':
- fputs_unfiltered ("\\v", gdb_stdlog);
- break;
- }
-
- return_p = ch == '\r';
- }
-
- /* Print suffix if we printed a newline. */
- if (new_line)
- {
- fputs_unfiltered (suffix, gdb_stdlog);
- fputs_unfiltered ("\n", gdb_stdlog);
- }
-}
-
-
/* 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,
extern void puts_filtered_tabular (char *string, int width, int right);
-extern void puts_debug (char *prefix, char *string, char *suffix);
-
extern void vprintf_filtered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
extern void vfprintf_filtered (struct ui_file *, const char *, va_list)