[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.48 and 1.49

version 1.48, 2005/04/06 16:35:25 version 1.49, 2005/04/11 17:56:27
Line 82 
Line 82 
  *   *
  * Command handlers are expected to return 0 if no error occurred, or one of   * Command handlers are expected to return 0 if no error occurred, or one of
  * the values known in sysexits.h in case of an error.  In case the error   * the values known in sysexits.h in case of an error.  In case the error
  * returned is EX_USAGE, the command's usage string is printed to standard   * returned is 1, the command's usage string is printed to standard
  * error before returning.   * error before returning.
  */   */
 struct cvs_cmd cvs_cdt[] = {  struct cvs_cmd cvs_cdt[] = {
Line 354 
Line 354 
         argv += ret;          argv += ret;
         if (argc == 0) {          if (argc == 0) {
                 usage();                  usage();
                 exit(EX_USAGE);                  exit(1);
         }          }
         cvs_command = argv[0];          cvs_command = argv[0];
   
Line 393 
Line 393 
                 for (i = 0; i < (int)CVS_NBCMD; i++)                  for (i = 0; i < (int)CVS_NBCMD; i++)
                         fprintf(stderr, "\t%-16s%s\n",                          fprintf(stderr, "\t%-16s%s\n",
                             cvs_cdt[i].cmd_name, cvs_cdt[i].cmd_descr);                              cvs_cdt[i].cmd_name, cvs_cdt[i].cmd_descr);
                 exit(EX_USAGE);                  exit(1);
         }          }
   
         if (cmdp->cmd_info == NULL) {          if (cmdp->cmd_info == NULL) {
Line 422 
Line 422 
                 cmd_argv[cmd_argc++] = argv[ret];                  cmd_argv[cmd_argc++] = argv[ret];
   
         ret = cvs_startcmd(cmdp, cmd_argc, cmd_argv);          ret = cvs_startcmd(cmdp, cmd_argc, cmd_argv);
         if (ret == EX_USAGE) {          if (ret == 1) {
                 fprintf(stderr, "Usage: %s %s %s\n", __progname, cvs_command,                  fprintf(stderr, "Usage: %s %s %s\n", __progname, cvs_command,
                     cmdp->cmd_synopsis);                      cmdp->cmd_synopsis);
         }          }
Line 485 
Line 485 
                         ep = strchr(optarg, '=');                          ep = strchr(optarg, '=');
                         if (ep == NULL) {                          if (ep == NULL) {
                                 cvs_log(LP_ERR, "no = in variable assignment");                                  cvs_log(LP_ERR, "no = in variable assignment");
                                 exit(EX_USAGE);                                  exit(1);
                         }                          }
                         *(ep++) = '\0';                          *(ep++) = '\0';
                         if (cvs_var_set(optarg, ep) < 0)                          if (cvs_var_set(optarg, ep) < 0)
                                 exit(EX_USAGE);                                  exit(1);
                         break;                          break;
                 case 't':                  case 't':
                         (void)cvs_log_filter(LP_FILTER_UNSET, LP_TRACE);                          (void)cvs_log_filter(LP_FILTER_UNSET, LP_TRACE);
Line 515 
Line 515 
                         break;                          break;
                 default:                  default:
                         usage();                          usage();
                         exit(EX_USAGE);                          exit(1);
                 }                  }
         }          }
   

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49