Lines Matching refs:pp
75 message((-3, "search: %s: status=%s%s test=%s", fp->name, status == INC_CLEAR ? "[CLEAR]" : status == INC_TEST ? "[ONCE]" : status == INC_IGNORE ? "[IGNORE]" : status->name, (pp.mode & HOSTED) ? "[HOSTED]" : "", test == INC_CLEAR ? "[CLEAR]" : test == INC_TEST ? "[TEST]" : test->name));
78 message((-2, "%s: ignored [%s]", fp->name, pp.ignore));
87 if ((pp.mode & (ALLMULTIPLE|LOADING)) == LOADING)
89 if ((pp.state & WARN) && (pp.mode & (HOSTED|MARKHOSTED|RELAX|PEDANTIC)) == PEDANTIC)
97 if ((pp.mode & (ALLMULTIPLE|LOADING)) == LOADING)
123 if (!(pp.option & PREFIX))
197 variant = sfsprintf(pp.tmpbuf, MAXTOKEN, "%c%s%c%s:archive", VDB_DELIMITER, VDB_MAGIC, VDB_DELIMITER, pp.pass);
198 if (!(s = sfgetr(sp, '\n', 1)) || !strneq(s, pp.tmpbuf, variant))
225 switch ((int)hashref(pp.strtab, e))
300 if (pp.test & 0x0020) error(1, "VDB#%d %s %s index=%d data=<%lu,%lu>", __LINE__, dp->name, xp->name, index, ap->offset, ap->size);
306 if (!(pp.test & 0x4000) &&
308 (pp.pool.input || !(dp->type & TYPE_CHECKPOINT))
318 if (pp.pool.input)
347 sfsprintf(t = pp.path, PATH_MAX - 1, "%s/%s", dp->name, prefix);
370 strcpy(pp.path, fp->name);
372 sfsprintf(pp.path, PATH_MAX - 1, "%s/%s", dp->name, fp->name);
373 pathcanon(pp.path, PATH_MAX, 0);
374 if (!xp || !streq(xp->name, pp.path))
376 fp->bound[index] = xp = ppsetfile(pp.path);
386 pp.include = xp->name;
402 strcpy(pp.path, xp->name);
408 pp.include = xp->name;
418 strcpy(pp.path, fp->name);
420 sfsprintf(pp.path, PATH_MAX - 1, "%s/%s", dp->name, fp->name);
421 pathcanon(pp.path, PATH_MAX, 0);
427 if (streq(error_info.file, pp.path))
432 for (in = pp.in; in; in = in->prev)
433 if (in->type == IN_FILE && in->file && streq(in->file, pp.path))
448 if ((xp || (xp = ppgetfile(pp.path))) && (xp->flags & INC_SELF))
457 pp.include = xp->name;
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);
472 pp.member = (struct ppmember*)fp->bound[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);
480 pp.member = 0;
481 fd = (flags & SEARCH_INCLUDE) ? open(pp.path, O_RDONLY) : eaccess(pp.path, R_OK);
485 pp.found = dp;
486 if ((pp.option & (PLUSPLUS|NOPROTO)) == PLUSPLUS && !(pp.test & TEST_noproto))
489 pp.mode |= MARKC;
491 pp.mode &= ~MARKC;
495 else if (!(markhosted = (dp->type & TYPE_HOSTED)) && dp->index == INC_PREFIX && (pp.mode & (FILEDEPS|HEADERDEPS|INIT)) == FILEDEPS)
503 pp.mode |= MARKHOSTED;
505 pp.mode &= ~MARKHOSTED;
506 xp = ppsetfile(pp.path);
509 message((-2, "search: %s -> %s%s%s", fp->name, pp.path, (pp.mode & MARKC) ? " [C]" : "", (pp.mode & MARKHOSTED) ? " [hosted]" : ""));
511 if (!pp.member)
527 if ((pp.prefix = prefix) || (pp.prefix = pp.in->prefix))
528 message((-2, "search: %s: prefix=%s", xp->name, pp.prefix));
529 if (!(pp.mode & ALLMULTIPLE))
535 if ((pp.state & WARN) && (pp.mode & (HOSTED|MARKHOSTED|RELAX|PEDANTIC)) == PEDANTIC)
541 if (!pp.member)
546 pp.include = xp->name;
550 pp.include = xp->name;
551 if ((pp.mode & (FILEDEPS|INIT)) == FILEDEPS && ((pp.mode & HEADERDEPS) || !(pp.mode & MARKHOSTED)) && !(xp->flags & INC_LISTED))
554 if ((pp.column + strlen(xp->name)) >= COLUMN_MAX)
556 sfprintf(pp.filedeps.sp, " \\\n");
557 pp.column = COLUMN_TAB;
562 pp.column += sfprintf(pp.filedeps.sp, "%c%s", index, xp->name);
572 error(ERROR_SYSTEM|1, "%s: cannot open file for reading", pp.path);
576 strcpy(pp.path, fp->name);
585 * with pp.path set to the full path and
586 * pp.prefix set to the directory prefix
610 pp.include = 0;
613 prefix = pp.chop ? -1 : 0;
624 for (cp = pp.chop; cp; cp = cp->next)
641 while ((fp->flags & INC_MAPALL) || (fp->flags & INC_MAPHOSTED) && (pp.mode & HOSTED) || (fp->flags & INC_MAPNOHOSTED) && !(pp.mode & HOSTED))
648 if ((fp->flags & INC_MAPNOLOCAL) && (pp.mode & HOSTED))
650 else if (pp.vendor)
652 pp.original = fp;
669 error_info.file = pp.include;
682 if (pp.in->prefix)
684 sfsprintf(name, sizeof(name) - 1, "%s/%s", pp.in->prefix, file);
695 strcpy(pp.path, fp->name);
701 pp.prefix = 0;
703 dp = pp.stddirs->next;
706 dp = pp.lcldirs;
707 if (dp == pp.firstdir)
722 else if (pp.in->prefix && pp.lcldirs != pp.firstdir)
734 if (!streq(fp->name, pp.in->prefix))
743 sfsprintf(name, sizeof(name) - 1, "%s/%s", pp.in->prefix, fp->name);
755 if ((pp.option & PLUSPLUS) && file != pp.tmpbuf)
761 sfsprintf(pp.tmpbuf, MAXTOKEN, "%s.h", file);
762 file = pp.tmpbuf;
789 if (!chop && pp.chop)
811 if (!(pp.mode & GENDEPS))
813 if (!(pp.option & ALLPOSSIBLE) || pp.in->prev->prev)
816 else if (!(pp.mode & INIT))
822 if ((pp.column + strlen(file)) >= COLUMN_MAX)
824 sfprintf(pp.filedeps.sp, " \\\n");
825 pp.column = COLUMN_TAB;
830 pp.column += sfprintf(pp.filedeps.sp, "%c%s", index, file);