1 /* $Id: file.hh,v 1.4 1994/06/24 10:59:53 ceriel Exp $ */
3 /* Structure for information about files. This information consists of three
5 - file name and directory
6 - mapping of line numbers to offsets in file
7 - mapping of object adresses to lines in file and vice versa
10 #define LOGHSIZ 6 /* make sure HSIZ is a power of 2 */
11 #define HSIZ (1 << LOGHSIZ)
12 #define HASH(line) ((line) & (HSIZ-1))
16 struct symbol *f_base;
17 char *f_fullname; /* name including directory */
18 struct scope *f_scope; /* reference to scope of this file */
19 t_lineno f_nlines; /* number of lines in file */
21 long *ff_linepos; /* positions of lines in file */
22 struct file *ff_next; /* only for BINCL, EINCL */
24 #define f_linepos f_x.ff_linepos
25 #define f_next f_x.ff_next
26 struct outname *f_line_addr[HSIZ];
27 /* hash table, mapping line numbers to
28 outname structures. Collisions are
31 #define next_outname(n) ((struct outname *) ((n)->on_mptr))
32 #define setnext_outname(n,m) ((n)->on_mptr = (char *) (m))
35 /* ALLOCDEF "file" 10 */