[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.6 and 1.7

version 1.6, 2004/07/14 19:40:10 version 1.7, 2004/07/14 20:07:28
Line 107 
Line 107 
 static int  rcs_parse_delta     (RCSFILE *);  static int  rcs_parse_delta     (RCSFILE *);
 static int  rcs_parse_deltatext (RCSFILE *);  static int  rcs_parse_deltatext (RCSFILE *);
   
 static int      rcs_parse_access      (RCSFILE *);  static int      rcs_parse_access    (RCSFILE *);
 static int      rcs_parse_symbols     (RCSFILE *);  static int      rcs_parse_symbols   (RCSFILE *);
 static int      rcs_parse_locks       (RCSFILE *);  static int      rcs_parse_locks     (RCSFILE *);
 static int      rcs_parse_branches    (RCSFILE *, struct rcs_delta *);  static int      rcs_parse_branches  (RCSFILE *, struct rcs_delta *);
 static void     rcs_freedelta         (struct rcs_delta *);  static void     rcs_freedelta       (struct rcs_delta *);
 static void     rcs_freepdata         (struct rcs_pdata *);  static void     rcs_freepdata       (struct rcs_pdata *);
 static int      rcs_gettok            (RCSFILE *);  static int      rcs_gettok          (RCSFILE *);
 static int      rcs_pushtok           (RCSFILE *, const char *, int);  static int      rcs_pushtok         (RCSFILE *, const char *, int);
 int rcs_patch_lines(struct rcs_foo *, struct rcs_foo *);  static int      rcs_patch_lines     (struct rcs_foo *, struct rcs_foo *);
   
 static struct rcs_delta*  rcs_findrev (RCSFILE *, RCSNUM *);  static struct rcs_delta*  rcs_findrev    (RCSFILE *, RCSNUM *);
 static struct rcs_foo* rcs_splitlines (const char *);  static struct rcs_foo*    rcs_splitlines (const char *);
 static void rcs_freefoo(struct rcs_foo *);  static void               rcs_freefoo    (struct rcs_foo *);
   
 #define RCS_TOKSTR(rfp)   ((struct rcs_pdata *)rfp->rf_pdata)->rp_buf  #define RCS_TOKSTR(rfp)   ((struct rcs_pdata *)rfp->rf_pdata)->rp_buf
 #define RCS_TOKLEN(rfp)   ((struct rcs_pdata *)rfp->rf_pdata)->rp_blen  #define RCS_TOKLEN(rfp)   ((struct rcs_pdata *)rfp->rf_pdata)->rp_blen
Line 263 
Line 263 
 rcs_write(RCSFILE *rfp)  rcs_write(RCSFILE *rfp)
 {  {
         FILE *fp;          FILE *fp;
         char buf[128], numbuf[64];          char buf[1024], numbuf[64], *cp;
           size_t rlen, len;
         struct rcs_sym *symp;          struct rcs_sym *symp;
         struct rcs_lock *lkp;          struct rcs_lock *lkp;
         struct rcs_delta *rdp;          struct rcs_delta *rdp;
Line 326 
Line 327 
         TAILQ_FOREACH(rdp, &(rfp->rf_delta), rd_list) {          TAILQ_FOREACH(rdp, &(rfp->rf_delta), rd_list) {
                 fprintf(fp, "\n%s\n", rcsnum_tostr(rdp->rd_num, numbuf,                  fprintf(fp, "\n%s\n", rcsnum_tostr(rdp->rd_num, numbuf,
                     sizeof(numbuf)));                      sizeof(numbuf)));
                 fprintf(fp, "log\n@%s@\n", rdp->rd_log);                  fprintf(fp, "log\n@%s@\ntext\n@", rdp->rd_log);
                 fprintf(fp, "text\n@%s@\n\n", rdp->rd_text);  
                   cp = rdp->rd_text;
                   do {
                           len = sizeof(buf);
                           rlen = rcs_stresc(1, cp, buf, &len);
                           fprintf(fp, "%s", buf);
                           cp += rlen;
                   } while (len != 0);
                   fprintf(fp, "@\n\n");
         }          }
         fclose(fp);          fclose(fp);
   
Line 426 
Line 435 
         return (res);          return (res);
 }  }
   
 int  static int
 rcs_patch_lines(struct rcs_foo *dlines, struct rcs_foo *plines)  rcs_patch_lines(struct rcs_foo *dlines, struct rcs_foo *plines)
 {  {
         char op, *ep;          char op, *ep;
Line 1487 
Line 1496 
         size_t rlen;          size_t rlen;
         const char *sp;          const char *sp;
         char *bp, *bep;          char *bp, *bep;
   
         if (!esc)  
                 printf("unescaping `%s'\n", str);  
   
         rlen = 0;          rlen = 0;
         bp = buf;          bp = buf;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7