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

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

version 1.31, 2006/04/05 01:38:56 version 1.32, 2006/05/27 03:30:31
Line 30 
Line 30 
 #include "log.h"  #include "log.h"
 #include "proto.h"  #include "proto.h"
   
   
 extern char *cvs_rootstr;  extern char *cvs_rootstr;
   
   
 /* keep these ordered with the defines */  /* keep these ordered with the defines */
 const char *cvs_methods[] = {  const char *cvs_methods[] = {
         "",          "",
Line 126 
Line 124 
                 fatal("no path specification in CVSROOT");                  fatal("no path specification in CVSROOT");
   
         root->cr_dir = sp;          root->cr_dir = sp;
           STRIP_SLASH(root->cr_dir);
         if (sp == cp) {          if (sp == cp) {
                 if (root->cr_method == CVS_METHOD_NONE)                  if (root->cr_method == CVS_METHOD_NONE)
                         root->cr_method = CVS_METHOD_LOCAL;                          root->cr_method = CVS_METHOD_LOCAL;
Line 249 
Line 248 
                         if ((rootstr = getenv("CVSROOT")) != NULL)                          if ((rootstr = getenv("CVSROOT")) != NULL)
                                 return cvsroot_parse(rootstr);                                  return cvsroot_parse(rootstr);
                         else                          else
                                 fatal("cvsroot_get: empty CVSROOT variable");                                  return (NULL);
                 } else {                  } else {
                         fatal("cvsroot_get: fopen: `%s': %s",                          fatal("cvsroot_get: fopen: `%s': %s",
                             CVS_PATH_ROOTSPEC, strerror(errno));                              CVS_PATH_ROOTSPEC, strerror(errno));
Line 263 
Line 262 
   
         len = strlen(line);          len = strlen(line);
         if (len == 0)          if (len == 0)
                 cvs_log(LP_WARN, "empty %s file", CVS_PATH_ROOTSPEC);                  cvs_log(LP_ERR, "empty %s file", CVS_PATH_ROOTSPEC);
         else if (line[len - 1] == '\n')          else if (line[len - 1] == '\n')
                 line[--len] = '\0';                  line[--len] = '\0';
   

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