Lines Matching refs:name

17  * 4. Neither the name of the University nor the names of its contributors
59 * routines to handle pattern matching, name modification (regular expression
60 * substitution and interactive renames), and destination name modification for
61 * copy (-rw). Both file name and link names are adjusted as required in these
340 * into arcn->name and arcn->name has not been modified.
351 if ((pt->pstr = strdup(arcn->name)) == NULL) {
444 * check for a file name match unless we have DIR_MTCH set in
454 if ((arcn->name[pt->plen] == '/') &&
455 (strncmp(pt->pstr, arcn->name, pt->plen) == 0))
457 } else if (fn_match(pt->pstr, arcn->name, &pt->pend) == 0)
597 * modify a selected file name. first attempt to apply replacement string
602 * interactively, we store that mapping (old name to user input name) so
603 * if we spot any file links to the old file name in the future, we will
618 if (rmleadslash && arcn->name[0] == '/') {
619 if (arcn->name[1] == '\0') {
620 arcn->name[0] = '.';
622 (void)memmove(arcn->name, &arcn->name[1],
623 strlen(arcn->name));
648 * Modifying a hard link name makes sense, as we know the file it
660 * justify though. We claim that the symlink name is only likely
667 * we have replacement strings, modify the name and the link
668 * name if any.
670 if ((res = rep_name(arcn->name, &(arcn->nlen), 1)) != 0)
694 * Prompt the user for a replacement file name. A "." keeps the old name,
696 * pax to stop processing and exit. Otherwise the file name input, replaces
709 * prompt user for the replacement name for a file, keep trying until
711 * on them with the same name (from updates etc). We print verbose info
718 tty_prnt("Input new name, or a \".\" to keep the old name, ");
724 tty_prnt("Try again, illegal file name: ..\n");
728 tty_prnt("Try again, file name too long\n");
735 * empty file name, skips this file. a "." leaves it alone
742 tty_prnt("Processing continues, name unchanged.\n");
747 * ok the name changed. We may run into links that point at this
751 tty_prnt("Processing continues, name changed to: %s\n", tmpname);
752 res = add_name(arcn->name, arcn->nlen, tmpname);
753 arcn->nlen = l_strncpy(arcn->name, tmpname, sizeof(arcn->name) - 1);
754 arcn->name[arcn->nlen] = '\0';
762 * fix up the file name and the link name (if any) so this file will land
765 * 0 if ok, -1 if failure (name too long)
771 if (fix_path(arcn->name, &(arcn->nlen), dest_dir, dir_len) < 0)
776 * if the name they point was moved (or will be moved). It is best to
792 * 0 if ok, -1 if the final name is too long
817 paxwarn(1, "File name %s/%s, too long", dir_name, start);
830 * splice in the destination directory name
842 * when we find one with a successful substitution, we modify the name
843 * as specified. if required, we print the results. if the resulting name
848 * name is the file name we are going to apply the regular expressions to
850 * nlen is the length of this name (and is modified to hold the length of
854 * 0 if substitution was successful, 1 if we are to skip the file (the name
859 rep_name(char *name, int *nlen, int prnt)
872 char buf1[PAXPATHLEN+1]; /* where we work on the name */
875 * copy the name into buf1, where we will work on it. We need to keep
883 (void)strcpy(buf1, name);
936 paxwarn(1, "Replacement name error %s",
937 name);
987 paxwarn(1,"Replacement name too long %s >> %s",
988 name, nname);
998 name);
1000 (void)fprintf(stderr,"%s >> %s\n", name, nname);
1005 * otherwise copy the new name over the orig name and return
1009 *nlen = l_strncpy(name, nname, PAXPATHLEN + 1);
1010 name[PAXPATHLEN] = '\0';