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

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

version 1.31, 2005/04/24 02:06:27 version 1.32, 2005/05/20 05:13:44
Line 58 
Line 58 
 };  };
   
 static char *mfile = NULL;  static char *mfile = NULL;
   static char **commit_files = NULL;
   static int commit_fcount = 0;
   
 int  int
 cvs_commit_options(char *opt, int argc, char **argv, int *arg)  cvs_commit_options(char *opt, int argc, char **argv, int *arg)
Line 100 
Line 102 
                 return (CVS_EX_DATA);                  return (CVS_EX_DATA);
   
         *arg = optind;          *arg = optind;
   
           commit_files = (argv + optind);
           commit_fcount = (argc - optind);
   
         return (0);          return (0);
 }  }
   
Line 108 
Line 114 
 {  {
         struct cvs_flist cl;          struct cvs_flist cl;
         CVSFILE *cfp;          CVSFILE *cfp;
           CVSFILE *tmp;
           int flags = CF_RECURSE | CF_IGNORE | CF_SORT;
   
         SIMPLEQ_INIT(&cl);          SIMPLEQ_INIT(&cl);
         cvs_file_examine(cvs_files, cvs_commit_prepare, &cl);  
         if (SIMPLEQ_EMPTY(&cl))          if (commit_fcount != 0) {
                   tmp = cvs_file_getspec(commit_files, commit_fcount,
                       flags, cvs_commit_prepare, &cl);
           } else {
                   tmp = cvs_file_get(".", flags, cvs_commit_prepare, &cl);
           }
   
           if (tmp == NULL)
                   return (CVS_EX_DATA);
   
           if (SIMPLEQ_EMPTY(&cl)) {
                   cvs_file_free(tmp);
                 return (0);                  return (0);
           }
   
         if (cvs_msg == NULL)          if (cvs_msg == NULL)
                 cvs_msg = cvs_logmsg_get(CVS_FILE_NAME(cvs_files),                  cvs_msg = cvs_logmsg_get(CVS_FILE_NAME(tmp),
                     NULL, &cl, NULL);                      NULL, &cl, NULL);
   
           cvs_file_free(tmp);
   
         while (!SIMPLEQ_EMPTY(&cl)) {          while (!SIMPLEQ_EMPTY(&cl)) {
                 cfp = SIMPLEQ_FIRST(&cl);                  cfp = SIMPLEQ_FIRST(&cl);

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