version 1.50, 2005/10/22 17:23:21 |
version 1.51, 2005/12/03 01:02:08 |
|
|
* by <name>. |
* by <name>. |
*/ |
*/ |
int |
int |
cvs_ent_remove(CVSENTRIES *ef, const char *name) |
cvs_ent_remove(CVSENTRIES *ef, const char *name, int useprev) |
{ |
{ |
struct cvs_ent *ent; |
struct cvs_ent *ent; |
|
|
|
|
* call to cvs_ent_next(), point to the next element to avoid |
* call to cvs_ent_next(), point to the next element to avoid |
* keeping an invalid reference. |
* keeping an invalid reference. |
*/ |
*/ |
ef->cef_cur = TAILQ_NEXT(ef->cef_cur, ce_list); |
if (useprev) { |
|
ef->cef_cur = TAILQ_PREV(ef->cef_cur, |
|
cvsentrieshead, ce_list); |
|
} else { |
|
ef->cef_cur = TAILQ_NEXT(ef->cef_cur, ce_list); |
|
} |
} |
} |
TAILQ_REMOVE(&(ef->cef_ent), ent, ce_list); |
TAILQ_REMOVE(&(ef->cef_ent), ent, ce_list); |
cvs_ent_free(ent); |
cvs_ent_free(ent); |