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

Diff for /src/usr.bin/sdiff/sdiff.c between version 1.5 and 1.6

version 1.5, 2005/12/27 04:31:06 version 1.6, 2005/12/27 04:33:31
Line 111 
Line 111 
          */           */
         argc_max = argc * 2;          argc_max = argc * 2;
         if (!(diffargv = malloc(sizeof(char **) * argc_max)))          if (!(diffargv = malloc(sizeof(char **) * argc_max)))
                 err(2, "out of memory");                  err(2, "main");
   
         /* Add first argument, the program name. */          /* Add first argument, the program name. */
         diffargv[diffargc++] = diffprog;          diffargv[diffargc++] = diffprog;
Line 679 
Line 679 
         struct diffline *diffp;          struct diffline *diffp;
   
         if (!(diffp = malloc(sizeof(struct diffline))))          if (!(diffp = malloc(sizeof(struct diffline))))
                 err(2, "could not allocate memory");                  err(2, "enqueue");
         diffp->left = left;          diffp->left = left;
         diffp->div = div;          diffp->div = div;
         diffp->right = right;          diffp->right = right;
Line 730 
Line 730 
          */           */
         if (!*s) {          if (!*s) {
                 if (!(*s = strdup(append)))                  if (!(*s = strdup(append)))
                         err(2, "could not allocate memory");                          err(2, "astrcat");
   
                 /* Keep track of string. */                  /* Keep track of string. */
                 offset = strlen(*s);                  offset = strlen(*s);
Line 764 
Line 764 
         /* Resize *s to fit new string. */          /* Resize *s to fit new string. */
         newstr = realloc(*s, newlen);          newstr = realloc(*s, newlen);
         if (newstr == NULL)          if (newstr == NULL)
                 err(2, "could not allocate memory");                  err(2, "astrcat");
         *s = newstr;          *s = newstr;
   
         /* Concatenate. */          /* Concatenate. */
Line 949 
Line 949 
   
                 /* Add to delete queue. */                  /* Add to delete queue. */
                 if (!(linep = malloc(sizeof(struct fileline))))                  if (!(linep = malloc(sizeof(struct fileline))))
                         err(2, "could not allocate memory");                          err(2, "printc");
                 linep->line = line1;                  linep->line = line1;
                 SIMPLEQ_INSERT_TAIL(&delqhead, linep, fileentries);                  SIMPLEQ_INSERT_TAIL(&delqhead, linep, fileentries);
         }          }

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