OLD | NEW |
1 /* listing.c - maintain assembly listings | 1 /* listing.c - maintain assembly listings |
2 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 2 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
3 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 | 3 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of GAS, the GNU Assembler. | 6 This file is part of GAS, the GNU Assembler. |
7 | 7 |
8 GAS is free software; you can redistribute it and/or modify | 8 GAS is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3, or (at your option) | 10 the Free Software Foundation; either version 3, or (at your option) |
11 any later version. | 11 any later version. |
12 | 12 |
13 GAS is distributed in the hope that it will be useful, | 13 GAS is distributed in the hope that it will be useful, |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 { | 1040 { |
1041 int num_lines_shown = 0; | 1041 int num_lines_shown = 0; |
1042 | 1042 |
1043 while (current_file->linenum < list->hll_line | 1043 while (current_file->linenum < list->hll_line |
1044 && !current_file->at_end) | 1044 && !current_file->at_end) |
1045 { | 1045 { |
1046 cached_line * cache = cached_lines + next_free_line; | 1046 cached_line * cache = cached_lines + next_free_line; |
1047 char *p; | 1047 char *p; |
1048 | 1048 |
1049 cache->file = current_file; | 1049 cache->file = current_file; |
1050 » cache->line = current_file->linenum; | 1050 » cache->line = current_file->linenum + 1; |
1051 cache->buffer[0] = 0; | 1051 cache->buffer[0] = 0; |
1052 p = buffer_line (current_file, cache->buffer, width); | 1052 p = buffer_line (current_file, cache->buffer, width); |
1053 | 1053 |
1054 /* Cache optimization: If printing a group of lines | 1054 /* Cache optimization: If printing a group of lines |
1055 cache the first and last lines in the group. */ | 1055 cache the first and last lines in the group. */ |
1056 if (num_lines_shown == 0) | 1056 if (num_lines_shown == 0) |
1057 { | 1057 { |
1058 next_free_line ++; | 1058 next_free_line ++; |
1059 if (next_free_line == NUM_CACHE_LINES) | 1059 if (next_free_line == NUM_CACHE_LINES) |
1060 next_free_line = 0; | 1060 next_free_line = 0; |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 listing_source_line (unsigned int n) | 1608 listing_source_line (unsigned int n) |
1609 { | 1609 { |
1610 } | 1610 } |
1611 | 1611 |
1612 void | 1612 void |
1613 listing_source_file (const char *n) | 1613 listing_source_file (const char *n) |
1614 { | 1614 { |
1615 } | 1615 } |
1616 | 1616 |
1617 #endif | 1617 #endif |
OLD | NEW |