[BACK]Return to rcsprog.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rcs

Diff for /src/usr.bin/rcs/rcsprog.c between version 1.72 and 1.73

version 1.72, 2006/03/14 03:33:30 version 1.73, 2006/03/15 02:46:14
Line 230 
Line 230 
 int  int
 rcs_statfile(char *fname, char *out, size_t len)  rcs_statfile(char *fname, char *out, size_t len)
 {  {
         int found, strdir;          int found;
         char defaultsuffix[] = RCS_DEFAULT_SUFFIX;          char defaultsuffix[] = RCS_DEFAULT_SUFFIX;
         char filev[MAXPATHLEN], fpath[MAXPATHLEN];          char filev[MAXPATHLEN], fpath[MAXPATHLEN];
         char *ext, *slash;          char *ext, *slash;
         struct stat st;          struct stat st;
   
         strdir = found = 0;          found = 0;
   
         /* we might have gotten the RCS/ dir in the argument string */  
         if (strstr(fname, RCSDIR) != NULL)  
                 strdir = 1;  
   
         if (rcs_suffixes != NULL)          if (rcs_suffixes != NULL)
                 ext = rcs_suffixes;                  ext = rcs_suffixes;
         else          else
Line 266 
Line 262 
                     strlcat(filev, ext, sizeof(filev)) >= sizeof(filev))                      strlcat(filev, ext, sizeof(filev)) >= sizeof(filev))
                         fatal("rcs_statfile: path truncation");                          fatal("rcs_statfile: path truncation");
   
                 if ((strdir == 0) &&                  if (stat(RCSDIR, &st) != -1 && (st.st_mode & S_IFDIR)) {
                     (stat(RCSDIR, &st) != -1) && (st.st_mode & S_IFDIR)) {  
                         if (strlcpy(fpath, RCSDIR,                          if (strlcpy(fpath, RCSDIR,
                             sizeof(fpath)) >= sizeof(fpath) ||                              sizeof(fpath)) >= sizeof(fpath) ||
                             strlcat(fpath, "/",                              strlcat(fpath, "/",

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73