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

Diff for /src/usr.bin/cvs/rcs.c between version 1.166 and 1.167

version 1.166, 2006/04/13 19:55:41 version 1.167, 2006/04/13 23:41:13
Line 234 
Line 234 
 int rcs_errno = RCS_ERR_NOERR;  int rcs_errno = RCS_ERR_NOERR;
 char *timezone_flag = NULL;  char *timezone_flag = NULL;
   
 static int      rcs_parse_init(RCSFILE *);  static void     rcs_parse_init(RCSFILE *);
 static int      rcs_parse_admin(RCSFILE *);  static int      rcs_parse_admin(RCSFILE *);
 static int      rcs_parse_delta(RCSFILE *);  static int      rcs_parse_delta(RCSFILE *);
 static void     rcs_parse_deltas(RCSFILE *, RCSNUM *);  static void     rcs_parse_deltas(RCSFILE *, RCSNUM *);
Line 312 
Line 312 
         TAILQ_INIT(&(rfp->rf_symbols));          TAILQ_INIT(&(rfp->rf_symbols));
         TAILQ_INIT(&(rfp->rf_locks));          TAILQ_INIT(&(rfp->rf_locks));
   
         if (!(rfp->rf_flags & RCS_CREATE)          if (!(rfp->rf_flags & RCS_CREATE))
             && (rcs_parse_init(rfp) < 0)) {                  rcs_parse_init(rfp);
                 rcs_close(rfp);  
                 return (NULL);  
         }  
   
         /* fill in rd_locker */          /* fill in rd_locker */
         TAILQ_FOREACH(lkr, &(rfp->rf_locks), rl_list) {          TAILQ_FOREACH(lkr, &(rfp->rf_locks), rl_list) {
Line 637 
Line 634 
 int  int
 rcs_head_set(RCSFILE *file, RCSNUM *rev)  rcs_head_set(RCSFILE *file, RCSNUM *rev)
 {  {
         struct rcs_delta *rd;          if (rcs_findrev(file, rev) == NULL)
   
         if ((rd = rcs_findrev(file, rev)) == NULL)  
                 return (-1);                  return (-1);
   
         if (file->rf_head == NULL)          if (file->rf_head == NULL)
Line 1752 
Line 1747 
  * rcs_parse_init()   * rcs_parse_init()
  *   *
  * Initial parsing of file <path>, which are in the RCS format.   * Initial parsing of file <path>, which are in the RCS format.
  * Just does admin section   * Just does admin section.
  * Returns 0 on success, or -1 on failure.  
  */   */
 static int  static void
 rcs_parse_init(RCSFILE *rfp)  rcs_parse_init(RCSFILE *rfp)
 {  {
         int ret, count;  
         struct rcs_pdata *pdp;          struct rcs_pdata *pdp;
   
         count = 0;  
         if (rfp->rf_flags & RCS_PARSED)          if (rfp->rf_flags & RCS_PARSED)
                 return (0);                  return;
   
         pdp = xcalloc(1, sizeof(*pdp));          pdp = xcalloc(1, sizeof(*pdp));
   
Line 1781 
Line 1773 
         rfp->rf_flags &= ~RCS_SLOCK;          rfp->rf_flags &= ~RCS_SLOCK;
         rfp->rf_pdata = pdp;          rfp->rf_pdata = pdp;
   
         if ((ret = rcs_parse_admin(rfp)) < 0) {          if (rcs_parse_admin(rfp) < 0) {
                 rcs_freepdata(pdp);                  rcs_freepdata(pdp);
                 fatal("could not parse admin data");                  fatal("could not parse admin data");
         }          }
Line 1790 
Line 1782 
                 rcs_parse_deltatexts(rfp, NULL);                  rcs_parse_deltatexts(rfp, NULL);
   
         rfp->rf_flags |= RCS_SYNCED;          rfp->rf_flags |= RCS_SYNCED;
         return (0);  
 }  }
   
 /*  /*

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167