version 1.116, 2005/08/19 13:36:50 |
version 1.117, 2005/09/06 15:29:33 |
|
|
!strcmp(de->d_name, "..")) |
!strcmp(de->d_name, "..")) |
continue; |
continue; |
|
|
|
len = cvs_path_cat(fpath, de->d_name, pbuf, sizeof(pbuf)); |
|
if (len >= sizeof(pbuf)) |
|
goto done; |
|
|
|
if (entf != NULL) |
|
ent = cvs_ent_get(entf, de->d_name); |
|
else |
|
ent = NULL; |
|
|
/* |
/* |
* Do some filtering on the current directory item. |
* Do some filtering on the current directory item. |
*/ |
*/ |
|
|
continue; |
continue; |
|
|
if (!(flags & CF_RECURSE) && (de->d_type == DT_DIR)) { |
if (!(flags & CF_RECURSE) && (de->d_type == DT_DIR)) { |
if (entf != NULL) |
if (ent != NULL) |
(void)cvs_ent_remove(entf, de->d_name); |
ent->processed = 1; |
continue; |
continue; |
} |
} |
|
|
if ((de->d_type != DT_DIR) && (flags & CF_NOFILES)) |
if ((de->d_type != DT_DIR) && (flags & CF_NOFILES)) |
continue; |
continue; |
|
|
/* |
|
* Obtain info about the item. |
|
*/ |
|
len = cvs_path_cat(fpath, de->d_name, pbuf, sizeof(pbuf)); |
|
if (len >= sizeof(pbuf)) |
|
goto done; |
|
|
|
if (entf != NULL) |
|
ent = cvs_ent_get(entf, de->d_name); |
|
else |
|
ent = NULL; |
|
|
|
cfp = cvs_file_lget(pbuf, flags, cf, entf, ent); |
cfp = cvs_file_lget(pbuf, flags, cf, entf, ent); |
if (cfp == NULL) { |
if (cfp == NULL) { |
cvs_log(LP_ERR, "failed to get '%s'", pbuf); |
cvs_log(LP_ERR, "failed to get '%s'", pbuf); |
|
|
} |
} |
|
|
/* |
/* |
* Remove it from the Entries list to make sure it won't |
* Mark the entry as processed. |
* be picked up again when we look at the Entries. |
|
*/ |
*/ |
if (entf != NULL) |
if (ent != NULL) |
(void)cvs_ent_remove(entf, de->d_name); |
ent->processed = 1; |
|
|
/* |
/* |
* If we don't want to keep it, free it |
* If we don't want to keep it, free it |
|
|
* (Follows the same procedure as above ... can we merge them?) |
* (Follows the same procedure as above ... can we merge them?) |
*/ |
*/ |
while ((entf != NULL) && ((ent = cvs_ent_next(entf)) != NULL)) { |
while ((entf != NULL) && ((ent = cvs_ent_next(entf)) != NULL)) { |
|
if (ent->processed == 1) |
|
continue; |
if (!(flags & CF_RECURSE) && (ent->ce_type == CVS_ENT_DIR)) |
if (!(flags & CF_RECURSE) && (ent->ce_type == CVS_ENT_DIR)) |
continue; |
continue; |
if ((flags & CF_NOFILES) && (ent->ce_type != CVS_ENT_DIR)) |
if ((flags & CF_NOFILES) && (ent->ce_type != CVS_ENT_DIR)) |