#include "line-map.h"
#include "intl.h"
-static void trace_include
- PARAMS ((const struct line_maps *, const struct line_map *));
+static void trace_include (const struct line_maps *, const struct line_map *);
/* Initialize a line map set. */
void
-init_line_maps (set)
- struct line_maps *set;
+init_line_maps (struct line_maps *set)
{
set->maps = 0;
set->allocated = 0;
/* Free a line map set. */
void
-free_line_maps (set)
- struct line_maps *set;
+free_line_maps (struct line_maps *set)
{
if (set->maps)
{
function. */
const struct line_map *
-add_line_map (set, reason, sysp, from_line, to_file, to_line)
- struct line_maps *set;
- enum lc_reason reason;
- unsigned int sysp;
- unsigned int from_line;
- const char *to_file;
- unsigned int to_line;
+add_line_map (struct line_maps *set, enum lc_reason reason,
+ unsigned int sysp, unsigned int from_line,
+ const char *to_file, unsigned int to_line)
{
struct line_map *map;
the list is sorted and we can use a binary search. */
const struct line_map *
-lookup_line (set, line)
- struct line_maps *set;
- unsigned int line;
+lookup_line (struct line_maps *set, unsigned int line)
{
unsigned int md, mn = 0, mx = set->used;
the most recently listed stack is the same as the current one. */
void
-print_containing_files (set, map)
- struct line_maps *set;
- const struct line_map *map;
+print_containing_files (struct line_maps *set, const struct line_map *map)
{
if (MAIN_FILE_P (map) || set->last_listed == map->included_from)
return;
/* Print an include trace, for e.g. the -H option of the preprocessor. */
static void
-trace_include (set, map)
- const struct line_maps *set;
- const struct line_map *map;
+trace_include (const struct line_maps *set, const struct line_map *map)
{
unsigned int i = set->depth;
};
/* Initialize a line map set. */
-extern void init_line_maps
- PARAMS ((struct line_maps *));
+extern void init_line_maps (struct line_maps *);
/* Free a line map set. */
-extern void free_line_maps
- PARAMS ((struct line_maps *));
+extern void free_line_maps (struct line_maps *);
/* Add a mapping of logical source line to physical source file and
line number. The text pointed to by TO_FILE must have a lifetime
function. A call to this function can relocate the previous set of
maps, so any stored line_map pointers should not be used. */
extern const struct line_map *add_line_map
- PARAMS ((struct line_maps *, enum lc_reason, unsigned int sysp,
- unsigned int from_line, const char *to_file, unsigned int to_line));
+ (struct line_maps *, enum lc_reason, unsigned int sysp,
+ unsigned int from_line, const char *to_file, unsigned int to_line);
/* Given a logical line, returns the map from which the corresponding
(source file, line) pair can be deduced. */
-extern const struct line_map *lookup_line
- PARAMS ((struct line_maps *, unsigned int));
+extern const struct line_map *lookup_line (struct line_maps *, unsigned int);
/* Print the file names and line numbers of the #include commands
which led to the map MAP, if any, to stderr. Nothing is output if
the most recently listed stack is the same as the current one. */
-extern void print_containing_files
- PARAMS ((struct line_maps *, const struct line_map *));
+extern void print_containing_files (struct line_maps *,
+ const struct line_map *);
/* Converts a map and logical line to source line. */
#define SOURCE_LINE(MAP, LINE) ((LINE) + (MAP)->to_line - (MAP)->from_line)