diff options
author | peter <peter@FreeBSD.org> | 2000-10-02 06:33:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-10-02 06:33:59 +0000 |
commit | 590c411955d6975551ffeaf41d7faf4b26f836d1 (patch) | |
tree | c2ec0b150478a3cab9fb18e60d02dedbdc1cfd15 /contrib/cvs/src/ignore.c | |
parent | 784ea5066cbea73d04e8ce5783dd0eb842e3ac1f (diff) | |
download | FreeBSD-src-590c411955d6975551ffeaf41d7faf4b26f836d1.zip FreeBSD-src-590c411955d6975551ffeaf41d7faf4b26f836d1.tar.gz |
Import cvs-1.11 onto vendor branch.
Diffstat (limited to 'contrib/cvs/src/ignore.c')
-rw-r--r-- | contrib/cvs/src/ignore.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/contrib/cvs/src/ignore.c b/contrib/cvs/src/ignore.c index df08017..4ea61ad 100644 --- a/contrib/cvs/src/ignore.c +++ b/contrib/cvs/src/ignore.c @@ -333,9 +333,7 @@ ign_dir_add (name) (dir_ign_max + 1) * sizeof (char *)); } - dir_ign_list[dir_ign_current] = name; - - dir_ign_current += 1 ; + dir_ign_list[dir_ign_current++] = xstrdup (name); } @@ -414,9 +412,9 @@ ignore_files (ilist, entries, update_dir, proc) { file = dp->d_name; if (strcmp (file, ".") == 0 || strcmp (file, "..") == 0) - continue; + goto continue_loop; if (findnode_fn (ilist, file) != NULL) - continue; + goto continue_loop; if (subdirs) { Node *node; @@ -437,14 +435,14 @@ ignore_files (ilist, entries, update_dir, proc) dir = isdir (p); free (p); if (dir) - continue; + goto continue_loop; } } /* We could be ignoring FIFOs and other files which are neither regular files nor directories here. */ if (ign_name (file)) - continue; + goto continue_loop; if ( #ifdef DT_DIR @@ -455,9 +453,12 @@ ignore_files (ilist, entries, update_dir, proc) if ( #ifdef DT_DIR - dp->d_type == DT_DIR || dp->d_type == DT_UNKNOWN && + dp->d_type == DT_DIR + || (dp->d_type == DT_UNKNOWN && S_ISDIR (sb.st_mode)) +#else + S_ISDIR (sb.st_mode) #endif - S_ISDIR(sb.st_mode)) + ) { if (! subdirs) { @@ -468,7 +469,7 @@ ignore_files (ilist, entries, update_dir, proc) if (isdir (temp)) { free (temp); - continue; + goto continue_loop; } free (temp); } @@ -476,16 +477,20 @@ ignore_files (ilist, entries, update_dir, proc) #ifdef S_ISLNK else if ( #ifdef DT_DIR - dp->d_type == DT_LNK || dp->d_type == DT_UNKNOWN && + dp->d_type == DT_LNK + || (dp->d_type == DT_UNKNOWN && S_ISLNK(sb.st_mode)) +#else + S_ISLNK (sb.st_mode) #endif - S_ISLNK(sb.st_mode)) + ) { - continue; + goto continue_loop; } #endif } (*proc) (file, xdir); + continue_loop: errno = 0; } if (errno != 0) |