X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gas%2Flisting.c;h=002b3c595865afced03cf4a403ce9d9a85a8ab02;hb=d905c788cf58f2d9b6346fab2d3a53c21fab8adf;hp=d1c291c3aeb3b340c29e1fd7110a752b430d92dd;hpb=f19df8f73a7bbfeb12d1540791ed51aa86b0bdf9;p=binutils-gdb.git diff --git a/gas/listing.c b/gas/listing.c index d1c291c3aeb..002b3c59586 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -1,6 +1,6 @@ /* listing.c - maintain assembly listings Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -347,10 +347,12 @@ listing_newline (char *ps) || is_end_of_line [(unsigned char) *copy] != 1); copy++) { - if (*copy == '\\') - seen_slash = ! seen_slash; - else if (*copy == '"' && seen_slash) - seen_quote = ! seen_quote; + if (seen_slash) + seen_slash = 0; + else if (*copy == '\\') + seen_slash = 1; + else if (*copy == '"') + seen_quote = !seen_quote; } len = copy - input_line_pointer + 1; @@ -1043,11 +1045,11 @@ print_source (file_info_type * current_file, while (current_file->linenum < list->hll_line && !current_file->at_end) { - cached_line * cache = cached_lines + next_free_line; char *p; + cache = cached_lines + next_free_line; cache->file = current_file; - cache->line = current_file->linenum; + cache->line = current_file->linenum + 1; cache->buffer[0] = 0; p = buffer_line (current_file, cache->buffer, width); @@ -1409,14 +1411,6 @@ listing_eject (int ignore ATTRIBUTE_UNUSED) listing_tail->edict = EDICT_EJECT; } -void -listing_flags (int ignore ATTRIBUTE_UNUSED) -{ - while ((*input_line_pointer++) && (*input_line_pointer != '\n')) - input_line_pointer++; - -} - /* Turn listing on or off. An argument of 0 means to turn off listing. An argument of 1 means to turn on listing. An argument of 2 means to turn off listing, but as of the next line; that is, @@ -1558,12 +1552,6 @@ listing_source_file (const char *file) /* Dummy functions for when compiled without listing enabled. */ -void -listing_flags (int ignore) -{ - s_ignore (0); -} - void listing_list (int on) {