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

Diff for /src/usr.bin/cvs/file.c between version 1.21 and 1.22

version 1.21, 2004/08/06 12:09:25 version 1.22, 2004/08/06 14:12:56
Line 233 
Line 233 
         if (cfp == NULL)          if (cfp == NULL)
                 return (NULL);                  return (NULL);
         cfp->cf_type = type;          cfp->cf_type = type;
           cfp->cf_mode = mode;
   
         if (type == DT_DIR) {          if (type == DT_DIR) {
                 if (mkdir(path, mode) == -1) {                  if (mkdir(path, mode) == -1) {
Line 347 
Line 348 
   
   
 /*  /*
    * cvs_file_attach()
    *
    * Attach the file <file> as one of the children of parent <parent>, which
    * has to be a file of type DT_DIR.
    * Returns 0 on success, or -1 on failure.
    */
   
   int
   cvs_file_attach(CVSFILE *parent, CVSFILE *file)
   {
   
           if (parent->cf_type != DT_DIR)
                   return (-1);
   
           TAILQ_INSERT_HEAD(&(parent->cf_ddat->cd_files), file, cf_list);
           parent->cf_ddat->cd_nfiles++;
           file->cf_parent = parent;
   
           return (0);
   }
   
   
   /*
  * cvs_file_getdir()   * cvs_file_getdir()
  *   *
  * Get a cvs directory structure for the directory whose path is <dir>.   * Get a cvs directory structure for the directory whose path is <dir>.
Line 648 
Line 672 
  * cvs_file_lget()   * cvs_file_lget()
  *   *
  * Get the file and link it with the parent right away.   * Get the file and link it with the parent right away.
    * Returns a pointer to the created file structure on success, or NULL on
    * failure.
  */   */
   
 static CVSFILE*  static CVSFILE*
Line 679 
Line 705 
                 return (NULL);                  return (NULL);
         }          }
         cfp->cf_parent = parent;          cfp->cf_parent = parent;
           cfp->cf_mode = st.st_mode & ACCESSPERMS;
           cfp->cf_mtime = st.st_mtime;
   
         if ((parent != NULL) && (CVS_DIR_ENTRIES(parent) != NULL)) {          if ((parent != NULL) && (CVS_DIR_ENTRIES(parent) != NULL)) {
                 ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), cfp->cf_name);                  ent = cvs_ent_get(CVS_DIR_ENTRIES(parent), cfp->cf_name);

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22