diff options
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/input-file.c | 32 |
2 files changed, 28 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3d3000d..7315f38 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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 diff --git a/gas/input-file.c b/gas/input-file.c index 0b6c9e0..fcd710f 100644 --- a/gas/input-file.c +++ b/gas/input-file.c @@ -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); |