diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-11 22:39:35 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-11 22:39:35 +0000 |
commit | 337057dd46c607bfdb0d01974e8c8398f89c1741 (patch) | |
tree | 32b445dea72fa81baa922e65be1741e2dcc548fa /gcc/genoutput.c | |
parent | 472832ddc91d3433dc0a6f0d30193ade26dd3eb6 (diff) | |
download | gcc-337057dd46c607bfdb0d01974e8c8398f89c1741.tar.gz |
* genflags.c (gen_insn): Use IS_VSPACE.
* genoutput.c (output_insn_data): Likewise.
(process_template): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50616 138bc75d-0d04-0410-961f-82ee72b054a4
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 7ed98bbbe26..80b73fcb915 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++; |