Lines Matching refs:dp
147 struct dirent *dp;
188 while ((dp = readdir (df))) {
189 if (dp->d_name[strlen(dp->d_name) - 1] == '~')
193 if (!strcmp(dp->d_name, ".DS_Store") ||
194 !strcmp(dp->d_name, "._.DS_Store"))
200 if (strlcat (buf, dp->d_name, sizeof(buf)) >= sizeof(buf)) {
202 quit(1, "Pathname too long: %s%s", buf, dp->d_name);
205 strcpy (p, dp->d_name);
218 if (dp->d_name[0] == '.' &&
219 (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' &&
220 dp->d_name[2] == '\0')))
223 if (dp->d_name[0] == '.') {
224 if (!strcmp (dp->d_name, ".git"))
226 if (!strcmp (dp->d_name, ".hg"))
228 if (!strcmp (dp->d_name, ".svn"))
231 if (!strcmp (dp->d_name, "BitKeeper"))
233 if (!strcmp (dp->d_name, "RCS"))
235 if (!strcmp (dp->d_name, "SCCS"))
237 if (!strcmp (dp->d_name, "CVS"))
239 if (!strcmp (dp->d_name, "CVS.adm"))
248 if ((stat (dp->d_name, &sc) < 0) && (errno == ENOENT)) {
249 if (mkdir (dp->d_name, 0777) < 0 ||
250 stat (dp->d_name, &sc) < 0) {
251 mperror (dp->d_name);
256 if (readlink (dp->d_name, symbuf, sizeof(symbuf) - 1) >= 0) {
257 msg ("%s: is a link instead of a directory", dp->d_name);
261 if (chdir (dp->d_name) < 0) {
262 mperror (dp->d_name);
275 symlen = readlink (dp->d_name, symbuf, sizeof(symbuf) - 1);
293 msg ("%s: Keeping existing link to %s", dp->d_name, symbuf);
356 if (symlink (sympath, dp->d_name) < 0)
357 mperror (dp->d_name);