ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), path);
ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), cfp->cf_name);
cvs_file_lget(const char *path, int flags, CVSFILE *parent){	int cwd;	size_t len;	char buf[32];	struct stat st;	struct tm lmtm;	CVSFILE *cfp;	struct cvs_ent *ent;	ent = NULL;	if (strcmp(path, ".") == 0)		cwd = 1;	else		cwd = 0;	if (stat(path, &st) == -1) {		cvs_log(LP_ERRNO, "failed to stat %s", path);		return (NULL);	}	cfp = cvs_file_alloc(path, IFTODT(st.st_mode));	if (cfp == NULL) {		cvs_log(LP_ERRNO, "failed to allocate CVS file data");		return (NULL);	}	cfp->cf_parent = parent;	if ((parent != NULL) && (CVS_DIR_ENTRIES(parent) != NULL)) {		ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), path);	}	if (ent == NULL)		cfp->cf_cvstat = (cwd == 1) ?		    CVS_FST_UPTODATE : CVS_FST_UNKNOWN;	else {		/* always show directories as up-to-date */		if (ent->ce_type == CVS_ENT_DIR)			cfp->cf_cvstat = CVS_FST_UPTODATE;		else if (rcsnum_cmp(ent->ce_rev, cvs_addedrev, 2) == 0)			cfp->cf_cvstat = CVS_FST_ADDED;		else {			/* check last modified time */			if ((gmtime_r((time_t *)&(st.st_mtime),			    &lmtm) == NULL) ||			    (asctime_r(&lmtm, buf) == NULL)) {				cvs_log(LP_ERR,				    "failed to generate file timestamp");				/* fake an up to date file */				strlcpy(buf, ent->ce_timestamp, sizeof(buf));			}			len = strlen(buf);			if ((len > 0) && (buf[len - 1] == '\n'))				buf[--len] = '\0';			if (strcmp(buf, ent->ce_timestamp) == 0)				cfp->cf_cvstat = CVS_FST_UPTODATE;			else				cfp->cf_cvstat = CVS_FST_MODIFIED;		}		cvs_ent_free(ent);	}	if ((cfp->cf_type == DT_DIR) && ((flags & CF_RECURSE) || cwd)) {		if ((flags & CF_KNOWN) && (cfp->cf_cvstat == CVS_FST_UNKNOWN)) {			free(cfp->cf_ddat);			cfp->cf_ddat = NULL;		}		else if (cvs_file_getdir(cfp, flags) < 0) {			cvs_file_free(cfp);			return (NULL);		}	}	if (flags & CF_STAT) {		cfp->cf_stat = (struct stat *)malloc(sizeof(struct stat));		if (cfp->cf_stat == NULL) {			cvs_log(LP_ERRNO, "failed to allocate stat structure");			cvs_file_free(cfp);			return (NULL);		}		memcpy(cfp->cf_stat, &st, sizeof(struct stat));	}	return (cfp);}