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

Diff for /src/usr.bin/cvs/file.c between version 1.126 and 1.127

version 1.126, 2005/10/27 00:24:24 version 1.127, 2005/11/12 21:34:48
Line 42 
Line 42 
 #include "cvs.h"  #include "cvs.h"
 #include "file.h"  #include "file.h"
 #include "log.h"  #include "log.h"
 #include "strtab.h"  
   
 #define CVS_IGN_STATIC  0x01    /* pattern is static, no need to glob */  #define CVS_IGN_STATIC  0x01    /* pattern is static, no need to glob */
   
Line 1031 
Line 1030 
         CVSFILE *child;          CVSFILE *child;
   
         if (cf->cf_name != NULL)          if (cf->cf_name != NULL)
                 cvs_strfree(cf->cf_name);                  free(cf->cf_name);
   
         if (cf->cf_dir != NULL)          if (cf->cf_dir != NULL)
                 cvs_strfree(cf->cf_dir);                  free(cf->cf_dir);
   
         if (cf->cf_type == DT_DIR) {          if (cf->cf_type == DT_DIR) {
                 if (cf->cf_root != NULL)                  if (cf->cf_root != NULL)
Line 1048 
Line 1047 
                 }                  }
         } else {          } else {
                 if (cf->cf_tag != NULL)                  if (cf->cf_tag != NULL)
                         cvs_strfree(cf->cf_tag);                          free(cf->cf_tag);
                 if (cf->cf_opts != NULL)                  if (cf->cf_opts != NULL)
                         cvs_strfree(cf->cf_opts);                          free(cf->cf_opts);
         }          }
   
         free(cf);          free(cf);
Line 1162 
Line 1161 
                 SIMPLEQ_INIT(&(cfp->cf_files));                  SIMPLEQ_INIT(&(cfp->cf_files));
         }          }
   
         cfp->cf_name = cvs_strdup(basename(path));          cfp->cf_name = strdup(basename(path));
         if (cfp->cf_name == NULL) {          if (cfp->cf_name == NULL) {
                 cvs_log(LP_ERR, "failed to copy file name");                  cvs_log(LP_ERR, "failed to copy file name");
                 cvs_file_free(cfp);                  cvs_file_free(cfp);
Line 1172 
Line 1171 
         if ((p = strrchr(path, '/')) != NULL) {          if ((p = strrchr(path, '/')) != NULL) {
                 *p = '\0';                  *p = '\0';
                 if (strcmp(path, ".")) {                  if (strcmp(path, ".")) {
                         cfp->cf_dir = cvs_strdup(path);                          cfp->cf_dir = strdup(path);
                         if (cfp->cf_dir == NULL) {                          if (cfp->cf_dir == NULL) {
                                 cvs_log(LP_ERR,                                  cvs_log(LP_ERR,
                                     "failed to copy directory");                                      "failed to copy directory");
Line 1277 
Line 1276 
   
                 if (ent->ce_type == CVS_ENT_FILE) {                  if (ent->ce_type == CVS_ENT_FILE) {
                         if (ent->ce_tag[0] != '\0') {                          if (ent->ce_tag[0] != '\0') {
                                 cfp->cf_tag = cvs_strdup(ent->ce_tag);                                  cfp->cf_tag = strdup(ent->ce_tag);
                                 if (cfp->cf_tag == NULL) {                                  if (cfp->cf_tag == NULL) {
                                         cvs_file_free(cfp);                                          cvs_file_free(cfp);
                                         return (NULL);                                          return (NULL);
Line 1285 
Line 1284 
                         }                          }
   
                         if (ent->ce_opts[0] != '\0') {                          if (ent->ce_opts[0] != '\0') {
                                 cfp->cf_opts = cvs_strdup(ent->ce_opts);                                  cfp->cf_opts = strdup(ent->ce_opts);
                                 if (cfp->cf_opts == NULL) {                                  if (cfp->cf_opts == NULL) {
                                         cvs_file_free(cfp);                                          cvs_file_free(cfp);
                                         return (NULL);                                          return (NULL);

Legend:
Removed from v.1.126  
changed lines
  Added in v.1.127