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

Diff for /src/usr.bin/patch/inp.c between version 1.12 and 1.13

version 1.12, 2003/07/21 14:00:41 version 1.13, 2003/07/21 14:30:31
Line 170 
Line 170 
                 out_of_mem = FALSE;                  out_of_mem = FALSE;
                 return FALSE;   /* force plan b because plan a bombed */                  return FALSE;   /* force plan b because plan a bombed */
         }          }
 #ifdef lint          i_womp = malloc(i_size + 2);
         i_womp = Nullch;  
 #else  
         i_womp = malloc((MEM) (i_size + 2));    /* lint says this may alloc  
                                                  * less than */  
         /* i_size, but that's okay, I think. */  
 #endif  
         if (i_womp == Nullch)          if (i_womp == Nullch)
                 return FALSE;                  return FALSE;
         if ((ifd = open(filename, O_RDONLY)) < 0)          if ((ifd = open(filename, O_RDONLY)) < 0)
Line 203 
Line 197 
 #ifdef lint  #ifdef lint
         i_ptr = Null(char **);          i_ptr = Null(char **);
 #else  #else
         i_ptr = (char **) malloc((MEM) ((iline + 2) * sizeof(char *)));          i_ptr = (char **) malloc((iline + 2) * sizeof(char *));
 #endif  #endif
         if (i_ptr == Null(char **)) {   /* shucks, it was a near thing */          if (i_ptr == Null(char **)) {   /* shucks, it was a near thing */
                 free((char *) i_womp);                  free((char *) i_womp);
Line 293 
Line 287 
         fseek(ifp, 0L, 0);      /* rewind file */          fseek(ifp, 0L, 0);      /* rewind file */
         lines_per_buf = BUFFERSIZE / maxlen;          lines_per_buf = BUFFERSIZE / maxlen;
         tireclen = maxlen;          tireclen = maxlen;
         tibuf[0] = malloc((MEM) (BUFFERSIZE + 1));          tibuf[0] = malloc(BUFFERSIZE + 1);
         if (tibuf[0] == Nullch)          if (tibuf[0] == Nullch)
                 fatal("out of memory\n");                  fatal("out of memory\n");
         tibuf[1] = malloc((MEM) (BUFFERSIZE + 1));          tibuf[1] = malloc(BUFFERSIZE + 1);
         if (tibuf[1] == Nullch)          if (tibuf[1] == Nullch)
                 fatal("out of memory\n");                  fatal("out of memory\n");
         for (i = 1;; i++) {          for (i = 1;; i++) {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13