strcpy(destcopy, dest);
strlcpy(destcopy, dest, sizeof destcopy);
install(src, dest, destdir, opts)	char *src, *dest;	int destdir, opts;{	char *rname;	char destcopy[BUFSIZ];	if (opts & WHOLE)		source[0] = '\0';	else		strcpy(source, src);	if (dest == NULL) {		opts &= ~WHOLE; /* WHOLE mode only useful if renaming */		dest = src;	}	if (nflag || debug) {		printf("%s%s%s%s%s %s %s\n", opts & VERIFY ? "verify":"install",			opts & WHOLE ? " -w" : "",			opts & YOUNGER ? " -y" : "",			opts & COMPARE ? " -b" : "",			opts & REMOVE ? " -R" : "", src, dest);		if (nflag)			return;	}	rname = exptilde(target, src, sizeof(target));	if (rname == NULL)		return;	tp = target;	while (*tp)		tp++;	/*	 * If we are renaming a directory and we want to preserve	 * the directory heirarchy (-w), we must strip off the leading	 * directory name and preserve the rest.	 */	if (opts & WHOLE) {		while (*rname == '/')			rname++;		destdir = 1;	} else {		rname = basename(target);	}	if (debug)		printf("target = %s, rname = %s\n", target, rname);	/*	 * Pass the destination file/directory name to remote.	 */	(void) snprintf(buf, sizeof(buf), "%c%s\n", destdir ? 'T' : 't', dest);	if (debug)		printf("buf = %s", buf);	(void) write(rem, buf, strlen(buf));	if (response() < 0)		return;	/*	 * Save the name of the remote target destination if we are	 * in WHOLE mode (destdir > 0) or if the source and destination	 * are not the same.  This info will be used later for maintaining	 * hardlink info.	 */	if (destdir || (src && dest && strcmp(src, dest))) {		strcpy(destcopy, dest);		Tdest = destcopy;	}	sendf(rname, opts);	Tdest = 0;}