Lines Matching refs:flags
111 search(register struct ppfile* fp, register struct ppdirs* dp, int type, int flags)
132 message((-3, "search: %s %s%s%s%s%s%s type=%s prefix=%s flags=|%s%s%s%s%s%s start=%s=\"%s\" pre=%s lcl=%s vnd=%s std=%s cur=%s",
134 (flags & SEARCH_INCLUDE) ? "include" : "exists",
135 (flags & SEARCH_VENDOR) ? " vendor" : "",
136 (flags & SEARCH_HOSTED) ? " hosted" : "",
137 (flags & SEARCH_NEXT) ? " next" : "",
138 (flags & SEARCH_SKIP) ? " skip" : "",
139 (flags & SEARCH_TEST) ? " test" : "",
141 (fp->flags & INC_SELF) ? "SELF|" : "",
142 (fp->flags & INC_EXISTS) ? "EXISTS|" : "",
143 (fp->flags & INC_BOUND(INC_PREFIX)) ? "PREFIX|" : "",
144 (fp->flags & INC_BOUND(INC_LOCAL)) ? "LOCAL|" : "",
145 (fp->flags & INC_BOUND(INC_VENDOR)) ? "VENDOR|" : "",
146 (fp->flags & INC_BOUND(INC_STANDARD)) ? "STANDARD|" : "",
149 !(fp->flags & INC_MEMBER(INC_PREFIX)) && (xp = fp->bound[INC_PREFIX]) ? xp->name : NiL,
150 !(fp->flags & INC_MEMBER(INC_LOCAL)) && (xp = fp->bound[INC_LOCAL]) ? xp->name : NiL,
151 !(fp->flags & INC_MEMBER(INC_VENDOR)) && (xp = fp->bound[INC_VENDOR]) ? xp->name : NiL,
152 !(fp->flags & INC_MEMBER(INC_STANDARD)) && (xp = fp->bound[INC_STANDARD]) ? xp->name : NiL,
155 if (flags & SEARCH_HOSTED)
157 else if (flags & SEARCH_VENDOR)
298 xp->flags |= INC_MEMBER(dp->index);
359 if (!(flags & SEARCH_NEXT) && index != dp->index && (!(need & TYPE_HOSTED) || dp->index == INC_STANDARD) && (!(need & TYPE_VENDOR) || dp->index == INC_VENDOR))
361 if (index >= 0 && !(fp->flags & INC_MEMBER(index)))
362 fp->flags |= INC_BOUND(index);
364 if (fp->flags & INC_BOUND(index))
378 xp->flags |= INC_HOSTED;
379 if ((flags & SEARCH_INCLUDE) || (xp->flags & INC_EXISTS))
381 if (!(flags & SEARCH_INCLUDE))
385 if (flags & SEARCH_TEST)
403 if (!(flags & SEARCH_INCLUDE))
407 if (flags & SEARCH_TEST)
415 if (!(fp->flags & INC_BOUND(index)) || (flags & SEARCH_NEXT))
422 if (!(flags & SEARCH_SKIP))
441 flags |= SEARCH_FOUND;
444 if (!(flags & SEARCH_FOUND))
448 if ((xp || (xp = ppgetfile(pp.path))) && (xp->flags & INC_SELF))
450 if (xp->flags & INC_EXISTS)
452 if (!(flags & SEARCH_INCLUDE))
454 if (!(flags & SEARCH_NEXT) && mp != xp && (mp = xp) && !ppmultiple(xp, INC_TEST))
456 if (flags & SEARCH_TEST)
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);
469 if ((fp->flags & INC_MEMBER(index)) && ((struct ppmember*)fp->bound[index])->archive == dp)
481 fd = (flags & SEARCH_INCLUDE) ? open(pp.path, O_RDONLY) : eaccess(pp.path, R_OK);
494 markhosted = xp->flags & INC_HOSTED;
508 xp->flags |= INC_HOSTED;
514 fp->flags |= INC_BOUND(index);
516 if ((index == INC_STANDARD || index == INC_VENDOR) && type != T_HEADER && !(fp->flags & INC_BOUND(INC_LOCAL)))
518 fp->flags |= INC_BOUND(INC_LOCAL);
524 xp->flags |= INC_SELF|INC_EXISTS;
525 if (flags & SEARCH_INCLUDE)
545 if (flags & SEARCH_TEST)
551 if ((pp.mode & (FILEDEPS|INIT)) == FILEDEPS && ((pp.mode & HEADERDEPS) || !(pp.mode & MARKHOSTED)) && !(xp->flags & INC_LISTED))
553 xp->flags |= INC_LISTED;
568 xp->flags |= INC_SELF;
577 message((-2, "search: %s%s not found", (flags & SEARCH_NEXT) ? "next " : "", fp->name));
583 * if (flags&SEARCH_INCLUDE) then
595 ppsearch(char* file, int type, int flags)
638 while ((fp->flags & INC_MAPALL) || (fp->flags & INC_MAPHOSTED) && (pp.mode & HOSTED) || (fp->flags & INC_MAPNOHOSTED) && !(pp.mode & HOSTED))
645 if ((fp->flags & INC_MAPNOLOCAL) && (pp.mode & HOSTED))
646 flags |= SEARCH_HOSTED;
648 flags |= SEARCH_VENDOR;
661 if ((fd = ppsearch(fp->name + 4, type, flags|SEARCH_TEST)) < 0)
667 fd = ppsearch(fp->name + 4, type, flags|SEARCH_NEXT);
677 flags |= SEARCH_NEXT;
683 if ((fd = ppsearch(fp->name, type, flags)) >= 0)
688 return ppsearch(fp->name, type, flags);
690 else if ((flags & SEARCH_INCLUDE) && fp->guard == INC_IGNORE)
696 else if (!(flags & SEARCH_NEXT))
697 flags |= SEARCH_SKIP;
743 if ((fd = search(xp, dp, type, flags)) >= 0)
748 if ((fd = search(fp, dp, type, flags)) < 0)
782 if ((flags & (SEARCH_INCLUDE|SEARCH_NEXT)) == SEARCH_INCLUDE)
798 if (!(xp->flags & INC_LISTED))
800 xp->flags |= INC_LISTED;