Lines Matching refs:map

25 #include "line-map.h"
29 /* Initialize a line map set. */
51 struct line_map *map;
54 for (map = &set->maps[set->used - 1]; ! MAIN_FILE_P (map);
55 map = INCLUDED_FROM (set, map))
56 fprintf (stderr, "line-map.c: file \"%s\" entered but not left\n",
57 map->to_file);
60 /* Free a line map set. */
91 struct line_map *map;
103 map = &set->maps[set->used];
117 if (MAIN_FILE_P (map - 1))
126 from = map - 1;
130 from = INCLUDED_FROM (set, map - 1);
137 fprintf (stderr, "line-map.c: file \"%s\" left but not entered\n",
149 map->reason = reason;
150 map->sysp = sysp;
151 map->start_location = start_location;
152 map->to_file = to_file;
153 map->to_line = to_line;
155 map->column_bits = 0;
162 map->included_from = set->depth == 0 ? -1 : (int) (set->used - 2);
165 trace_include (set, map);
168 map->included_from = map[-1].included_from;
172 map->included_from = INCLUDED_FROM (set, map - 1)->included_from;
175 return map;
182 struct line_map *map = &set->maps[set->used - 1];
185 unsigned int last_line = SOURCE_LINE (map, set->highest_line);
189 || (line_delta > 10 && line_delta * map->column_bits > 1000)
190 || (max_column_hint >= (1U << map->column_bits))
191 || (max_column_hint <= 80 && map->column_bits >= 10))
216 /* Allocate the new line_map. However, if the current map only has a
219 || last_line != map->to_line
220 || SOURCE_COLUMN (map, highest) >= (1U << column_bits))
221 map = (struct line_map*) linemap_add (set, LC_RENAME, map->sysp,
222 map->to_file, to_line);
223 map->column_bits = column_bits;
224 r = map->start_location + ((to_line - map->to_line) << column_bits);
227 r = highest - SOURCE_COLUMN (map, highest)
228 + (line_delta << map->column_bits);
249 struct line_map *map = &set->maps[set->used - 1];
250 r = linemap_line_start (set, SOURCE_LINE (map, r), to_column + 50);
259 /* Given a logical line, returns the map from which the corresponding
300 which led to the map MAP, if any, to stderr. Nothing is output if
305 const struct line_map *map)
307 if (MAIN_FILE_P (map) || set->last_listed == map->included_from)
310 set->last_listed = map->included_from;
311 map = INCLUDED_FROM (set, map);
314 map->to_file, LAST_SOURCE_LINE (map));
316 while (! MAIN_FILE_P (map))
318 map = INCLUDED_FROM (set, map);
332 map->to_file, LAST_SOURCE_LINE (map));
341 trace_include (const struct line_maps *set, const struct line_map *map)
347 fprintf (stderr, " %s\n", map->to_file);