(void) write(remout, path, strlen(path));
(void) atomicio(write, remout, path, strlen(path));
rsource(name, statp)	char *name;	struct stat *statp;{	DIR *dirp;	struct dirent *dp;	char *last, *vect[1], path[1100];	if (!(dirp = opendir(name))) {		run_err("%s: %s", name, strerror(errno));		return;	}	last = strrchr(name, '/');	if (last == 0)		last = name;	else		last++;	if (pflag) {		(void) sprintf(path, "T%lu 0 %lu 0\n",			       (unsigned long) statp->st_mtime,			       (unsigned long) statp->st_atime);		(void) write(remout, path, strlen(path));		if (response() < 0) {			closedir(dirp);			return;		}	}	(void) sprintf(path, "D%04o %d %.1024s\n",		       (unsigned int) (statp->st_mode & FILEMODEMASK),		       0, last);	if (verbose_mode)		fprintf(stderr, "Entering directory: %s", path);	(void) write(remout, path, strlen(path));	if (response() < 0) {		closedir(dirp);		return;	}	while ((dp = readdir(dirp))) {		if (dp->d_ino == 0)			continue;		if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))			continue;		if (strlen(name) + 1 + strlen(dp->d_name) >= sizeof(path) - 1) {			run_err("%s/%s: name too long", name, dp->d_name);			continue;		}		(void) sprintf(path, "%s/%s", name, dp->d_name);		vect[0] = path;		source(1, vect);	}	(void) closedir(dirp);	(void) write(remout, "E\n", 2);	(void) response();}