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

Diff for /src/usr.bin/cvs/util.c between version 1.151 and 1.152

version 1.151, 2009/03/24 06:59:19 version 1.152, 2010/07/23 21:46:05
Line 685 
Line 685 
 /*  /*
  * Split the contents of a file into a list of lines.   * Split the contents of a file into a list of lines.
  */   */
 struct cvs_lines *  struct rcs_lines *
 cvs_splitlines(u_char *data, size_t len)  cvs_splitlines(u_char *data, size_t len)
 {  {
         u_char *p, *c;          u_char *p, *c;
         size_t i, tlen;          size_t i, tlen;
         struct cvs_lines *lines;          struct rcs_lines *lines;
         struct cvs_line *lp;          struct rcs_line *lp;
   
         lines = xcalloc(1, sizeof(*lines));          lines = xcalloc(1, sizeof(*lines));
         TAILQ_INIT(&(lines->l_lines));          TAILQ_INIT(&(lines->l_lines));
Line 717 
Line 717 
 }  }
   
 void  void
 cvs_freelines(struct cvs_lines *lines)  cvs_freelines(struct rcs_lines *lines)
 {  {
         struct cvs_line *lp;          struct rcs_line *lp;
   
         while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) {          while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) {
                 TAILQ_REMOVE(&(lines->l_lines), lp, l_list);                  TAILQ_REMOVE(&(lines->l_lines), lp, l_list);

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152