* config/tc-ppc.c (PPC_HA, PPC_HIGHERA, PPC_HIGHESTA): Simplify.
[deliverable/binutils-gdb.git] / gas / input-file.c
index 0b6c9e01a7a873a7b5dc69f1c7a421df549588f4..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));
 
@@ -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.024017 seconds and 4 git commands to generate.