From ae23c7a3692234fd902e1394f01f8c366d299b57 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 19 Dec 2001 06:29:18 +0000 Subject: [PATCH] * c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match ISO C, and our parser. Print ASCII 0 as '\0', since that's what people are used to seeing. --- gdb/ChangeLog | 6 ++++++ gdb/c-lang.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 127b512dfaa..a44bdc5e3b6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-12-19 Jim Blandy + + * c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match + ISO C, and our parser. Print ASCII 0 as '\0', since that's what + people are used to seeing. + 2001-12-18 Jim Blandy * c-lang.c (c_printstr, c_builtin_types, cplus_builtin_types): diff --git a/gdb/c-lang.c b/gdb/c-lang.c index c7cfd29b039..9e92d7e9091 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -67,12 +67,18 @@ c_emit_char (register int c, struct ui_file *stream, int quoter) case '\r': fputs_filtered ("\\r", stream); break; + case '\013': + fputs_filtered ("\\v", stream); + break; case '\033': fputs_filtered ("\\e", stream); break; case '\007': fputs_filtered ("\\a", stream); break; + case '\0': + fputs_filtered ("\\0", stream); + break; default: fprintf_filtered (stream, "\\%.3o", (unsigned int) c); break; -- 2.30.2