aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c97
1 files changed, 0 insertions, 97 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index df4e6c1..3ee2b54 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1129,103 +1129,6 @@ parse_escape (struct gdbarch *gdbarch, const char **string_ptr)
return target_char;
}
-/* Print the character C on STREAM as part of the contents of a literal
- string whose delimiter is QUOTER. Note that this routine should only
- be called for printing things which are independent of the language
- of the program being debugged.
-
- printchar will normally escape backslashes and instances of QUOTER. If
- QUOTER is 0, printchar won't escape backslashes or any quoting character.
- As a side effect, if you pass the backslash character as the QUOTER,
- printchar will escape backslashes as usual, but not any other quoting
- character. */
-
-static void
-printchar (int c, do_fputc_ftype do_fputc, ui_file *stream, int quoter)
-{
- c &= 0xFF; /* Avoid sign bit follies */
-
- if (c < 0x20 || /* Low control chars */
- (c >= 0x7F && c < 0xA0) || /* DEL, High controls */
- (sevenbit_strings && c >= 0x80))
- { /* high order bit set */
- do_fputc ('\\', stream);
-
- switch (c)
- {
- case '\n':
- do_fputc ('n', stream);
- break;
- case '\b':
- do_fputc ('b', stream);
- break;
- case '\t':
- do_fputc ('t', stream);
- break;
- case '\f':
- do_fputc ('f', stream);
- break;
- case '\r':
- do_fputc ('r', stream);
- break;
- case '\033':
- do_fputc ('e', stream);
- break;
- case '\007':
- do_fputc ('a', stream);
- break;
- default:
- {
- do_fputc ('0' + ((c >> 6) & 0x7), stream);
- do_fputc ('0' + ((c >> 3) & 0x7), stream);
- do_fputc ('0' + ((c >> 0) & 0x7), stream);
- break;
- }
- }
- }
- else
- {
- if (quoter != 0 && (c == '\\' || c == quoter))
- do_fputc ('\\', stream);
- do_fputc (c, stream);
- }
-}
-
-/* Print the character C on STREAM as part of the contents of a
- literal string whose delimiter is QUOTER. Note that these routines
- should only be call for printing things which are independent of
- the language of the program being debugged. */
-
-void
-fputstr_filtered (const char *str, int quoter, struct ui_file *stream)
-{
- while (*str)
- printchar (*str++, fputc_filtered, stream, quoter);
-}
-
-void
-fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream)
-{
- while (*str)
- printchar (*str++, fputc_unfiltered, stream, quoter);
-}
-
-void
-fputstrn_filtered (const char *str, int n, int quoter,
- struct ui_file *stream)
-{
- for (int i = 0; i < n; i++)
- printchar (str[i], fputc_filtered, stream, quoter);
-}
-
-void
-fputstrn_unfiltered (const char *str, int n, int quoter,
- do_fputc_ftype do_fputc, struct ui_file *stream)
-{
- for (int i = 0; i < n; i++)
- printchar (str[i], do_fputc, stream, quoter);
-}
-
/* Number of lines per page or UINT_MAX if paging is disabled. */
static unsigned int lines_per_page;