* c-lang.c (c_emit_char): Don't treat \0 specially unless quoter

is "'".
This commit is contained in:
Tom Tromey 2002-09-17 17:01:47 +00:00
parent 0deec7d673
commit a741e51424
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-09-17 Tom Tromey <tromey@redhat.com>
* c-lang.c (c_emit_char): Don't treat \0 specially unless quoter
is "'".
2002-09-17 Corinna Vinschen <vinschen@redhat.com>
* MAINTAINERS: Remove "non multi-arched" text from h8300.

View File

@ -78,9 +78,12 @@ c_emit_char (register int c, struct ui_file *stream, int quoter)
case '\007':
fputs_filtered ("\\a", stream);
break;
case '\0':
fputs_filtered ("\\0", stream);
break;
case '\0':
if (quoter == '\'')
fputs_filtered ("\\0", stream);
else
fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
break;
default:
fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
break;