6 #include "search_list.h"
8 typedef struct source_file {
9 struct source_file *next;
10 const char *name; /* name of source file */
11 int ncalls; /* # of "calls" to this file */
12 int num_lines; /* # of lines in file */
13 int nalloced; /* number of lines allocated */
14 void **line; /* usage-dependent per-line data */
20 extern bool create_annotation_files; /* create annotated output files? */
23 * List of directories to search for source files:
25 extern Search_List src_search_list;
28 * Chain of source-file descriptors:
30 extern Source_File *first_src_file;
33 * Returns pointer to source file descriptor for PATH/FILENAME.
35 extern Source_File *source_file_lookup_path PARAMS((const char *path));
36 extern Source_File *source_file_lookup_name PARAMS((const char *filename));
39 * Read source file SF output annotated source. The annotation is at
40 * MAX_WIDTH characters wide and for each source-line an annotation is
41 * obtained by invoking function ANNOTE. ARG is an argument passed to
42 * ANNOTE that is left uninterpreted by annotate_source().
44 * Returns a pointer to the output file (which maybe stdout) such
45 * that summary statistics can be printed. If the returned file
46 * is not stdout, it should be closed when done with it.
48 extern FILE *annotate_source PARAMS((Source_File *sf, int max_width,
49 void (*annote) (char *b, int w, int l,