Lines Matching refs:file

25  * include file search support
55 * test!=INC_CLEAR returns 1 if file can be included again
59 * (1) different hard links to the same file are treated as
63 * different files to be treated as the same file:
65 * "../h/<file>" == "/usr/include/sys/../h/<file>" -> "/usr/include/h/<file>"
66 * "h/<file>" -> "/usr/include/h/<file>"
107 * search for file using directories in dp
153 error_info.file
427 if (streq(error_info.file, pp.path))
433 if (in->type == IN_FILE && in->file && streq(in->file, pp.path))
466 message((-3, "search: file=%s path=%s", fp->name, pp.path));
468 if (pp.test & 0x0040) error(1, "SEARCH#%d dir=%s%s%s%s%s file=%s%s path=%s index=%d", __LINE__, dp->name, (dp->type & TYPE_ARCHIVE) ? " ARCHIVE" : "", (dp->type & TYPE_BUFFER) ? " BUFFER" : "", (dp->type & TYPE_CHECKPOINT) ? " CHECKPOINT" : "", (dp->type & TYPE_DIRECTORY) ? " DIRECTORY" : "", fp->name, (fp->flags & INC_MEMBER(index)) ? " MEMBER" : "", pp.path, index);
473 if (pp.test & 0x0010) error(1, "SEARCH#%d file=%s path=%s index=%d data=<%lu,%lu>", __LINE__, fp->name, pp.path, index, pp.member->offset, pp.member->size);
572 error(ERROR_SYSTEM|1, "%s: cannot open file for reading", pp.path);
582 * search for an include file
584 * if file found then open read file descriptor returned
587 * otherwise 0 returned if file found but ignored
590 * if file found then 0 returned
595 ppsearch(char* file, int type, int flags)
611 if (s = strchr(file, '\\'))
619 pathcanon(file, 0);
622 if (strneq(file, cp->value, cp->op))
626 sfsprintf(name, sizeof(name) - 1, "%s%s", cp->value + cp->op + 1, file + cp->op);
627 message((-2, "search: %s -> %s", file, name));
628 file = name;
630 else if (strchr(file + cp->op, '/'))
632 message((-2, "search: %s -> %s", file, file + cp->op));
633 file += cp->op;
637 fp = ppsetfile(file);
657 n = strlen(error_info.file);
659 if (n < m || !streq(fp->name + 4, error_info.file + n - m))
665 s = error_info.file;
666 error_info.file = pp.include;
668 error_info.file = s;
671 file = error_info.file + n - m;
673 else if (file = strrchr(error_info.file, '/'))
674 file++;
676 file = error_info.file;
681 sfsprintf(name, sizeof(name) - 1, "%s/%s", pp.in->prefix, file);
687 fp = ppsetfile(file);
707 * look in directory of including file first
710 if (error_info.file && (s = strrchr(error_info.file, '/')))
713 dp->name = ppsetfile(error_info.file)->name;
722 * look in prefix directory of including file first
750 if ((pp.option & PLUSPLUS) && file != pp.tmpbuf)
752 s = file + strlen(file);
753 while (s > file && *--s != '/' && *s != '\\' && *s != '.');
756 sfsprintf(pp.tmpbuf, MAXTOKEN, "%s.h", file);
757 file = pp.tmpbuf;
769 if (ppisid(file[0]) && file[1] == ':' && file[2] == '/')
771 file[1] = file[0];
772 file[0] = '/';
773 pathcanon(file, 0);
779 file += 2;
793 error(2, "%s: cannot find include file", file);
797 xp = ppsetfile(file);
801 if ((pp.column + strlen(file)) >= COLUMN_MAX)
809 pp.column += sfprintf(pp.filedeps.sp, "%c%s", index, file);