From ca2329727efad7d7e8a541f2aa88c28fcb5d2526 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 18 Aug 1995 15:15:28 +0000 Subject: * read.c (s_include): In MRI mode, don't expect quotes around the file name. * listing.c (listing_title): Don't require the title to be quoted. --- gas/ChangeLog | 4 ++++ gas/read.c | 26 +++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 06c05e3..9b63a94 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Fri Aug 18 10:58:09 1995 Ian Lance Taylor + * read.c (s_include): In MRI mode, don't expect quotes around the + file name. + * listing.c (listing_title): Don't require the title to be quoted. + * gasp.c (include_print_where_line): Always subtract 1 from linecount before printing it. (process_file): In MRI mode, lines beginning with '*' or '!' are diff --git a/gas/read.c b/gas/read.c index 4ae32ec..7a9cd3e 100644 --- a/gas/read.c +++ b/gas/read.c @@ -1711,17 +1711,17 @@ s_mri_sect (type) flagword flags; flags = SEC_NO_FLAGS; - if (type == 'C') + if (*type == 'C') flags = SEC_CODE; - else if (type == 'D') + else if (*type == 'D') flags = SEC_DATA; - else if (type == 'R') + else if (*type == 'R') flags = SEC_ROM; if (flags != SEC_NO_FLAGS) { if (! bfd_set_section_flags (stdoutput, seg, flags)) as_warn ("error setting flags for \"%s\": %s", - bfd_section_name (stdoutput, sec), + bfd_section_name (stdoutput, seg), bfd_errmsg (bfd_get_error ())); } } @@ -3273,7 +3273,23 @@ s_include (arg) FILE *try; char *path; - filename = demand_copy_string (&i); + if (! flag_mri) + filename = demand_copy_string (&i); + else + { + SKIP_WHITESPACE (); + i = 0; + while (! is_end_of_line[(unsigned char) *input_line_pointer] + && *input_line_pointer != ' ' + && *input_line_pointer != '\t') + { + obstack_1grow (¬es, *input_line_pointer); + ++input_line_pointer; + ++i; + } + obstack_1grow (¬es, '\0'); + filename = obstack_finish (¬es); + } demand_empty_rest_of_line (); path = xmalloc ((unsigned long) i + include_dir_maxlen + 5 /* slop */ ); for (i = 0; i < include_dir_count; i++) -- cgit v1.1