diff options
author | Chris Meyer <cmeyer@gatan.com> | 2002-03-11 22:39:35 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-03-11 14:39:35 -0800 |
commit | 6b8b9d7bd4bb109bf9bf0a8b0a298541171c5934 (patch) | |
tree | 32b445dea72fa81baa922e65be1741e2dcc548fa /gcc/genoutput.c | |
parent | 172f7610ae6b769fe9a1465424361956472955d8 (diff) | |
download | gcc-6b8b9d7bd4bb109bf9bf0a8b0a298541171c5934.zip gcc-6b8b9d7bd4bb109bf9bf0a8b0a298541171c5934.tar.gz gcc-6b8b9d7bd4bb109bf9bf0a8b0a298541171c5934.tar.bz2 |
genflags.c (gen_insn): Use IS_VSPACE.
* genflags.c (gen_insn): Use IS_VSPACE.
* genoutput.c (output_insn_data): Likewise.
(process_template): Likewise.
From-SVN: r50616
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r-- | gcc/genoutput.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 7ed98bb..80b73fc 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -366,8 +366,13 @@ output_insn_data () printf (" \""); while (*p) { - if (*p == '\n' && prev != '\\') - printf ("\\n\\\n"); + if (IS_VSPACE (*p) && prev != '\\') + { + /* Preserve two consecutive \n's or \r's, but treat \r\n + as a single newline. */ + if (*p == '\n' && prev != '\r') + printf ("\\n\\\n"); + } else putchar (*p); prev = *p; @@ -694,11 +699,11 @@ process_template (d, template) for (i = 0, cp = &template[1]; *cp; ) { - while (*cp == '\n' || *cp == ' ' || *cp== '\t') + while (ISSPACE (*cp)) cp++; printf (" \""); - while (*cp != '\n' && *cp != '\0') + while (!IS_VSPACE (*cp) && *cp != '\0') { putchar (*cp); cp++; |