Lines Matching defs:arcn

307  *	pattern as having selected an archive member. arcn->pat points at the
308 * pattern that was matched. arcn->pat is set in pat_match()
316 * 0 if the pattern pointed at by arcn->pat was tagged as creating a
321 pat_sel(ARCHD *arcn)
330 if ((pathead == NULL) || ((pt = arcn->pat) == NULL))
352 if (!dflag && ((pt->pend != NULL) || (arcn->type == PAX_DIR))) {
358 * into arcn->name and arcn->name has not been modified.
369 if ((pt->pstr = strdup(arcn->name)) == NULL) {
395 arcn->pat = pt;
409 while ((pt != NULL) && (pt != arcn->pat)) {
423 arcn->pat = NULL;
430 * is found, arcn->pat is set to point at the potential pattern. Later if
440 pat_match(ARCHD *arcn)
444 arcn->pat = NULL;
472 if ((arcn->name[pt->plen] == '/') &&
473 (strncmp(pt->pstr, arcn->name, pt->plen) == 0))
475 } else if (fn_match(pt->pstr, arcn->name, &pt->pend,
494 arcn->pat = pt;
498 if (pat_sel(arcn) < 0)
500 arcn->pat = NULL;
637 mod_name(ARCHD *arcn, int flags)
642 if (checkdotdot(arcn->name)) {
644 arcn->name);
648 if (checkdotdot(arcn->ln_name)) {
650 arcn->ln_name);
681 if ((res = rep_name(arcn->name, sizeof(arcn->name),
682 &(arcn->nlen), flags)) != 0)
685 if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
686 (arcn->type == PAX_HRG)) &&
687 ((res = rep_name(arcn->ln_name,
688 sizeof(arcn->ln_name), &(arcn->ln_nlen),
689 flags | (arcn->type == PAX_SLK ? SYML : 0))) != 0))
697 if ((res = tty_rename(arcn)) != 0)
699 if ((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
700 (arcn->type == PAX_HRG))
701 sub_name(arcn->ln_name, &(arcn->ln_nlen), sizeof(arcn->ln_name));
708 if (rmleadslash && arcn->name[0] == '/') {
709 if (arcn->name[1] == '\0') {
710 arcn->name[0] = '.';
712 (void)memmove(arcn->name, &arcn->name[1],
713 strlen(arcn->name));
714 arcn->nlen--;
721 if (rmleadslash && arcn->ln_name[0] == '/' &&
722 (arcn->type == PAX_HLK || arcn->type == PAX_HRG)) {
723 if (arcn->ln_name[1] == '\0') {
724 arcn->ln_name[0] = '.';
726 (void)memmove(arcn->ln_name, &arcn->ln_name[1],
727 strlen(arcn->ln_name));
728 arcn->ln_nlen--;
750 tty_rename(ARCHD *arcn)
764 ls_tty(arcn);
799 res = add_name(arcn->name, arcn->nlen, tmpname);
800 arcn->nlen = strlcpy(arcn->name, tmpname, sizeof(arcn->name));
815 set_dest(ARCHD *arcn, char *dest_dir, int dir_len)
817 if (fix_path(arcn->name, &(arcn->nlen), dest_dir, dir_len) < 0)
825 if ((arcn->type != PAX_HLK) && (arcn->type != PAX_HRG))
828 if (fix_path(arcn->ln_name, &(arcn->ln_nlen), dest_dir, dir_len) < 0)