version 1.202, 2007/09/24 13:44:20 |
version 1.203, 2007/10/05 19:28:23 |
|
|
{ |
{ |
int i; |
int i; |
FILE *ifp; |
FILE *ifp; |
size_t len; |
|
char path[MAXPATHLEN], buf[MAXNAMLEN]; |
char path[MAXPATHLEN], buf[MAXNAMLEN]; |
|
|
TAILQ_INIT(&cvs_ign_pats); |
TAILQ_INIT(&cvs_ign_pats); |
|
|
"failed to open user's cvsignore file `%s'", path); |
"failed to open user's cvsignore file `%s'", path); |
} else { |
} else { |
while (fgets(buf, MAXNAMLEN, ifp) != NULL) { |
while (fgets(buf, MAXNAMLEN, ifp) != NULL) { |
len = strlen(buf); |
buf[strcspn(buf, "\n")] = '\0'; |
if (len == 0) |
if (buf[0] == '\0') |
continue; |
continue; |
if (buf[len - 1] == '\n') |
|
buf[len - 1] = '\0'; |
|
|
|
cvs_file_ignore(buf, &cvs_ign_pats); |
cvs_file_ignore(buf, &cvs_ign_pats); |
} |
} |
|
|
int l, type; |
int l, type; |
FILE *fp; |
FILE *fp; |
int nbytes; |
int nbytes; |
size_t len; |
|
long base; |
long base; |
size_t bufsize; |
size_t bufsize; |
struct stat st; |
struct stat st; |
|
|
|
|
if ((fp = fopen(fpath, "r")) != NULL) { |
if ((fp = fopen(fpath, "r")) != NULL) { |
while (fgets(fpath, MAXPATHLEN, fp) != NULL) { |
while (fgets(fpath, MAXPATHLEN, fp) != NULL) { |
len = strlen(fpath); |
fpath[strcspn(fpath, "\n")] = '\0'; |
if (len == 0) |
if (fpath[0] == '\0') |
continue; |
continue; |
if (fpath[len - 1] == '\n') |
|
fpath[len - 1] = '\0'; |
|
|
|
cvs_file_ignore(fpath, &dir_ign_pats); |
cvs_file_ignore(fpath, &dir_ign_pats); |
} |
} |
|
|
continue; |
continue; |
} |
} |
|
|
len = xsnprintf(fpath, MAXPATHLEN, "%s/%s", |
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", |
cf->file_path, dp->d_name); |
cf->file_path, dp->d_name); |
|
|
/* |
/* |