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

Diff for /src/usr.bin/cvs/edit.c between version 1.8 and 1.9

version 1.8, 2005/07/25 12:05:43 version 1.9, 2005/10/10 17:51:53
Line 44 
Line 44 
 static int      cvs_edit_remote(CVSFILE *, void *);  static int      cvs_edit_remote(CVSFILE *, void *);
 static int      cvs_edit_local(CVSFILE *, void *);  static int      cvs_edit_local(CVSFILE *, void *);
   
   static int      cvs_editors_remote(CVSFILE *, void *);
   
   
 struct cvs_cmd cvs_cmd_edit = {  struct cvs_cmd cvs_cmd_edit = {
         CVS_OP_EDIT, CVS_REQ_NOOP, "edit",          CVS_OP_EDIT, CVS_REQ_NOOP, "edit",
         { },          { },
Line 69 
Line 71 
         "[-lR] [file ...]",          "[-lR] [file ...]",
         "lR",          "lR",
         NULL,          NULL,
         0,          CF_SORT | CF_RECURSE,
         cvs_edit_init,          cvs_edit_init,
         NULL,          NULL,
         cvs_edit_remote,          cvs_editors_remote,
         cvs_edit_local,  
         NULL,          NULL,
         NULL,          NULL,
         0          NULL,
           CVS_CMD_SENDDIR | CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2
 };  };
   
   
Line 138 
Line 140 
  *   *
  */   */
 static int  static int
 cvs_edit_remote(CVSFILE *file, void *arg)  cvs_edit_remote(CVSFILE *cf, void *arg)
 {  {
         int *mod_count;          int *mod_count;
   
Line 153 
Line 155 
  *   *
  */   */
 static int  static int
 cvs_edit_local(CVSFILE *file, void *arg)  cvs_edit_local(CVSFILE *cf, void *arg)
 {  {
         int *mod_count;          int *mod_count;
   
         mod_count = (int *)arg;          mod_count = (int *)arg;
   
         return (CVS_EX_OK);          return (CVS_EX_OK);
   }
   
   
   /*
    * cvs_editors_remote()
    *
    */
   static int
   cvs_editors_remote(CVSFILE *cf, void *arg)
   {
           int ret;
           struct cvsroot *root;
   
           ret = 0;
           root = CVS_DIR_ROOT(cf);
   
           if (cf->cf_type == DT_DIR) {
                   if (cf->cf_cvstat == CVS_FST_UNKNOWN)
                           ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE,
                               cf->cf_name);
                   else
                           ret = cvs_senddir(root, cf);
   
                   if (ret == -1)
                           ret = CVS_EX_PROTO;
   
                   return (ret);
           }
   
           if (cvs_sendentry(root, cf) < 0)
                   return (CVS_EX_PROTO);
   
           switch (cf->cf_cvstat) {
           case CVS_FST_UNKNOWN:
                   ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name);
                   break;
           case CVS_FST_UPTODATE:
                   ret = cvs_sendreq(root, CVS_REQ_UNCHANGED, cf->cf_name);
                   break;
           case CVS_FST_ADDED:
           case CVS_FST_MODIFIED:
                   ret = cvs_sendreq(root, CVS_REQ_ISMODIFIED, cf->cf_name);
                   break;
           default:
                   break;
           }
   
   
           if (ret == -1)
                   ret = CVS_EX_PROTO;
   
           return (ret);
 }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9