* c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match
authorJim Blandy <jimb@codesourcery.com>
Wed, 19 Dec 2001 06:29:18 +0000 (06:29 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 19 Dec 2001 06:29:18 +0000 (06:29 +0000)
ISO C, and our parser.  Print ASCII 0 as '\0', since that's what
people are used to seeing.

gdb/ChangeLog
gdb/c-lang.c

index 127b512dfaa05cc5130d45438587d95fb39a3c2a..a44bdc5e3b62fd83d0924257e2a9583bc7f7f291 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-19  Jim Blandy  <jimb@redhat.com>
+
+       * 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  <jimb@redhat.com>
 
        * c-lang.c (c_printstr, c_builtin_types, cplus_builtin_types): 
index c7cfd29b03940dd2ec175a6fd8ce340761d6a2fa..9e92d7e90915ea6199191d83a7fd5e9bda8d83d9 100644 (file)
@@ -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;