Lines Matching refs:vp
274 int a_depth, struct Save *a_last, struct Var *vp)
308 if ((vp->curflags & FTW_CHDIR) && last)
311 comp = vp->tmppath;
313 if (vp->savedstatf == NULL)
314 vp->savedstatf = vp->statf;
316 if ((vp->walklevel++ == 0) && (vp->curflags & FTW_HOPTION)) {
317 if (((vp->curflags & FTW_CHDIR) == 0) && (depth >= 2)) {
318 vp->statf = nocdstat;
320 vp->statf = cdstat;
323 vp->statf = vp->savedstatf;
332 if ((*vp->statf)(comp, &statb, last, _AT_TRIGGER) >= 0) {
337 if ((this->fd = (*vp->opendirf)(comp)) == 0) {
339 (this->fd = (*vp->opendirf)(comp)) != 0) {
358 } else if ((vp->curflags & FTW_ANYERR) && errno != ENOENT) {
378 if (((vp->statf == cdstat) &&
381 ((vp->statf == nocdstat) &&
400 if (!(vp->curflags & FTW_ANYERR))
411 if ((vp->curflags & FTW_MOUNT) && type != FTW_NS &&
412 statb.st_dev != vp->cur_mount)
414 vp->state.quit = 0;
420 if (type != FTW_D || (vp->curflags & FTW_DEPTH) == 0)
421 rc = (*fn)(vp->tmppath, &statb, type, &vp->state);
424 skip = (vp->state.quit & FTW_SKD);
425 if (rc != 0 || type != FTW_D || (vp->state.quit & FTW_PRUNE))
428 if (vp->tmppath[0] != '\0' && component[-1] != '/')
431 if (vp->curflags & FTW_CHDIR) {
436 * (*vp->statf)() and opendir() above).
438 if ((vp->curflags & FTW_PHYS) &&
451 rc = (*fn)(vp->tmppath, &statb, type, &vp->state);
462 if ((vp->curflags & FTW_NOLOOP) ||
463 ((vp->curflags & FTW_PHYS) == 0)) {
472 if (vp->curflags & FTW_NOLOOP) {
484 oldbase = vp->state.base;
485 vp->state.base = (int)(component - vp->tmppath);
497 base_last_comp = last->comp - vp->home;
499 base_comp = comp - vp->home;
500 base_component = component - vp->home;
501 if ((strlen(q) + strlen(vp->home) + 1) > vp->len) {
503 * When the space needed for vp->home has
507 * (possibly moved) new block for vp->home
509 base_this_comp = this->comp - vp->home;
510 base_fullpath = vp->fullpath - vp->home;
511 base_tmppath = vp->tmppath - vp->home;
512 vp->len *= 2;
513 tmp = (char *)realloc(vp->home, vp->len);
518 vp->home = tmp;
519 comp = vp->home + base_comp;
520 component = vp->home + base_component;
521 this->comp = vp->home + base_this_comp;
522 vp->fullpath = vp->home + base_fullpath;
523 vp->tmppath = vp->home + base_tmppath;
525 last->comp = vp->home + base_last_comp;
532 vp->state.level++;
537 last->comp = vp->home + base_last_comp;
539 comp = vp->home + base_comp;
540 component = vp->home + base_component;
541 vp->state.level--;
544 if (vp->curflags & FTW_CHDIR) {
547 this->fd = (*vp->opendirf)(comp);
558 vp->tmppath, strerror(errno));
565 vp->state.base = oldbase;
568 if ((vp->tmppath[0] != '\0') && (vp->curflags & FTW_DEPTH) && !skip)
569 rc = (*fn)(vp->tmppath, &statb, type, &vp->state);
579 if ((*vp->statf)(".", &statb, last, 0) < 0 ||
586 if (chdir(vp->fullpath) < 0) {
590 if ((vp->curflags & FTW_PHYS) &&
591 ((*vp->statf)(".", &statb,