* gas/pdp11/pdp11.exp: New file.
[deliverable/binutils-gdb.git] / gas / input-file.c
index 02512de681343730bea588d001f907825d29cfb8..798f327d0f573c9f64daf67a218443ee92825c53 100644 (file)
@@ -26,9 +26,9 @@
 
 #include <stdio.h>
 #include <string.h>
-
 #include "as.h"
 #include "input-file.h"
+#include "safe-ctype.h"
 
 static int input_file_get PARAMS ((char *, int));
 
@@ -146,7 +146,7 @@ input_file_open (filename, pre)
     }
   if (f_in == (FILE *) 0)
     {
-      as_bad (_("Can't open %s for reading."), file_name);
+      as_bad (_("can't open %s for reading"), file_name);
       as_perror ("%s", file_name);
       return;
     }
@@ -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);
This page took 0.023647 seconds and 4 git commands to generate.