/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)objaddr.c 1.2 2/17/82";
* Lookup the object address of a given line from the named file.
* Potentially all files in the file table need to be checked
* until the line is found since a particular file name may appear
* more than once in the file table (caused by includes).
ADDRESS
objaddr(line
, name
)
for (ftp
= &filetab
[0]; ftp
< &filetab
[nlhdr
.nfiles
]; ftp
++) {
if (streq(ftp
->filename
, name
)) {
if (ftp
== &filetab
[nlhdr
.nfiles
-1]) {
j
= (ftp
+ 1)->lineindex
;
if (linetab
[i
].line
== line
) {
error("unknown source file \"%s\"", name
);