summaryrefslogtreecommitdiff
path: root/gas/listing.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2009-10-15 10:58:34 +0000
committerAlan Modra <amodra@bigpond.net.au>2009-10-15 10:58:34 +0000
commitf0d1a35ab0a01a472d3638dd0ba4ccf0b04b7c19 (patch)
tree6fb9f3678aa908b359fa3db9ecc92dcd29e42531 /gas/listing.c
parentb8b053cc877106c4ffe97846a5151a0cb7dc53cb (diff)
downloadbinutils-redhat-f0d1a35ab0a01a472d3638dd0ba4ccf0b04b7c19.tar.gz
PR gas/1491
gas/ * macro.c: Delete unnecessary function declarations. (buffer_and_nest): Support multiple labels per line for LABELS_WITHOUT_COLONS targets if the labels do have colons. (free_macro): Move so that we don't need forward declaration. * read.c (read_a_source_file): Take a copy of macro expansion line before we trim labels. * listing.c (listing_newline): Adjust stdin line save for input_line_pointer still at start of line. gas/testsuite/ * gas/macros/dot.s: Don't start macro invocations is first column. * gas/macros/dot.l: Update. * gas/macros/macros.exp: Run dot test on more targets.
Diffstat (limited to 'gas/listing.c')
-rw-r--r--gas/listing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/listing.c b/gas/listing.c
index c8b6d63bc4..d1c291c3ae 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -342,7 +342,7 @@ listing_newline (char *ps)
int seen_quote = 0;
int seen_slash = 0;
- for (copy = input_line_pointer - 1;
+ for (copy = input_line_pointer;
*copy && (seen_quote
|| is_end_of_line [(unsigned char) *copy] != 1);
copy++)
@@ -353,13 +353,13 @@ listing_newline (char *ps)
seen_quote = ! seen_quote;
}
- len = (copy - input_line_pointer) + 2;
+ len = copy - input_line_pointer + 1;
copy = (char *) xmalloc (len);
if (copy != NULL)
{
- char *src = input_line_pointer - 1;
+ char *src = input_line_pointer;
char *dest = copy;
while (--len)