version 1.20, 2005/07/11 18:05:09 |
version 1.21, 2005/07/14 06:54:59 |
|
|
static int |
static int |
cvs_annotate_local(CVSFILE *cf, void *arg) |
cvs_annotate_local(CVSFILE *cf, void *arg) |
{ |
{ |
int len; |
char fpath[MAXPATHLEN], rcspath[MAXPATHLEN]; |
char *repo, fpath[MAXPATHLEN], rcspath[MAXPATHLEN]; |
|
RCSFILE *rf; |
RCSFILE *rf; |
struct cvsroot *root; |
|
|
|
if (cf->cf_type == DT_DIR) |
if (cf->cf_type == DT_DIR) |
return (0); |
return (0); |
|
|
root = CVS_DIR_ROOT(cf); |
|
repo = CVS_DIR_REPO(cf); |
|
|
|
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
|
|
if (cf->cf_cvstat == CVS_FST_UNKNOWN) |
if (cf->cf_cvstat == CVS_FST_UNKNOWN) |
return (0); |
return (0); |
|
|
len = snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", |
if (cvs_rcs_getpath(cf, rcspath, sizeof(rcspath)) == NULL) |
root->cr_dir, repo, CVS_FILE_NAME(cf), RCS_FILE_EXT); |
|
if (len == -1 || len >= (int)sizeof(rcspath)) { |
|
errno = ENAMETOOLONG; |
|
cvs_log(LP_ERRNO, "%s", rcspath); |
|
return (CVS_EX_DATA); |
return (CVS_EX_DATA); |
} |
|
|
|
rf = rcs_open(rcspath, RCS_READ); |
rf = rcs_open(rcspath, RCS_READ); |
if (rf == NULL) |
if (rf == NULL) |