version 1.1, 2005/03/23 20:21:54 |
version 1.2, 2005/03/24 03:11:03 |
|
|
|
|
#include "cvs.h" |
#include "cvs.h" |
#include "log.h" |
#include "log.h" |
|
#include "strtab.h" |
|
|
#define CVS_STRTAB_HASHBITS 8 |
#define CVS_STRTAB_HASHBITS 8 |
#define CVS_STRTAB_NBUCKETS (1 << CVS_STRTAB_HASHBITS) |
#define CVS_STRTAB_NBUCKETS (1 << CVS_STRTAB_HASHBITS) |
|
|
* cvs_strfree() |
* cvs_strfree() |
*/ |
*/ |
void |
void |
cvs_strfree(char *s) |
cvs_strfree(const char *s) |
{ |
{ |
cvs_strtab_free(s); |
cvs_strtab_free(s); |
} |
} |
|
|
sp->cs_ref--; |
sp->cs_ref--; |
if (sp->cs_ref == 0) { |
if (sp->cs_ref == 0) { |
/* no more references, free the file */ |
/* no more references, free the file */ |
h = cvs_file_hashname(sp->cs_str); |
h = cvs_strtab_hash(sp->cs_str); |
|
|
SLIST_REMOVE(&(cvs_strtab[h]), sp, cvs_str, cs_link); |
SLIST_REMOVE(&(cvs_strtab[h]), sp, cvs_str, cs_link); |
free(sp->cs_str); |
free(sp->cs_str); |