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

Diff for /src/usr.bin/cvs/cvs.c between version 1.79 and 1.80

version 1.79, 2005/08/03 14:43:08 version 1.80, 2005/08/04 13:31:14
Line 24 
Line 24 
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
   #include <sys/stat.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/wait.h>  #include <sys/wait.h>
   
Line 67 
Line 68 
 char *cvs_homedir = NULL;  char *cvs_homedir = NULL;
 char *cvs_msg = NULL;  char *cvs_msg = NULL;
 char *cvs_repo_base = NULL;  char *cvs_repo_base = NULL;
   char *cvs_tmpdir = CVS_TMPDIR_DEFAULT;
   
 /* hierarchy of all the files affected by the command */  /* hierarchy of all the files affected by the command */
 CVSFILE *cvs_files;  CVSFILE *cvs_files;
Line 99 
Line 101 
         int i, ret, cmd_argc;          int i, ret, cmd_argc;
         struct cvs_cmd *cmdp;          struct cvs_cmd *cmdp;
         struct passwd *pw;          struct passwd *pw;
           struct stat st;
   
         TAILQ_INIT(&cvs_variables);          TAILQ_INIT(&cvs_variables);
   
Line 136 
Line 139 
                 cvs_homedir = pw->pw_dir;                  cvs_homedir = pw->pw_dir;
         }          }
   
           if ((envstr = getenv("TMPDIR")) != NULL)
                   cvs_tmpdir = envstr;
   
         ret = cvs_getopt(argc, argv);          ret = cvs_getopt(argc, argv);
   
         argc -= ret;          argc -= ret;
Line 144 
Line 150 
                 usage();                  usage();
                 exit(1);                  exit(1);
         }          }
   
         cvs_command = argv[0];          cvs_command = argv[0];
   
           /*
            * check the tmp dir, either specified through
            * the environment variable TMPDIR, or via
            * the global option -T <dir>
            */
           if (stat(cvs_tmpdir, &st) == -1) {
                   cvs_log(LP_ERR, "failed to stat `%s'", cvs_tmpdir);
                   exit(1);
           } else if (!S_ISDIR(st.st_mode)) {
                   cvs_log(LP_ERR, "`%s' is not valid temporary directory",
                       cvs_tmpdir);
                   exit(1);
           }
   
         if (cvs_readrc == 1) {          if (cvs_readrc == 1) {
                 cvs_read_rcfile();                  cvs_read_rcfile();
   
Line 250 
Line 271 
         int ret;          int ret;
         char *ep;          char *ep;
   
         while ((ret = getopt(argc, argv, "b:d:e:fHlnQqrs:tvz:")) != -1) {          while ((ret = getopt(argc, argv, "b:d:e:fHlnQqrs:T:tvz:")) != -1) {
                 switch (ret) {                  switch (ret) {
                 case 'b':                  case 'b':
                         /*                          /*
Line 295 
Line 316 
                         *(ep++) = '\0';                          *(ep++) = '\0';
                         if (cvs_var_set(optarg, ep) < 0)                          if (cvs_var_set(optarg, ep) < 0)
                                 exit(1);                                  exit(1);
                           break;
                   case 'T':
                           cvs_tmpdir = optarg;
                         break;                          break;
                 case 't':                  case 't':
                         (void)cvs_log_filter(LP_FILTER_UNSET, LP_TRACE);                          (void)cvs_log_filter(LP_FILTER_UNSET, LP_TRACE);

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.80