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

Diff for /src/usr.bin/cvs/entries.c between version 1.55 and 1.56

version 1.55, 2006/04/05 01:38:55 version 1.56, 2006/04/14 02:45:35
Line 68 
Line 68 
         if (len >= sizeof(cdpath))          if (len >= sizeof(cdpath))
                 return (NULL);                  return (NULL);
   
         if ((stat(cdpath, &st) == 0) && S_ISDIR(st.st_mode))          if (stat(cdpath, &st) == 0 && S_ISDIR(st.st_mode))
                 nodir = 0;      /* the CVS/ directory does exist */                  nodir = 0;      /* the CVS/ directory does exist */
   
         len = cvs_path_cat(dir, CVS_PATH_BACKUPENTRIES, bpath, sizeof(bpath));          len = cvs_path_cat(dir, CVS_PATH_BACKUPENTRIES, bpath, sizeof(bpath));
Line 114 
Line 114 
   
         while (fgets(ebuf, (int)sizeof(ebuf), fp) != NULL) {          while (fgets(ebuf, (int)sizeof(ebuf), fp) != NULL) {
                 len = strlen(ebuf);                  len = strlen(ebuf);
                 if ((len > 0) && (ebuf[len - 1] == '\n'))                  if (len > 0 && ebuf[len - 1] == '\n')
                         ebuf[--len] = '\0';                          ebuf[--len] = '\0';
                 if ((ebuf[0] == 'D') && (ebuf[1] == '\0'))                  if (ebuf[0] == 'D' && ebuf[1] == '\0')
                         break;                          break;
                 ent = cvs_ent_parse(ebuf);                  ent = cvs_ent_parse(ebuf);
                 if (ent == NULL)                  if (ent == NULL)
Line 152 
Line 152 
         if (fp != NULL) {          if (fp != NULL) {
                 while (fgets(ebuf, (int)sizeof(ebuf), fp) != NULL) {                  while (fgets(ebuf, (int)sizeof(ebuf), fp) != NULL) {
                         len = strlen(ebuf);                          len = strlen(ebuf);
                         if ((len > 0) && (ebuf[len - 1] == '\n'))                          if (len > 0 && ebuf[len - 1] == '\n')
                                 ebuf[--len] = '\0';                                  ebuf[--len] = '\0';
   
                         p = &ebuf[2];                          p = &ebuf[2];
Line 191 
Line 191 
 {  {
         struct cvs_ent *ent;          struct cvs_ent *ent;
   
         if ((cvs_noexec == 0) && (ep->cef_flags & CVS_ENTF_WR) &&          if (cvs_noexec == 0 && (ep->cef_flags & CVS_ENTF_WR) &&
             !(ep->cef_flags & CVS_ENTF_SYNC)) {              !(ep->cef_flags & CVS_ENTF_SYNC)) {
                 /* implicit sync with disk */                  /* implicit sync with disk */
                 (void)cvs_ent_write(ep);                  (void)cvs_ent_write(ep);
Line 372 
Line 372 
                         *(dp++) = '\0';                          *(dp++) = '\0';
                 fields[i++] = sp;                  fields[i++] = sp;
                 sp = dp;                  sp = dp;
         } while ((dp != NULL) && (i < CVS_ENTRIES_NFIELDS));          } while (dp != NULL && i < CVS_ENTRIES_NFIELDS);
   
         if (i < CVS_ENTRIES_NFIELDS) {          if (i < CVS_ENTRIES_NFIELDS) {
                 cvs_log(LP_ERR, "missing fields in entry line `%s'", entry);                  cvs_log(LP_ERR, "missing fields in entry line `%s'", entry);
Line 399 
Line 399 
                         sp = fields[2] + 1;                          sp = fields[2] + 1;
                 } else {                  } else {
                         sp = fields[2];                          sp = fields[2];
                         if ((fields[2][0] == '0') && (fields[2][1] == '\0'))                          if (fields[2][0] == '0' && fields[2][1] == '\0')
                                 ent->ce_status = CVS_ENT_ADDED;                                  ent->ce_status = CVS_ENT_ADDED;
                 }                  }
   
Line 412 
Line 412 
                         if (!strcmp(fields[3], "up to date"))                          if (!strcmp(fields[3], "up to date"))
                                 ent->ce_status = CVS_ENT_UPTODATE;                                  ent->ce_status = CVS_ENT_UPTODATE;
                 } else {                  } else {
                         if ((strcmp(fields[3], CVS_DATE_DUMMY) == 0) ||                          if (strcmp(fields[3], CVS_DATE_DUMMY) == 0 ||
                             (strncmp(fields[3], "Initial ", 8) == 0))                              strncmp(fields[3], "Initial ", 8) == 0)
                                 ent->ce_mtime = CVS_DATE_DMSEC;                                  ent->ce_mtime = CVS_DATE_DMSEC;
                         else                          else
                                 ent->ce_mtime = cvs_date_parse(fields[3]);                                  ent->ce_mtime = cvs_date_parse(fields[3]);
Line 469 
Line 469 
                         revbuf[0] = '\0';                          revbuf[0] = '\0';
                 } else {                  } else {
                         rcsnum_tostr(ent->ce_rev, revbuf, sizeof(revbuf));                          rcsnum_tostr(ent->ce_rev, revbuf, sizeof(revbuf));
                         if ((ent->ce_mtime == CVS_DATE_DMSEC) &&                          if (ent->ce_mtime == CVS_DATE_DMSEC &&
                             (ent->ce_status != CVS_ENT_ADDED))                              ent->ce_status != CVS_ENT_ADDED)
                                 strlcpy(timebuf, CVS_DATE_DUMMY,                                  strlcpy(timebuf, CVS_DATE_DUMMY,
                                     sizeof(timebuf));                                      sizeof(timebuf));
                         else if (ent->ce_status == CVS_ENT_ADDED) {                          else if (ent->ce_status == CVS_ENT_ADDED) {
Line 479 
Line 479 
                         } else {                          } else {
                                 ctime_r(&(ent->ce_mtime), timebuf);                                  ctime_r(&(ent->ce_mtime), timebuf);
                                 len = strlen(timebuf);                                  len = strlen(timebuf);
                                 if ((len > 0) && (timebuf[len - 1] == '\n'))                                  if (len > 0 && timebuf[len - 1] == '\n')
                                         timebuf[--len] = '\0';                                          timebuf[--len] = '\0';
                         }                          }
                 }                  }

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56