2001-09-26 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Wed, 26 Sep 2001 20:32:17 +0000 (20:32 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Wed, 26 Sep 2001 20:32:17 +0000 (20:32 +0000)
        * input-file.c (input_file_open): When reading the
        first line looking for #NO_APP, prepare for the possibility
        of finding #APP instead.  Also fix algorithm to allow
        white-space to follow either #NO_APP or #APP directives.

gas/ChangeLog
gas/input-file.c

index 3d3000d..7315f38 100644 (file)
@@ -1,3 +1,10 @@
+2001-09-26  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * input-file.c (input_file_open): When reading the
+       first line looking for #NO_APP, prepare for the possibility
+       of finding #APP instead.  Also fix algorithm to allow
+       white-space to follow either #NO_APP or #APP directives.
+
 2001-09-25  Geoff Berry  <geoff.berry@bops.com>
 
        * listing.c (buffer_line): Don't write past the end of `line' when
index 0b6c9e0..fcd710f 100644 (file)
@@ -157,19 +157,29 @@ input_file_open (filename, pre)
       /* Begins with comment, may not want to preprocess.  */
       c = getc (f_in);
       if (c == 'N')
-       {
-         fgets (buf, 80, f_in);
-         if (!strcmp (buf, "O_APP\n"))
-           preprocess = 0;
-         if (!strchr (buf, '\n'))
-           ungetc ('#', f_in); /* It was longer.  */
-         else
-           ungetc ('\n', f_in);
-       }
+        {
+          fgets (buf, 80, f_in);
+          if (!strncmp (buf, "O_APP", 5) && isspace (buf[5]))
+            preprocess = 0;
+          if (!strchr (buf, '\n'))
+            ungetc ('#', f_in);        /* It was longer.  */
+          else
+            ungetc ('\n', f_in);
+        }
+      else if (c == 'A')
+        {
+          fgets (buf, 80, f_in);
+          if (!strncmp (buf, "PP", 2) && isspace (buf[2]))
+            preprocess = 1;
+          if (!strchr (buf, '\n'))
+            ungetc ('#', f_in);
+          else
+            ungetc ('\n', f_in);
+        }
       else if (c == '\n')
-       ungetc ('\n', f_in);
+        ungetc ('\n', f_in);
       else
-       ungetc ('#', f_in);
+        ungetc ('#', f_in);
     }
   else
     ungetc (c, f_in);