=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/usr.bin/cvs/file.c 2004/12/06 07:28:15 1.37 --- src/usr.bin/cvs/file.c 2004/12/06 21:03:12 1.38 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.37 2004/12/06 07:28:15 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.38 2004/12/06 21:03:12 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 154,161 **** if (errno != ENOENT) cvs_log(LP_ERRNO, "failed to open user's cvsignore", path); ! } ! else { while (fgets(buf, sizeof(buf), ifp) != NULL) { len = strlen(buf); if (len == 0) --- 154,160 ---- if (errno != ENOENT) cvs_log(LP_ERRNO, "failed to open user's cvsignore", path); ! } else { while (fgets(buf, sizeof(buf), ifp) != NULL) { len = strlen(buf); if (len == 0) *************** *** 232,239 **** if (ip->ip_flags & CVS_IGN_STATIC) { if (cvs_file_cmpname(file, ip->ip_pat) == 0) return (1); ! } ! else if (fnmatch(ip->ip_pat, file, flags) == 0) return (1); } --- 231,237 ---- if (ip->ip_flags & CVS_IGN_STATIC) { if (cvs_file_cmpname(file, ip->ip_pat) == 0) return (1); ! } else if (fnmatch(ip->ip_pat, file, flags) == 0) return (1); } *************** *** 279,286 **** } cfp->cf_ddat->cd_ent = cvs_ent_open(path, O_RDWR); ! } ! else { fd = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); if (fd == -1) { cvs_file_free(cfp); --- 277,283 ---- } cfp->cf_ddat->cd_ent = cvs_ent_open(path, O_RDWR); ! } else { fd = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); if (fd == -1) { cvs_file_free(cfp); *************** *** 440,447 **** } cf = cf->cf_parent; continue; ! } ! else if (*(pp + 1) == '\0') continue; } --- 437,443 ---- } cf = cf->cf_parent; continue; ! } else if (*(pp + 1) == '\0') continue; } *************** *** 622,629 **** if (cfp->cf_type == DT_DIR) { TAILQ_INSERT_TAIL(&dirs, cfp, cf_list); ndirs++; ! } ! else { TAILQ_INSERT_TAIL(&(cdp->cd_files), cfp, cf_list); cdp->cd_nfiles++; --- 618,624 ---- if (cfp->cf_type == DT_DIR) { TAILQ_INSERT_TAIL(&dirs, cfp, cf_list); ndirs++; ! } else { TAILQ_INSERT_TAIL(&(cdp->cd_files), cfp, cf_list); cdp->cd_nfiles++; *************** *** 691,698 **** if (ret == -1) break; } ! } ! else ret = (*exam)(cf, arg); return (ret); --- 686,692 ---- if (ret == -1) break; } ! } else ret = (*exam)(cf, arg); return (ret); *************** *** 889,896 **** 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; --- 883,889 ---- 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;