Commit 6b8b9d7b by Chris Meyer Committed by Richard Henderson

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
parent 172f7610
2002-03-11 Chris Meyer <cmeyer@gatan.com>
* genflags.c (gen_insn): Use IS_VSPACE.
* genoutput.c (output_insn_data): Likewise.
(process_template): Likewise.
2002-03-11 Richard Henderson <rth@redhat.com> 2002-03-11 Richard Henderson <rth@redhat.com>
* toplev.c (rest_of_compilation): Don't compile if we've had errors. * toplev.c (rest_of_compilation): Don't compile if we've had errors.
......
...@@ -201,7 +201,7 @@ gen_insn (insn) ...@@ -201,7 +201,7 @@ gen_insn (insn)
printf ("("); printf ("(");
for (p = XSTR (insn, 2); *p; p++) for (p = XSTR (insn, 2); *p; p++)
{ {
if (*p == '\n') if (IS_VSPACE (*p))
printf (" \\\n"); printf (" \\\n");
else else
printf ("%c", *p); printf ("%c", *p);
......
...@@ -366,8 +366,13 @@ output_insn_data () ...@@ -366,8 +366,13 @@ output_insn_data ()
printf (" \""); printf (" \"");
while (*p) while (*p)
{ {
if (*p == '\n' && prev != '\\') if (IS_VSPACE (*p) && prev != '\\')
printf ("\\n\\\n"); {
/* 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 else
putchar (*p); putchar (*p);
prev = *p; prev = *p;
...@@ -694,11 +699,11 @@ process_template (d, template) ...@@ -694,11 +699,11 @@ process_template (d, template)
for (i = 0, cp = &template[1]; *cp; ) for (i = 0, cp = &template[1]; *cp; )
{ {
while (*cp == '\n' || *cp == ' ' || *cp== '\t') while (ISSPACE (*cp))
cp++; cp++;
printf (" \""); printf (" \"");
while (*cp != '\n' && *cp != '\0') while (!IS_VSPACE (*cp) && *cp != '\0')
{ {
putchar (*cp); putchar (*cp);
cp++; cp++;
......
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