Commit 042cdf71 by Zack Weinberg Committed by Zack Weinberg

toplev.c (output_quoted_string): Write unprintable characters with octal escapes.

	* toplev.c (output_quoted_string): Write unprintable
	characters with octal escapes.

From-SVN: r49891
parent c1f11548
2002-02-19 Zack Weinberg <zack@codesourcery.com>
* toplev.c (output_quoted_string): Write unprintable
characters with octal escapes.
2002-02-19 David Edelsohn <edelsohn@gnu.org> 2002-02-19 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set
......
...@@ -1762,9 +1762,14 @@ output_quoted_string (asm_file, string) ...@@ -1762,9 +1762,14 @@ output_quoted_string (asm_file, string)
putc ('\"', asm_file); putc ('\"', asm_file);
while ((c = *string++) != 0) while ((c = *string++) != 0)
{ {
if (c == '\"' || c == '\\') if (ISPRINT (c))
putc ('\\', asm_file); {
putc (c, asm_file); if (c == '\"' || c == '\\')
putc ('\\', asm_file);
putc (c, asm_file);
}
else
fprintf (asm_file, "\\%03o", c);
} }
putc ('\"', asm_file); putc ('\"', asm_file);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment