=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/rcsprog.c,v retrieving revision 1.72 retrieving revision 1.73 diff -c -r1.72 -r1.73 *** src/usr.bin/rcs/rcsprog.c 2006/03/14 03:33:30 1.72 --- src/usr.bin/rcs/rcsprog.c 2006/03/15 02:46:14 1.73 *************** *** 1,4 **** ! /* $OpenBSD: rcsprog.c,v 1.72 2006/03/14 03:33:30 ray Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcsprog.c,v 1.73 2006/03/15 02:46:14 ray Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. *************** *** 230,247 **** int rcs_statfile(char *fname, char *out, size_t len) { ! int found, strdir; char defaultsuffix[] = RCS_DEFAULT_SUFFIX; char filev[MAXPATHLEN], fpath[MAXPATHLEN]; char *ext, *slash; struct stat st; ! strdir = found = 0; - /* we might have gotten the RCS/ dir in the argument string */ - if (strstr(fname, RCSDIR) != NULL) - strdir = 1; - if (rcs_suffixes != NULL) ext = rcs_suffixes; else --- 230,243 ---- int rcs_statfile(char *fname, char *out, size_t len) { ! int found; char defaultsuffix[] = RCS_DEFAULT_SUFFIX; char filev[MAXPATHLEN], fpath[MAXPATHLEN]; char *ext, *slash; struct stat st; ! found = 0; if (rcs_suffixes != NULL) ext = rcs_suffixes; else *************** *** 266,273 **** strlcat(filev, ext, sizeof(filev)) >= sizeof(filev)) fatal("rcs_statfile: path truncation"); ! if ((strdir == 0) && ! (stat(RCSDIR, &st) != -1) && (st.st_mode & S_IFDIR)) { if (strlcpy(fpath, RCSDIR, sizeof(fpath)) >= sizeof(fpath) || strlcat(fpath, "/", --- 262,268 ---- strlcat(filev, ext, sizeof(filev)) >= sizeof(filev)) fatal("rcs_statfile: path truncation"); ! if (stat(RCSDIR, &st) != -1 && (st.st_mode & S_IFDIR)) { if (strlcpy(fpath, RCSDIR, sizeof(fpath)) >= sizeof(fpath) || strlcat(fpath, "/",