version 1.47, 2010/10/23 18:36:35 |
version 1.48, 2015/01/16 06:40:07 |
|
|
struct cvsroot * |
struct cvsroot * |
cvsroot_get(const char *dir) |
cvsroot_get(const char *dir) |
{ |
{ |
char rootpath[MAXPATHLEN], *rootstr, line[128]; |
char rootpath[PATH_MAX], *rootstr, line[128]; |
FILE *fp; |
FILE *fp; |
|
|
if (cvs_rootstr != NULL) |
if (cvs_rootstr != NULL) |
|
|
return (NULL); |
return (NULL); |
} |
} |
|
|
(void)xsnprintf(rootpath, MAXPATHLEN, "%s/%s", dir, CVS_PATH_ROOTSPEC); |
(void)xsnprintf(rootpath, PATH_MAX, "%s/%s", dir, CVS_PATH_ROOTSPEC); |
|
|
if ((fp = fopen(rootpath, "r")) == NULL) { |
if ((fp = fopen(rootpath, "r")) == NULL) { |
if (errno == ENOENT) { |
if (errno == ENOENT) { |