version 1.29, 2006/01/25 08:15:05 |
version 1.30, 2006/01/25 13:31:45 |
|
|
struct cvsroot * |
struct cvsroot * |
cvsroot_get(const char *dir) |
cvsroot_get(const char *dir) |
{ |
{ |
int l; |
|
size_t len; |
size_t len; |
char rootpath[MAXPATHLEN], *rootstr, line[128]; |
char rootpath[MAXPATHLEN], *rootstr, line[128]; |
FILE *fp; |
FILE *fp; |
|
|
if (cvs_rootstr != NULL) |
if (cvs_rootstr != NULL) |
return cvsroot_parse(cvs_rootstr); |
return cvsroot_parse(cvs_rootstr); |
|
|
l = snprintf(rootpath, sizeof(rootpath), "%s/" CVS_PATH_ROOTSPEC, dir); |
|
if (strlcpy(rootpath, dir, sizeof(rootpath)) >= sizeof(rootpath) || |
if (strlcpy(rootpath, dir, sizeof(rootpath)) >= sizeof(rootpath) || |
strlcat(rootpath, "/", sizeof(rootpath)) >= sizeof(rootpath) || |
strlcat(rootpath, "/", sizeof(rootpath)) >= sizeof(rootpath) || |
strlcat(rootpath, CVS_PATH_ROOTSPEC, |
strlcat(rootpath, CVS_PATH_ROOTSPEC, |