Lines Matching defs:dp
47 struct dir_list *dp;
49 dp = malloc(sizeof(struct dir_list));
50 if (!dp)
52 dp->name = malloc(strlen(name)+1);
53 if (!dp->name) {
54 free(dp);
57 strcpy(dp->name, name);
58 dp->next = *list;
59 *list = dp;
67 struct dir_list *dp, *next;
69 for (dp = *list; dp; dp = next) {
70 next = dp->next;
71 free(dp->name);
72 free(dp);
81 struct dirent *dp;
89 dp = readdir(dir);
90 while (dp) {
91 if (dirlen + strlen(dp->d_name) + 2 >= sizeof(path))
93 if (dp->d_name[0] == '.' &&
94 ((dp->d_name[1] == 0) ||
95 ((dp->d_name[1] == '.') && (dp->d_name[2] == 0))))
97 sprintf(path, "%s/%s", dirname, dp->d_name);
113 dp = readdir(dir);