CVS patchset: 706
CVS date: 1996/06/28 21:13:32
char *Pmode, char *Uname, char *Gname)
{
struct file_entry *p;
+ char *copyTo, copied;
+ const char *copyFrom;
char fullname[1024];
int mode;
GGname = Gname;
p = malloc(sizeof(struct file_entry));
- strcpy(p->file, name);
+
+ copyTo = p->file;
+ copied = '\0';
+ copyFrom = name;
+ while (*copyFrom) {
+ if (*copyFrom != '/' || copied != '/') {
+ *copyTo++ = copied = *copyFrom;
+ }
+ copyFrom++;
+ }
+ *copyTo = '\0';
+
p->isdoc = isdoc;
p->isconf = isconf;
p->verify_flags = verify_flags;