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
This commit is contained in:
Chris Meyer 2002-03-11 22:39:35 +00:00 committed by Richard Henderson
parent 172f7610ae
commit 6b8b9d7bd4
3 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,9 @@
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>
* toplev.c (rest_of_compilation): Don't compile if we've had errors.

View File

@ -201,7 +201,7 @@ gen_insn (insn)
printf ("(");
for (p = XSTR (insn, 2); *p; p++)
{
if (*p == '\n')
if (IS_VSPACE (*p))
printf (" \\\n");
else
printf ("%c", *p);

View File

@ -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++;