3 Copyright 2000, 2001 Free Software Foundation, Inc.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 typedef struct source_file
26 struct source_file *next;
27 const char *name; /* Name of source file. */
28 unsigned long ncalls; /* # of "calls" to this file. */
29 int num_lines; /* # of lines in file. */
30 int nalloced; /* Number of lines allocated. */
31 void **line; /* Usage-dependent per-line data. */
36 extern boolean create_annotation_files; /* Create annotated output files? */
38 /* List of directories to search for source files. */
39 extern Search_List src_search_list;
41 /* Chain of source-file descriptors. */
42 extern Source_File *first_src_file;
44 /* Returns pointer to source file descriptor for PATH/FILENAME. */
45 extern Source_File *source_file_lookup_path PARAMS ((const char *));
46 extern Source_File *source_file_lookup_name PARAMS ((const char *));
48 /* Read source file SF output annotated source. The annotation is at
49 MAX_WIDTH characters wide and for each source-line an annotation is
50 obtained by invoking function ANNOTE. ARG is an argument passed to
51 ANNOTE that is left uninterpreted by annotate_source().
53 Returns a pointer to the output file (which maybe stdout) such
54 that summary statistics can be printed. If the returned file
55 is not stdout, it should be closed when done with it. */
56 extern FILE *annotate_source PARAMS ((Source_File * sf, int max_width,
57 void (*annote) (char *b, int w, int l,