diff options
author | Alan Modra <amodra@gmail.com> | 2001-03-31 06:47:54 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-03-31 06:47:54 +0000 |
commit | 61b96bb4281e65ed15d15ed7e9ae5102d64bc8c9 (patch) | |
tree | 1519a47d47120445c93e517b143353d65f109da8 /gas/listing.c | |
parent | 69e37bf6a2178f46c52f5e9d1e607a2067ec2c8b (diff) | |
download | gdb-61b96bb4281e65ed15d15ed7e9ae5102d64bc8c9.zip gdb-61b96bb4281e65ed15d15ed7e9ae5102d64bc8c9.tar.gz gdb-61b96bb4281e65ed15d15ed7e9ae5102d64bc8c9.tar.bz2 |
Fix conditional assembly listings when more than one .else/.elsif
Diffstat (limited to 'gas/listing.c')
-rw-r--r-- | gas/listing.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/listing.c b/gas/listing.c index 96c7239..8168ebe 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -1,5 +1,6 @@ /* listing.c - mainting assembly listings - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1007,6 +1008,8 @@ listing_listing (name) show_listing--; break; case EDICT_NOLIST_NEXT: + if (show_listing == 0) + list_line--; break; case EDICT_EJECT: break; @@ -1029,7 +1032,8 @@ listing_listing (name) p = buffer_line (list->file, buffer, width); } - if (list->edict == EDICT_LIST) + if (list->edict == EDICT_LIST + || (list->edict == EDICT_NOLIST_NEXT && show_listing == 0)) { /* Enable listing for the single line that caused the enable. */ list_line++; @@ -1090,7 +1094,7 @@ listing_listing (name) } } - if (list->edict == EDICT_NOLIST_NEXT) + if (list->edict == EDICT_NOLIST_NEXT && show_listing == 1) --show_listing; list = list->next; |