diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2007-03-09 07:14:23 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2007-03-09 07:14:23 +0000 |
commit | 93e914b2d912c75ede29d5c3140d0bce26baf77d (patch) | |
tree | 140ffa36d3fd14152828a902cb88b63f5ecb62b8 /gas/input-scrub.c | |
parent | * spu-tdep.c (spu_in_function_epilogue_p): New function. (diff) | |
download | binutils-gdb-93e914b2d912c75ede29d5c3140d0bce26baf77d.tar.gz binutils-gdb-93e914b2d912c75ede29d5c3140d0bce26baf77d.tar.bz2 binutils-gdb-93e914b2d912c75ede29d5c3140d0bce26baf77d.zip |
* app.c (do_scrub_chars): Turn #<line>"file"flags into .linefile.
* as.h (new_logical_line_flags): New.
* input-scrub.c (new_logical_line): Turned into wrapper for...
(new_logical_line_flags): this. Handle flags.
* read.c (potable): Add linefile. Adjust appline argument.
(s_app_file): Fake .appfiles no more.
(s_app_line): For .linefile, accept file name and flags.
Diffstat (limited to 'gas/input-scrub.c')
-rw-r--r-- | gas/input-scrub.c | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/gas/input-scrub.c b/gas/input-scrub.c index 9efea1100e2..5698a6dc22a 100644 --- a/gas/input-scrub.c +++ b/gas/input-scrub.c @@ -1,6 +1,6 @@ /* input_scrub.c - Break up input buffers into whole numbers of lines. Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 2000, 2001, 2003, 2006 + 2000, 2001, 2003, 2006, 2007 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -435,13 +435,34 @@ bump_line_counters (void) Returns nonzero if the filename actually changes. */ int -new_logical_line (char *fname, /* DON'T destroy it! We point to it! */ - int line_number) +new_logical_line_flags (char *fname, /* DON'T destroy it! We point to it! */ + int line_number, + int flags) { + switch (flags) + { + case 0: + break; + case 1: + if (line_number != -1) + abort (); + break; + case 1 << 1: + case 1 << 2: + /* FIXME: we could check that include nesting is correct. */ + break; + default: + abort (); + } + if (line_number >= 0) logical_input_line = line_number; - else if (line_number == -2 && logical_input_line > 0) - --logical_input_line; + else if (line_number == -1 && fname && !*fname && (flags & (1 << 2))) + { + logical_input_file = physical_input_file; + logical_input_line = physical_input_line; + fname = NULL; + } if (fname && (logical_input_file == NULL @@ -453,6 +474,13 @@ new_logical_line (char *fname, /* DON'T destroy it! We point to it! */ else return 0; } + +int +new_logical_line (char *fname, int line_number) +{ + return new_logical_line_flags (fname, line_number, 0); +} + /* Return the current file name and line number. namep should be char * const *, but there are compilers which screw |