* fix-header.c (line_table): Move local variable in main to global.
* scan.h (line_table): Use it.
* scan-decls.c (scan_decls): Need to call linemap_lookup on token's
line (recently renamed to src_loc) before calling recognized_function.
From-SVN: r77808
+2004-02-14 Per Bothner <per@bothner.com>
+
+ * fix-header.c (line_table): Move local variable in main to global.
+ * scan.h (line_table): Use it.
+ * scan-decls.c (scan_decls): Need to call linemap_lookup on token's
+ line (recently renamed to src_loc) before calling recognized_function.
+
2004-02-14 Matt Kraai <kraai@alumni.cmu.edu>
* Makefile.in: Fix comment typos.
ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+struct line_maps line_table;
+
sstring buf;
int verbose = 0;
struct fn_decl *fn;
int i, strings_processed;
struct symbol_list *cur_symbols;
- struct line_maps line_table;
obstack_init (&scan_file_obstack);
{
int nesting = 1;
int have_arg_list = 0;
+ const struct line_map *map;
+ unsigned int line;
for (;;)
{
token = get_a_token (pfile);
|| token->type == CPP_ELLIPSIS)
have_arg_list = 1;
}
- recognized_function (&prev_id, token->line,
+ map = linemap_lookup (&line_table, token->src_loc);
+ line = SOURCE_LINE (map, token->src_loc);
+ recognized_function (&prev_id, line,
(saw_inline ? 'I'
: in_extern_C_brace || current_extern_C
? 'F' : 'f'), have_arg_list);
extern sstring source_filename;
/* Current physical line number */
extern int lineno;
+
+extern struct line_maps line_table;