]> gcc.gnu.org Git - gcc.git/commitdiff
genoutput.c (output_insn_data): Translate <NEWLINE> to \n\ while outputting templates...
authorDenis Chertykov <denisc@overta.ru>
Sun, 10 Sep 2000 14:01:56 +0000 (14:01 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Sun, 10 Sep 2000 14:01:56 +0000 (14:01 +0000)
2000-09-10  Denis Chertykov  <denisc@overta.ru>

* genoutput.c (output_insn_data): Translate <NEWLINE> to \n\ while
outputting templates with many lines.

From-SVN: r36299

gcc/ChangeLog
gcc/genoutput.c

index 6df192a82d0cee73ba291ff9e7b38b211c23e295..8c714e13c3188e2560ba42f289b591803d7c00a4 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-10  Denis Chertykov  <denisc@overta.ru>
+
+       * genoutput.c (output_insn_data): Translate <NEWLINE> to \n\ while
+       outputting templates with many lines.
+
 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
 
        * libgcc2.h: Use LONG_LONG_TYPE_SIZE instead of MIN_UNITS_PER_WORD
index 797f3d2083583b747ddc198d300c5d489c1d09eb..57a9028aee833e30a8f3d5bf88bd01ab23154bc7 100644 (file)
@@ -352,7 +352,22 @@ output_insn_data ()
          printf ("    0,\n");
          break;
        case INSN_OUTPUT_FORMAT_SINGLE:
-         printf ("    \"%s\",\n", d->template);
+         {
+           const char *p = d->template;
+           char prev = 0;
+           
+           printf ("    \"");
+           while (*p)
+             {
+               if (*p == '\n' && prev != '\\')
+                 printf ("\\n\\\n");
+               else
+                 putchar (*p);
+               prev = *p;
+               ++p;
+             }
+           printf ("\",\n");
+         }
          break;
        case INSN_OUTPUT_FORMAT_MULTI:
        case INSN_OUTPUT_FORMAT_FUNCTION:
This page took 0.070535 seconds and 5 git commands to generate.