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

Diff for /src/usr.bin/cvs/Attic/proto.c between version 1.31 and 1.32

version 1.31, 2004/12/07 17:10:56 version 1.32, 2004/12/08 05:36:14
Line 173 
Line 173 
   
 static pid_t cvs_subproc_pid;  static pid_t cvs_subproc_pid;
   
   /* last directory sent with cvs_senddir() */
   static char cvs_lastdir[MAXPATHLEN] = "";
   
   
 /*  /*
  * cvs_connect()   * cvs_connect()
  *   *
Line 930 
Line 933 
 /*  /*
  * cvs_senddir()   * cvs_senddir()
  *   *
  * Send a `Directory' request along with the 2 paths that follow it.   * Send a `Directory' request along with the 2 paths that follow it.  If
    * the directory info to be sent is the same as the last info sent, the
    * call does nothing and simply returns without an error.
  */   */
 int  int
 cvs_senddir(struct cvsroot *root, CVSFILE *dir)  cvs_senddir(struct cvsroot *root, CVSFILE *dir)
 {  {
         char lbuf[MAXPATHLEN], rbuf[MAXPATHLEN];          char lbuf[MAXPATHLEN], rbuf[MAXPATHLEN];
   
           cvs_file_getpath(dir, lbuf, sizeof(lbuf));
           if (strcmp(lbuf, cvs_lastdir) == 0)
                   return (0);
   
         if (dir->cf_ddat->cd_repo == NULL)          if (dir->cf_ddat->cd_repo == NULL)
                 strlcpy(rbuf, root->cr_dir, sizeof(rbuf));                  strlcpy(rbuf, root->cr_dir, sizeof(rbuf));
         else          else
                 snprintf(rbuf, sizeof(rbuf), "%s/%s", root->cr_dir,                  snprintf(rbuf, sizeof(rbuf), "%s/%s", root->cr_dir,
                     dir->cf_ddat->cd_repo);                      dir->cf_ddat->cd_repo);
   
         cvs_file_getpath(dir, lbuf, sizeof(lbuf));  
   
         if ((cvs_sendreq(root, CVS_REQ_DIRECTORY, lbuf) < 0) ||          if ((cvs_sendreq(root, CVS_REQ_DIRECTORY, lbuf) < 0) ||
             (cvs_sendln(root, rbuf) < 0))              (cvs_sendln(root, rbuf) < 0))
                 return (-1);                  return (-1);
   
           strlcpy(cvs_lastdir, lbuf, sizeof(cvs_lastdir));
   
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32